/* EX’SIE — page Contact : scène « La conversation » et états du formulaire.
   À plat : aplats, bordures fines, aucune ombre colorée, aucun dégradé. Seuls transform, opacity et filter bougent. */

/* =====================================================================
   Scène « La conversation » — classes préfixées cv-
   Les bulles s’échangent, puis prennent la forme de trois lignes numérotées.
   ===================================================================== */
.cv-bulle, .cv-carte, .cv-num, .cv-nom, .cv-temoin { position: absolute; left: 0; top: 0; }
.cv-bulle, .cv-carte, .cv-num { transform-origin: 0 0; opacity: 0; }

/* Les bulles : le visiteur (contour fin, à droite), EX’SIE (aplat d’encre, à gauche) */
.cv-bulle {
  display: grid; place-items: center; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line-fort); color: var(--ink);
  font-size: 16px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.cv-bulle.v { border-bottom-right-radius: 5px; }
.cv-bulle.e { border-bottom-left-radius: 5px; background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Les trois lignes : la forme que prennent les bulles */
.cv-carte { border-radius: 14px; background: var(--surface); border: 1px solid var(--line-fort); }
.cv-num {
  display: grid; place-items: center; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1;
}
.cv-nom { display: flex; align-items: center; opacity: 0; font-size: 21px; font-weight: 700; color: var(--ink); line-height: 1; white-space: nowrap; }

/* Le témoin : discret pendant l’échange, en aplat d’accent quand les trois points sont posés (temps fort) */
.cv-temoin {
  left: 50%; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 18px; border-radius: var(--r-pilule);
  background: var(--surface); border: 1px solid var(--line-fort); color: var(--muted);
  font-size: 13.5px; font-weight: 700; line-height: 1; white-space: nowrap; opacity: 0; transform: translateX(-50%);
}
.cv-temoin.juste { background: var(--accent-fonce); border-color: var(--accent-fonce); color: #fff; }
.cv-temoin.juste::before {
  content: ""; width: 11px; height: 6px; margin-top: -3px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg);
}

/* Petit écran : un échange à la fois, lignes compactes */
.cv-compact .cv-bulle { border-radius: 13px; font-size: 13.5px; }
.cv-compact .cv-bulle.v { border-bottom-right-radius: 4px; }
.cv-compact .cv-bulle.e { border-bottom-left-radius: 4px; }
.cv-compact .cv-carte { border-radius: 11px; }
.cv-compact .cv-num { border-radius: 8px; font-size: 12.5px; }
.cv-compact .cv-nom { font-size: 16px; }
.cv-compact .cv-temoin { height: 30px; padding: 0 14px; font-size: 12.5px; gap: 8px; }
/* Entre 600 et 900 px la zone est large : la scène y prend un peu plus de hauteur, donc d’échelle */
@media (min-width: 600px) and (max-width: 900px) { .conversation-scene { min-height: 420px; } }

/* =====================================================================
   Formulaire — états posés par scene-formulaire.js
   ===================================================================== */
.formulaire { position: relative; }

/* La ligne de message garde la même hauteur vide ou remplie : aucun saut quand une erreur apparaît */
/* Champ en erreur : le contour passe à l’ambre, le message est celui de .champ-msg (composants.css) */
.champ.est-erreur :is(input, textarea, .liste-bouton) { border-color: var(--ambre); }
/* Champ valide : la coche de composants.css ; le texte lui laisse la place */
.champ.est-valide :is(input, textarea) { padding-right: 46px; }

/* Case de consentement : son message vit sous elle, sur une ligne réservée (aucun saut de mise en page) */
.case.est-erreur .case-boite { border-color: var(--ambre); }
.case-msg { margin: -18px 0 -12px 36px; }

/* Message d’état, à côté du bouton */
.form-etat { flex: 1 1 15rem; min-width: 0; color: var(--ink); }
.form-etat[data-ton="erreur"] { color: var(--ambre-texte); }
.form-etat a { color: var(--accent-texte); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Le bouton se remplit : fond neutre, l’accent avance à mesure que les six points requis sont valides (--rempli : 0 → 1).
   Le texte reste blanc sur les deux fonds (AA) ; le bouton n’est jamais désactivé. */
.btn.f-envoi::before { background: var(--c-sombre); }
:root[data-theme="dark"] .btn.f-envoi::before { box-shadow: inset 0 0 0 1px var(--line-fort); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.f-envoi::before { box-shadow: inset 0 0 0 1px var(--line-fort); } }
.f-jauge {
  position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; pointer-events: none;
  transform-origin: left center; transition: transform var(--d-3) var(--c-elan);
}
.btn.f-envoi:is(:hover, :focus-visible) .f-jauge { transform: scaleX(1.05); } /* suit l’étirement du fond de .btn */
.f-jauge i {
  position: absolute; inset: 0; background: var(--accent-fonce);
  transform-origin: left center; transform: scaleX(var(--rempli, 0)); transition: transform var(--d-4) var(--c-elan);
}
.btn.f-envoi[aria-busy="true"] { justify-content: center; cursor: progress; }
.btn.f-envoi[aria-busy="true"] .fleche { opacity: 0; }

/* Envoi réussi : la feuille se plie en trois, devient une enveloppe qui part, et laisse la confirmation */
.formulaire.est-plie { background: transparent; border-color: transparent; }
.f-pli { position: absolute; inset: -1px; perspective: 1500px; pointer-events: none; }
.f-volet { position: absolute; left: 0; right: 0; height: 33.4%; background: var(--surface); border: 1px solid var(--line-fort); }
.f-volet b { position: absolute; inset: 0; border-radius: inherit; background: var(--surface-2); opacity: 0; } /* le verso du papier */
.f-volet.haut { top: 0; border-radius: var(--r-4) var(--r-4) 0 0; transform-origin: 50% 100%; }
.f-volet.milieu { top: 33.3%; }
.f-volet.bas { bottom: 0; border-radius: 0 0 var(--r-4) var(--r-4); transform-origin: 50% 0; }
.f-env {
  position: absolute; max-width: none; overflow: visible; opacity: 0; pointer-events: none;
  fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round;
}
.f-env .plis { fill: none; stroke: var(--line-fort); stroke-width: 2; }
.f-env .rabat { transform-origin: 100px 41px; transform: scaleY(-.6); }

.formulaire.est-envoye { min-height: 320px; align-content: center; }
.f-conf { display: grid; justify-items: start; gap: var(--e-4); }
.f-conf:focus { outline: none; } /* focus posé par le script pour l’annonce : ce n’est pas un contrôle */
.f-conf-env { width: 56px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.f-conf p { font-size: var(--t-chapo); color: var(--text); }
