/* =============================================================================
 * TCHUT – LA FEUILLE DU JEU
 * -----------------------------------------------------------------------------
 * Indépendante du site : aucune règle, aucune police, aucune image du site n'est
 * chargée. L'identité vient des mascottes (le seul fichier pris au site, posé
 * par le serveur), du logo textuel, du jaune et du #333 des boutons du site.
 *
 * TOUT TIENT DANS L'ÉCRAN, SANS JAMAIS DÉFILER. `#app` fait la hauteur de la
 * fenêtre visible (`100dvh`), chaque écran est un calque de cette hauteur, et ce
 * qui pourrait déborder – le début d'une blague longue, une chute sur trois
 * lignes – est ramené à la taille par `ajuste()` dans tchut.js, pas coupé.
 * ========================================================================== */

@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("fonts/fredoka-600.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("fonts/fredoka-700.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/nunito-400.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/nunito-800.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --nuit: #1c0b33;
  --nuit2: #2b1150;
  --violet: #4a148c;
  --vif: #7c43bd;
  --lilas: #cdb9eb;
  --lilas-f: #a08ac4;
  --jaune: #f4d400;
  --jaune-f: #c9ae00;
  --vert: #7ddd21;
  --vert-f: #3f8a0c;
  --rouge: #e5484d;
  --rose: #ff3d7f;
  --encre: #333;
  --papier: #fffdf6;
  --gris: #6b6478;
  --ombre: 0 14px 40px rgba(8, 0, 20, .45);
  --r: 20px;
  --t-titre: "Fredoka", "Nunito", system-ui, sans-serif;
  --t-texte: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --barre: clamp(46px, 7.2vh, 60px);
  --gout: max(16px, env(safe-area-inset-left, 0px));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--nuit);
  color: #fff;
  font-family: var(--t-texte);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  user-select: none;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }

/* ----------------------------------------------------------------- l'ossature */
#app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--barre) 1fr;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  isolation: isolate;
}
/* LE BAS, SELON LA DOCUMENTATION DE CHROME ET RIEN D'AUTRE (4.0.19). La
   réserve est `safe-area-inset-bottom` (règle de #app ci-dessus), celle que
   le navigateur annonce pour la barre du bas. Plus de minimum fixe (24 px en
   1.8.x, 48 px en 4.0.9) ni de mesure (4.0.18) : tout l'écran va au jeu.
   Pierre : « on va appliquer la documentation officielle sans mesure ».
   Relevés du 30 sur son téléphone : 0 dans l'appli installée, 25 px dans
   l'onglet Chrome, et aucune bande blanche sur cinq lancements. */
.fond { position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, var(--violet) 0%, var(--nuit2) 45%, var(--nuit) 100%); }
.fond i { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .5; animation: derive 26s ease-in-out infinite alternate; }
.fond i:nth-child(1) { width: 46vmax; height: 46vmax; left: -14vmax; top: 30%; background: #6b2fb3; }
.fond i:nth-child(2) { width: 30vmax; height: 30vmax; right: -10vmax; top: -6vmax; background: #8a4fd0; animation-duration: 32s; }
.fond i:nth-child(3) { width: 22vmax; height: 22vmax; right: 10%; bottom: -8vmax; background: rgba(244, 212, 0, .22); animation-duration: 40s; }
@keyframes derive { to { transform: translate(6vmax, -4vmax) scale(1.12); } }

/* ------------------------------------------------------------------ la barre */
.barre { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding-inline: var(--gout); z-index: 3; }
.marque { display: inline-flex; align-items: center; height: calc(var(--barre) - 16px); padding: 5px 11px;
  background: #fff; border-radius: 999px; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); transform: rotate(-2deg);
  transition: transform .2s; }
.marque:hover { transform: rotate(0) scale(1.04); }
.marque .mot { height: 100%; width: auto; aspect-ratio: 440 / 83.43; display: block; }
/* Sur un téléphone haut, la barre grandit (7,2 vh) et le logo avec : il
   poussait les boutons hors de l'écran (Pierre, capture du 27 septembre).
   Le logo ne prend jamais plus d'un tiers de la largeur. */
.marque .mot { width: min(calc((var(--barre) - 26px) * 5.274), calc(34vw - 22px)); height: auto; }
.nom { min-width: 0; }
.marque .mot-repli { font: 800 17px/1 var(--t-texte); color: var(--encre); letter-spacing: -.02em; }
.marque .mot-repli b { color: var(--vif); }
.nom { justify-self: center; background: none; border: 0; padding: 0; display: inline-flex; align-items: baseline;
  font: 700 clamp(22px, 3.6vh, 30px)/1 var(--t-titre); color: var(--jaune);
  -webkit-text-stroke: 2px var(--encre); paint-order: stroke fill; text-shadow: 0 3px 0 var(--encre); letter-spacing: .01em; }
.nom b { display: inline-block; margin-left: 2px; animation: exclam 2.8s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes exclam { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(14deg) translateY(-3px); } 86% { transform: rotate(-10deg); } 93% { transform: rotate(4deg); } }
#app[data-ecran="accueil"] .nom { visibility: hidden; }
.demo-puce { position: absolute; left: 50%; top: calc(var(--barre) - 8px); transform: translateX(-50%); font: 800 10px/1 var(--t-texte);
  letter-spacing: .12em; background: var(--rose); color: #fff; padding: 3px 7px; border-radius: 999px; z-index: 4; }
.icones { display: flex; gap: 4px; }
.ico { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: rgba(255, 255, 255, .08);
  border-radius: 12px; color: #fff; transition: background .15s, transform .15s; }
.ico:hover { background: rgba(255, 255, 255, .16); }
.ico:active { transform: scale(.92); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico svg .p { fill: currentColor; stroke: none; }

/* ------------------------------------------------------------------ les écrans */
.scenes { position: relative; min-height: 0; }
.ecran { position: absolute; inset: 0; padding: 4px var(--gout) 12px; display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transform: translateY(18px) scale(.985); transition: opacity .35s, transform .45s cubic-bezier(.2, .8, .2, 1); }
#app[data-ecran="accueil"] #e-accueil, #app[data-ecran="jeu"] #e-jeu, #app[data-ecran="fin"] #e-fin {
  opacity: 1; pointer-events: auto; transform: none; }

/* ------------------------------------------------------------------ les puces */
.puce { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); font: 800 13px/1.1 var(--t-texte); color: var(--lilas); }
.puce.petite { padding: 3px 9px; font-size: 12px; margin: 0; }
.puce.serie { background: var(--jaune); color: var(--encre); }
.puce.serie svg { width: 15px; height: 15px; fill: #ff7a00; }
.puce.archive { background: rgba(255, 61, 127, .18); color: #ffc2d7; }

/* ------------------------------------------------------------------ les boutons */
.gros { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px;
  border-radius: 999px; border: 2px solid var(--encre); font: 700 clamp(17px, 2.5vh, 20px)/1.1 var(--t-titre); letter-spacing: .01em;
  box-shadow: 0 4px 0 var(--encre); transition: transform .12s, box-shadow .12s, filter .15s; }
.gros:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 5px 0 var(--encre); }
.gros:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--encre); }
.gros svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.gros.jaune { background: var(--jaune); color: var(--encre); }
.gros.blanc { background: #fff; color: var(--encre); }
.gros.rose { background: var(--rose); color: #fff; }
.gros.court { min-height: 46px; padding: 10px 22px; }
.mini { border: 2px solid rgba(255, 255, 255, .3); background: transparent; border-radius: 999px; padding: 5px 13px; font-weight: 800; font-size: 14px; }
.mini.jaune { background: var(--jaune); color: var(--encre); border-color: var(--jaune); }
.lien { background: none; border: 0; padding: 4px 2px; color: var(--lilas); font-weight: 800; font-size: 14px;
  text-decoration: underline; text-decoration-color: rgba(205, 185, 235, .4); text-underline-offset: 4px; }
.lien:hover { color: #fff; }

/* ------------------------------------------------------------------ les mascottes */
.duo { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.masc { display: block; overflow: visible; cursor: pointer; flex: none; transform-origin: 50% 92%;
  transition: transform .45s cubic-bezier(.3, .8, .3, 1.25), opacity .4s, filter .4s; }
.masc.oeuf { aspect-ratio: 145 / 180; }
.masc.kiwi { aspect-ratio: 142 / 144; }
.masc:active { transform: scale(.94); }
/* Au repos : l'œuf respire, le kiwi cligne et guette. */
.masc.oeuf { --a-oeuf: bb-o-respire; --d: 5.5s; --n: infinite; }
.masc.kiwi { --a-oeil-k: bb-k-cligne-lent; --d-cligne: 5s; --nk: infinite; --a-pupille: bb-k-guette; --dk: 7s; }
/* Celui qui parle passe devant. */
.duo[data-parle="oeuf"] .kiwi, .duo[data-parle="kiwi"] .oeuf { transform: scale(.86); filter: saturate(.75) brightness(.9); }
.duo[data-parle="oeuf"] .oeuf, .duo[data-parle="kiwi"] .kiwi { transform: scale(1.05); }

/* LES ATTITUDES. Chacune branche une animation que la feuille de mascottes.svg
   expose déjà : on ne pose que des variables, jamais une règle sur le dessin.
   Rejouées par classe retirée, reflow, classe remise (piège 32). */
.masc.a-rit    { --a-oeuf: bb-fete-rire; --a-bouche: bb-o-bouche; --a-arcs: bb-o-sourcil; --d: 1.1s; --n: 2; }
.masc.a-saute  { --a-oeuf: bb-o-saute; --a-bouche: bb-o-bouche; --a-arcs: bb-o-sourcil; --d: .9s; --n: 3; }
.masc.a-danse  { --a-oeuf: bb-o-rit; --a-bouche: bb-o-bouche; --a-arcs: bb-o-sourcil; --d: .8s; --n: infinite; }
.masc.a-clin   { --a-oeuf: bb-o-penche; --a-oeil-od: bb-o-clin; --a-arc-od: bb-o-arc-od; --a-arc-og: bb-o-arc-og; --a-bouche: bb-o-sourit; --d: 1.4s; --n: 1; }
.masc.a-penche { --a-oeuf: bb-o-penche; --a-yeux: bb-o-plisse; --d: 1.6s; --n: 1; }
.masc.a-tombe  { --a-oeuf: bb-o-tombe; --d: 1.1s; --n: 1; --e: cubic-bezier(.3, .6, .4, 1); }
.masc.a-souffle { --a-jaune: bb-o-souffle; --a-oeuf: bb-o-respire; --d: 2s; --n: 2; }
.masc.a-blase  { --a-oeil-k: none; --a-kiwi: bb-fete-blase; --a-pupille: bb-fete-roulent; --a-verres: bb-fete-lunettes; --dk: 1.5s; --nk: 2; }
.masc.a-non    { --a-oeil-k: none; --a-kiwi: bb-k-non; --a-pupille: bb-k-roule; --a-sourcils-k: bb-k-sourcil; --dk: 1.3s; --nk: 2; }
.masc.a-roule  { --a-oeil-k: none; --a-pupille: bb-k-roule; --a-sourcils-grp: bb-k-sourcils2; --dk: 1.6s; --nk: 1; }
.masc.a-regard { --a-oeil-k: none; --a-pupille: bb-k-regard; --a-sourcils-k: bb-k-sourcil; --dk: 2.2s; --nk: 1; }
.masc.a-hausse { --a-oeil-k: none; --a-sourcils-k: bb-k-sourcil; --a-verres: bb-k-verres; --dk: 1.5s; --nk: 1; }
.masc.a-affaisse { --a-oeil-k: none; --a-kiwi: bb-k-affaisse; --a-verres: bb-k-verres; --dk: 1.8s; --nk: 1; }
.masc.a-tourne { --a-oeil-k: none; --a-kiwi: bb-att-roule; --tours: 2; --a-pupille: bb-att-scrute; --dk: 1.4s; --nk: 1; --e-kiwi: cubic-bezier(.4, 0, .2, 1); }
.masc.a-vertige { --pivot-k: 50% 50%; --a-couronne: bb-att-tourne; --a-pupille: bb-k-roule; --dk: 1.2s; --nk: 3; }
.masc.a-trepigne { --a-kiwi: bb-att-trepigne; --a-oeil-k: none; --a-pupille: bb-att-scrute; --dk: .5s; --nk: 4; }
#app[data-anim="doux"] .masc { --n: 1 !important; --nk: 1 !important; }
#app[data-anim="doux"] .fond i { animation: none; }
#app[data-anim="doux"] .suspens i { animation: none; opacity: .6; }

/* La bulle */
.bulle { position: relative; align-self: center; max-width: min(62%, 320px); background: #fff; color: var(--encre);
  border-radius: 16px; padding: 9px 13px; font-weight: 800; font-size: clamp(13px, 1.9vh, 15.5px); line-height: 1.3;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .22); opacity: 0; transform: scale(.7) translateY(8px); transition: opacity .2s, transform .35s cubic-bezier(.3, .8, .3, 1.4);
  pointer-events: none; }
.bulle.vue { opacity: 1; transform: none; }
.bulle::after { content: ""; position: absolute; bottom: 12px; border: 9px solid transparent; }
.duo[data-parle="oeuf"] .bulle::after { left: -14px; border-right-color: #fff; }
.duo[data-parle="kiwi"] .bulle::after { right: -14px; border-left-color: #fff; }
.duo[data-parle="kiwi"] .bulle { font-style: italic; font-weight: 400; }

/* ------------------------------------------------------------------ ACCUEIL */
#e-accueil { align-items: center; justify-content: space-between; gap: clamp(4px, 1.4vh, 14px); text-align: center; }
.acc-puces { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.acc-duo { flex: 1 1 auto; min-height: 0; width: 100%; max-height: 38vh; align-items: flex-end; container-type: inline-size; }
/* Les deux mascottes tiennent dans la largeur de leur boîte (cqw) : l'œuf fait
   0,8 fois sa hauteur de large, le kiwi 0,79 fois celle de l'œuf ; à 60 cqw de
   haut, le duo remplit 95 % de la largeur. Sans cette borne, le kiwi débordait
   sur la colonne de texte des grands écrans. */
.acc-duo .masc.oeuf { height: min(100%, 30vh, 60cqw); max-height: 220px; }
.acc-duo .masc.kiwi { height: min(80%, 24vh, 48cqw); max-height: 178px; }
.acc-duo .bulle { position: absolute; top: 4%; left: 50%; transform: translateX(-50%) scale(.7); max-width: min(82%, 340px); }
.acc-duo .bulle.vue { transform: translateX(-50%); }
.acc-duo .bulle::after { left: 50% !important; right: auto !important; bottom: -14px; border: 9px solid transparent; border-top-color: #fff !important; border-right-color: transparent !important; border-left-color: transparent !important; transform: translateX(-50%); }
.acc-texte { display: flex; flex-direction: column; align-items: center; gap: clamp(6px, 1.4vh, 14px); width: 100%; }
.acc-titre { margin: 0; font: 700 clamp(44px, min(11vh, 20vw), 108px)/.9 var(--t-titre); white-space: nowrap; color: var(--jaune);
  -webkit-text-stroke: clamp(3px, .5vh, 5px) var(--encre); paint-order: stroke fill;
  text-shadow: 0 clamp(4px, .8vh, 8px) 0 var(--encre); letter-spacing: .01em; display: flex; align-items: baseline; }
.acc-titre .lettres { display: inline-flex; }
.acc-titre .lettres span { display: inline-block; animation: vague 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * .09s); }
.acc-titre b { display: inline-block; margin-left: .04em; animation: exclam 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes vague { 0%, 60%, 100% { transform: none; } 70% { transform: translateY(-.12em) rotate(-4deg); } 80% { transform: translateY(.02em) rotate(3deg); } }
#app[data-anim="doux"] .acc-titre .lettres span, #app[data-anim="doux"] .acc-titre b, #app[data-anim="doux"] .nom b { animation: none; }
.acc-sous { margin: 0; color: var(--lilas); font-size: clamp(14px, 2vh, 17px); max-width: 30em; text-wrap: balance; }
.acc-sous em { color: #fff; font-style: normal; font-weight: 800; }
#b-jouer { min-width: min(100%, 320px); min-height: clamp(54px, 8vh, 64px); font-size: clamp(19px, 2.8vh, 23px); }
#b-jouer.brille { animation: brille 2.2s ease-in-out infinite; }
@keyframes brille { 0%, 100% { box-shadow: 0 4px 0 var(--encre), 0 0 0 0 rgba(244, 212, 0, .55); } 50% { box-shadow: 0 4px 0 var(--encre), 0 0 0 12px rgba(244, 212, 0, 0); } }
.acc-rebours { margin: 0; color: var(--lilas); font-size: 14px; font-variant-numeric: tabular-nums; }
.acc-rebours b { color: #fff; }
.semaine { display: flex; gap: clamp(6px, 1.4vw, 12px); justify-content: center; }
.semaine .j { display: grid; justify-items: center; gap: 3px; font: 800 11px/1 var(--t-texte); color: var(--lilas-f); background: none; border: 0; padding: 0; }
.semaine .j i { width: clamp(22px, 3.4vh, 30px); height: clamp(28px, 4.2vh, 37px); border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  border: 2px dashed rgba(205, 185, 235, .35); display: grid; place-items: center; font: 700 13px/1 var(--t-titre); font-style: normal; color: var(--encre); }
.semaine .j.fait i { border: 2px solid var(--encre); background: var(--jaune); }
.semaine .j.rattrape i { border: 2px solid var(--encre); background: #fff; }
.semaine .j.aujourdhui { color: #fff; }
.semaine .j.aujourdhui i { border-color: var(--jaune); border-style: solid; }
.semaine .j.futur i { opacity: .35; }
.acc-liens { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ JEU */
#e-jeu { gap: clamp(6px, 1.2vh, 12px); }
.jeu-haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; }
.pions { display: flex; gap: clamp(4px, 1vw, 8px); align-items: center; }
.pion { width: clamp(22px, 3.3vh, 28px); height: clamp(27px, 4vh, 34px); display: grid; place-items: center; position: relative; }
.pion .vide { width: 70%; height: 80%; border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; border: 2px dashed rgba(205, 185, 235, .45); }
.pion.encours .vide { border-style: solid; border-color: var(--jaune); animation: pouls 1.2s ease-in-out infinite; }
@keyframes pouls { 50% { transform: scale(1.15); } }
.pion svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: pose .5s cubic-bezier(.3, .8, .3, 1.5) both; }
.pion.bonus .vide { border-color: rgba(255, 61, 127, .6); }
.pion .x2 { position: absolute; right: -7px; top: -6px; font: 800 9px/1 var(--t-texte); background: var(--jaune); color: var(--encre); padding: 2px 3px; border-radius: 5px; }
@keyframes pose { from { transform: scale(0) rotate(-40deg); } }
.jeu-info { display: flex; align-items: center; gap: 8px; }
.points { font: 700 17px/1 var(--t-titre); color: var(--jaune); font-variant-numeric: tabular-nums; min-width: 3.6em; text-align: right; }
.points.bouge { animation: gonfle .5s ease; }
@keyframes gonfle { 40% { transform: scale(1.4); } }

.jeu-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 12px); }
.carte { position: relative; flex: 1 1 0; min-height: 90px; background: var(--papier); color: var(--encre); border-radius: var(--r);
  padding: clamp(12px, 2vh, 20px) clamp(14px, 2.2vh, 22px) clamp(18px, 2.6vh, 26px); box-shadow: var(--ombre), 0 5px 0 rgba(0, 0, 0, .25);
  display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.carte.entre { animation: carte-entre .5s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes carte-entre { from { transform: translateX(40px) rotate(3deg); opacity: 0; } }
.carte.tremble { animation: tremble .45s ease; }
@keyframes tremble { 20%, 60% { transform: translateX(-7px) rotate(-1deg); } 40%, 80% { transform: translateX(7px) rotate(1deg); } }
.carte.adulte-on { background: #fff4f8; box-shadow: var(--ombre), 0 0 0 3px var(--rose), 0 5px 0 rgba(0, 0, 0, .25); }
.carte-puces { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.rub { font: 800 11px/1 var(--t-texte); letter-spacing: .1em; text-transform: uppercase; background: var(--encre); color: #fff; padding: 5px 9px; border-radius: 999px; }
.puce-18 { font: 800 11px/1 var(--t-texte); letter-spacing: .06em; background: var(--rose); color: #fff; padding: 5px 9px; border-radius: 999px; }
/* `safe center` et pas `center` (3.304.732) : un texte centré qui déborde
   déborde DES DEUX CÔTÉS, et `scrollHeight` ne voit pas la moitié du haut.
   L'ajustement croyait que tout tenait ; la dernière ligne perdait ses
   jambages, « je » se lisait « ie » (Pierre, capture du 27). */
.debut { margin: 0; flex: 1; min-height: 0; font: 600 22px/1.3 var(--t-titre); white-space: pre-line; overflow: hidden; text-wrap: pretty;
  display: flex; flex-direction: column; justify-content: center; justify-content: safe center; padding-bottom: .12em; }
/* LE FILET (4.0.133) : si une blague ne tient pas même à la plus petite
   taille, elle défile dans la carte au lieu d'être coupée. Sans barre
   visible : c'est un secours, l'ajustement reste la règle. */
.debut { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.debut::-webkit-scrollbar { display: none; }
/* LE SUSPENS : trois points qui s'allument l'un après l'autre. L'ancienne
   version découpait le mot « … » en quatre tranches égales : la coupe tombait
   au milieu des points, qui paraissaient rognés à chaque pas. Trois éléments
   entiers ne se coupent pas. */
.suspens { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 5px; }
.suspens i { width: 7px; height: 7px; border-radius: 50%; background: var(--vif); opacity: .2; animation: suspens 1.2s ease-in-out infinite; }
.suspens i:nth-child(2) { animation-delay: .2s; }
.suspens i:nth-child(3) { animation-delay: .4s; }
@keyframes suspens { 0%, 60%, 100% { opacity: .2; transform: none; } 25% { opacity: 1; transform: translateY(-3px); } }
.carte.revele .suspens { display: none; }

.jeu-duo { flex: none; height: clamp(58px, 10vh, 92px); align-items: stretch; }
.jeu-duo .masc.oeuf { height: 100%; }
.jeu-duo .masc.kiwi { height: 86%; align-self: flex-end; }
.jeu-duo .bulle { flex: 1; max-width: none; margin-inline: 8px; }

.jeu-reponses { flex: none; display: flex; flex-direction: column; gap: clamp(6px, 1.1vh, 10px); }
.options { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(5px, 1vh, 9px); }
.opt { width: 100%; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; text-align: left;
  min-height: clamp(44px, 7vh, 58px); padding: 7px 12px 7px 9px; border-radius: 16px; border: 2px solid transparent;
  background: #fff; color: var(--encre); font: 800 clamp(13.5px, 2vh, 16.5px)/1.25 var(--t-texte);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .28); transition: transform .12s, box-shadow .12s, background .2s, opacity .3s;
  animation: opt-entre .4s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i) * 60ms + 120ms); overflow: hidden; }
@keyframes opt-entre { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.opt:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 0 rgba(0, 0, 0, .28); }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .28); }
.opt .k { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--encre); color: #fff; font: 700 14px/1 var(--t-titre); }
.opt .t { overflow: hidden; }
.opt:disabled { cursor: default; }
.opt.attend { opacity: .7; }
.opt.vraie { background: var(--vert); border-color: var(--encre); animation: vraie .6s cubic-bezier(.3, .8, .3, 1.6) both; }
.opt.vraie .k { background: #fff; color: var(--vert-f); }
@keyframes vraie { 0% { transform: scale(1); } 40% { transform: scale(1.05) rotate(-1deg); } 100% { transform: scale(1.02); } }
.opt.fausse { background: #ffd7d8; border-color: var(--rouge); animation: tremble .45s ease both; }
.opt.fausse .k { background: var(--rouge); }
.opt.terne { opacity: .38; transform: scale(.98); }
/* La mise et le chrono, au-dessus des réponses : on décide AVANT de choisir. */
.jeu-mise { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.jeu-mise .audace { flex: none; }
.chrono { position: relative; flex: 1; min-width: 0; height: 40px; border-radius: 999px; overflow: hidden; display: flex; align-items: center;
  justify-content: space-between; padding: 0 14px; background: rgba(255, 255, 255, .1); border: 2px solid rgba(205, 185, 235, .35); }
.chrono i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, var(--vert-f), var(--vert)); border-radius: 999px; }
.chrono b, .chrono span { position: relative; z-index: 1; }
.chrono b { font: 700 19px/1 var(--t-titre); color: #fff; -webkit-text-stroke: 3px var(--encre); paint-order: stroke fill; }
.chrono span { font-weight: 800; font-size: 13px; color: #fff; text-shadow: 0 1px 0 var(--encre), 0 0 3px var(--encre); font-variant-numeric: tabular-nums; }
.chrono.presse i { background: linear-gradient(90deg, #d99a00, var(--jaune)); }
.chrono.urgent { border-color: var(--rouge); animation: chrono-bat .5s ease-in-out infinite alternate; }
.chrono.urgent i { background: linear-gradient(90deg, #b3161c, var(--rouge)); }
.chrono.fini { animation: none; }
.chrono.fini i { opacity: .45; }
.chrono.sans i { background: rgba(255, 255, 255, .12); }
.audace:has(input:checked) ~ .chrono b { color: var(--jaune); }
@keyframes chrono-bat { to { transform: scale(1.03); } }
#app[data-anim="doux"] .chrono.urgent { animation: none; }
@media (max-width: 400px) { .chrono { padding: 0 10px; gap: 6px; } .chrono b { font-size: 17px; } .jeu-mise { gap: 8px; } }
/* Le réglage « Main » : chaque bouton qu'on touche vient sous le pouce.
   Droitier (par défaut) : « Sûr de moi » à droite, et « Suivante », qui y
   était déjà. Gaucher : les deux à gauche (Pierre, 27 septembre : « quand on
   est droitier, on veut le bouton Sûr de moi proche de sa main droite »). */
#app:not([data-main="gaucher"]) .jeu-mise, #app[data-main="gaucher"] .jeu-bas { flex-direction: row-reverse; }
.chrono-essai { margin-top: -4px; color: var(--lilas); font-size: 11px; text-align: left; }
#app[data-main="gaucher"] .chrono-essai { text-align: right; }
.jeu-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.audace { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px 12px 5px 6px; border-radius: 999px; border: 2px dashed rgba(205, 185, 235, .4); transition: background .2s, border-color .2s; }
.audace input { position: absolute; opacity: 0; pointer-events: none; }
.audace .interr { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; font: 700 16px/1 var(--t-titre); transition: background .2s, transform .3s; }
.audace .interr::before { content: "?"; }
.audace b { display: block; font-family: var(--t-titre); font-weight: 600; font-size: 15px; }
.audace small { display: block; color: var(--lilas); font-size: 11.5px; }
.audace:has(input:checked) { background: rgba(244, 212, 0, .16); border-style: solid; border-color: var(--jaune); }
.audace:has(input:checked) .interr { background: var(--jaune); color: var(--encre); transform: rotate(360deg); }
.audace:has(input:checked) .interr::before { content: "!"; }
.audace:has(input:disabled) { opacity: .5; }
.lire { color: var(--lilas); font-weight: 800; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.flotte { position: absolute; font: 700 30px/1 var(--t-titre); color: var(--jaune); -webkit-text-stroke: 2px var(--encre); paint-order: stroke fill;
  pointer-events: none; z-index: 20; animation: flotte 1.1s ease-out forwards; }
.flotte.moins { color: var(--rouge); }
@keyframes flotte { from { opacity: 0; transform: translateY(10px) scale(.6); } 20% { opacity: 1; transform: translateY(0) scale(1.2); } to { opacity: 0; transform: translateY(-60px) scale(1); } }

/* ------------------------------------------------------------------ FIN */
#e-fin { align-items: center; text-align: center; gap: clamp(4px, 1vh, 10px); }
/* LE FILET (4.0.9) : si malgré tout le bas ne tient pas (petit écran,
   bonus, gain, invitation et moyenne ensemble),
   l'écran défile au lieu de couper. Sans barre visible : c'est un secours,
   pas une mise en page. tchut.js y ramène l'invitation quand elle arrive. */
#e-fin, #e-accueil { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
#e-fin::-webkit-scrollbar, #e-accueil::-webkit-scrollbar { display: none; }
.fin-duo { flex: 1 1 auto; min-height: 0; max-height: 30vh; width: 100%; }
.fin-duo .masc.oeuf { height: min(100%, 24vh); max-height: 180px; }
.fin-duo .masc.kiwi { height: min(80%, 19vh); max-height: 146px; }
.fin-duo .bulle { position: absolute; top: 0; left: 50%; transform: translateX(-50%) scale(.7); max-width: min(84%, 340px); }
.fin-duo .bulle.vue { transform: translateX(-50%); }
.fin-duo .bulle::after { left: 50% !important; right: auto !important; bottom: -14px; border: 9px solid transparent; border-top-color: #fff !important; border-right-color: transparent !important; border-left-color: transparent !important; transform: translateX(-50%); }
.fin-texte { display: flex; flex-direction: column; align-items: center; gap: clamp(5px, 1.1vh, 11px); width: 100%; flex: none; }
.fin-titre { margin: 0; font: 700 clamp(28px, 5vh, 44px)/1 var(--t-titre); text-wrap: balance; }
.fin-score { display: flex; align-items: baseline; gap: 8px; }
.fin-score b { font: 700 clamp(44px, 8vh, 72px)/.9 var(--t-titre); color: var(--jaune); -webkit-text-stroke: 3px var(--encre); paint-order: stroke fill; text-shadow: 0 4px 0 var(--encre); font-variant-numeric: tabular-nums; }
.fin-score span { color: var(--lilas); font-weight: 800; }
.pions.grands .pion { width: clamp(34px, 5.4vh, 48px); height: clamp(42px, 6.6vh, 58px); }
.pions.grands .pion svg { animation-delay: calc(var(--i) * 120ms + 200ms); }
.fin-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.fin-actions .gros { min-height: 50px; padding-inline: 20px; }
.fin-rebours { margin: 0; color: var(--lilas); font-size: 14px; font-variant-numeric: tabular-nums; }
.fin-rebours b { color: #fff; font-family: var(--t-titre); font-size: 17px; }
.fin-liens { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.invite { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; background: rgba(255, 255, 255, .08); padding: 7px 8px 7px 16px; border-radius: 22px; font-weight: 800; font-size: 14px; animation: apparait .35s; }
.invite select { background: rgba(255, 255, 255, .12); color: #fff; border: 2px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 4px 8px; font-weight: 800; font-size: 14px; }
.invite select option { color: var(--encre); }
.invite.alerte { background: rgba(255, 92, 138, .2); }
.invite-note { flex-basis: 100%; margin-top: -4px; color: var(--lilas); font-weight: 700; font-size: 12.5px; line-height: 1.3; text-align: center; }

/* ------------------------------------------------------------------ VOLETS */
.voile { position: absolute; inset: 0; background: rgba(10, 2, 22, .55); z-index: 10; backdrop-filter: blur(3px); animation: apparait .25s; }
@keyframes apparait { from { opacity: 0; } }
.volet { position: absolute; z-index: 11; left: 50%; bottom: 0; width: min(100%, 520px); max-height: calc(100% - 40px);
  transform: translateX(-50%); background: var(--papier); color: var(--encre); border-radius: 26px 26px 0 0;
  padding: 10px var(--gout) calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .4); animation: monte .38s cubic-bezier(.2, .9, .3, 1.1); overflow: hidden; }
@keyframes monte { from { transform: translate(-50%, 100%); } }
@media (min-width: 700px) and (min-height: 560px) {
  .volet { bottom: 50%; transform: translate(-50%, 50%); border-radius: 26px; max-height: min(92%, 720px); }
  @keyframes monte { from { transform: translate(-50%, 60%) scale(.9); opacity: 0; } }
}
.volet header { display: flex; align-items: center; justify-content: space-between; }
.volet h3 { margin: 0; font: 700 24px/1 var(--t-titre); }
/* La grande popin d'installation, à l'arrivée dans Chrome (3.304.725). */
.volet.installer { text-align: center; }
.inst-duo { display: flex; justify-content: center; align-items: flex-end; gap: 6px; height: 108px; }
.inst-duo .oeuf { width: 78px; height: 104px; animation: inst-saute 1.6s ease-in-out 3; }
/* Trois rebonds à l'ouverture de la popin, puis l'œuf se pose (3.304.835) :
   un saut sans fin donnait l'impression d'un écran bloqué, comme la danse du
   5 sur 5 (3.304.818). */
@keyframes inst-saute { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-12px); } }
.inst-duo .kiwi { width: 80px; height: 80px; }
.inst-titre { margin: 0; font: 700 22px/1.15 var(--t-titre); }
.inst-plus { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.inst-plus li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.3; }
.inst-plus b { flex: none; font-size: 20px; line-height: 1; }
#b-inst-go { width: 100%; min-height: 54px; font-size: 20px; }

/* L'ASSISTANCE iOS (jeu 1.8.25), reprise de blablagues (`.bb-pas`,
   `.bb-guide`, components/_parcours.scss, 4.0.100 à 4.0.103) aux couleurs du
   jeu. Le volet perd son duo (le guide a le sien) ; sur iPhone, le guide se
   pose en bas, contre la barre de Safari : le volet lui réserve sa place
   pour qu'il ne couvre pas « Compris ». */
.volet.installer.ios .inst-duo { display: none; }
.volet.installer.place-guide-bas { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); }
.inst-pas { margin: 0; padding: 0; list-style: none; counter-reset: pas; text-align: left; display: grid; gap: 8px; }
.inst-pas li { position: relative; counter-increment: pas; padding-left: 32px; font-size: 15px; line-height: 1.35; }
.inst-pas li::before { content: counter(pas); position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--jaune); color: var(--encre); font: 800 12px/22px var(--t-texte); text-align: center; }
.inst-pas .pas-ic { font-weight: 800; }

.guide { position: fixed; z-index: 50; width: 270px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none; animation: guide-arrive .55s cubic-bezier(.2, 1.4, .4, 1) both; font-family: var(--t-texte); }
.guide-pointe { position: relative; display: flex; align-items: center; gap: 9px; padding: 10px 18px 10px 14px; border-radius: 999px;
  background: var(--jaune); color: var(--encre); font-size: 16px; font-weight: 800; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18), 0 2px 5px rgba(0, 0, 0, .1); }
.guide-pointe::before { content: ""; position: absolute; right: 21px; width: 16px; height: 16px; border-radius: 4px; background: var(--jaune); transform: rotate(45deg); }
.guide-pointe::after { content: ""; position: absolute; inset: 0; border-radius: 999px; animation: guide-halo 1.8s ease-out infinite; }
.guide-ic { position: relative; display: block; flex: none; width: 16px; height: 20px; }
.guide-ic::before { content: ""; position: absolute; left: 0; bottom: 0; width: 16px; height: 11px; box-sizing: border-box;
  border: 2px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; }
.guide-ic::after { content: ""; position: absolute; left: 7px; top: 1px; width: 2px; height: 13px; border-radius: 1px; background: currentColor; }
.guide-ic span { position: absolute; left: 4px; top: 2px; width: 8px; height: 8px; box-sizing: border-box;
  border-left: 2px solid currentColor; border-top: 2px solid currentColor; border-radius: 1px 0 0 0; transform: rotate(45deg); }
.guide-points { font-size: 18px; letter-spacing: 1px; line-height: 1; }
.guide-duo { display: flex; align-items: flex-end; gap: 2px; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; }
.guide-bulle { position: relative; align-self: center; max-width: 170px; margin-right: 10px; padding: 10px 14px; border-radius: 18px;
  background: #fff; color: var(--encre); font-size: 13.5px; font-weight: 700; line-height: 1.3; text-align: left;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08); }
.guide-bulle::after { content: ""; position: absolute; right: -5px; bottom: 16px; width: 12px; height: 12px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.guide-bulle.guide-change { animation: guide-bulle .35s cubic-bezier(.2, 1.4, .4, 1); }
.guide-o, .guide-k { display: block; flex: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); }
.guide-o { width: 62px; height: 80px; transform-origin: 50% 100%; animation: guide-dandine 1.2s ease-in-out infinite; }
.guide-k { width: 56px; height: 56px; margin-left: -8px; animation: guide-saute 1.2s ease-in-out .3s infinite; }
.guide-haut { top: calc(env(safe-area-inset-top, 0px) + 16px); right: 12px; }
.guide-haut .guide-pointe { margin-right: 79px; animation: guide-monte 1.1s ease-in-out infinite; }
.guide-haut .guide-pointe::before { top: -6px; }
.guide-bas, .guide-bas-droite { bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); flex-direction: column-reverse; }
.guide-bas .guide-pointe, .guide-bas-droite .guide-pointe { animation: guide-descend 1.1s ease-in-out infinite; }
.guide-bas .guide-pointe::before, .guide-bas-droite .guide-pointe::before { bottom: -6px; }
.guide-bas-droite { right: 8px; }
.guide-bas { left: 50%; margin-left: -135px; align-items: center; }
.guide-bas .guide-pointe::before { right: auto; left: 50%; margin-left: -8px; }
@keyframes guide-arrive { from { opacity: 0; transform: scale(.6) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes guide-monte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes guide-descend { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes guide-halo { 0% { box-shadow: 0 0 0 0 rgba(244, 212, 0, .6); } 100% { box-shadow: 0 0 0 16px rgba(244, 212, 0, 0); } }
@keyframes guide-dandine { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-4px); } }
@keyframes guide-saute { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-10px) rotate(-10deg); } 60% { transform: translateY(-10px) rotate(6deg); } }
@keyframes guide-bulle { from { transform: scale(.7); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .guide, .guide-pointe, .guide-pointe::after, .guide-o, .guide-k, .guide-bulle { animation: none !important; }
}
.volet h4 { margin: 4px 0 0; font: 800 12px/1 var(--t-texte); letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.volet .ico { background: rgba(51, 51, 51, .07); color: var(--encre); }
.volet .note { margin: 0; font-size: 13px; color: var(--gris); }

.cal-nav { display: flex; align-items: center; justify-content: space-between; }
.cal-nav b { font: 700 19px/1 var(--t-titre); text-transform: capitalize; }
.cal-nav .ico:disabled { opacity: .25; cursor: default; }
.cal-jours, .cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-jours span { text-align: center; font: 800 11px/1 var(--t-texte); color: var(--gris); }
.cal-j { aspect-ratio: 1; max-height: 54px; border-radius: 14px; border: 2px solid rgba(51, 51, 51, .1); background: #fff; display: grid; place-items: center;
  position: relative; font: 700 15px/1 var(--t-titre); color: var(--encre); padding: 0; transition: transform .12s; }
.cal-j:not(:disabled):hover { transform: scale(1.08); border-color: var(--encre); }
.cal-j.vide { visibility: hidden; }
.cal-j.futur { background: rgba(51, 51, 51, .04); color: #b8b2c2; border-style: dashed; cursor: not-allowed; }
.cal-j.futur::after { content: ""; position: absolute; bottom: 5px; width: 8px; height: 6px; border-radius: 2px; background: currentColor; box-shadow: 0 -4px 0 -1px transparent; }
.cal-j.hors { opacity: .3; cursor: not-allowed; }
.cal-j.auj { border-color: var(--jaune); box-shadow: 0 0 0 2px var(--jaune); }
.cal-j.fini { background: var(--jaune); border-color: var(--encre); }
.cal-j.fini.rattrape { background: #efe7fb; }
.cal-j.encours { background: linear-gradient(135deg, var(--jaune) 50%, #fff 50%); }
/* La légende du calendrier (4.0.61, Pierre : « Et c'est quoi le code
   couleur ? ») : les mêmes fonds que les cases, en petit. */
.cal-legende { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 10px 0 0; font-size: 12.5px; font-weight: 700; color: var(--gris); }
.cal-legende span { display: inline-flex; align-items: center; gap: 6px; }
.cal-p { width: 14px; height: 14px; border-radius: 4px; border: 2px solid rgba(51, 51, 51, .15); background: #fff; flex: none; }
.cal-p.fini { background: var(--jaune); border-color: var(--encre); }
.cal-p.fini.rattrape { background: #efe7fb; }
.cal-p.encours { background: linear-gradient(135deg, var(--jaune) 50%, #fff 50%); }
.cal-j .sc { position: absolute; right: 3px; top: 3px; font: 800 9px/1 var(--t-texte); background: var(--encre); color: #fff; border-radius: 5px; padding: 2px 3px; }

.stats-chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats-chiffres div { background: #fff; border: 2px solid rgba(51, 51, 51, .08); border-radius: 16px; padding: 10px 4px; text-align: center; }
.stats-chiffres b { display: block; font: 700 26px/1 var(--t-titre); }
.stats-chiffres small { display: block; font-size: 11px; color: var(--gris); margin-top: 4px; line-height: 1.15; }
.stats-barres { display: grid; gap: 5px; }
.barre-l { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: center; font: 700 14px/1 var(--t-titre); }
.barre-l i { display: block; height: 22px; border-radius: 7px; background: var(--lilas); min-width: 26px; color: var(--encre); font: 800 12px/22px var(--t-texte); font-style: normal; text-align: right; padding-right: 7px; transform-origin: left; animation: pousse .7s cubic-bezier(.2, .8, .2, 1) both; }
.barre-l.max i { background: var(--jaune); }
@keyframes pousse { from { transform: scaleX(0); } }

.reg-compte { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px 12px; border: 2px solid rgba(51, 51, 51, .08); }
.reg-compte .av { width: 40px; height: 40px; border-radius: 50%; background: var(--jaune); display: grid; place-items: center; font: 700 18px/1 var(--t-titre); flex: none; }
.reg-compte .txt { flex: 1; font-size: 14px; line-height: 1.25; }
.reg-compte .txt b { display: block; font-size: 15px; }
.reg-compte .mini { border-color: var(--encre); }
.reg-liste { display: grid; gap: 2px; }
.reg { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 2px; border-bottom: 1px solid rgba(51, 51, 51, .08); font-weight: 800; font-size: 15px; }
.reg small { display: block; font-weight: 400; font-size: 12px; color: var(--gris); }
.reg-version { margin: 0; text-align: center; font-size: 11px; color: var(--gris); opacity: .75; }
/* L'état de l'appareil (4.0.21), sur le modèle du pied du registre du site :
   mêmes pastilles, mêmes couleurs (vert fait, rose bloqué, cercle vide pas
   encore), version à droite. */
.reg-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--encre); }
.reg-etat span, .reg-etat button { padding: 3px 9px; border-radius: 10px; background: #fff; border: 1px solid rgba(0, 0, 0, .08); white-space: nowrap; }
.reg-etat button { font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted rgba(0, 0, 0, .35); text-underline-offset: 3px; }
.reg-etat button:active { transform: scale(.96); }
.reg-etat span::before, .reg-etat button::before { content: "● "; color: #afafaf; }
.reg-etat .ok::before { color: #14ad84; }
.reg-etat .non::before { color: #e35183; }
.reg-etat .jamais::before { content: "○ "; }
.reg-etat span.v { background: none; border: 0; color: var(--gris); font-weight: 400; margin-left: auto; }
.reg-etat span.v::before { content: none; }
.reg-version a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.reg select { background: #fff; border: 2px solid rgba(51, 51, 51, .15); border-radius: 10px; padding: 5px 8px; color: var(--encre); font-weight: 800; }
.bascule { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #d9d3e3; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.bascule::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .25s cubic-bezier(.3, .8, .3, 1.4); }
.bascule:checked { background: var(--vert-f); }
.bascule:checked::after { transform: translateX(18px); }
.bascule:disabled { opacity: .4; cursor: not-allowed; }
.reg-adulte .bascule:checked { background: var(--rose); }

.recap { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-height: 0; }
.recap li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; background: #fff; border-radius: 14px; padding: 8px 10px; border: 2px solid rgba(51, 51, 51, .07); }
.recap svg { width: 28px; height: 34px; overflow: visible; }
.recap .d { font-size: 12.5px; color: var(--gris); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.recap .c { font-weight: 800; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recap a { font-size: 12.5px; font-weight: 800; color: var(--vif); }
.recap .a18 { color: var(--rose); font-size: 11px; font-weight: 800; margin-left: 6px; }

#v-partage img { width: 100%; max-height: 36vh; object-fit: contain; border-radius: 14px; background: var(--nuit); }
#v-partage textarea { width: 100%; resize: none; border: 2px solid rgba(51, 51, 51, .12); border-radius: 12px; padding: 8px 10px; font: 13px/1.35 var(--t-texte); color: var(--encre); background: #fff; user-select: text; }

/* ------------------------------------------------------------------ divers */
.toast { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px); opacity: 0;
  background: var(--encre); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 800; font-size: 14px; z-index: 30;
  transition: opacity .25s, transform .35s cubic-bezier(.3, .8, .3, 1.3); pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.vu { opacity: 1; transform: translate(-50%, 0); }
.confettis { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 25; }

/* ------------------------------------------------------------------ grands écrans */
@media (min-width: 880px) and (min-aspect-ratio: 5/4) {
  .ecran { padding-inline: max(var(--gout), calc((100% - 1100px) / 2)); }
  #e-accueil { flex-direction: row; align-items: center; justify-content: center; gap: 40px; }
  #e-accueil .acc-puces { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); }
  .acc-duo { flex: 1 1 0; min-width: 0; max-height: 70%; height: 70%; }
  .acc-duo .masc.oeuf { height: min(100%, 60cqw); max-height: 320px; }
  .acc-duo .masc.kiwi { height: min(80%, 48cqw); max-height: 260px; }
  /* La bulle se pose au-dessus de l'œuf, pas en haut de la boîte : depuis
     que les mascottes suivent la largeur, le haut de la boîte était loin. */
  .acc-duo .bulle { top: auto; bottom: calc(min(100%, 60cqw, 320px) - 14px); }
  .acc-texte { flex: 1 1 0; align-items: flex-start; text-align: left; }
  .acc-titre { font-size: clamp(44px, min(11vh, 7vw), 108px); }
  .acc-sous { text-align: left; }
  .semaine, .acc-liens { justify-content: flex-start; }
  .jeu-corps { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr auto; column-gap: 28px; }
  .carte { grid-column: 1; grid-row: 1; }
  .jeu-duo { grid-column: 1; grid-row: 2; }
  .jeu-reponses { grid-column: 2; grid-row: 1 / span 2; justify-content: center; }
  .debut { font-size: 34px; }
  .jeu-duo { height: clamp(90px, 16vh, 140px); justify-content: center; }
  .jeu-duo .bulle { flex: 0 1 380px; }
  .carte { max-height: 62vh; align-self: stretch; }
  .jeu-reponses { max-width: 520px; }
  #e-fin { flex-direction: row; justify-content: center; gap: 40px; }
  .fin-duo { flex: 1 1 0; max-height: 60%; height: 60%; container-type: inline-size; }
  .fin-duo .masc.oeuf { height: min(100%, 60cqw); max-height: 280px; }
  .fin-duo .masc.kiwi { height: min(80%, 48cqw); max-height: 224px; }
  .fin-duo .bulle { top: auto; bottom: calc(min(100%, 60cqw, 280px) + 20px); }
  .fin-texte { flex: 1 1 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fond i, .acc-titre .lettres span, .acc-titre b, .nom b, .suspens, #b-jouer.brille { animation: none !important; }
  .ecran, .opt, .carte, .volet { transition-duration: .01s !important; animation-duration: .01s !important; }
}

/* ------------------------------------------------------------------ PROGRESSION */
.niveau { display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 0;
  background: rgba(255, 255, 255, .1); color: #fff; max-width: min(100%, 330px); transition: background .15s, transform .15s; }
.niveau:hover { background: rgba(255, 255, 255, .16); }
.niveau:active { transform: scale(.97); }
.niv-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--jaune); color: var(--encre);
  font: 700 15px/1 var(--t-titre); border: 2px solid var(--encre); }
.niv-t { display: grid; gap: 4px; flex: 1; min-width: 0; text-align: left; }
.niv-t b { font: 600 14px/1 var(--t-titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.niv-barre { display: block; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; min-width: 110px; }
.niv-barre i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--jaune), #ffe766); transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.niv-xp { font: 800 11px/1 var(--t-texte); color: var(--lilas); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gain { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 8px; width: min(100%, 320px); }
.gain b { font: 700 24px/1 var(--t-titre); color: var(--jaune); font-variant-numeric: tabular-nums; }
.gain > span:not(.niv-barre) { color: var(--lilas); font-weight: 800; font-size: 13px; }
.gain small { grid-column: 1 / -1; color: var(--lilas); font-size: 12px; text-align: center; }

/* ------------------------------------------------------------------ PALMARÈS */
.onglets, .periodes { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(51, 51, 51, .07); flex: none; }
.onglets button, .periodes button { border: 0; background: none; border-radius: 10px; padding: 8px 4px; font: 800 13.5px/1 var(--t-texte); color: var(--gris); }
.periodes { background: none; padding: 0; gap: 6px; }
.periodes button { border: 2px solid rgba(51, 51, 51, .12); border-radius: 999px; padding: 6px 4px; font-size: 12.5px; }
.onglets button[aria-selected="true"] { background: #fff; color: var(--encre); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.periodes button[aria-selected="true"] { background: var(--encre); border-color: var(--encre); color: #fff; }
.onglet { display: flex; flex-direction: column; gap: 10px; min-height: 0; }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 6px; padding-top: 6px; min-height: 150px; }
.marche { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.marche .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 19px/1 var(--t-titre); border: 3px solid var(--encre); background: #fff; position: relative; }
.marche.r1 .av { width: 54px; height: 54px; font-size: 23px; background: var(--jaune); }
.marche.r1 .av::before { content: "👑"; position: absolute; top: -20px; font-size: 20px; animation: couronne 2.4s ease-in-out infinite; }
@keyframes couronne { 50% { transform: translateY(-3px) rotate(-8deg); } }
.marche .ps { font: 800 12.5px/1.15 var(--t-texte); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--encre); text-decoration: none; }
.marche .ps:hover { text-decoration: underline; }
.marche .bloc { box-sizing: border-box; width: 100%; padding: 5px 2px 4px; border-radius: 12px 12px 0 0; background: #efe7fb; border: 2px solid var(--encre); border-bottom: 0; display: grid; place-items: center; align-content: center; gap: 2px;
  font: 700 22px/1 var(--t-titre); color: var(--encre); animation: monte-marche .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.marche .bloc small { font: 800 11px/1 var(--t-texte); color: var(--gris); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.marche.r1 .bloc { height: 84px; background: var(--jaune); animation-delay: .25s; }
.marche.r2 .bloc { height: 66px; background: #e3e0ea; animation-delay: .1s; }
.marche.r3 .bloc { height: 52px; background: #f1d3b3; }
.marche.moi .av { box-shadow: 0 0 0 3px var(--rose); }
/* Un avatar au fond transparent disparaissait sur le cercle blanc : le
   fond jaune le porte, sans masquer la couronne (3.304.736). */
.av.photo { padding: 0; background: var(--jaune); }
/* Les joueurs maison et les visiteurs au podium (3.304.735). */
.tag-maison { display: inline-block; margin-left: 5px; padding: 2px 6px; border-radius: 999px; background: var(--lilas); color: #fff; font: 800 9.5px/1.2 var(--t-texte); letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
.marche .tag-maison { display: block; width: max-content; margin: 2px auto 0; }
.tag-toi { background: var(--rose); }
.reg-compte .txt .exp { display: block; }
.fin-moyenne, .acc-compteur { margin: 0; color: var(--lilas); font-size: 14px; text-align: center; }
.fin-moyenne b, .acc-compteur b { color: #fff; }
.av.photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.marche.vide { visibility: hidden; }
@keyframes monte-marche { from { transform: scaleY(0); transform-origin: bottom; } }
.classement { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; min-height: 0; overflow: hidden; }
.classement li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; background: #fff; border-radius: 12px; padding: 6px 10px; border: 2px solid rgba(51, 51, 51, .06); font-size: 14px; }
.classement li.moi { border-color: var(--rose); background: #fff4f8; }
.classement li.sep { background: none; border: 0; padding: 0; height: 6px; }
.classement .r { font: 700 15px/1 var(--t-titre); color: var(--gris); text-align: center; }
.classement .p { min-width: 0; display: flex; flex-direction: column; }
.classement .p a, .classement .p span:first-child { font-weight: 800; color: var(--encre); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.classement .p small { color: var(--gris); font-size: 11.5px; }
.classement .v { font: 700 16px/1 var(--t-titre); font-variant-numeric: tabular-nums; }
.classement .v small { font: 800 11px/1 var(--t-texte); color: var(--gris); margin-left: 2px; }

.niv-carte { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; background: var(--encre); color: #fff; border-radius: 16px; padding: 12px 14px; flex: none; }
.niv-carte .niv-n { width: 46px; height: 46px; font-size: 21px; grid-row: span 2; border-color: var(--jaune); }
.niv-carte b { font: 700 19px/1.1 var(--t-titre); }
.niv-carte .niv-barre { background: rgba(255, 255, 255, .18); }
.niv-carte small { grid-column: 2; color: var(--lilas); font-size: 12px; font-variant-numeric: tabular-nums; }
.niv-carte .niv-aide { grid-column: 1 / -1; margin-top: 6px; font: 700 12px/1.35 var(--t-texte); font-style: normal; color: rgba(255, 255, 255, .78); }
.acc-titre.tape { animation: titre-tape .35s ease; }
@keyframes titre-tape { 40% { transform: scale(.94, 1.06); } 70% { transform: scale(1.04, .96); } }
.trophee.cache { font: 700 26px/1 var(--t-titre); color: var(--lilas); border-style: dashed; }
/* Les canaux de partage, dans le style de la popin du site (assets/scss/
   components/popins/_share.scss) : ronds pleins aux couleurs des réseaux,
   pictogramme blanc qui grossit au survol, nom dessous en graisse normale,
   puis la ligne « lien + Copier ». */
/* Cinq tuiles sur une ligne, à largeur égale, dans l'ordre du site :
   Télécharger, Copier l'image, Copier le texte, Copier tout, Partager…
   (Pierre, 27 septembre : « pour harmoniser avec le site »). Elles se
   serrent au lieu de passer à la ligne, comme là-bas (3.304.710). */
.canaux { display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start; gap: 12px 6px; }
.canal { flex: 1 1 0; min-width: 0; max-width: 96px; }
.canal { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0; color: var(--encre); text-decoration: none; cursor: pointer; font: 400 12px/1.15 var(--t-texte); text-align: center; }
.canal .rond { width: 52px; max-width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: #333; color: #fff; overflow: hidden; }
.canal svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 120ms ease-in-out; }
.canal:hover svg, .canal:focus-visible svg { transform: scale(1.3); }
.canal svg .p { fill: currentColor; stroke: none; }
/* Des couleurs gaies (Pierre) : le partage au vert de WhatsApp, puisque c'est
   par lui que l'image part le plus souvent. */
.canal.natif .rond { background: #25d366; }
.canal.cimg .rond { background: var(--rose); }
.canal.ctxt .rond { background: var(--jaune); color: var(--encre); }
.canal.img .rond { background: #5472d3; }
.canal.tout .rond { background: #7c43bd; }
.canal.wa .rond { background: #25d366; } .canal.ig .rond { background: #c13584; }
.canal.fb .rond { background: #4469b0; } .canal.x .rond { background: #111; }
.canal.tg .rond { background: #29a9eb; } .canal.sms .rond { background: #8e8e93; }
.canal.mail .rond { background: #afafaf; }
.canal.natif.indispo .rond { background: #b9e8c9; }
.canal.attend-img { opacity: .4; pointer-events: none; }
.copie-lien { display: flex; border-top: 1px solid #e6e1ee; border-bottom: 1px solid #e6e1ee; }
.copie-lien input { flex: 1; min-width: 0; border: 0; background: none; padding: 0 10px; font: 400 13px/1 var(--t-texte); color: var(--encre); height: 44px; }
.copie-lien button { flex: none; border: 0; background: var(--jaune); color: var(--encre); font: 700 15px/1 var(--t-titre); padding: 0 18px; cursor: pointer; }
@media (max-height: 700px) { .canal .rond { width: 40px; } .canaux { gap: 8px 4px; } .copie-lien input { height: 38px; } }
.trophees { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.trophee { aspect-ratio: 1; max-height: 74px; border-radius: 18px; border: 2px solid var(--encre); background: var(--jaune); display: grid; place-items: center;
  font-size: clamp(22px, 3.6vh, 30px); line-height: 1; padding: 0; position: relative; box-shadow: 0 3px 0 var(--encre); transition: transform .15s; }
.trophee:hover { transform: translateY(-2px) rotate(-4deg); }
.trophee.non { background: #ece8f1; border-color: #cfc8da; box-shadow: none; filter: grayscale(1); opacity: .55; }
.trophee.choisi { outline: 3px solid var(--rose); outline-offset: 2px; }
.trophee-desc { min-height: 2.6em; }
.trophee-desc b { color: var(--encre); }

/* ------------------------------------------------------------------ LA FÊTE */
.fete { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(10, 2, 22, .72); backdrop-filter: blur(4px); animation: apparait .25s; }
.fete-carte { position: relative; width: min(100%, 340px); background: var(--papier); color: var(--encre); border-radius: 28px; padding: 58px 22px 22px; text-align: center;
  display: grid; justify-items: center; gap: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: fete-entre .6s cubic-bezier(.2, .9, .3, 1.4) both; overflow: visible; }
@keyframes fete-entre { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
.fete-rayons { position: absolute; left: 50%; top: 0; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(244, 212, 0, .55) 0 10deg, transparent 10deg 24deg); animation: tourne 9s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes tourne { to { transform: rotate(360deg); } }
.fete-medaille { position: absolute; top: -48px; width: 96px; height: 96px; border-radius: 50%; background: var(--jaune); border: 4px solid var(--encre);
  display: grid; place-items: center; font: 700 46px/1 var(--t-titre); color: var(--encre); box-shadow: 0 6px 0 var(--encre); animation: medaille 1s cubic-bezier(.3, .8, .3, 1.5) .15s both; }
@keyframes medaille { from { transform: scale(0) rotate(-180deg); } }
.fete-sur { margin: 0; font: 800 12px/1 var(--t-texte); letter-spacing: .14em; text-transform: uppercase; color: var(--rose); }
.fete-titre { margin: 0; font: 700 28px/1.05 var(--t-titre); text-wrap: balance; }
.fete-desc { margin: 0 0 6px; color: var(--gris); font-size: 15px; text-wrap: balance; }
#app[data-anim="doux"] .fete-rayons { animation: none; }

/* ------------------------------------------------------------------ écrans courts */
/* Mesuré à 360 × 620 : les réglages dépassaient de 34 px (39 avec le chrono). On resserre les
   lignes plutôt que de laisser le volet défiler. */
@media (max-height: 700px) {
  .volet { gap: 7px; padding-top: 8px; }
  .volet h3 { font-size: 21px; }

  .reg small { font-size: 11px; line-height: 1.2; }
  .reg-compte { padding: 7px 10px; }
  .reg-compte .av { width: 34px; height: 34px; }
  .reg-compte .txt { font-size: 12.5px; }
  .volet .note { font-size: 12px; }
  .cal-j { max-height: 44px; }
  .podium { min-height: 136px; }
  .marche .bloc { font-size: 18px; }
  .marche.r1 .bloc { height: 70px; } .marche.r2 .bloc { height: 56px; } .marche.r3 .bloc { height: 44px; }
  .marche .av { width: 38px; height: 38px; font-size: 16px; } .marche.r1 .av { width: 46px; height: 46px; }
  .classement li { padding: 4px 10px; }
  .trophee { max-height: 58px; border-radius: 14px; }
  .niv-carte { padding: 9px 12px; }
}
@media (max-height: 600px) { .niveau { display: none; } }
/* Douze réglages depuis le mode gaucher : les lignes se resserrent dès 820 px
   de haut, et encore sous 640. */
@media (max-height: 820px) { .reg { padding: 3px 2px; font-size: 14px; } .reg select { padding: 3px 6px; } .bascule { transform: scale(.9); } }
@media (max-height: 640px) { .reg { padding: 1px 2px; font-size: 13.5px; } .reg-compte .txt { font-size: 12px; } }

/* ------------------------------------------------------------------ essai de noms (?titre=essais) */
.nom-essai { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 45;
  padding: 8px 16px; border-radius: 999px; border: 2px solid var(--encre); background: var(--rose); color: #fff;
  font: 800 14px/1 var(--t-texte); box-shadow: 0 3px 0 var(--encre); cursor: pointer; }
