/* ============================================================================ 
   1. STRUCTURE GLOBALE
============================================================================ */

/* Page contact */
.contact-page {
  padding: 140px 20px 80px;
  min-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #ffffff;
  font-family: inherit;
  color: #222;
}

/* Section centrée */
.contact-section {
  width: 100%;
  max-width: 1180px;
}

/* Carte formulaire */
.contact-card {
  background: #FBF9F6;
  border-radius: 6px;
  padding: 40px;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

/* ============================================================================ 
   2. TITRE
============================================================================ */

.contact-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 30px;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================================ 
   3. FORMULAIRE
============================================================================ */

.contact-form {
  width: 100%;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Ligne à deux colonnes */
.contact-row {
  display: flex;
  gap: 22px;
  margin-bottom: 18px;
}

/* Champ */
.contact-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Champ pleine largeur */
.contact-field-full {
  margin-top: 10px;
}

/* Labels */
.contact-field label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

/* Inputs & textarea */
.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
}

/* Focus noir checkout */
.contact-field input:focus,
.contact-field textarea:focus {
  outline: 1px solid #000;
}

/* Désactive resize */
.contact-field textarea {
  resize: none;
}

/* ============================================================================ 
   4. BOUTON
============================================================================ */

.contact-actions {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.contact-button {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 14px 40px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  max-width: 260px;
  transition: background-color 0.3s ease;
}

.contact-button:hover {
  background: #333;
}

/* ============================================================================ 
   5. TEXTE OBLIGATOIRE
============================================================================ */

.contact-required {
  margin-top: 14px;
  font-size: 12px;
  font-style: italic;
  color: #666;
}

/* ============================================================================ 
   6. MESSAGE SUCCÈS / ERREUR — VERSION PREMIUM
============================================================================ */

/* Bloc conteneur pour centrer verticalement */
.contact-confirmation {
  width: 100%;
  height: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: height 0.5s ease, padding 0.5s ease;
  padding: 0;
}

.contact-confirmation.active {
  height: 200px; /* hauteur désirée */
  min-height: auto;
  padding: 20px 0; /* ajuster selon besoin */
  overflow: visible;
}

/* Base message succès / erreur */
.contact-success,
.contact-error {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  min-height: 140px;
  padding: 40px 60px;

  border-radius: 6px;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  max-width: 520px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(15px); /* léger slide */
  transition: opacity 0.5s ease, transform 0.5s ease;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* Succès */
.contact-success {
  background-color: #FBF9F6; /* fond beige luxe */
  border: 1px solid #222;
  color: #222;
}

/* Erreur */
.contact-error {
  background-color: #fff5f5;
  border: 1px solid #f0caca;
  color: #a94442;
}

/* Classe visible pour fade + slide */
.contact-success.is-visible,
.contact-error.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Transition pour la hauteur de la card */
.contact-card {
  transition: height 0.5s ease, padding 0.5s ease;
}
 

/* ============================================================================ 
   7. MESSAGE ERREUR TÉLÉPHONE
============================================================================ */

.contact-error-phone {
  display: none;
  font-size: 12px;
  color: #a94442;
  margin-top: 4px;
  font-style: italic;
}

/* ============================================================================ 
   8. INPUT TÉLÉPHONE — NETTOYAGE
============================================================================ */

.contact-field input[type="tel"],
.contact-field input[type="text"] {
  -moz-appearance: textfield;
}

.contact-field input::-webkit-inner-spin-button,
.contact-field input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ============================================================================ 
   9. RESPONSIVE
============================================================================ */

@media (max-width: 900px) {
  .contact-card {
    padding: 30px 20px;
  }

  .contact-row {
    flex-direction: column;
    gap: 16px;
  }

  .contact-button {
    max-width: 100%;
  }

  .contact-success,
  .contact-error {
    padding: 30px 20px;
    font-size: 14px;
    max-width: 100%;
  }
}
