/* ================================================
   CONTACT OVERLAY
   ================================================ */
.contact-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms cubic-bezier(.22,.9,.35,1);
  will-change: opacity;
}

/* Visibility classes (sandboxed — not from base.css) */
.contact-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.contact-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  z-index: 9999;
}

/* ================================================
   CONTACT CARD
   ================================================ */
.contact-card {
  background: rgba(0,0,0,0.75);
  padding: 32px 40px 32px; /* au lieu de 32px 40px 40px */
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  transform: translate3d(0, 18px, 0) scale(0.995);
  opacity: 0;
  will-change: transform, opacity;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backface-visibility: hidden;
  transform-origin: center;
  transition:
    transform 380ms cubic-bezier(.22,.9,.35,1),
    opacity 380ms cubic-bezier(.22,.9,.35,1);
}

.contact-overlay.visible .contact-card {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

/* ================================================
   TITRE
   ================================================ */
.contact-card h3 {
  width: 100%;
  text-align: center;
  margin-bottom: 28px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

/* ================================================
   CONTACT CONTENT
   ================================================ */
.contact-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  /* Repère pour le formulaire une fois masqué, qui sort du flux ci-dessous. */
  position: relative;
}

/* ================================================
   FORM + MERCI PANELS
   ================================================ */
#form-fields {
  width: 100%;
  opacity: 1;
  pointer-events: auto;
}

#form-fields.hidden {
  opacity: 0;
  pointer-events: none;
  /* Sorti du flux, sans quoi il continue d'occuper toute sa hauteur : le
     message de confirmation se retrouvait alors repoussé tout en bas de la
     carte, séparé du titre par le vide du formulaire devenu invisible.

     `position: absolute` plutôt que `display: none` pour que le fondu de
     sortie ait le temps de se jouer — un élément en `display: none` disparaît
     instantanément, sans transition. */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

#form-fields.visible {
  opacity: 1;
  pointer-events: auto;
}

#merci-block {
  width: 100%;
  opacity: 0;
  pointer-events: none;
}

#merci-block.hidden {
  opacity: 0;
  pointer-events: none;
}

#merci-block.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ================================================
   INPUTS
   ================================================ */
.contact-card input,
.contact-card textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 14px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
}

.contact-card textarea {
  height: 120px;
  resize: none;
}

/* ================================================
   BUTTON
   ================================================ */
.send-btn {
  width: 100%;
  height: 48px;
  margin-top: 16px;
  background: #d87a3c;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.25s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.send-btn:hover {
  opacity: 0.85;
}

.send-btn.loading .btn-text {
  opacity: 0;
  position: absolute;
}

.send-btn .loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.send-btn.loading .loader {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Honeypot anti-spam : invisible pour l'humain, rempli par les bots.
   Ni display:none ni hidden — certains bots les ignorent. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
