/* L'Hexagone coupé en deux — DA : cahier d'écolier (Seyès), ligne claire, étiquettes, tampons. Voir docs/DA.md */
:root {
  --papier: #F5EFE3;
  --papier-2: #EDE4D0;
  --blanc: #FFFDF8;
  --encre: #16161D;
  --encre-2: #4A4953;
  --encre-3: #7C7A84;
  --seyes: rgba(78, 116, 196, .16);
  --seyes-fort: rgba(78, 116, 196, .28);
  --marge: rgba(214, 69, 80, .45);
  --gauche: #E3342F;
  --gauche-fonce: #B81F1B;
  --gauche-clair: #F9D6D2;
  --droite: #1D4ED8;
  --droite-fonce: #1537A0;
  --droite-clair: #D3DEFA;
  --or: #F2B705;
  --etiquette: #3557A7;
  --ok: #1E7F4F;
  --alerte: #C2410C;
  --trait: 2.5px;
  --ombre: 4px 4px 0 var(--encre);
  --ombre-petite: 2px 2px 0 var(--encre);
  --rayon: 14px;
  --titre: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
  --texte: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --plume: 'Playwrite FR Moderne', 'Comic Sans MS', cursive;
  --largeur: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--encre); font: 16px/1.55 var(--texte); background-color: var(--papier);
  /* Réglure Seyès : interlignes fins tous les 8 px, ligne forte et colonnes tous les 32 px. */
  background-image:
    linear-gradient(var(--seyes-fort) 1px, transparent 1px),
    linear-gradient(90deg, var(--seyes-fort) 1px, transparent 1px),
    linear-gradient(var(--seyes) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px, 8px 8px;
  min-height: 100vh; display: flex; flex-direction: column;
}
@media (min-width: 900px) {
  body::before { content: ''; position: fixed; top: 0; bottom: 0; left: 72px; width: 2px; background: var(--marge); pointer-events: none; z-index: 0; }
}
main { flex: 1; position: relative; z-index: 1; }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.conteneur { width: min(var(--largeur), 100% - 32px); margin-inline: auto; }
.cache { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typo ---------- */
h1, h2, h3, .titre { font-family: var(--titre); font-weight: 400; line-height: 1.02; letter-spacing: -.01em; text-transform: uppercase; margin: 0 0 .4em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: 0; }
p { margin: 0 0 1em; }
.plume { font-family: var(--plume); font-weight: 400; text-transform: none; letter-spacing: 0; }
.chapo { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--encre-2); max-width: 46ch; }
.petit { font-size: .86rem; color: var(--encre-2); }
.g { color: var(--gauche); } .d { color: var(--droite); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- Étiquette d'écolier (titres de section) ---------- */
.etiquette {
  display: inline-block; background: var(--blanc); border: 3px double var(--etiquette); border-radius: 10px;
  padding: .35em .9em .3em; font-family: var(--titre); text-transform: uppercase; font-size: .82rem; letter-spacing: .06em;
  color: var(--encre); box-shadow: 0 0 0 3px var(--blanc);
}
.etiquette.g { border-color: var(--gauche); } .etiquette.d { border-color: var(--droite); }

/* ---------- Tampon administratif ---------- */
.tampon {
  display: inline-block; font-family: var(--titre); text-transform: uppercase; letter-spacing: .12em; font-size: .9rem;
  color: var(--gauche-fonce); border: 3px solid currentColor; border-radius: 6px; padding: .2em .6em; transform: rotate(-7deg);
  mix-blend-mode: multiply; opacity: .88; background: transparent;
}
.tampon.d { color: var(--droite-fonce); } .tampon.vert { color: var(--ok); } .tampon.noir { color: var(--encre); }
.tampon.anime { animation: tamponner .35s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes tamponner { from { transform: rotate(-7deg) scale(2.2); opacity: 0; } to { transform: rotate(-7deg) scale(1); opacity: .88; } }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--papier) 92%, transparent); backdrop-filter: blur(6px); border-bottom: var(--trait) solid var(--encre); }
.entete .conteneur { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo svg { width: 40px; height: 44px; flex: none; }
.logo span { font-family: var(--titre); text-transform: uppercase; font-size: .86rem; line-height: 1; }
.logo span small { display: block; font-size: .86rem; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--blanc); box-shadow: inset 0 0 0 2px var(--encre); }
@media (max-width: 760px) {
  .entete .conteneur { min-height: 56px; }
  .nav .lien-nav { display: none; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.3em; border-radius: 999px;
  border: var(--trait) solid var(--encre); background: var(--blanc); box-shadow: var(--ombre-petite); font-weight: 800; text-decoration: none;
  cursor: pointer; transition: transform .08s, box-shadow .08s; white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--encre); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.noir { background: var(--encre); color: var(--blanc); }
.btn.rouge { background: var(--gauche); color: #fff; }
.btn.bleu { background: var(--droite); color: #fff; }
.btn.or { background: var(--or); }
.btn.grand { min-height: 58px; font-size: 1.1rem; padding: .8em 1.7em; }
.btn.petit { min-height: 38px; padding: .4em .9em; font-size: .9rem; }
.btn.lien { border: 0; box-shadow: none; background: none; text-decoration: underline; padding: 0; min-height: 0; font-weight: 600; }

/* ---------- Cartes ---------- */
.carte { background: var(--blanc); border: var(--trait) solid var(--encre); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 22px; position: relative; }
.carte.g { box-shadow: 4px 4px 0 var(--gauche); } .carte.d { box-shadow: 4px 4px 0 var(--droite); }
.grille { display: grid; gap: 20px; }
.grille.deux { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grille.trois { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grille.quatre { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
section.bloc { padding: clamp(48px, 8vw, 96px) 0; }
.entete-section { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin-bottom: 28px; }

/* ---------- Héros ---------- */
.heros { padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); }
.heros .conteneur { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; }
@media (max-width: 860px) { .heros .conteneur { grid-template-columns: 1fr; } .heros .visuel { order: -1; max-width: 340px; margin: 0 auto; } }
.heros h1 .ligne2 { display: block; }
.heros h1 .coupe { background: linear-gradient(90deg, var(--gauche) 0 50%, var(--droite) 50% 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; }
.visuel svg { width: 100%; height: auto; overflow: visible; }

/* Animation de la découpe (moitiés qui s'écartent, ciseaux qui descendent). */
.decoupe .moitie-g { animation: ecarter-g 4s ease-in-out infinite; }
.decoupe .moitie-d { animation: ecarter-d 4s ease-in-out infinite; }
.decoupe .ciseaux { animation: ciseaux 4s ease-in-out infinite; }
.decoupe .pointilles { animation: pointilles 4s linear infinite; }
@keyframes ecarter-g { 0%, 30% { transform: translateX(0); } 55%, 85% { transform: translateX(-7px) rotate(-3deg); } 100% { transform: translateX(0); } }
@keyframes ecarter-d { 0%, 30% { transform: translateX(0); } 55%, 85% { transform: translateX(7px) rotate(3deg); } 100% { transform: translateX(0); } }
@keyframes ciseaux { 0% { transform: translate(0, -8px); opacity: 0; } 8% { opacity: 1; } 45% { transform: translate(0, 92px); opacity: 1; } 55%, 100% { transform: translate(0, 100px); opacity: 0; } }
@keyframes pointilles { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .decoupe * { animation: none !important; } }
.moitie-g, .moitie-d { transform-box: fill-box; transform-origin: center bottom; }

/* ---------- Compte à rebours ---------- */
.rebours { display: flex; gap: 10px; flex-wrap: wrap; }
.rebours .case { min-width: 72px; text-align: center; background: var(--blanc); border: var(--trait) solid var(--encre); border-radius: 12px; padding: 8px 6px 6px; box-shadow: var(--ombre-petite); }
.rebours .case b { display: block; font-family: var(--titre); font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.rebours .case span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-2); }

/* ---------- Jauge des camps (inscrits) ---------- */
.camps-barre { display: flex; height: 18px; border: var(--trait) solid var(--encre); border-radius: 999px; overflow: hidden; background: var(--papier-2); }
.camps-barre i { display: block; height: 100%; transition: width .6s; }
.camps-barre .g { background: var(--gauche); } .camps-barre .d { background: var(--droite); border-left: 2px solid var(--blanc); }
.camps-legende { display: flex; justify-content: space-between; font-weight: 700; margin-top: 6px; font-size: .95rem; }

/* ---------- Étapes ---------- */
.etape { padding-top: 34px; }
.etape .num { position: absolute; top: -22px; left: 18px; width: 48px; height: 48px; border-radius: 50%; background: var(--or); border: var(--trait) solid var(--encre); display: grid; place-items: center; font-family: var(--titre); font-size: 1.4rem; }
.etape h3 { margin-top: 6px; }

/* ---------- Duel / scoreboard ---------- */
.duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; border: var(--trait) solid var(--encre); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); background: var(--blanc); }
.duel > div { padding: 18px 20px; }
.duel .cote-g { background: var(--gauche-clair); } .duel .cote-d { background: var(--droite-clair); text-align: right; }
.duel .vs { display: grid; place-items: center; font-family: var(--titre); background: var(--encre); color: var(--blanc); padding: 0 12px; }
.duel .score { font-family: var(--titre); font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1; }
.duel .nom { font-family: var(--titre); text-transform: uppercase; font-size: .9rem; }
.ligne-duel { display: grid; grid-template-columns: 1fr minmax(110px, auto) 1fr; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1.5px dashed var(--seyes-fort); }
.ligne-duel:last-child { border-bottom: 0; }
.ligne-duel .lib { text-align: center; font-size: .85rem; font-weight: 700; color: var(--encre-2); }
.ligne-duel .val { font-weight: 800; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.ligne-duel .val.d { justify-content: flex-end; }
.pastille { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pastille.g { background: var(--gauche); } .pastille.d { background: var(--droite); }
.mieux { font-size: .7rem; font-weight: 800; background: var(--or); border: 1.5px solid var(--encre); border-radius: 999px; padding: 0 6px; }

/* ---------- Calendrier ---------- */
.frise { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.frise .sem { background: var(--blanc); border: 2px solid var(--encre); border-radius: 12px; padding: 10px 12px; font-size: .88rem; position: relative; }
.frise .sem b { display: block; font-family: var(--titre); font-size: 1.05rem; }
.frise .sem.passee { background: var(--papier-2); }
.frise .sem.encours { background: var(--or); box-shadow: var(--ombre-petite); }
.frise .sem .badge { position: absolute; top: -10px; right: 8px; background: var(--encre); color: var(--blanc); font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; }

/* ---------- FAQ ---------- */
details.faq { background: var(--blanc); border: 2px solid var(--encre); border-radius: 12px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: '+'; font-family: var(--titre); }
details.faq[open] summary::after { content: '−'; }
details.faq > div { padding: 0 18px 14px; color: var(--encre-2); }

/* ---------- Formulaires ---------- */
label.champ { display: block; font-weight: 700; margin-bottom: 14px; }
label.champ span { display: block; margin-bottom: 6px; }
.input, textarea.input { width: 100%; min-height: 50px; padding: 12px 14px; border: var(--trait) solid var(--encre); border-radius: 12px; background: var(--blanc); }
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: 3px solid var(--or); outline-offset: 1px; }
.case-a-cocher { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; font-size: .95rem; }
.case-a-cocher input { width: 22px; height: 22px; accent-color: var(--encre); flex: none; margin-top: 2px; }
.message { padding: 12px 16px; border-radius: 12px; border: 2px solid var(--encre); background: var(--blanc); margin: 12px 0; font-weight: 600; }
.message.erreur { border-color: var(--alerte); background: #FFF1EA; color: #8A2E07; }
.message.ok { border-color: var(--ok); background: #EAF7EF; color: #11532F; }

/* ---------- Choix du camp ---------- */
.choix-camp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .choix-camp { grid-template-columns: 1fr; } }
.choix-camp button { text-align: left; border: var(--trait) solid var(--encre); border-radius: var(--rayon); padding: 20px; cursor: pointer; display: grid; gap: 8px; box-shadow: var(--ombre); transition: transform .1s; }
.choix-camp button:hover { transform: translate(-2px, -2px); }
.choix-camp .g { background: var(--gauche); color: #fff; } .choix-camp .d { background: var(--droite); color: #fff; }
.choix-camp button[aria-pressed="true"] { outline: 5px solid var(--or); outline-offset: 3px; }
.choix-camp svg { width: 90px; height: 96px; }
.choix-camp .titre { font-size: 1.5rem; }
.puces { display: flex; flex-wrap: wrap; gap: 10px; }
.puce { border: 2px solid var(--encre); background: var(--blanc); border-radius: 999px; padding: 10px 16px; cursor: pointer; font-weight: 700; min-height: 46px; }
.puce[aria-pressed="true"] { background: var(--encre); color: var(--blanc); }
.etapes-nav { display: flex; gap: 8px; margin-bottom: 18px; }
.etapes-nav i { flex: 1; height: 8px; border-radius: 999px; background: var(--papier-2); border: 1.5px solid var(--encre); }
.etapes-nav i.fait { background: var(--encre); }

/* ---------- Modale ---------- */
dialog { border: var(--trait) solid var(--encre); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 26px; max-width: min(520px, 100% - 32px); background: var(--blanc); }
dialog::backdrop { background: rgba(22, 22, 29, .55); }

/* ---------- Jeu ---------- */
.bandeau-camp { color: #fff; border-bottom: var(--trait) solid var(--encre); }
.bandeau-camp.g { background: var(--gauche); } .bandeau-camp.d { background: var(--droite); }
.bandeau-camp .conteneur { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; padding: 16px 0; }
.bandeau-camp .titre { font-size: clamp(1.2rem, 3vw, 1.7rem); margin: 0; }
.bandeau-camp .info { font-weight: 700; }
.mise-en-page { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; padding: 28px 0 64px; align-items: start; }
@media (max-width: 980px) { .mise-en-page { grid-template-columns: 1fr; } }
.colonne { display: grid; gap: 24px; }
.dossier { padding: 0; overflow: hidden; }
.dossier .tete { padding: 18px 22px 14px; border-bottom: 2px dashed var(--seyes-fort); }
.dossier .tete h3 { font-size: 1.35rem; margin: 10px 0 0; text-transform: none; font-family: var(--titre); }
.options { display: grid; gap: 10px; padding: 16px 22px 20px; }
.option { display: grid; grid-template-columns: 26px 1fr; gap: 12px; border: 2px solid var(--encre); border-radius: 12px; padding: 14px; cursor: pointer; background: var(--blanc); transition: background .1s; }
.option:hover { background: var(--papier); }
.option input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--encre); }
.option.choisie { background: var(--papier-2); box-shadow: inset 0 0 0 2px var(--encre); }
.option strong { display: block; line-height: 1.3; }
.option p { margin: 4px 0 0; color: var(--encre-2); font-size: .92rem; }
.effets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.effet { font-size: .74rem; font-weight: 700; border: 1.5px solid var(--encre-3); border-radius: 999px; padding: 1px 8px; color: var(--encre-2); background: var(--blanc); white-space: nowrap; }
.effet.cout { border-style: dashed; }
.source { display: block; font-size: .76rem; color: var(--encre-3); margin-top: 6px; }
.pied-dossier { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px 20px; flex-wrap: wrap; }
.alerte-crise { background: #FFF6D6; border-color: var(--encre); }
.alerte-crise .icone { font-size: 2.2rem; line-height: 1; }
.president { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.president .couronne { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--or); border: var(--trait) solid var(--encre); font-size: 1.8rem; }
.discours { font-family: var(--plume); font-size: .95rem; line-height: 1.9; margin-top: 12px; background: repeating-linear-gradient(transparent 0 29px, var(--seyes-fort) 29px 30px); padding: 0 4px; }
.candidat { border: 2px solid var(--encre); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; background: var(--blanc); }
.candidat .barre { height: 8px; border-radius: 999px; background: var(--papier-2); overflow: hidden; border: 1.5px solid var(--encre); }
.candidat .barre i { display: block; height: 100%; background: var(--or); }
.mentions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.mentions label { display: grid; place-items: center; text-align: center; font-size: .68rem; font-weight: 700; border: 1.5px solid var(--encre); border-radius: 8px; padding: 6px 2px; cursor: pointer; min-height: 44px; }
.mentions input { position: absolute; opacity: 0; pointer-events: none; }
.mentions input:checked + span { color: #fff; }
.mentions label:has(input:checked) { background: var(--encre); color: #fff; }
@media (max-width: 480px) { .mentions { grid-template-columns: repeat(3, 1fr); } }
.proposition { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; border-bottom: 1.5px dashed var(--seyes-fort); padding: 10px 0; }
.proposition:last-child { border-bottom: 0; }

/* ---------- Graphiques ---------- */
.graphique { position: relative; }
.graphique svg { display: block; width: 100%; height: auto; overflow: visible; }
.graphique .axe text { font-size: 11px; fill: var(--encre-2); font-family: var(--texte); }
.graphique .grille-g line { stroke: var(--seyes-fort); stroke-width: 1; }
.graphique .zero { stroke: var(--encre-3); stroke-width: 1; stroke-dasharray: 3 3; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; font-weight: 700; margin-bottom: 6px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.infobulle { position: absolute; pointer-events: none; background: var(--blanc); border: 2px solid var(--encre); border-radius: 10px; padding: 8px 10px; font-size: .8rem; box-shadow: var(--ombre-petite); white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 12px)); }
.infobulle b { display: block; margin-bottom: 2px; }
.donnees summary { cursor: pointer; font-size: .82rem; font-weight: 700; margin-top: 8px; color: var(--encre-2); }
table.tableau { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
table.tableau th, table.tableau td { border-bottom: 1px solid var(--seyes-fort); padding: 6px 8px; text-align: right; }
table.tableau th:first-child, table.tableau td:first-child { text-align: left; }
.defile { overflow-x: auto; }
.jauge { display: grid; gap: 6px; }
.jauge .rail { position: relative; height: 14px; border-radius: 999px; background: var(--papier-2); border: 2px solid var(--encre); }
.jauge .rail i { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--encre); transform: translate(-50%, -50%); }
.jauge .rail .depart { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--encre); left: 50%; }

/* ---------- Journal ---------- */
.annee { border-left: 4px solid var(--encre); padding: 4px 0 20px 20px; position: relative; }
.annee::before { content: ''; position: absolute; left: -12px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--or); border: 2px solid var(--encre); }
.annee h3 { margin-bottom: 8px; }
.decisions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .decisions { grid-template-columns: 1fr; } }
.decision { font-size: .9rem; border: 2px solid var(--encre); border-radius: 10px; padding: 8px 12px; background: var(--blanc); }
.decision.g { border-left: 8px solid var(--gauche); } .decision.d { border-left: 8px solid var(--droite); }

/* ---------- Pied de page ---------- */
.pied { border-top: var(--trait) solid var(--encre); background: var(--encre); color: var(--papier); padding: 36px 0 28px; position: relative; z-index: 1; }
.pied a { color: var(--papier); }
.pied .conteneur { display: grid; gap: 18px; grid-template-columns: 1.4fr 1fr; }
@media (max-width: 700px) { .pied .conteneur { grid-template-columns: 1fr; } }
.pied .avertissement { font-weight: 700; }
.pied nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-content: start; }

/* ---------- Divers ---------- */
.texte-long { max-width: 74ch; }
.texte-long h2 { margin-top: 1.6em; }
.texte-long h3 { margin-top: 1.4em; text-transform: none; }
.texte-long li { margin-bottom: .4em; }
.vide { text-align: center; padding: 30px; color: var(--encre-2); }
.empreinte { font-family: ui-monospace, monospace; font-size: .75rem; word-break: break-all; color: var(--encre-2); }
.chargement { opacity: .55; pointer-events: none; }

/* ---------- Correctifs de spécificité ---------- */
.carte.g, .carte.d { color: var(--encre); }
.ligne-duel .val, .ligne-duel .val.d { color: var(--encre); }
.choix-camp svg { background: var(--blanc); border: var(--trait) solid var(--encre); border-radius: 50%; padding: 6px; }

/* ==========================================================================
   MOBILE D'ABORD : les joueurs arrivent d'Instagram et de TikTok, sur téléphone.
   ========================================================================== */
html { -webkit-tap-highlight-color: transparent; scroll-padding-top: 76px; }
@media (max-width: 760px) { html { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); } }
.logo span { white-space: nowrap; }
#nav-compte { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; display: inline-flex; }
#nav-compte span { overflow: hidden; text-overflow: ellipsis; }
body { min-height: 100dvh; }
.plein { width: 100%; }
.input { font-size: 16px; } /* 16 px minimum : iOS ne zoome pas sur le champ */
.input.code { font-family: var(--titre); font-size: 2rem; letter-spacing: .45em; text-align: center; padding-left: .45em; min-height: 64px; }

/* Barre d'onglets du bas */
.onglets { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .onglets {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--blanc); border-top: var(--trait) solid var(--encre); padding-bottom: env(safe-area-inset-bottom);
  }
  .onglets a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; text-decoration: none; font-size: .74rem; font-weight: 800; color: var(--encre-2); }
  .onglets svg { width: 26px; height: 26px; }
  .onglets a[aria-current="page"] { color: var(--encre); }
  .onglets a[aria-current="page"] svg { background: var(--or); border-radius: 10px; padding: 2px; box-shadow: 0 0 0 2px var(--encre); }
  body[data-camp="G"] .onglets a[aria-current="page"] svg { background: var(--gauche-clair); }
  body[data-camp="D"] .onglets a[aria-current="page"] svg { background: var(--droite-clair); }
}

/* Écrans tactiles : pas d'effets de survol qui « collent » après un tap */
@media (hover: none) {
  .btn:hover { transform: none; box-shadow: var(--ombre-petite); }
  .btn.lien:hover, .btn.lien { box-shadow: none; }
  .choix-camp button:hover { transform: none; }
  .option:hover { background: var(--blanc); }
  .option.choisie:hover { background: var(--papier-2); }
  .nav a:hover { background: none; box-shadow: none; }
}
.btn:active, .option:active, .puce:active, .choix-camp button:active { transform: scale(.98); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 50; max-width: calc(100% - 32px);
  background: var(--encre); color: var(--blanc); padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: var(--ombre-petite);
  transition: transform .25s cubic-bezier(.2, 1.4, .4, 1); pointer-events: none; text-align: center; }
.toast.visible { transform: translate(-50%, 0); }
@media (max-width: 760px) { .toast { bottom: calc(78px + env(safe-area-inset-bottom)); } }

/* Mise en page resserrée sur téléphone */
@media (max-width: 600px) {
  section.bloc { padding: 36px 0; }
  .bloc-serre { padding-top: 20px !important; }
  .carte { padding: 18px; box-shadow: 3px 3px 0 var(--encre); }
  .carte.g { box-shadow: 3px 3px 0 var(--gauche); } .carte.d { box-shadow: 3px 3px 0 var(--droite); }
  h2 { font-size: 1.75rem; }
  .heros { padding: 18px 0 28px; }
  .heros .conteneur { gap: 8px; }
  .heros .visuel { order: 0 !important; max-width: 200px !important; margin: 4px auto 0; }
  .heros h1 { font-size: clamp(2.3rem, 11.5vw, 3.2rem); margin-top: 12px !important; }
  .chapo { font-size: 1.02rem; }
  .actions { margin: 18px 0 12px; }
  .actions .btn.grand { flex: 1 1 100%; }
  .rebours .case { min-width: 0; flex: 1; padding: 6px 2px 4px; }
  .rebours .case b { font-size: 1.6rem; }
  .duel > div { padding: 12px; }
  .duel .score { font-size: 2.2rem; }
  .ligne-duel { grid-template-columns: 1fr minmax(84px, auto) 1fr; gap: 6px; }
  .ligne-duel .lib { font-size: .75rem; }
  .frise { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .etape { padding-top: 28px; }
  details.faq summary { padding: 14px; min-height: 52px; align-items: center; }
  .pied .conteneur { gap: 10px; }
  dialog { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-bottom: 0; }
  dialog .actions .btn { flex: 1 1 100%; }
  .mentions label { min-height: 48px; font-size: .74rem; }
  .bandeau-camp .conteneur { padding: 12px 0; gap: 4px 16px; }
  .bandeau-camp .info { font-size: .9rem; }
  .mise-en-page { padding: 18px 0 40px; gap: 18px; }
  .dossier .tete { padding: 16px 16px 12px; }
  .dossier .tete h3 { font-size: 1.15rem; }
  .options { padding: 12px 12px 14px; gap: 8px; }
  .option { padding: 12px; gap: 10px; }
  .pied-dossier { padding: 0 16px 16px; }
  table.tableau { font-size: .82rem; }
  table.tableau th, table.tableau td { padding: 6px 4px; }
}

/* Jeu : bandeau de score compact en haut sur téléphone */
.score-mobile { display: none; }
@media (max-width: 980px) {
  .score-mobile { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--blanc); border: var(--trait) solid var(--encre); border-radius: 14px; overflow: hidden; text-decoration: none; }
  .score-mobile > span { padding: 10px 12px; }
  .score-mobile .sg { background: var(--gauche-clair); } .score-mobile .sd { background: var(--droite-clair); text-align: right; }
  .score-mobile b { display: block; font-family: var(--titre); font-size: 1.6rem; line-height: 1; }
  .score-mobile small { font-size: .72rem; font-weight: 700; color: var(--encre-2); }
  .score-mobile .milieu { font-family: var(--titre); font-size: .8rem; background: var(--encre); color: var(--blanc); align-self: stretch; display: grid; place-items: center; }
}
.progression-vote { display: flex; gap: 6px; align-items: center; font-weight: 800; font-size: .9rem; }
.progression-vote i { width: 26px; height: 10px; border-radius: 999px; border: 2px solid var(--encre); background: var(--blanc); }
.progression-vote i.fait { background: var(--encre); }
.option .vote-ok { display: none; }
.option.choisie .vote-ok { display: inline-block; margin-left: 6px; }

/* Résultats : un graphique à la fois sur téléphone */
.choix-courbe { display: none; }
@media (max-width: 700px) {
  .choix-courbe { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px 10px; padding-inline: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .choix-courbe::-webkit-scrollbar { display: none; }
  .choix-courbe .puce { flex: none; scroll-snap-align: start; min-height: 42px; padding: 8px 14px; }
  #courbes > .carte { display: none; }
  #courbes > .carte.active { display: block; }
}

/* Inscription et connexion : tunnel sans onglets, bouton d'action toujours visible en bas */
@media (max-width: 760px) {
  body.tunnel { padding-bottom: env(safe-area-inset-bottom); }
  body.tunnel .onglets { display: none; }
}
.collant { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; }
@media (max-width: 600px) { .collant { width: 100%; } }

/* Plancher de lisibilité : aucun libellé sous 12 px */
.rebours .case span, .score-mobile small { font-size: .78rem; }
.mieux { font-size: .75rem; }
.frise .sem .badge { font-size: .75rem; }
.effet { font-size: .8rem; padding: 2px 9px; }
.effet small { font-size: inherit; font-weight: 600; }
.onglets a { font-size: .78rem !important; }
.donnees summary { min-height: 44px; display: flex; align-items: center; }
.lien-fleche { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* Signalement : discret mais assez grand pour le doigt */
.btn.lien.signaler { font-size: .8rem; color: var(--encre-3); min-height: 32px; padding: 6px 0; display: inline-flex; font-weight: 600; }
.turnstile { margin: 4px 0 14px; min-height: 65px; }
