/*
 * Styles du tunnel. Un seul fichier, aucune dependance, aucune ressource
 * externe : les polices sont servies par ce serveur (Manrope, licence OFL).
 * Conception « mobile d'abord » : une question par ecran, une colonne, des
 * cibles d'au moins 48 px, un texte de base a 17 px sur telephone et 18 px
 * au-dela (jamais sous 15).
 *
 * LISIBILITE (demande de Thomas) : un seul texte par niveau. Le titre de la
 * question, gros ; les reponses ; puis son descriptif, SOUS les reponses,
 * dans la couleur du texte courant. Les paragraphes ne depassent pas 34 rem de
 * large : au-dela, l'oeil perd la ligne.
 */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("/polices/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url("/polices/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("/polices/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("/polices/manrope-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* Les couleurs de la maison, reprises d'AVA Incubation (contrastes verifies la-bas). */
  --encre: #000092;
  --encre-survol: #000070;
  --papier: #f4f2ec;
  --papier-2: #ebe8df;
  --surface: #ffffff;
  --texte: #16162a;
  --texte-2: #2e2e44;
  --bord: #e2dfd6;
  --bord-fort: #b9b3a3;
  --vert: #1f7a4d;
  --vert-fond: #e7f4ec;
  --ambre: #7d5408;
  --ambre-fond: #f8efd8;
  --rouge: #8b1e2d;
  --rouge-fond: #f7e4e6;
  --info-fond: #ececff;
  --rayon: 12px;
  --largeur: 40rem;
  --mesure: 34rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--papier);
  color: var(--texte);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
@media (min-width: 34rem) { body { font-size: 1.125rem; } }

[hidden] { display: none !important; }

a { color: var(--encre); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; border-radius: 4px; }
h1:focus, main:focus { outline: none; }

.evitement {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.75rem 1rem; background: var(--encre); color: var(--papier); border-radius: 8px;
}
.evitement:focus { top: 1rem; }

/* ------------------------------------------------------------- en-tete */

.entete {
  position: sticky; top: 0; z-index: 5;
  background: var(--papier);
  border-bottom: 1px solid var(--bord);
  padding: 0.75rem 1.25rem;
}
.entete > * { max-width: var(--largeur); margin-inline: auto; }

.marque { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; color: var(--texte); min-height: 44px; }
.marque img { border-radius: 6px; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.2; }
.marque-nom { font-weight: 700; font-size: 0.9375rem; }
.marque-produit { font-size: 0.875rem; color: var(--texte-2); }

.progression { margin-top: 0.625rem; }
.progression-texte { margin: 0 0 0.375rem; font-size: 0.9375rem; font-weight: 600; color: var(--texte-2); }
.barre { height: 6px; background: var(--papier-2); border-radius: 999px; overflow: hidden; }
.barre-plein { display: block; height: 100%; width: 0; background: var(--encre); border-radius: 999px; transition: width 0.3s ease; }

/* ------------------------------------------------------------- ecran */

main { flex: 1; width: 100%; padding: 2rem 1.25rem 3rem; }

.ecran { max-width: var(--largeur); margin-inline: auto; }
.ecran.anime { animation: entree 0.22s ease both; }
.lecteur-seul { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Le contenu ne part jamais de l'invisible : si le navigateur gele l'animation (onglet en arriere-plan), l'ecran reste lisible. */
@keyframes entree { from { opacity: 0.55; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.surtitre {
  margin: 0 0 0.5rem;
  font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-2);
}
.titre {
  margin: 0;
  font-size: clamp(1.625rem, 5.2vw, 2.25rem);
  line-height: 1.18; font-weight: 700; letter-spacing: -0.01em; color: var(--encre);
  text-wrap: balance;
}
.titre-question { font-size: clamp(1.5rem, 5.6vw, 2rem); line-height: 1.2; }
.chapo { margin: 1rem 0 0; max-width: var(--mesure); font-size: 1.1875rem; line-height: 1.5; color: var(--texte); text-wrap: pretty; }
.aide { margin: 0.75rem 0 0; max-width: var(--mesure); color: var(--texte-2); text-wrap: pretty; }
/* Le descriptif d'une question : sous les reponses, avant le bouton. */
.descriptif { margin: 1.25rem 0 0; max-width: var(--mesure); font-size: 1.0625rem; line-height: 1.55; color: var(--texte); text-wrap: pretty; }
@media (min-width: 34rem) { .descriptif { font-size: 1.125rem; } }

/* La mention « Version test » : petite, sans capitales, a cote du surtitre de l'accueil. */
.pastille-test {
  display: inline-block; padding: 0.0625rem 0.5rem;
  border: 1px solid var(--bord-fort); border-radius: 999px;
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; color: var(--texte-2);
}

/* Sur un telephone la mention passe a la ligne : elle s'aligne alors a gauche, sous le surtitre. */
.hero .surtitre { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; }

/* L'accueil : le nom en grand, la question, le bouton. Tout tient sur un ecran de telephone. */
.hero { padding-top: 0.5rem; }
.titre-hero { margin: 0; }
.titre-hero:focus { outline: none; }
.hero-nom {
  display: block;
  font-size: clamp(3.25rem, 16vw, 6.5rem);
  line-height: 0.95; font-weight: 700; letter-spacing: -0.045em; color: var(--encre);
}
.hero-question {
  display: block; margin-top: 0.875rem;
  font-size: clamp(1.375rem, 5.4vw, 2rem);
  line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; color: var(--texte);
  text-wrap: balance;
}
.hero .actions { margin-top: 1.75rem; }
.sous-action { margin: 0.75rem 0 0; font-size: 0.9375rem; font-weight: 500; color: var(--texte-2); }
.bouton-large { width: 100%; min-height: 58px; font-size: 1.125rem; }
@media (min-width: 34rem) { .bouton-large { width: auto; padding-inline: 2.25rem; } }

/* Trois exemples qui ne se ressemblent pas. Un par ligne : on les lit d'un coup d'oeil. */
.duals { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.625rem; }
.duals li { padding: 0.875rem 1rem; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); color: var(--texte-2); }
.duals strong { color: var(--encre); }
@media (min-width: 46rem) { .duals { grid-template-columns: repeat(3, 1fr); } .duals strong { display: block; } }
/* Le repere au-dessus d'une question : une des cinq questions-test de HEXIS. Discret, mais lisible. */
.repere { margin-bottom: 0.625rem; color: var(--encre); }
.repere::before { content: ""; display: inline-block; width: 1.25rem; height: 2px; margin-right: 0.5rem; vertical-align: middle; background: var(--encre); }

.garanties { list-style: none; margin: 2rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--bord); display: grid; gap: 0.75rem; max-width: var(--mesure); }
.garanties li { padding-left: 1.75rem; position: relative; color: var(--texte-2); }
.garanties li::before {
  content: ""; position: absolute; left: 0.25rem; top: 0.5em;
  width: 0.75rem; height: 0.4rem; border-left: 2.5px solid var(--vert); border-bottom: 2.5px solid var(--vert);
  transform: rotate(-45deg);
}
.garanties strong { color: var(--texte); }

/* ------------------------------------------------------------- boutons */

.actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.75rem 1.5rem;
  border: 2px solid transparent; border-radius: var(--rayon);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.bouton:active { transform: translateY(1px); }
.bouton[disabled] { opacity: 0.45; cursor: not-allowed; }
.bouton-principal { background: var(--encre); color: var(--papier); }
.bouton-principal:hover:not([disabled]) { background: var(--encre-survol); }
.bouton-second { background: var(--surface); color: var(--encre); border-color: var(--bord-fort); }
.bouton-second:hover:not([disabled]) { border-color: var(--encre); }
.bouton-lien { background: none; border: none; min-height: 44px; padding: 0.5rem 0.25rem; color: var(--encre); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.retour { margin: 0 0 1.25rem -0.25rem; }

/* ------------------------------------------------------------- champs */

.champ {
  display: block; width: 100%; margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  background: var(--surface); color: var(--texte);
  border: 2px solid var(--bord-fort); border-radius: var(--rayon);
  font: inherit; line-height: 1.5; resize: none;
}
.champ:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 4px rgb(0 0 146 / 0.14); }
.champ[aria-invalid="true"] { border-color: var(--rouge); }
.sous-champ { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.5rem; font-size: 0.9375rem; color: var(--texte-2); }

.exemples { margin: 1.25rem 0 0; }
.exemples p { margin: 0 0 0.5rem; font-size: 0.9375rem; font-weight: 600; color: var(--texte-2); }
.exemples ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.exemple {
  width: 100%; text-align: left; min-height: 48px; padding: 0.625rem 0.875rem;
  background: transparent; color: var(--texte-2);
  border: 1px dashed var(--bord-fort); border-radius: var(--rayon);
  font: inherit; font-size: 1rem; line-height: 1.45; cursor: pointer;
}
.exemple:hover { border-color: var(--encre); color: var(--texte); }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; width: 100%; }

.options { margin-top: 1.75rem; display: grid; gap: 0.75rem; }
.option {
  display: flex; align-items: center; gap: 0.875rem;
  min-height: 60px; padding: 0.75rem 1rem;
  background: var(--surface);
  border: 2px solid var(--bord); border-radius: var(--rayon);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.option:hover { border-color: var(--bord-fort); }
.option:has(input:checked) { border-color: var(--encre); background: var(--info-fond); }
.option:has(input:focus-visible) { outline: 3px solid var(--encre); outline-offset: 3px; }
.option input { flex: none; width: 1.375rem; height: 1.375rem; margin: 0; accent-color: var(--encre); }
.option input:focus-visible { outline: none; }
.option-texte { display: flex; flex-direction: column; gap: 0.125rem; line-height: 1.4; }
.option-libelle { font-weight: 600; }
.option-aide { font-size: 1rem; color: var(--texte-2); }
.option-aucun { border-style: dashed; }

@media (min-width: 34rem) {
  .options-deux { grid-template-columns: 1fr 1fr; }
}

.alerte {
  margin: 1.25rem 0 0; padding: 0.875rem 1rem;
  background: var(--rouge-fond); color: var(--rouge);
  border-radius: var(--rayon); font-weight: 500;
}
.note {
  margin: 1.25rem 0 0; padding: 0.875rem 1rem;
  background: var(--ambre-fond); color: var(--ambre);
  border-radius: var(--rayon);
}

/* ------------------------------------------------------------- attente */

.attente { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 3rem 0; }
.attente img { border-radius: 50%; }
.attente-titre { margin: 1.25rem 0 0; font-size: 1.25rem; font-weight: 600; color: var(--encre); }
.attente-texte { margin: 0.375rem 0 0; color: var(--texte-2); }
.points { display: inline-flex; gap: 0.375rem; margin-top: 1.25rem; }
.points span { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--encre); animation: pouls 1.1s ease-in-out infinite; }
.points span:nth-child(2) { animation-delay: 0.18s; }
.points span:nth-child(3) { animation-delay: 0.36s; }
@keyframes pouls { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); } 40% { opacity: 1; transform: scale(1); } }

/* ------------------------------------------------------------- lecture d'AVA */

.ava { display: flex; gap: 0.875rem; align-items: flex-start; }
.ava img { flex: none; border-radius: 50%; }
.ava-nom { margin: 0; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texte-2); }
.reformulation { margin: 0.375rem 0 0; font-size: clamp(1.25rem, 4vw, 1.5rem); line-height: 1.35; font-weight: 600; color: var(--encre); text-wrap: pretty; }

.etiquette { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.875rem; border-radius: 999px; font-weight: 600; font-size: 0.9375rem; }
.etiquette::before { content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: currentColor; }
.feu-vert { background: var(--vert-fond); color: var(--vert); }
.feu-ambre { background: var(--ambre-fond); color: var(--ambre); }
.feu-rouge { background: var(--rouge-fond); color: var(--rouge); }
/* La forme redit la couleur : rond, losange, carre. Jamais la couleur seule. */
.feu-ambre::before { border-radius: 2px; transform: rotate(45deg); }
.feu-rouge::before { border-radius: 2px; }

.bloc { margin-top: 2rem; }
.bloc-titre { margin: 0 0 0.75rem; font-size: 1.1875rem; font-weight: 700; }

.cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.carte { padding: 1rem 1.125rem; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); }
.carte-titre { margin: 0; font-weight: 600; color: var(--encre); }
.carte-texte { margin: 0.25rem 0 0; color: var(--texte-2); }

.axe-entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.axe-nom { margin: 0; font-size: 1.1875rem; font-weight: 700; color: var(--encre); }
.axe-question { margin: 0.125rem 0 0; font-size: 0.9375rem; color: var(--texte-2); text-wrap: pretty; }
.axe-lecture { margin: 0.75rem 0 0; }

.action {
  margin-top: 2rem; padding: 1.25rem 1.25rem 1.375rem;
  background: var(--encre); color: var(--papier); border-radius: var(--rayon);
}
.action .surtitre { color: var(--papier); opacity: 0.85; }
.action-texte { margin: 0; font-size: 1.1875rem; font-weight: 600; line-height: 1.4; text-wrap: pretty; }

.verrous { margin: 0; padding-left: 1.25rem; color: var(--texte-2); display: grid; gap: 0.5rem; }

.rdv { margin-top: 2rem; padding: 1.5rem 1.25rem; background: var(--surface); border: 2px solid var(--encre); border-radius: var(--rayon); }
.rdv-attente { border-color: var(--bord-fort); }

/* Pour aller plus loin : la prise de contact (bord plein), puis la fiche (bord discret). */
.sorties-titre { margin: 2.25rem 0 0; font-size: 1.25rem; color: var(--encre); }
.suite > .rdv:first-child { margin-top: 0.875rem; }
.suite > .rdv + .rdv { margin-top: 0.875rem; }
.rdv-recu { background: var(--vert-fond); border-color: var(--vert); }
.rdv-recu .rdv-titre:focus { outline: none; }
/* La confirmation d'envoi : une coche devant le titre, et l'adresse saisie qui ne deborde pas. */
.rdv-recu .rdv-titre { position: relative; padding-left: 2rem; color: var(--vert); }
.rdv-recu .rdv-titre::before {
  content: ""; position: absolute; left: 0.25rem; top: 0.3em;
  width: 1rem; height: 0.5rem; border-left: 3px solid var(--vert); border-bottom: 3px solid var(--vert);
  transform: rotate(-45deg);
}
.rdv-recu .rdv-texte { color: var(--texte); }
.recu-adresse { overflow-wrap: anywhere; }
.contact { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--bord); }
.coord-large { margin-top: 0.75rem; }
.coord-large .champ { min-height: 5.5rem; }
.facultatif { font-weight: 400; color: var(--texte-2); }
/* Les deux accords : conditions generales, puis recontact. Deux cases distinctes, aucune cochee d'avance. */
.accords { margin-top: 1.25rem; display: grid; gap: 0.5rem; }
.accord { display: flex; align-items: flex-start; gap: 0.75rem; min-height: 44px; padding: 0.5rem 0; font-size: 1rem; line-height: 1.45; color: var(--texte); cursor: pointer; }
.accord input { flex: none; width: 1.375rem; height: 1.375rem; margin: 0.125rem 0 0; accent-color: var(--encre); }
.contact .alerte { margin-top: 1rem; }
.contact-autre { margin: 0.75rem 0 0; }
.champ-court[aria-invalid="true"] { border-color: var(--rouge); }

/* Les coordonnees : quatre champs courts, deux par ligne des que la place le permet. */
.rdv-coord { border-color: var(--bord-fort); }
.coord-titre { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.coord-mention { margin-top: 0.375rem; }
.coordonnees { margin-top: 1rem; display: grid; gap: 0.75rem; }
@media (min-width: 34rem) { .coordonnees { grid-template-columns: 1fr 1fr; } }
.coord { display: grid; gap: 0.25rem; }
.coord label { font-size: 1rem; font-weight: 600; }
.champ-court { margin-top: 0; min-height: 52px; padding: 0.625rem 0.875rem; }
.rdv .bouton-second { width: 100%; }
@media (min-width: 34rem) { .rdv .bouton-second { width: auto; } }

.selecteur {
  min-height: 52px; width: 100%; padding: 0.625rem 0.875rem;
  background: var(--surface); color: var(--texte);
  border: 2px solid var(--bord-fort); border-radius: var(--rayon); font: inherit;
}
/* La liste des regions, dans le parcours : aussi haute qu'une reponse a cocher. */
.selecteur-grand { margin-top: 1.75rem; min-height: 60px; padding: 0.75rem 1rem; font-weight: 600; }
.selecteur:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 4px rgb(0 0 146 / 0.14); }
.rdv-titre { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--encre); text-wrap: balance; }
.rdv-texte { margin: 0.5rem 0 0; color: var(--texte-2); }
.rdv-texte + .rdv-texte { margin-top: 0.75rem; }
.rdv-signature { margin: 1rem 0 0; font-weight: 600; color: var(--encre); }
.rdv .actions { margin-top: 1.25rem; }
.rdv .bouton-principal { width: 100%; }
@media (min-width: 34rem) { .rdv .bouton-principal { width: auto; } }

.mention { margin: 1.5rem 0 0; max-width: var(--mesure); font-size: 0.9375rem; color: var(--texte-2); }
.impression-seule { display: none; }

/* ------------------------------------------------------------- pied */

.pied { padding: 1.25rem; border-top: 1px solid var(--bord); font-size: 0.9375rem; color: var(--texte-2); }
.pied p { max-width: var(--largeur); margin: 0 auto; }
.pied-liens { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; padding-top: 0.5rem; }
.pied-liens a { display: inline-flex; align-items: center; min-height: 44px; }

/* ------------------------------------------------------------- page de texte */

.texte h2 { margin: 2.25rem 0 0.5rem; font-size: 1.25rem; color: var(--encre); }
.texte p, .texte li { max-width: var(--mesure); color: var(--texte-2); }
.texte .version { margin-top: 2rem; font-size: 0.9375rem; }
.texte ul { padding-left: 1.25rem; display: grid; gap: 0.375rem; }

/* ------------------------------------------------------------- mouvement et impression */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  body { background: #fff; font-size: 11pt; }
  .entete { position: static; border: 0; padding: 0 0 12pt; }
  .progression, .actions, .retour, .pied a, .evitement, .rdv .bouton, .ecran-outils, .suite, .sorties-titre { display: none !important; }
  main { padding: 0; }
  .ecran { animation: none; max-width: none; }
  .carte, .rdv, .action { break-inside: avoid; }
  .action { background: #fff; color: #000; border: 2pt solid var(--encre); }
  .action .surtitre { color: #000; }
  .impression-seule { display: block; }
}
