/* --- Conteneur général --- */
.contactform {
  max-width: 600px;
  margin: 0 auto;
  font-family: system-ui, sans-serif;
}

/* --- Messages (invisibles sans occuper d'espace) --- */
.contactform #sendmessage,
.contactform #errormessage {
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  padding: 0 18px;

  /* Option 2 : invisible + ne prend pas de place */
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;

  transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease;
}

/* --- Message succès --- */
.contactform #sendmessage {
  background: #e8f4ff;
  border: 1px solid var(--accent);
  color: var(--accent-soft);
}

/* --- Message erreur --- */
.contactform #errormessage {
  background: #ffe8e8;
  border: 1px solid #d9534f;
  color: #d9534f;
}

/* --- État visible --- */
.contactform #sendmessage.show,
.contactform #errormessage.show {
  opacity: 1;
  padding: 14px 18px;
  max-height: 200px; /* assez pour contenir le message */
  margin-top: 20px;  /* espace visible uniquement quand affiché */
}

/* --- Champs --- */
.contactform .form-group {
  margin-bottom: 22px;
  position: relative;
}

.contactform input,
.contactform textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 15px;
  background: #fafafa;
  transition: all 0.25s ease;
  outline: none;
  resize: none;
}

.contactform input:focus,
.contactform textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 107, 168, 0.15);
}

/* --- Placeholder --- */
.contactform input::placeholder,
.contactform textarea::placeholder {
  color: #999;
  opacity: 0.8;
}

/* --- Validation --- */
.contactform .validation {
  color: #d9534f;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

/* --- Bouton --- */
.contactform button[type="submit"] {
  background: var(--accent);
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}

.contactform button[type="submit"]:hover {
  background: #1094e7;
  transform: translateY(-2px);
}

.contactform button[type="submit"]:active {
  transform: translateY(0);
}

/* --- Honeypot invisible --- */
.contactform #email_verif {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
}
