
/* ============================================
   CONTACT MODAL — design aligné avec le site
   ============================================ */

/* Overlay backdrop */
.contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 28, 46, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal */
#contact {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(0.97);

  width: min(640px, calc(100vw - 2rem));
  /* svh = « small viewport height » : la modal ne dépasse jamais la zone
     réellement visible, même quand la barre d'adresse mobile est déployée. */
  max-height: calc(100svh - 4rem);

  background: var(--cream);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow:
    0 32px 64px -12px rgba(23, 28, 46, 0.22),
    0 0 0 1px rgba(255, 247, 240, 0.12);

  padding: 2.5rem;
  overflow-y: auto;

  z-index: 950;
  opacity: 0;
  pointer-events: none;

  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity  0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header du modal */
.contact-header {
  position: relative;
  margin-bottom: 0.6rem;
  text-align: left;
}

/* Bouton fermer */
.contact-close {
  position: absolute;
  top: -0.75rem;
  right: -1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 247, 240, 0.9);
  border: 1px solid var(--border);
  color: var(--body);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
              transform 0.22s ease, box-shadow 0.18s ease;
  box-shadow: var(--shadow);
  z-index: 10;
}
.contact-close:hover {
  background: var(--orange-light);
  border-color: var(--border-orange);
  color: var(--brown);
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 169, 89, 0.2);
}
.contact-close svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* États actifs */
body.contact-focus {
  overflow: hidden;
  overscroll-behavior: none;
}
body.contact-focus .contact-overlay {
  opacity: 1;
  pointer-events: auto;
}
body.contact-focus #contact {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
body.contact-focus main {
  transform: scale(0.985);
  filter: blur(2px);
  opacity: 0.55;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Layout interne (max-width géré par #contact) */
.contact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding-top: 0.5rem;
  text-align: left;
}

.contact-copy { width: 100%; }

.contact-copy h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--navy);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.contact-copy p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: var(--body);
  font-size: 15px;
}

/* Formulaire */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

/* Rangée Nom + Email côte à côte (desktop) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form label span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(23, 28, 46, 0.86);
  font-family: 'Inter', sans-serif;
}

.contact-form label span small {
  font-weight: 400;
  color: rgba(57, 64, 82, 0.55);
}

.contact-form input,
.contact-form textarea {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(23, 28, 46, 0.1);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(57, 64, 82, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 169, 89, 0.18);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

/* Bouton envoyer — CTA orange canonique du site (cf. .btn-submit) */
.btn-contact {
  background: var(--orange);
  color: var(--navy);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 1.6rem;
  height: 46px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 12px rgba(255, 169, 89, 0.2);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
  flex-shrink: 0;
}

/* Note de statut à gauche, bouton à droite */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-contact:hover {
  background: #f0983c;
  box-shadow: 0 10px 16px rgba(255, 169, 89, 0.3);
  transform: translateY(-1px);
}
.btn-contact:active { transform: translateY(0); }
.btn-contact:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.form-note {
  font-size: 0.875rem;
  padding: 0.35rem 0;
  min-height: 1.5rem;
  color: var(--body);
}
.form-note.success { color: #2e7040; }
.form-note.error   { color: #b95e65; }

/* ── Mobile ── */
@media (max-width: 768px) {
  #contact {
    width: calc(100vw - 1rem);
    max-height: calc(100svh - 1rem);
    padding: 2.5rem 1.25rem 1.5rem;
    border-radius: 20px;
  }

  .contact { max-width: 100%; }

  .contact-close {
    top: -1.5rem !important;
    right: -0.5rem !important;
    width: 36px !important;
    height: 36px !important;
  }
  .contact-close svg {
    width: 16px !important;
    height: 16px !important;
  }

  .contact-copy h2 { font-size: 1.4rem; }

  .form-row { grid-template-columns: 1fr; }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px; /* évite le zoom iOS */
  }
  .contact-form textarea { min-height: 90px; }

  body.contact-focus {
    position: fixed;
    width: 100%;
    overflow: hidden;
  }
  body.contact-focus .contact-overlay {
    position: fixed;
  }
}

/* ── Très petits écrans ── */
@media (max-width: 480px) {
  #contact {
    width: calc(100vw - 0.5rem);
    padding: 2rem 1rem 1.25rem;
  }

  .contact-copy h2 { font-size: 1.2rem; }
  .contact-copy p  { font-size: 14px; }

  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .btn-contact { width: 100%; }
}

/* ── iPhone SE & petits Androids ── */
@media (max-width: 380px) {
  #contact { padding: 1.75rem 0.875rem 1rem; }
  .contact-copy h2 { font-size: 1.1rem; }
}

/* reduced-motion : géré globalement dans style.css */

/* Champ honeypot anti-bot, hors écran */
.visually-hidden { position: absolute; left: -10000px; width: 1px; height: 1px; }
