/* Tapil, la page (missions 2 et 3, 24/11/2026). Elle s'appuie sur systeme.css : le papier pour lire, le bleu pour essayer et s'inscrire,
   une seule couleur d'accent (l'orange, la carte cachée), ombres en aplat. Téléphone d'abord.
   Règle du 24/11 : jamais de bleu derrière une image de la boîte. Le haut de page est clair, et son fond continue le mur de la photo. */
:root {
  /* Le mur des deux photos du haut de page, relevé de gauche à droite sur leurs premières lignes par outils/images-m4.py : le fond le prolonge sans couture. */
  --mur-etroit: linear-gradient(90deg, #E8D7C0 0%, #E6D4BD 16.7%, #E2D1BA 33.3%, #DFCEB8 50%, #DBCAB4 66.7%, #D6C6B1 83.3%, #D2C2AD 100%);
  --mur-large: linear-gradient(90deg, #EADAC3 0%, #E9D9C2 16.7%, #E7D5BE 33.3%, #E3D1BA 50%, #DECDB7 66.7%, #D9C8B2 83.3%, #D3C3AD 100%);
  --encre-haut: #17163F;      /* le bleu nuit, un ton plus bas : le texte du haut de page se lit sur le mur et sur le bois de la photo (contrastes mesurés sur la photo) */
}
html { scroll-behavior: smooth; scroll-padding-top: 3.25rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { overflow-x: clip; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.09em; }
.sur-bleu, .sur-papier { background-attachment: scroll; }
/* Le calcul de l'exemple a sa propre ligne, comme une formule : il ne se coupe jamais et ne laisse pas de ligne trouée avant lui. */
.calcul { display: block; margin-top: 0.25rem; font-weight: 600; white-space: nowrap; }   /* en Archivo : ses signes + − × = se lisent, ceux d'Anybody sont trop petits */
/* Texte courant : les lignes se remplissent (text-wrap: wrap). « pretty » rééquilibrait les dernières lignes et laissait des lignes à moitié vides sur téléphone ;
   le mot seul en fin de paragraphe est déjà empêché par l'insécable des deux derniers mots (outils/fr-texte.mjs). Les titres gardent « balance ». */
p, li { text-wrap: wrap; }
.l { display: block; text-wrap: wrap; }   /* une phrase par ligne dans les textes courts de deux phrases */
.dedans { width: 100%; max-width: var(--large); margin-inline: auto; padding-inline: var(--marge); }
.bloc { padding-block: clamp(3rem, 9vw, 6rem); scroll-margin-top: 3.25rem; }
.bloc h2 { margin-bottom: var(--e5); }

.aller { position: absolute; left: var(--e4); top: -6rem; z-index: 50; padding: var(--e3) var(--e4); background: var(--papier); color: var(--nuit); border-radius: var(--rayon); font-weight: 600; }
.aller:focus { top: var(--e2); }

/* ───── L'en-tête : une ligne claire, le logotype, puis le menu (écrit, jamais une icône seule).
   Tout en haut de la page, il est transparent : on voit le mur de la photo. Dès qu'on descend, il devient une bande de papier. ───── */
.tete { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--e4); height: 3.25rem; padding-inline: var(--marge); background: var(--papier); color: var(--nuit); box-shadow: 0 0.125rem 0 var(--ombre); transition: background-color var(--duree), box-shadow var(--duree); }
.tete.est-en-haut { background: transparent; box-shadow: none; }
.tete :focus-visible, .haut :focus-visible { outline-color: var(--nuit); }
.tete-logo { display: flex; align-items: center; min-height: var(--toucher); margin-right: auto; border-radius: 0.25rem; }
.tete-logo img { height: 1.75rem; width: auto; }
.tete-nav, .tete-bouton { display: none; }
.tete-menu { display: inline-flex; align-items: center; gap: var(--e2); min-height: var(--toucher); margin-right: -0.5rem; padding: 0 0.75rem; border: 0; border-radius: var(--rayon); background: none; color: var(--nuit); font: 800 1.0625rem/1 var(--titre); letter-spacing: 0.01em; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tete-menu svg { width: 1.125rem; height: 1.125rem; }
.tete-menu .trait { transition: transform var(--duree), opacity var(--duree); transform-origin: 50% 50%; transform-box: fill-box; }
.tete-menu[aria-expanded="true"] .trait--1 { transform: translateY(5px) rotate(45deg); }
.tete-menu[aria-expanded="true"] .trait--2 { opacity: 0; }
.tete-menu[aria-expanded="true"] .trait--3 { transform: translateY(-5px) rotate(-45deg); }
.tete-menu:active { background: var(--papier-creux); }
.menu { position: absolute; left: 0; right: 0; top: 100%; display: grid; padding: var(--e2) var(--marge) var(--e4); background: var(--papier); box-shadow: 0 0.25rem 0 var(--ombre); }
.menu[hidden] { display: none; }
.menu a { display: flex; align-items: center; gap: var(--e3); min-height: 3.25rem; border-bottom: 0.0625rem solid var(--filet); font: 800 1.375rem/1 var(--titre); text-decoration: none; }
.menu a:last-child { border-bottom: 0; }
.menu a::before { content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%; box-shadow: inset 0 0 0 0.125rem var(--nuit); }
.menu a[aria-current]::before { background: var(--nuit); }      /* la section où l'on est : le rond plein */
.menu a:active { background: var(--papier-creux); }
@media (min-width: 60rem) {
  html { scroll-padding-top: 4rem; }
  .bloc { scroll-margin-top: 4rem; }
  .tete { height: 4rem; gap: var(--e6); }
  .tete-logo img { height: 2rem; }
  .tete-menu, .menu { display: none !important; }
  .tete-nav { display: flex; gap: var(--e2); }
  .tete-nav a { display: inline-flex; align-items: center; min-height: var(--toucher); padding: 0 0.75rem; font: 600 1.0625rem/1 var(--titre); letter-spacing: 0.01em; text-decoration: none; box-shadow: inset 0 -0.1875rem 0 transparent; transition: box-shadow var(--duree); }
  .tete-nav a:hover { box-shadow: inset 0 -0.1875rem 0 #B9AE98; }
  .tete-nav a[aria-current] { box-shadow: inset 0 -0.1875rem 0 var(--nuit); }
  /* Le bouton de l'en-tête reste discret tant que celui du haut de page est à l'écran : un seul bouton plein par écran. */
  .tete-bouton { display: inline-flex; min-height: 2.75rem; font-size: 1.0625rem; background: transparent; color: var(--nuit); box-shadow: inset 0 0 0 0.125rem var(--nuit); }
  .tete-bouton.est-plein { background: var(--bleu); color: var(--papier); box-shadow: 0 0.1875rem 0 var(--ombre); }
}

/* ───── Le haut de page : la photo de la boîte sur fond clair.
   Téléphone et tablette : le texte sur le fond qui continue le mur, puis la photo d'un bord à l'autre.
   Ordinateur : la photo large remplit le haut de page, le texte tient dans sa moitié libre. Le titre est sur le mur, le reste sur la table. ───── */
.haut { position: relative; margin-top: -3.25rem; padding-top: 3.25rem; background: var(--mur-etroit); color: var(--encre-haut); scroll-margin-top: 4rem; overflow: hidden; container-type: inline-size; }
.haut-texte { padding: var(--e5) var(--marge); }
.haut h1 { font-size: clamp(2.5rem, 1.6rem + 4.6vw, 4.5rem); }
.haut-phrase { margin-top: var(--e4); font-size: var(--t-texte); }
.haut-phrase .l { display: block; }
.faits { display: flex; flex-wrap: wrap; gap: var(--e2) var(--e5); margin: var(--e4) 0 0; padding: 0; list-style: none; font: 600 1.0625rem/1.2 var(--titre); letter-spacing: 0.01em; }
.faits li { display: inline-flex; align-items: center; gap: var(--e2); white-space: nowrap; }
.faits svg { height: 1.375rem; width: auto; flex: none; }
.haut .bouton { margin-top: var(--e5); min-height: 3.25rem; font-size: 1.1875rem; }
.haut-photo { display: block; }
.haut-photo img { width: 100%; height: auto; aspect-ratio: 2400 / 2600; }
@media (max-height: 36rem) and (max-width: 39.99rem) {   /* petits téléphones (375 x 548) : tout le texte et le haut de la boîte tiennent */
  .haut-texte { padding-block: var(--e4); }
  .haut h1 { font-size: 2.375rem; }
  .haut-phrase { margin-top: var(--e3); line-height: 1.42; } .faits { margin-top: var(--e3); } .haut .bouton { margin-top: var(--e4); min-height: 3rem; }
}
@media (min-width: 40rem) {
  .haut { background: var(--mur-large); }
  .haut-texte { padding-block: var(--e6); }
  .haut-phrase { font-size: var(--t-grand); line-height: 1.45; max-width: 36rem; }
  .haut-photo img { aspect-ratio: 2400 / 1500; }
}
@media (min-width: 60rem) {
  /* La photo fait 62,5 % de sa largeur en hauteur ; la boîte y commence à 16,7 % du haut, la table à 39,4 %.
     Hauteur du haut de page : l'écran entier, sans jamais rogner la boîte sous l'en-tête, ni dépasser la photo. */
  .haut { --encre-haut: #0B0A26;   /* sur le bois de la table, il faut l'encre la plus sombre : 7 de contraste au moins, mesuré sur la photo (outils/contraste-haut.py) */
    --h: min(max(100svh, 52vw + 5rem), 62.5vw); --t: clamp(2.75rem, 4.6vw, 4.25rem); min-height: var(--h); margin-top: -4rem; padding-top: 0; }
  .haut-photo { position: absolute; left: 0; right: 0; bottom: 0; }   /* calée en bas : au-dessus d'elle, le fond continue son mur */
  /* Le titre (2 lignes) finit juste au-dessus de la ligne de la table : la phrase, les chiffres et le bouton sont sur le bois. */
  .haut-texte { position: relative; z-index: 1; width: 47cqw; padding: calc(var(--h) - 37.875cqw - 0.875rem - 2.1 * var(--t)) 0 var(--e6) min(max(var(--marge), calc((100cqw - var(--large)) / 2 + var(--marge))), calc(47cqw - 30.5rem)); }
  .haut h1 { font-size: var(--t); }
  .haut-phrase { margin-top: var(--e6); font-weight: 600; }
  .haut-phrase .l { display: inline; }   /* sur ordinateur, les deux phrases se suivent : plus de « et de mise. » seul sur sa ligne */
  .faits { margin-top: var(--e5); font-size: 1.1875rem; font-weight: 800; } .faits svg { height: 1.5rem; }
  .haut .bouton { margin-top: var(--e6); min-height: 3.5rem; padding-inline: var(--e6); font-size: 1.3125rem; }
}
@media (min-width: 60rem) and (max-width: 79.99rem) {   /* petits écrans d'ordinateur : la colonne de texte est étroite, le texte un peu plus petit pour tenir au-dessus du bas de la boîte */
  .haut-texte { padding-left: var(--marge); }
  .haut-phrase { margin-top: var(--e5); font-size: 1.125rem; text-wrap: balance; }   /* lignes équilibrées : à 1024 px, « Avec » ne reste plus seul en bout de ligne */
  .haut .bouton { margin-top: var(--e5); }
}

/* ───── Comment on joue : les 4 étapes, le calcul en cartes sous l'étape 2, puis la photo d'une manche. ───── */
.deux { display: grid; gap: var(--e6); }
.exemple { display: grid; grid-template-columns: 1fr 1.25rem 1fr 1.25rem 1fr 1.25rem 1fr; align-items: center; max-width: 19rem; margin-top: var(--e4); padding: 0.375rem 0.625rem 0.25rem 0; }
.exemple svg { justify-self: center; width: 0.8125rem; height: 0.8125rem; color: var(--nuit); }
.exemple .carte-face { position: relative; }
.exemple img { border-radius: var(--rayon-carte); box-shadow: 0 0.1875rem 0 var(--ombre); }
.exemple .cachee { position: relative; }
.exemple .cachee .carte-dos { position: absolute; inset: 0; transform: translate(9%, -5%) rotate(7deg); transform-origin: 50% 100%; }
.etapes { display: grid; gap: var(--e5); margin: 0; padding: 0; list-style: none; counter-reset: etape; }
.etapes li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: var(--e3); align-items: start; }
/* Le numéro d'étape : un rond plein et plat, sans ombre, pour qu'on ne le prenne pas pour un bouton. Le chiffre est dessiné, centré sur son dessin. */
.pastille { display: block; width: 2rem; height: 2rem; margin-top: -0.1875rem; border-radius: 50%; background: var(--nuit); color: var(--papier); }
.pastille svg { display: block; width: 100%; height: 100%; }
.pastille text { font: 800 19px var(--titre); fill: currentColor; text-anchor: middle; }
.etapes strong { font-weight: 600; }
/* La photo d'une manche : d'un bord à l'autre sur téléphone, pour que les cartes soient les plus grandes possible. */
.partie { margin: 0 calc(-1 * var(--marge)); }
.partie picture, .partie img { display: block; width: 100%; }
.partie figcaption { padding: var(--e3) var(--marge) 0; }
.le-nom { padding: var(--e5); border-radius: var(--rayon); background: var(--papier-creux); max-width: 36rem; }
@media (min-width: 40rem) {
  .partie { margin-inline: 0; max-width: 34rem; }
  .partie img { border-radius: 0.25rem; box-shadow: 0.375rem 0.375rem 0 var(--ombre); }
  .partie figcaption { padding: var(--e4) 0 0; }
}
@media (min-width: 60rem) {
  .deux { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "titre titre" "etapes photo" "nom photo"; gap: var(--e6) var(--e8); align-items: start; }
  .deux > h2 { grid-area: titre; margin-bottom: 0; }
  .comment-texte { grid-area: etapes; } .comment-nom { grid-area: nom; }
  .partie { grid-area: photo; max-width: none; align-self: center; }
}

/* ───── Essayez une main. ───── */
.essai h2 { text-align: center; }
.essai { padding-bottom: clamp(1.5rem, 4vw, 3rem); }   /* la place des deux lignes du Tapil est déjà réservée sous le bouton */

/* ───── Dans la boîte : la liste, le prix, et la photo du contenu. ───── */
.contenu { display: grid; margin: var(--e5) 0 0; padding: 0; list-style: none; max-width: 36rem; }
.contenu li { padding-block: var(--e4); border-top: 0.0625rem solid var(--filet); }
.contenu li:last-child { border-bottom: 0.0625rem solid var(--filet); }
.prix { margin-top: var(--e5); font: 800 var(--t-titre)/1 var(--titre); font-variant-numeric: lining-nums; white-space: nowrap; }
.boite-images { margin: var(--e6) calc(-1 * var(--marge)) 0; }
.boite-images picture, .boite-images img { display: block; width: 100%; }
@media (min-width: 40rem) {
  .boite-images { margin-inline: 0; max-width: 40rem; }
  .boite-images img { border-radius: 0.25rem; box-shadow: 0.375rem 0.375rem 0 var(--ombre); }
}
@media (min-width: 60rem) {
  .boite-grille { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--e8); align-items: center; }
  .boite-images { order: -1; margin-top: 0; max-width: none; }
}

/* ───── L'inscription : prénom, nom, adresse e-mail, puis la confirmation (le questionnaire s'ouvre par-dessus). ───── */
.inscription .dedans { max-width: 40rem; }
.inscription p { max-width: none; }
.formulaire { margin-top: var(--e5); }
.champs { display: grid; gap: var(--e4); }
.formulaire label { display: block; margin-bottom: var(--e2); font-weight: 600; }
.formulaire input { width: 100%; min-height: 3.25rem; padding: 0 var(--e4); border: 0.125rem solid var(--nuit); border-radius: var(--rayon); background: var(--papier); color: var(--nuit); font: 400 1.0625rem/1.2 var(--texte); box-shadow: 0 0.25rem 0 var(--ombre); }
.formulaire input::placeholder { color: #6B6990; opacity: 1; }
.formulaire input:focus-visible { outline: 0.1875rem solid var(--papier); outline-offset: 0.1875rem; }
.formulaire input[aria-invalid="true"] { box-shadow: 0 0 0 0.1875rem var(--papier); }
.formulaire > .bouton { width: 100%; margin-top: var(--e5); min-height: 3.25rem; font-size: 1.1875rem; }
.formulaire > .bouton[disabled] { cursor: progress; }
.formulaire.a-une-question > .bouton { display: none; }   /* la question sur l'adresse a ses deux boutons : un seul bouton plein à l'écran */
/* Le champ piège contre les robots : hors de l'écran, jamais atteint au clavier ni lu. */
.piege { position: absolute; left: -200vw; top: 0; width: 1px; height: 1px; overflow: hidden; }
/* Les messages ne ressemblent pas à des boutons : ni fond en relief, ni ombre. */
.erreur { margin-top: var(--e3); color: var(--papier); font-weight: 600; }
.erreur[hidden], .merci[hidden], .formulaire[hidden], .suggestion[hidden], .merci .bouton[hidden] { display: none; }
.erreur .l, .consentement .l { display: block; }
/* La faute de frappe probable : la question montre l'adresse corrigée en entier, puis deux boutons. */
.suggestion { margin-top: var(--e4); }
.suggestion p { font-weight: 600; overflow-wrap: anywhere; }
.suggestion-boutons { display: grid; gap: var(--e3); margin-top: var(--e3); }
.suggestion .bouton { min-height: 3rem; font-size: 1.0625rem; }
.consentement { margin-top: var(--e5); font-size: var(--t-petit); color: var(--encre-douce); }
.consentement a { display: inline-block; padding-block: 0.625rem; margin-block: -0.625rem; color: var(--papier); font-weight: 600; }
/* La confirmation : une feuille de papier à la place du formulaire. */
.merci { --encre: var(--nuit); --plein: var(--bleu); --sur-plein: var(--papier); margin-top: var(--e5); padding: var(--e5); border-radius: var(--rayon); background: var(--papier); color: var(--nuit); }
.merci:focus { outline: none; }
.merci h3 { font-size: var(--t-titre); font-weight: 800; line-height: 1.05; }
.merci > p { margin-top: var(--e3); font-size: var(--t-grand); line-height: 1.3; font-weight: 600; }
.merci .bouton { margin-top: var(--e5); min-height: 3.25rem; }   /* « Reprendre les questions », tant qu'il en reste sans réponse */
.merci :focus-visible { outline-color: var(--orange); }
@media (min-width: 36rem) {
  .champs { grid-template-columns: 1fr 1fr; }
  .champ--adresse { grid-column: 1 / -1; }
  .suggestion-boutons { grid-template-columns: auto auto; justify-content: start; }
}
/* Sur ordinateur : le titre et le texte à gauche, le formulaire à droite, sur toute la largeur de la page. */
@media (min-width: 60rem) {
  .inscription, .questions { padding-block: var(--e8); }
  .inscription .dedans { max-width: var(--large); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "titre saisie" "texte saisie"; column-gap: var(--e8); }
  .inscription h2 { grid-area: titre; }
  .inscription-texte { grid-area: texte; max-width: var(--mesure); }
  .formulaire, .merci { grid-area: saisie; align-self: center; margin-top: 0; }
}

/* ───── Le questionnaire : une fenêtre par-dessus la page, une question par écran, de grosses réponses sur lesquelles on appuie.
   Sur téléphone, la fenêtre prend tout l'écran : le compteur et la croix en haut, les réponses au milieu (elles défilent si besoin),
   « Continuer », « Passer cette question » et les points de progression toujours visibles en bas. ───── */
.qz { position: fixed; inset: 0; z-index: 60; display: flex; background: rgba(44, 42, 94, 0.86); color: var(--nuit); --encre: var(--nuit); --plein: var(--bleu); --sur-plein: var(--papier); }
.qz-carte { display: flex; flex-direction: column; width: 100%; height: 100%; background-color: var(--papier); }
.qz-tete { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--e4); min-height: 3.25rem; padding: var(--e1) 0.25rem var(--e1) calc(var(--marge) - var(--e3)); border-bottom: 0.0625rem solid var(--filet); }
/* « Question précédente » : écrit en toutes lettres, en haut à gauche, sur les écrans 2 à 6 et sur l'écran de fin. */
.qz-precedente { display: inline-flex; align-items: center; gap: var(--e2); min-height: 3rem; padding: 0 var(--e3); border: 0; border-radius: var(--rayon); background: none; color: var(--nuit); font: 600 1.0625rem/1 var(--texte); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.qz-precedente svg { flex: none; width: 1.125rem; height: 1.125rem; }
.qz-precedente span { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.09em; }
.qz-precedente:active { background: var(--papier-creux); }
.qz-precedente[hidden], .qz-pied[hidden], .qz-pied .bouton[hidden], .qz-libre[hidden] { display: none; }
/* En haut de la question 1 : l'inscription est faite. Une coche et une phrase, sans cadre. */
.qz-note { display: flex; align-items: flex-start; gap: var(--e3); margin-bottom: var(--e5); padding-bottom: var(--e5); border-bottom: 0.0625rem solid var(--filet); font-weight: 600; line-height: 1.35; }
.qz-note svg { flex: none; width: 1.5rem; height: 1.5rem; padding: 0.25rem; border-radius: 50%; background: var(--bleu); color: var(--papier); }
.qz-compteur { margin-bottom: var(--e3); font: 800 1.0625rem/1 var(--titre); letter-spacing: 0.01em; color: var(--bleu); }
.qz-fermer { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border: 0; border-radius: var(--rayon); background: none; color: var(--nuit); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.qz-fermer svg { width: 1.125rem; height: 1.125rem; }
.qz-fermer:active { background: var(--papier-creux); }
.qz-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--e5) var(--marge); }
.qz-explication { margin-bottom: var(--e4); }
.qz-explication span { display: block; }   /* une phrase par ligne : aucune phrase entamée en bout de ligne */
.qz-question { font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.125rem); line-height: 1.1; }
.qz-question:focus { outline: none; }
.qz-mode { margin-top: var(--e2); color: var(--encre-douce); }
.qz-reponses { display: grid; gap: var(--e3); margin: var(--e5) 0 0; padding: 0 0 0.25rem; list-style: none; }
/* Une réponse : un bouton large. Une case carrée à gauche quand on peut en cocher plusieurs, un rond quand il n'y en a qu'une. */
.qz-reponse { display: flex; align-items: center; gap: var(--e3); width: 100%; min-height: 3.25rem; padding: 0.625rem var(--e4); border: 0.125rem solid var(--nuit); border-radius: var(--rayon); background: #FFFDF8; color: var(--nuit); font: 600 1.0625rem/1.25 var(--texte); text-align: left; cursor: pointer; box-shadow: 0 0.1875rem 0 var(--ombre); transition: transform var(--duree), box-shadow var(--duree), background-color var(--duree), color var(--duree); -webkit-tap-highlight-color: transparent; }
.qz-reponse:active { transform: translateY(0.125rem); box-shadow: 0 0.0625rem 0 var(--ombre); }
.qz-case { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.375rem; height: 1.375rem; border: 0.125rem solid currentColor; border-radius: 0.25rem; }
.qz-reponses[data-mode="une"] .qz-case { border-radius: 50%; }
.qz-case svg { width: 0.875rem; height: 0.875rem; opacity: 0; }
.qz-reponse[aria-pressed="true"] { background: var(--bleu); color: var(--papier); }
.qz-reponse[aria-pressed="true"] .qz-case svg { opacity: 1; }
/* Le champ à remplir sous « D'autres jeux » et sous « Ailleurs » : sur toute la largeur de la liste. */
.qz-libre { grid-column: 1 / -1; padding-bottom: var(--e3); }
.qz-mot { text-wrap: balance; }
.qz-libre label { display: block; margin-bottom: var(--e2); font-weight: 600; }
.qz-libre input { width: 100%; min-height: 3.25rem; padding: 0 var(--e4); border: 0.125rem solid var(--nuit); border-radius: var(--rayon); background: #FFFDF8; color: var(--nuit); font: 400 1.0625rem/1.2 var(--texte); }
.qz-libre input::placeholder { color: #6B6990; opacity: 1; }
.qz-pied { flex: none; display: grid; gap: var(--e2); padding: var(--e3) var(--marge) calc(var(--e3) + env(safe-area-inset-bottom, 0px)); border-top: 0.0625rem solid var(--filet); background: var(--papier); }
.qz-pied .bouton { min-height: 3.25rem; }
.qz-pied .bouton[disabled] { background: #D8D2C4; color: #55537D; box-shadow: none; cursor: default; transform: none; }
.qz-passer { justify-self: center; min-height: var(--toucher); padding: 0 var(--e4); border: 0; border-radius: var(--rayon); background: none; color: var(--nuit); font: 600 1.0625rem/1 var(--texte); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.09em; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.qz-passer:active { background: var(--papier-creux); }
.qz-points { display: flex; justify-content: center; gap: var(--e2); padding-top: var(--e1); }
.qz-points span { width: 0.625rem; height: 0.625rem; border-radius: 50%; box-shadow: inset 0 0 0 0.125rem var(--nuit); }
.qz-points span.est-fait { background: var(--nuit); }
.qz-corps.est-fin { display: flex; flex-direction: column; justify-content: center; }   /* l'écran de fin, au milieu de la fenêtre */
.qz-fin p { margin-top: var(--e4); font-size: var(--t-grand); line-height: 1.35; }
.qz-fin .bouton { margin-top: var(--e6); min-height: 3.25rem; }
.qz :focus-visible { outline-color: var(--orange); }
@media (min-width: 40rem) {
  .qz { align-items: center; justify-content: center; padding: var(--e5); }
  .qz-carte { width: min(100%, 36rem); height: auto; max-height: 100%; border-radius: var(--rayon); box-shadow: 0.5rem 0.5rem 0 var(--ombre); overflow: hidden; }
  .qz-tete { padding-left: calc(var(--e6) - var(--e3)); }
  .qz-corps { padding: var(--e6); }
  .qz-pied { padding-inline: var(--e6); }
  .qz-reponses[data-colonnes="2"] { grid-template-columns: 1fr 1fr; }
  /* sur ordinateur, on vise à la souris : les réponses un peu plus serrées, pour en voir le plus possible sans faire défiler */
  .qz-reponses { gap: var(--e2); } .qz-reponse { min-height: 3rem; } .qz-note { margin-bottom: var(--e4); padding-bottom: var(--e4); }
}
@media (max-height: 36rem) and (max-width: 39.99rem) {   /* petits téléphones : les réponses un peu plus serrées, pour en voir le plus possible */
  .qz-corps { padding-block: var(--e4); } .qz-question { font-size: 1.5rem; } .qz-reponses { margin-top: var(--e4); gap: var(--e2); } .qz-reponse { min-height: 3rem; }
  /* le pied sur deux rangs au lieu de trois : « Continuer », puis « Passer cette question » et les points côte à côte */
  .qz-pied { grid-template-columns: 1fr auto; align-items: center; gap: var(--e1) var(--e3); padding-block: var(--e2) calc(var(--e1) + env(safe-area-inset-bottom, 0px)); }
  .qz-pied .bouton { grid-column: 1 / -1; min-height: 3rem; } .qz-passer { justify-self: start; margin-left: calc(-1 * var(--e4)); } .qz-points { padding-top: 0; }
}

/* ───── Les questions : repliées, ouvertes au toucher. ───── */
.questions .dedans { max-width: 46rem; }
.questions details { border-top: 0.0625rem solid var(--filet); }
.questions details:last-of-type { border-bottom: 0.0625rem solid var(--filet); }
.questions summary { display: flex; align-items: center; justify-content: space-between; gap: var(--e4); min-height: 3.75rem; padding-block: var(--e3); cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; border-radius: 0.25rem; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); font-weight: 800; }
.questions summary svg { flex: none; width: 1.25rem; height: 1.25rem; transition: transform var(--duree); }
.questions summary .v { transition: opacity var(--duree); }
.questions details[open] summary .v { opacity: 0; }
.questions details[open] summary svg { transform: rotate(180deg); }
.questions summary:active { background: var(--papier-creux); }
.questions details p { padding-bottom: var(--e5); max-width: 38rem; }
.questions details a { font-weight: 600; display: inline-block; padding-block: 0.625rem; margin-block: -0.625rem; }
/* Sur ordinateur : le titre à gauche, les questions à droite, alignés sur les autres sections. */
@media (min-width: 60rem) {
  .questions .dedans { max-width: var(--large); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: var(--e8); align-items: start; }
  .questions h2 { grid-row: 1 / span 4; margin: 0; padding-top: var(--e3); }
  .questions details { grid-column: 2; }
}

/* ───── Le pied de page. ───── */
.pied { background: var(--nuit); color: var(--papier); padding-block: var(--e7); font-size: var(--t-petit); --encre: var(--papier); }
.pied .dedans { display: grid; gap: var(--e5); }
.pied img { height: 2rem; width: auto; }
.pied p { max-width: none; }
.pied .l { display: block; }
.pied a { display: inline-block; padding-block: 0.6875rem; margin-block: -0.6875rem; font-weight: 600; }
.pied-liens { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e3); }
.pied :focus-visible { outline-color: var(--papier); }
.pied .discret { color: #C9C8DC; }

/* ───── La barre du bas, sur téléphone : elle paraît quand le bouton du haut de page sort de l'écran, et s'efface devant l'inscription. ───── */
.barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; padding: 0.25rem var(--marge) calc(0.25rem + env(safe-area-inset-bottom, 0px)); background: var(--papier); box-shadow: 0 -0.125rem 0 var(--nuit); transform: translateY(110%); visibility: hidden; transition: transform 260ms ease-out, visibility 0s 260ms; }
.barre.est-visible { transform: none; visibility: visible; transition: transform 260ms ease-out, visibility 0s; }
/* 52 px en tout : 44 px de bouton (la zone à toucher), 4 px au-dessus, 4 px dessous pour son ombre. */
.barre .bouton { flex: 1; min-height: var(--toucher); font-size: 1.0625rem; box-shadow: 0 0.125rem 0 var(--aplat); }
@media (max-width: 59.99rem) { body { padding-bottom: 0; } .pied { padding-bottom: calc(var(--e7) + 3.25rem); } }
@media (min-width: 60rem) { .barre { display: none; } }

/* ───── Les pages légales : courtes et discrètes. ───── */
.legal { max-width: 44rem; margin-inline: auto; padding: var(--e6) var(--marge) var(--e8); }
.legal h1 { font-size: var(--t-titre); margin-bottom: var(--e5); }
.legal h2 { font-size: var(--t-grand); font-weight: 800; line-height: 1.2; margin: var(--e6) 0 var(--e2); }
.legal p { max-width: 40rem; margin-top: var(--e2); }
.legal a { font-weight: 600; display: inline-block; padding-block: 0.625rem; margin-block: -0.625rem; }
.legal .retour { display: inline-flex; align-items: center; min-height: var(--toucher); margin-bottom: var(--e4); }
.legal .discret { color: var(--encre-douce); margin-top: var(--e6); }
