/* Crêpe Simulator : la cuisine du dimanche. Mobile d'abord (390 × 844), puis ordinateur. */
/* La police du jeu, embarquée (v10) : Nunito, ronde et grasse, OFL 1.1 (res/police/OFL.txt), variable 200 à 1000,
   sous-ensemble latin et ponctuation française en woff2 (33 Ko). Même silhouette sur iPhone, Samsung et PC.
   font-display: block : le titre ne change jamais de police sous les yeux (fichier local et préchargé : quelques ms). */
@font-face { font-family: "Nunito Crepe"; src: url("res/police/nunito.woff2") format("woff2");
  font-weight: 200 1000; font-style: normal; font-display: block; }
:root {
  --fonte: #1b1b1d;
  --pate: #f3e2b3;
  --doree: #c98a3a;
  --brule: #3a2414;
  --beurre: #ffd24a;
  --email: #efe6d6;
  --encre: #2b1d12;
  --voile: rgba(239, 230, 214, 0.86);
  --rond: 999px;
  --titre: "Nunito Crepe", ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
  --lv: 100vw;   /* largeur et hauteur du jeu affiché (portrait) ; échangées quand l'écran est contre-tourné */
  --hv: 100dvh;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--email); color: var(--encre);
  font-family: "Nunito Crepe", system-ui, -apple-system, "Segoe UI", sans-serif; overflow: hidden;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
#wrap { position: fixed; inset: 0; height: 100dvh; }
/* Téléphone passé en paysage (rotation automatique) : capteurs.js pose html.pivot et contre-tourne tout le jeu
   pour qu'il reste droit par rapport au téléphone, aux dimensions portrait (--lv = innerHeight, --hv = innerWidth). */
html.pivot #wrap { inset: auto; left: 50%; top: 50%; width: var(--lv); height: var(--hv);
  transform: translate(-50%, -50%) rotate(var(--pivot-r, 0deg)); }
html[data-pivot="90"] { --haut: env(safe-area-inset-left, 0px); --bas: env(safe-area-inset-right, 0px); }
html[data-pivot="270"] { --haut: env(safe-area-inset-right, 0px); --bas: env(safe-area-inset-left, 0px); }
html.pivot .ecran, html.pivot #potards { touch-action: pan-x pan-y; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; touch-action: manipulation; }

.principal { background: var(--beurre); color: var(--encre); border: 0; border-radius: var(--rond);
  padding: 14px 34px; min-height: 52px; font-family: var(--titre); font-weight: 800; font-size: 1.15rem; cursor: pointer;
  box-shadow: 0 3px 0 #c99a1a, 0 8px 22px rgba(43, 29, 18, 0.18); }
.principal:active { transform: translateY(2px); box-shadow: 0 1px 0 #c99a1a, 0 4px 12px rgba(43, 29, 18, 0.18); }

/* ---------- Écrans (accueil, fin) : texte en haut, boutons en bas, la poêle au milieu */
.ecran { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  align-items: center; overflow-y: auto; touch-action: pan-y;
  padding: calc(18px + var(--haut)) 18px calc(18px + var(--bas)); }
.panel { text-align: center; max-width: 480px; width: 100%; }
.panel.haut { background: var(--voile); border-radius: 26px; padding: 16px 18px; }
.panel.bas { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.panel h1 { margin: 0 0 8px; font-family: var(--titre); font-weight: 900; font-size: clamp(2rem, calc(var(--lv) * 0.1), 3.2rem);
  line-height: 0.95; letter-spacing: -0.01em; color: var(--brule); }
.panel p { margin: 0; line-height: 1.4; font-size: 1rem; }
/* La phrase d'accueil (le seul écran avant la partie) et, sur ordinateur, la consigne clavier en petit */
#accroche { font-family: var(--titre); font-weight: 800; font-size: 1.2rem; line-height: 1.3; }
#accueil-ordi { margin-top: 8px; font-size: 0.82rem; line-height: 1.35; opacity: 0.8; }

/* ---------- Pendant la partie */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud-haut { position: absolute; left: 14px; right: 14px; top: calc(14px + var(--haut)); display: flex; flex-direction: column;
  align-items: center; gap: 6px; }
#consigne { margin: 0; max-width: 100%; text-align: center;
  background: var(--voile); color: var(--encre); border-radius: 22px; padding: 9px 18px;
  font-family: var(--titre); font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
#consigne:empty { display: none; }
#odeur { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 0.95rem; color: var(--encre);
  background: rgba(255, 210, 74, 0.88); border-radius: var(--rond); padding: 4px 12px; white-space: nowrap; }
#odeur:empty { display: none; }
#decompte { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; text-align: center;
  font-family: var(--titre); font-weight: 900; font-size: 7rem; line-height: 1; color: var(--beurre);
  -webkit-text-stroke: 3px var(--encre); paint-order: stroke fill; }
#repli { position: absolute; left: 16px; right: 16px; bottom: calc(110px + var(--bas)); margin: 0 auto; max-width: 420px;
  background: var(--voile); border-radius: 18px; padding: 10px 14px; text-align: center; font-size: 0.95rem; line-height: 1.35; }
#jauge { position: absolute; left: 50%; bottom: calc(30px + var(--bas)); transform: translateX(-50%);
  width: 180px; height: 14px; border-radius: var(--rond); background: var(--voile); border: 2px solid var(--encre); overflow: hidden; }
#jauge-niveau { display: block; height: 100%; width: 0; background: var(--beurre); }
#enlever { position: absolute; left: 50%; bottom: calc(26px + var(--bas)); transform: translateX(-50%);
  pointer-events: auto; min-width: 210px; min-height: 64px; font-size: 1.35rem; }
#enlever:active { transform: translate(-50%, 2px); }

/* ---------- Écran de fin : une feuille crème en bas, la crêpe reste visible au-dessus */
#fin { justify-content: flex-end; padding-left: 12px; padding-right: 12px; }
.feuille { background: var(--voile); border-radius: 26px; padding: 14px 16px 10px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#fin .score { margin: 0; font-family: var(--titre); font-weight: 900; font-size: clamp(3.2rem, calc(var(--lv) * 0.17), 5rem); line-height: 1; color: var(--brule); }
.score small { font-size: 0.38em; font-weight: 800; margin-left: 2px; opacity: 0.75; }
#fin-titre { margin: 4px 0 10px; font-family: var(--titre); font-weight: 800; font-size: 1.2rem; line-height: 1.2; }
#fin-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin: 0 0 12px; text-align: left; font-size: 0.88rem; }
#fin-detail div { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px dotted rgba(43, 29, 18, 0.3); padding: 2px 0; }
#fin-detail dt { opacity: 0.75; }
#fin-detail dd { margin: 0; font-weight: 700; text-align: right; white-space: nowrap; }
#fin-detail div.large { grid-column: 1 / -1; }
/* trois blocs côte à côte (étalement, retournement, timing) : un libellé, un chiffre en gros, une ou deux lignes ;
   puis la cuisson sur une ligne */
#fin-detail.blocs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 2px 0 10px; text-align: center; }
#fin-detail.blocs > div { flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px;
  border-bottom: 0; padding: 4px 5px 6px; }
#fin-detail.blocs > div + div { border-left: 1.5px dotted rgba(43, 29, 18, 0.35); }
#fin-detail.blocs dt { font-size: 0.74rem; white-space: nowrap; }
#fin-detail.blocs dd { white-space: normal; text-align: center; font-weight: 600; font-size: 0.8rem; line-height: 1.2; }
#fin-detail.blocs dd.fort { font-family: var(--titre); font-weight: 900; font-size: 1.35rem; line-height: 1.05; margin: 1px 0 2px; }
#fin-detail.blocs > div.pied { grid-column: 1 / -1; border-left: 0; border-top: 1.5px dotted rgba(43, 29, 18, 0.35);
  padding: 6px 0 0; margin-top: 2px; }
#fin-detail.blocs > div.pied dd { font-weight: 600; opacity: 0.8; }
html.court #fin-detail.blocs dd.fort { font-size: 1.15rem; }
html.court #fin-detail.blocs > div { padding: 2px 4px 4px; }

/* Partage : quatre boutons de même poids. Le style suit la DA du jeu, pas l'ordre ni les libellés. */
.partage { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; margin-top: 12px; }
.partage-titre { flex-basis: 100%; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }
.partage button { background: transparent; color: var(--encre); border: 2px solid var(--encre); border-radius: var(--rond);
  padding: 6px 12px; min-height: 40px; font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.partage button:hover { background: rgba(255, 210, 74, 0.45); }

#toast { position: absolute; left: 50%; bottom: calc(24px + var(--bas)); transform: translateX(-50%);
  background: var(--encre); color: var(--email); padding: 8px 16px; border-radius: var(--rond); font-size: 0.9rem; z-index: 5; }

/* Liens de sortie, sur l'écran d'accueil et l'écran de fin (jamais pendant la partie). Voir PARTAGE.md. */
.pl-sortie { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 0.88rem; font-weight: 700; }
.pl-sortie a { color: var(--encre); opacity: 0.75; text-decoration: none; padding: 6px 2px; }
.pl-sortie a:hover { opacity: 1; text-decoration: underline; }
.pl-sortie a.credits { font-weight: 600; font-size: 0.74rem; opacity: 0.55; }
#accueil .pl-sortie { background: var(--voile); border-radius: var(--rond); padding: 2px 16px; }

/* ---------- Habillage des styles de la scène (scene.js pose html[data-style]) : dessin animé par défaut ('mama'),
   contours d'encre, boutons joufflus à ombre pleine. 'wii' : blanc laqué et bleu ciel. 'jouet' : pastels. */
:root { --trait: 3px solid var(--encre); }
html { background: #fff8ee; }
.principal { border: var(--trait); box-shadow: 0 5px 0 var(--encre); padding: 12px 34px; }
.principal:active { box-shadow: 0 2px 0 var(--encre); }
.panel.haut, #consigne, .feuille, #repli, #accueil .pl-sortie { background: rgba(255, 248, 238, 0.94); border: var(--trait); }
.feuille { box-shadow: 0 6px 0 var(--encre); }
#odeur { border: 2px solid var(--encre); background: var(--beurre); }
.panel h1 { color: #d8392b; -webkit-text-stroke: 2px var(--encre); paint-order: stroke fill; letter-spacing: 0; }
#fin .score { color: #d8392b; -webkit-text-stroke: 2px var(--encre); paint-order: stroke fill; }
.score small { -webkit-text-stroke: 0; color: var(--encre); }
#decompte { -webkit-text-stroke: 4px var(--encre); }
.partage button { background: #fff; }
#jauge { border: var(--trait); }

html[data-style="wii"] { --encre: #33404f; --beurre: #5cc6f5; background: #fbfaf7; }
html[data-style="wii"] .principal { color: #fff; border: 0; box-shadow: 0 4px 0 #2b8fc4, 0 10px 24px rgba(51, 64, 79, 0.18);
  background: linear-gradient(#7fd6ff, #3fb2ec); }
html[data-style="wii"] .principal:active { box-shadow: 0 1px 0 #2b8fc4; }
html[data-style="wii"] .panel.haut, html[data-style="wii"] #consigne, html[data-style="wii"] .feuille, html[data-style="wii"] #repli,
html[data-style="wii"] #accueil .pl-sortie { background: rgba(255, 255, 255, 0.92); border: 3px solid #cfe9f7;
  box-shadow: 0 6px 20px rgba(51, 64, 79, 0.12); }
html[data-style="wii"] .panel h1, html[data-style="wii"] #fin .score { color: #33404f; -webkit-text-stroke: 0; }
html[data-style="wii"] #odeur { background: #e4f6ff; border-color: #9fdcf7; }
html[data-style="wii"] #decompte { color: #fff; -webkit-text-stroke: 4px #3fb2ec; }

html[data-style="jouet"] { --encre: #4b3a6b; --beurre: #ffd84d; background: #f3e9de; }
html[data-style="jouet"] .principal { background: #ff8a91; color: #fff; border: 0; box-shadow: 0 5px 0 #d9636c; }
html[data-style="jouet"] .principal:active { box-shadow: 0 2px 0 #d9636c; }
html[data-style="jouet"] .panel.haut, html[data-style="jouet"] #consigne, html[data-style="jouet"] .feuille, html[data-style="jouet"] #repli,
html[data-style="jouet"] #accueil .pl-sortie { background: rgba(255, 250, 244, 0.94); border: 3px solid #bfeee4; box-shadow: none; }
html[data-style="jouet"] .panel h1, html[data-style="jouet"] #fin .score { color: #7b62c9; -webkit-text-stroke: 0; }
html[data-style="jouet"] #decompte { color: #ff8a91; -webkit-text-stroke: 4px #fff; }

/* Petits écrans : la fin se resserre (375 × 540, 393 × 660). html.court : hauteur du jeu affiché < 700 px
   (posée par capteurs.js, juste aussi quand l'écran est contre-tourné, contrairement à une media query) */
html.court .feuille { padding: 10px 14px 6px; }
html.court #fin .score { font-size: 3rem; }
html.court #fin-titre { font-size: 1.05rem; margin: 2px 0 6px; }
html.court #fin-detail { font-size: 0.8rem; gap: 1px 12px; margin-bottom: 8px; }
html.court #fin-detail div { padding: 1px 0; }
html.court #fin .principal { min-height: 44px; padding: 9px 30px; font-size: 1.05rem; }
html.court .partage { margin-top: 8px; gap: 6px; }
html.court .partage-titre { display: none; }
html.court .partage button { min-height: 36px; padding: 4px 11px; }
html.court .pl-sortie { margin-top: 4px; }
html.court .pl-sortie a { padding: 4px 2px; }
html.court #decompte:not(.verdict) { font-size: 5rem; }

/* Ordinateur (jeu affiché plus large que haut, html.large) : la feuille de fin passe à droite, la crêpe reste visible */
html.large #fin { justify-content: center; align-items: flex-end; padding-right: calc(var(--lv) * 0.04); }
html.large #fin .feuille { max-width: 400px; }
html.large #accueil .panel.haut { max-width: 560px; }

/* ---------- Panneau de mise au point (?debug) */
#debug { position: absolute; right: 6px; top: calc(6px + var(--haut)); z-index: 10; width: min(300px, calc(var(--lv) - 12px));
  max-height: calc(var(--hv) - 12px); display: flex; flex-direction: column; font: 11px/1.3 ui-monospace, Consolas, monospace;
  color: #eee; background: rgba(20, 16, 12, 0.88); border-radius: 8px; touch-action: pan-y; user-select: text; }
#debug.replie { width: auto; }
#debug.replie > header > :not(:first-child) { display: none; }
#debug > header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 5px 6px; }
#debug button, #debug select { background: #3a3128; color: #eee; border: 1px solid #6b5a48; border-radius: 4px;
  padding: 3px 6px; font: inherit; cursor: pointer; }
#debug .corps { overflow-y: auto; padding: 0 6px 6px; }
#debug.replie .corps { display: none; }
#debug pre { margin: 4px 0; white-space: pre-wrap; color: #ffd24a; }
#debug details { margin: 4px 0; }
#debug summary { cursor: pointer; font-weight: 700; color: #f3e2b3; }
#debug .ligne { display: grid; grid-template-columns: 104px 1fr 60px; gap: 4px; align-items: center; margin: 2px 0; }
#debug .ligne span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#debug input[type=range] { width: 100%; margin: 0; }
#debug input[type=number] { width: 100%; background: #2a231c; color: #eee; border: 1px solid #6b5a48; border-radius: 3px; font: inherit; padding: 1px 2px; }
#debug .actions { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }

/* ---------- Jauge de cuisson, façon barre ATB : cadre fin à double filet, coins biseautés, fond sombre, remplie de pâte
   à crêpe. Trois parties séparées par deux traits fins (--z1, --z2, posées par jeu.js) : cuisson 1 | moment de retourner
   (la fenêtre parfaite, exactement) | cuisson 2. jeu.js ne fait que glisser le cache sombre (#doree-vide, un transform)
   et régler l'opacité des couches de cuisson (dorée, rousse, noire ; arrondie, le DOM ne change qu'au pas). */
#doree { position: absolute; left: 50%; top: calc(20px + var(--haut)); transform: translateX(-50%);
  width: min(calc(var(--lv) * 0.84), 360px); --z1: 0.6; --z2: 0.78; }
#doree-cadre, #doree-filet, #doree-piste, #doree-pate { clip-path: polygon(var(--k) 0, calc(100% - var(--k)) 0, 100% var(--k),
  100% calc(100% - var(--k)), calc(100% - var(--k)) 100%, var(--k) 100%, 0 calc(100% - var(--k)), 0 var(--k)); }
#doree-cadre { --k: 7px; height: 30px; padding: 1.5px; background: #140d08; }
#doree-filet { --k: 6px; height: 100%; padding: 1.5px; background: linear-gradient(#fff6dc, #e2cd9f 55%, #b99a63); }
#doree-piste { --k: 5px; position: relative; height: 100%; padding: 2px; background: linear-gradient(#33261c, #18100a); }
#doree-pate { --k: 3.5px; position: relative; height: 100%; overflow: hidden; }
#doree-pate > i { position: absolute; inset: 0; display: block; }
/* couches de cuisson sur leur propre calque : leur opacité change sans repeindre la jauge (le premier repeint du doré
   compilait les shaders du navigateur en pleine phase 1, 70 à 100 ms d'image figée à la première partie) */
#doree-d, #doree-r, #doree-n, #doree-d2 { will-change: opacity; }
/* la pâte crue : crème, des bulles, un fond un peu plus soutenu en bas */
#doree-base { background:
  radial-gradient(circle, rgba(255, 255, 255, 0.75) 0 0.7px, rgba(190, 150, 86, 0.4) 1.1px 1.6px, transparent 2px) 0 -3px / 29px 17px,
  radial-gradient(circle, rgba(255, 255, 255, 0.6) 0 0.5px, rgba(190, 150, 86, 0.35) 0.9px 1.3px, transparent 1.7px) 11px 5px / 41px 19px,
  radial-gradient(circle, rgba(190, 150, 86, 0.3) 0 0.9px, transparent 1.4px) 23px 2px / 53px 13px,
  linear-gradient(#fcf1d0, #f4e2ae 60%, #e8cf94); }
/* dorée : taches rousses, bulles devenues de petits trous sombres, bords brunis */
#doree-d { opacity: 0; background:
  radial-gradient(ellipse 9px 5px, rgba(140, 74, 20, 0.55), transparent) 3px 1px / 37px 20px,
  radial-gradient(ellipse 6px 4px, rgba(160, 92, 28, 0.5), transparent) 19px 11px / 29px 20px,
  radial-gradient(circle, rgba(96, 52, 16, 0.45) 0 0.9px, transparent 1.6px) 0 -3px / 29px 17px,
  radial-gradient(circle, rgba(96, 52, 16, 0.35) 0 0.7px, transparent 1.3px) 11px 5px / 41px 19px,
  radial-gradient(ellipse 14px 7px, rgba(255, 214, 140, 0.45), transparent) 11px 4px / 47px 20px,
  linear-gradient(rgba(128, 66, 18, 0.65), transparent 30%, transparent 70%, rgba(128, 66, 18, 0.65)),
  linear-gradient(#e6a956, #d18f3f 60%, #bd7a2f); }
/* rousse puis noire : la crêpe brûle */
#doree-r { opacity: 0; background:
  radial-gradient(ellipse 8px 5px, rgba(60, 26, 8, 0.6), transparent) 5px 3px / 31px 20px,
  radial-gradient(circle, rgba(40, 18, 6, 0.6) 0 1px, transparent 1.8px) 0 -3px / 29px 17px,
  linear-gradient(rgba(70, 30, 8, 0.6), transparent 35%, transparent 65%, rgba(70, 30, 8, 0.6)),
  linear-gradient(#a35a22, #8a4518 60%, #6e3410); }
#doree-n { opacity: 0; background:
  radial-gradient(ellipse 7px 4px, rgba(110, 96, 86, 0.45), transparent) 8px 5px / 27px 20px,
  radial-gradient(ellipse 10px 5px, rgba(70, 30, 10, 0.5), transparent) 21px 12px / 41px 20px,
  linear-gradient(#2a1d15, #160e09); }
/* phase 2 : la cuisson 1 est figée à gauche du second trait, la pâte de la face 2 dore seule à droite */
#doree-d2 { display: none !important; left: calc(var(--z2) * 100%) !important; opacity: 0; background:
  radial-gradient(ellipse 8px 5px, rgba(140, 74, 20, 0.5), transparent) 9px 2px / 33px 20px,
  radial-gradient(circle, rgba(96, 52, 16, 0.45) 0 0.9px, transparent 1.6px) 0 -3px / 29px 17px,
  linear-gradient(rgba(128, 66, 18, 0.6), transparent 30%, transparent 70%, rgba(128, 66, 18, 0.6)),
  linear-gradient(#e6a956, #d18f3f 60%, #bd7a2f); }
#doree.p2 #doree-d2 { display: block !important; }
#doree.p2 #doree-d, #doree.p2 #doree-r, #doree.p2 #doree-n { right: calc((1 - var(--z2)) * 100%); }
/* le brillant de la pâte, puis le cache sombre de la partie vide, qui glisse vers la droite (ombre douce au front de pâte) */
#doree-lustre { background: linear-gradient(transparent 10%, rgba(255, 255, 255, 0.5) 17%, rgba(255, 255, 255, 0.1) 40%, transparent 46%); }
#doree-vide { transform: translateX(0); will-change: transform; background: linear-gradient(#33261c, #18100a); }
#doree-vide::before { content: ""; position: absolute; top: 0; bottom: 0; left: -5px; width: 5px;
  background: linear-gradient(90deg, transparent, rgba(24, 16, 10, 0.55)); }
/* les deux traits, posés à l'échelle de l'intérieur de la piste (marge de 2px) */
#doree-piste > b { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff3d2;
  box-shadow: 0 0 0 1px rgba(20, 13, 8, 0.9); }
#doree-t1 { left: calc(2px + (100% - 4px) * var(--z1)); }
#doree-t2 { left: calc(2px + (100% - 4px) * var(--z2)); }
/* un éclat bref quand le remplissage atteint un trait (pas en phase 2) */
#doree.z1:not(.p2) #doree-t1, #doree.z2:not(.p2) #doree-t2 { animation: trait-eclat 0.6s ease-out 1; }
@keyframes trait-eclat { 0% { background: #fff; box-shadow: 0 0 0 1px #140d08, 0 0 7px 3px rgba(255, 228, 140, 0.95); }
  100% { background: #fff3d2; box-shadow: 0 0 0 1px rgba(20, 13, 8, 0.9), 0 0 0 0 rgba(255, 228, 140, 0); } }
@media (prefers-reduced-motion: reduce) { #doree-piste > b { animation: none !important; } }
/* le chiffre du décompte et « Faites sauter ! », collés sous la jauge : les deux forment un seul bloc */
#decompte.avec-jauge { top: calc(64px + var(--haut)); transform: translate(-50%, 0); font-size: 5.2rem; }
#decompte.retournez { font-size: min(3.4rem, calc(var(--lv) * 0.125)); white-space: nowrap; animation: retournez-pop 0.35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes retournez-pop { from { transform: translate(-50%, 0) scale(0.4); } to { transform: translate(-50%, 0) scale(1); } }
#decompte.verdict { font-size: 3.2rem; white-space: nowrap; }
html.court #decompte.retournez { font-size: min(3.2rem, calc(var(--lv) * 0.12)); }

/* Petits liens (son, recalibrer) : discrets, sous les boutons principaux */
.lien { background: none; border: 0; padding: 6px 8px; min-height: 32px; font: 700 0.85rem var(--titre); color: var(--encre);
  opacity: 0.75; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.petits-liens { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 14px; margin: 4px 0 0; }
#decompte.verdict { animation: verdict-pop 0.35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes verdict-pop { from { transform: translate(-50%, -50%) scale(0.4); } to { transform: translate(-50%, -50%) scale(1); } }

/* ---------- L'image à partager (story.js, exception demandée par Benoit) : « partager ma crêpe » en tête du bloc de
   partage, rouge et joufflu ; les quatre boutons du lien restent dessous. Calque plein écran : repli iOS sans partage
   de fichier (appui long sur l'image). */
.partage-image { flex-basis: 100%; display: flex; justify-content: center; margin-bottom: 4px; }
.partage-image[hidden] { display: none !important; }
.partage .partage-image button { background: #d8392b; color: #fff8ee; border: var(--trait); box-shadow: 0 4px 0 var(--encre);
  padding: 8px 26px; min-height: 48px; font-family: var(--titre); font-weight: 900; font-size: 1.08rem; }
.partage .partage-image button:hover { background: #e3483a; }
.partage .partage-image button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--encre); }
.partage .partage-image button.attente { cursor: progress; }
html.court .partage .partage-image button { min-height: 42px; padding: 6px 22px; font-size: 1rem; }
html.court .partage-image { margin-bottom: 2px; }
#story-calque { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: calc(16px + var(--haut)) 16px calc(16px + var(--bas)); background: rgba(43, 29, 18, 0.9); touch-action: pan-y; }
#story-calque img { display: block; max-width: 100%; max-height: calc(var(--hv) - 160px); width: auto; height: auto;
  border: 3px solid #fff8ee; border-radius: 10px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
#story-calque p { margin: 0; color: #fff8ee; font-family: var(--titre); font-weight: 800; font-size: 1rem; text-align: center; }

/* ---------- Aide « à la Wii » : pictogrammes animés du téléphone (SVG inline, contours d'encre, crème, rouge).
   #aide-incliner sur l'accueil : le téléphone tenu à plat (vu en perspective) penche à gauche puis à droite, la flaque
   de pâte coule du côté bas, les flèches s'allument tour à tour. #aide-secouer sous « Faites sauter ! » : un petit coup sec
   vers le haut, traits de vitesse, la crêpe saute et se retourne. prefers-reduced-motion : une image fixe. */
.aide { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.aide svg { display: block; overflow: visible; }
#aide-incliner { flex-direction: row; justify-content: center; gap: 8px; margin: 4px auto -4px; }
.aide-tel { display: flex; align-items: center; gap: 2px; height: 66px; }
.aide-plan { width: 44px; height: 72px; perspective: 120px; }
.aide-plan svg { width: 100%; height: 100%; transform-origin: 50% 55%; transform: rotateX(48deg);
  animation: aide-pencher 2.4s ease-in-out infinite; }
.aide .corps { fill: #fff8ee; stroke: var(--encre); stroke-width: 4; stroke-linejoin: round; }
.aide .ecran { fill: #3a3346; stroke: var(--encre); stroke-width: 2; stroke-linejoin: round; }
.aide-plan .flaque path { fill: var(--pate); stroke: var(--encre); stroke-width: 2.5; }
.aide-plan .flaque ellipse { fill: #fff; opacity: 0.7; }
.aide-plan .flaque { transform-box: view-box; animation: aide-couler 2.4s ease-in-out infinite; }
.aide-fleche { width: 18px; height: 30px; animation: aide-fleche-g 2.4s ease-in-out infinite; }
.aide-fleche.d { animation-name: aide-fleche-d; }
.aide-fleche path { fill: none; stroke: #d8392b; stroke-width: 4; stroke-linecap: round; }
.aide-fleche path.pointe { fill: #d8392b; stroke-width: 1.5; stroke-linejoin: round; }
.aide-mot { font-family: var(--titre); font-weight: 900; font-size: 1.05rem; color: #d8392b; letter-spacing: 0.02em; }
.aide-mot:empty { display: none; }
@keyframes aide-pencher {
  0%, 100% { transform: rotateX(48deg) rotateY(0deg); }
  25% { transform: rotateX(48deg) rotateY(-24deg); }
  75% { transform: rotateX(48deg) rotateY(24deg); }
}
@keyframes aide-couler {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-9px); }
  80% { transform: translateX(9px); }
}
@keyframes aide-fleche-g { 0%, 50%, 100% { opacity: 0.25; } 20%, 30% { opacity: 1; } }
@keyframes aide-fleche-d { 0%, 50%, 100% { opacity: 0.25; } 70%, 80% { opacity: 1; } }

/* « d'un coup sec » : collé sous « Faites sauter ! » (le mot et l'image forment un seul bloc), au-dessus de la poêle */
#aide-secouer { position: absolute; left: 50%; top: calc(126px + var(--haut)); transform: translateX(-50%); }
html.court #aide-secouer { top: calc(116px + var(--haut)); }
#aide-secouer svg { width: 86px; height: 67px; }
#aide-secouer .tel, #aide-secouer .crepe, #aide-secouer .vitesse { transform-box: view-box; }
#aide-secouer .tel { animation: aide-coup 1.1s cubic-bezier(.3, 0, .2, 1) infinite; }
#aide-secouer .crepe { transform-origin: 45px 26px; animation: aide-saut 1.1s ease-out infinite; }
#aide-secouer .crepe ellipse { fill: #e9b25c; stroke: var(--encre); stroke-width: 2.5; }
#aide-secouer .crepe ellipse.dessus { fill: #f7dc9c; stroke: none; }
#aide-secouer .vitesse path { stroke: var(--encre); stroke-width: 3; stroke-linecap: round; }
#aide-secouer .vitesse { opacity: 0; animation: aide-traits 1.1s linear infinite; }
@keyframes aide-coup {
  0%, 30%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
  55% { transform: translateY(0); }
}
@keyframes aide-saut {
  0%, 30% { transform: translateY(0) scaleY(1); }
  42% { transform: translateY(-12px) scaleY(1); }
  62% { transform: translateY(-24px) scaleY(-1); }
  85%, 100% { transform: translateY(0) scaleY(1); }
}
@keyframes aide-traits { 0%, 34% { opacity: 0; } 38%, 52% { opacity: 1; } 60%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .aide-plan svg, .aide-plan .flaque, .aide-fleche, #aide-secouer .tel, #aide-secouer .crepe, #aide-secouer .vitesse { animation: none !important; }
  .aide-plan svg { transform: rotateX(48deg) rotateY(22deg); }
  .aide-plan .flaque { transform: translateX(8px); }
  .aide-fleche.g { opacity: 0.25; }
  #aide-secouer .tel { transform: translateY(-8px); }
  #aide-secouer .crepe { transform: translateY(-18px); }
  #aide-secouer .vitesse { opacity: 1; }
}

/* ---------- Consignes-éclair (eclair.js, façon WarioWare) : un verbe en capitales très grasses, contour d'encre épais,
   ombre pleine, légère rotation, et un pictogramme animé à côté. Environ 1 s (--duree) : entrée en zoom avec rebond,
   tenue, sortie rapide (zoom et fondu). « Tournez ! » en haut, au-dessus de la poêle (la pâte coule au centre : jamais
   masquée) ; « Attendez… » sous la jauge (jamais dessus). Seuls transform et opacity bougent. */
.eclair { position: absolute; left: 0; right: 0; top: calc(18px + var(--haut)); z-index: 3; display: flex; justify-content: center;
  pointer-events: none; }
.eclair.attendez { top: calc(66px + var(--haut)); }
.eclair-boite { display: flex; align-items: center; gap: 2px; transform: rotate(-5deg); }
.eclair.on .eclair-boite { animation: eclair-vie var(--duree, 1000ms) linear both; }
.eclair-mot { margin: 0; font-family: var(--titre); font-weight: 900; text-transform: uppercase; white-space: nowrap;
  font-size: min(3rem, calc(var(--lv) * 0.112)); line-height: 1; letter-spacing: 0.005em;
  color: var(--beurre); -webkit-text-stroke: 8px var(--encre); paint-order: stroke fill; text-shadow: 0 6px 0 var(--encre); }
.eclair.attendez .eclair-mot { color: #fff8ee; }
.eclair-picto { flex: none; width: min(64px, calc(var(--lv) * 0.16)); height: min(64px, calc(var(--lv) * 0.16)); }
.eclair-picto svg { display: block; width: 100%; height: 100%; overflow: visible; }
.eclair-picto svg * { transform-box: view-box; }
.ec-poele { fill: #2c2c31; stroke: var(--encre); stroke-width: 5; }
.ec-pate { fill: var(--pate); stroke: var(--encre); stroke-width: 3; }
.ec-manche { fill: #c08a4a; stroke: var(--encre); stroke-width: 4; stroke-linejoin: round; }
.ec-fleche { fill: none; stroke: var(--beurre); stroke-width: 7; stroke-linecap: round; }
.ec-fleche-fond { fill: none; stroke: var(--encre); stroke-width: 13; stroke-linecap: round; }
.ec-pointe { fill: var(--beurre); stroke: var(--encre); stroke-width: 3.5; stroke-linejoin: round; }
.ec-tourne { transform-origin: 50px 50px; }
.eclair.on .ec-tourne { animation: ec-tourner 0.5s ease-in-out infinite alternate; }
.ec-verre { fill: #fff8ee; stroke: var(--encre); stroke-width: 5; stroke-linejoin: round; }
.ec-sable { fill: #e9b25c; }
.ec-bord { stroke: var(--encre); stroke-width: 9; stroke-linecap: round; }
.ec-sablier { transform-origin: 50px 50px; }
.eclair.on .ec-sablier { animation: ec-retourner var(--duree, 1000ms) ease-in-out both; }
@keyframes eclair-vie {
  0% { transform: rotate(-5deg) scale(0.2); opacity: 0; }
  13% { transform: rotate(-5deg) scale(1.18); opacity: 1; }
  21% { transform: rotate(-5deg) scale(0.93); }
  29% { transform: rotate(-5deg) scale(1.04); }
  35%, 84% { transform: rotate(-5deg) scale(1); opacity: 1; }
  100% { transform: rotate(-5deg) scale(1.3); opacity: 0; }
}
@keyframes ec-tourner { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
@keyframes ec-retourner { 0%, 35% { transform: rotate(0deg); } 65%, 100% { transform: rotate(180deg); } }
@keyframes eclair-fondu { 0% { opacity: 0; } 18%, 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sauter-fondu { from { opacity: 0; } to { opacity: 1; } }

/* Le décompte et « Faites sauter ! » parlent la même langue : capitales grasses, contour épais, ombre pleine. « Faites
   sauter ! » est la consigne-éclair du retournement : sur deux lignes, en très gros, entrée en zoom avec rebond, puis
   un léger battement, visible pendant TOUTE la zone (du premier au second trait de la jauge), jamais sur la jauge. */
#decompte { -webkit-text-stroke: 8px var(--encre); text-shadow: 0 7px 0 var(--encre); }
#decompte.retournez { width: min-content; max-width: calc(var(--lv) - 20px); white-space: normal; text-transform: uppercase;
  font-size: min(3.6rem, calc(var(--lv) * 0.148)); line-height: 0.9; letter-spacing: 0.005em; rotate: -4deg;
  animation: sauter-entree 0.42s cubic-bezier(.2, 1.5, .4, 1) both, sauter-battre 0.5s ease-in-out 0.42s infinite alternate; }
html.court #decompte.retournez { font-size: min(3.1rem, calc(var(--lv) * 0.13)); }
#decompte.retournez ~ #aide-secouer { top: calc(178px + var(--haut)); }
html.court #decompte.retournez ~ #aide-secouer { top: calc(160px + var(--haut)); }
@keyframes sauter-entree { 0% { scale: 0.25; opacity: 0; } 40% { opacity: 1; } 62% { scale: 1.14; } 82% { scale: 0.96; } 100% { scale: 1; opacity: 1; } }
@keyframes sauter-battre { from { scale: 1; } to { scale: 1.05; } }
#decompte.verdict { -webkit-text-stroke: 8px var(--encre); }
@media (prefers-reduced-motion: reduce) {
  .eclair.on .eclair-boite { animation: eclair-fondu var(--duree, 1000ms) linear both; }
  .eclair.on .ec-tourne, .eclair.on .ec-sablier { animation: none; }
  #decompte.retournez { animation: sauter-fondu 0.25s linear both; }
}

/* ---------- La note sur 20 (écran de fin) : très grosse, rouge à contour d'encre épais et ombre pleine, lisible d'un coup
   d'oeil. Mise en scène : le compteur défile (.score.compte, un tic par valeur), puis l'éclat à l'arrivée (.score.eclat
   posée par jeu.js : rayons de beurre qui jaillissent derrière la note, une fois). « ? » en attendant. */
#fin .score { position: relative; isolation: isolate; margin: -4px 0 0; font-size: clamp(4.4rem, calc(var(--lv) * 0.25), 6.4rem);
  line-height: 0.95; letter-spacing: -0.01em; color: #d8392b; -webkit-text-stroke: 9px var(--encre); paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--encre); }
#fin-score { display: inline-block; transform-origin: 50% 60%; }
#fin .score small { font-size: 0.3em; text-shadow: none; -webkit-text-stroke: 0; margin-left: 4px; opacity: 0.85; }
#fin .score::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 1.9em; height: 1.9em;
  margin: -0.95em 0 0 -0.95em; border-radius: 50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 4deg, rgba(255, 210, 74, 0.95) 0 11deg, rgba(255, 210, 74, 0) 11deg 30deg);
  -webkit-mask: radial-gradient(closest-side, transparent 22%, #000 40%, #000 70%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 22%, #000 40%, #000 70%, transparent 100%); }
#fin .score.eclat::before { animation: note-rayons 1.1s cubic-bezier(.15, .8, .3, 1) both; }
#fin .score.compte #fin-score { color: #e2553f; }
@keyframes note-rayons { 0% { opacity: 0; transform: scale(0.3) rotate(0deg); } 18% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.45) rotate(35deg); } }
html.court #fin .score { font-size: clamp(3.6rem, calc(var(--lv) * 0.19), 4.6rem); }
@media (prefers-reduced-motion: reduce) { #fin .score.eclat::before { animation: none; } }

/* ---------- Boutons de jeu vidéo (menu de console, Wii Sports, Cooking Mama) : épais, arrondis, corps en dégradé, bande
   de reflet à bord franc en haut (::before), bordure claire intérieure, contour d'encre, ombre pleine dessous et ombre
   douce. Au toucher (:active), le bouton descend et l'ombre se réduit. Couleurs par variables : --b-haut, --b-bas (corps),
   --b-texte, --b-prof (hauteur de l'ombre pleine). Le clic sonore est dans jeu.js (sons.clic). */
.principal, .partage button, .lien, .pl-sortie a:not(.credits) {
  --b-haut: #ffffff; --b-bas: #dfe5ec; --b-texte: var(--encre); --b-prof: 5px;
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--b-texte); text-decoration: none; opacity: 1; cursor: pointer;
  border: 3px solid var(--encre); border-radius: 999px;
  background: linear-gradient(180deg, var(--b-haut) 0%, var(--b-haut) 30%, var(--b-bas) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), inset 0 -5px 0 rgba(43, 29, 18, 0.1),
    0 var(--b-prof) 0 var(--encre), 0 calc(var(--b-prof) + 4px) 12px rgba(43, 29, 18, 0.28);
  transition: transform 0.07s ease-out, box-shadow 0.07s ease-out, filter 0.15s; }
.principal::before, .partage button::before, .lien::before, .pl-sortie a:not(.credits)::before {
  content: ""; position: absolute; z-index: -1; left: 9%; right: 9%; top: 3px; height: 45%; pointer-events: none;
  border-radius: 999px 999px 6px 6px / 999px 999px 4px 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.5)); }
.principal:active, .partage button:active, .lien:active, .pl-sortie a:not(.credits):active {
  transform: translateY(calc(var(--b-prof) - 1px));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), inset 0 -3px 0 rgba(43, 29, 18, 0.12),
    0 1px 0 var(--encre), 0 2px 4px rgba(43, 29, 18, 0.25); }
@media (hover: hover) {
  .principal:hover, .partage button:hover, .lien:hover, .pl-sortie a:not(.credits):hover { filter: brightness(1.05) saturate(1.08); text-decoration: none; }
}
/* le grand bouton : beurre, très épais (Jouer, Rejouer, fermer) */
.principal { --b-haut: #ffe98a; --b-bas: #f4b417; --b-prof: 6px; padding: 12px 42px; min-height: 58px;
  font-family: var(--titre); font-weight: 900; font-size: 1.3rem; letter-spacing: 0.01em; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
/* « partager ma crêpe » : rouge cerise, texte crème */
.partage .partage-image button { --b-haut: #ff7a63; --b-bas: #c92c1d; --b-texte: #fff8ee; --b-prof: 5px;
  background: linear-gradient(180deg, var(--b-haut) 0%, var(--b-haut) 28%, var(--b-bas) 100%); border: 3px solid var(--encre);
  box-shadow: inset 0 0 0 2px rgba(255, 220, 210, 0.6), inset 0 -5px 0 rgba(60, 10, 0, 0.18),
    0 var(--b-prof) 0 var(--encre), 0 calc(var(--b-prof) + 4px) 12px rgba(43, 29, 18, 0.28);
  text-shadow: 0 2px 0 rgba(90, 15, 5, 0.45); padding: 9px 30px; min-height: 52px; }
.partage .partage-image button::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.28)); }
.partage .partage-image button:hover { background: linear-gradient(180deg, var(--b-haut) 0%, var(--b-haut) 28%, var(--b-bas) 100%); }
.partage .partage-image button:active { transform: translateY(calc(var(--b-prof) - 1px));
  box-shadow: inset 0 0 0 2px rgba(255, 220, 210, 0.6), inset 0 -3px 0 rgba(60, 10, 0, 0.2), 0 1px 0 var(--encre), 0 2px 4px rgba(43, 29, 18, 0.25); }
/* les quatre boutons du lien : blancs laqués, de même poids */
.partage { gap: 9px 6px; }
.partage button { --b-prof: 4px; padding: 6px 11px; min-height: 44px; font-family: var(--titre); font-weight: 900; font-size: 0.86rem; }
.partage button:hover { background: linear-gradient(180deg, var(--b-haut) 0%, var(--b-haut) 30%, var(--b-bas) 100%); }
/* petits boutons (son, recalibrer) et liens de sortie : plus petits, plus discrets (crème), mais de la même famille */
.lien { --b-prof: 3px; --b-bas: #ece3d2; padding: 4px 14px; min-height: 34px; border-width: 2.5px; font: 800 0.8rem var(--titre); }
.petits-liens { gap: 6px 10px; margin: 8px 0 2px; }
.pl-sortie { gap: 8px 8px; }
.pl-sortie a:not(.credits) { --b-prof: 3px; --b-bas: #ece3d2; padding: 4px 13px; min-height: 32px; border-width: 2.5px;
  font: 800 0.78rem var(--titre); }
.pl-sortie a.credits { align-self: center; }
#accueil .pl-sortie { background: none; border: 0; padding: 0; }
html.court .lien { min-height: 30px; padding: 3px 12px; }
html.court .pl-sortie a:not(.credits) { min-height: 29px; padding: 3px 11px; }
html.court .partage { gap: 7px 5px; }
html.court .partage button { min-height: 38px; padding: 4px 9px; font-size: 0.82rem; }
html.court #fin .principal { min-height: 48px; padding: 8px 36px; font-size: 1.15rem; }
html.court .partage .partage-image button { min-height: 44px; padding: 6px 24px; }

/* ---------- Écran de fin v8, en trois temps (jeu.js, sequenceFin ; le jury se place lui-même, jury.css) :
   #fin.etape-jury : le jury seul, aucun bloc de texte ; .etape-note : la note seule avec son titre, en bas, sous les
   juges, sans feuille ; .etape-tout : la feuille revient avec le reste (détail en deux lignes, Rejouer, partager ma
   crêpe, quatre pastilles, liens de sortie en petit texte) et la roue des réglages en haut à droite. */
#fin.etape-jury .feuille { display: none; }
#fin.etape-jury .reglages-fin, #fin.etape-note .reglages-fin { display: none; }
#fin.etape-note { justify-content: flex-start; padding-top: calc(var(--haut) + var(--hv) * 0.15); }
#fin.etape-note .feuille { background: none; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
#fin.etape-note .fin-suite, #fin.etape-jury .fin-suite { display: none; }
#fin.etape-note #fin-titre { display: inline-block; margin-top: 8px; padding: 5px 16px; border-radius: 999px;
  background: rgba(255, 248, 238, 0.96); border: var(--trait); animation: fin-titre-arrive 0.35s 0.2s cubic-bezier(.2, 1.4, .4, 1) both; }
#fin.etape-note .score { animation: fin-note-arrive 0.35s cubic-bezier(.2, 1.4, .4, 1) both; }
#fin.etape-tout .fin-suite { animation: fin-suite-arrive 0.4s cubic-bezier(.2, 1.1, .4, 1) both; }
#fin.etape-tout .feuille { animation: fin-feuille-arrive 0.3s ease-out both; }
@keyframes fin-note-arrive { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes fin-titre-arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fin-suite-arrive { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fin-feuille-arrive { from { opacity: 0.4; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  #fin.etape-note #fin-titre, #fin.etape-note .score, #fin.etape-tout .fin-suite, #fin.etape-tout .feuille { animation: sauter-fondu 0.2s linear both; }
}
.fin-suite { display: flex; flex-direction: column; align-items: center; }

/* le détail : deux lignes courtes */
#fin-detail.resume { display: block; margin: 6px 0 12px; text-align: center; }
#fin-detail.resume > div { display: block; border: 0; padding: 0; }
#fin-detail.resume dd { margin: 0; white-space: normal; text-align: center; font-weight: 600; font-size: 0.86rem; line-height: 1.3; opacity: 0.8; }
#fin-detail.resume dd.fort { font-family: var(--titre); font-weight: 900; font-size: 1rem; opacity: 1; }

/* Partage : « partager ma crêpe » en grand, puis les quatre pastilles rondes du lien sur une ligne (icônes en formes
   simples dessinées en code ; libellés dans aria-label) */
#fin .partage { margin-top: 14px; gap: 10px; flex-wrap: wrap; }
#fin .partage-titre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#fin .partage-image { margin-bottom: 2px; }
.partage button.pastille { --b-prof: 4px; width: 46px; height: 46px; min-height: 0; padding: 0; border-radius: 50%; flex: none; }
.partage button.pastille::before { left: 16%; right: 16%; top: 3px; height: 42%; border-radius: 50% 50% 40% 40% / 70% 70% 30% 30%; }
.partage button.pastille svg { display: block; width: 24px; height: 24px; overflow: visible; }
.pastille .trait { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pastille .plein { fill: currentColor; }
.pastille text { fill: currentColor; font: 900 19px var(--titre); }
.partage button.pastille[data-reseau="x"] { --b-haut: #55555c; --b-bas: #16161a; --b-texte: #fff; }
.partage button.pastille[data-reseau="whatsapp"] { --b-haut: #6ee089; --b-bas: #1f9e48; --b-texte: #fff; }
.partage button.pastille[data-reseau="facebook"] { --b-haut: #6aa6ff; --b-bas: #2457c5; --b-texte: #fff; }
.partage button.pastille[data-reseau="lien"] { --b-haut: #ffe98a; --b-bas: #f4b417; --b-texte: var(--encre); }
.partage button.pastille[data-reseau="x"] .trait { stroke-width: 3; }
.partage button.pastille:not([data-reseau="lien"])::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.15)); }
.partage button.pastille:hover { background: linear-gradient(180deg, var(--b-haut) 0%, var(--b-haut) 30%, var(--b-bas) 100%); }

/* liens de sortie de la fin : petits liens texte discrets (règle du kit : toujours présents) */
#fin .pl-sortie { margin-top: 12px; gap: 2px 16px; }
#fin .pl-sortie a, #fin .pl-sortie a:not(.credits) { display: inline; min-height: 0; padding: 4px 2px; border: 0; border-radius: 0;
  background: none; box-shadow: none; transform: none; filter: none; font: 700 0.76rem var(--titre); color: var(--encre);
  opacity: 0.65; text-decoration: underline; text-underline-offset: 3px; }
#fin .pl-sortie a::before { display: none; }
#fin .pl-sortie a.credits { opacity: 0.5; font-weight: 600; }

/* la roue des réglages : petit bouton rond en haut à droite, qui ouvre un petit menu (son, recalibrer) */
.reglages-fin { position: absolute; z-index: 6; top: calc(12px + var(--haut)); right: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#reglages { --b-prof: 4px; width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; }
#reglages svg { display: block; width: 26px; height: 26px; }
#reglages .dents { fill: none; stroke: var(--encre); stroke-width: 3.4; stroke-dasharray: 3.38 3.38; }
#reglages .moyeu { fill: var(--encre); }
#reglages .trou { fill: #fff; }
#reglages[aria-expanded="true"] svg { transform: rotate(30deg); }
#reglages svg { transition: transform 0.25s ease-out; }
#reglages-menu { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; border-radius: 18px;
  background: rgba(255, 248, 238, 0.97); border: var(--trait); box-shadow: 0 5px 0 var(--encre); }
#reglages-menu[hidden] { display: none; }
#reglages-menu .lien { min-height: 38px; font-size: 0.86rem; }
/* la roue suit le style des boutons */
#reglages { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  --b-haut: #ffffff; --b-bas: #dfe5ec; border: 3px solid var(--encre);
  background: linear-gradient(180deg, var(--b-haut) 0%, var(--b-haut) 30%, var(--b-bas) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), inset 0 -5px 0 rgba(43, 29, 18, 0.1),
    0 var(--b-prof) 0 var(--encre), 0 calc(var(--b-prof) + 4px) 12px rgba(43, 29, 18, 0.28);
  transition: transform 0.07s ease-out, box-shadow 0.07s ease-out; }
#reglages:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), 0 1px 0 var(--encre), 0 2px 4px rgba(43, 29, 18, 0.25); }

html.court #fin .partage { margin-top: 10px; gap: 8px; }
html.court .partage button.pastille { width: 42px; height: 42px; }
html.court #fin-detail.resume { margin: 4px 0 8px; }
html.court #fin .pl-sortie { margin-top: 8px; }
html.court #fin.etape-note { padding-top: calc(var(--haut) + var(--hv) * 0.12); }

/* ==========================================================================================================================
   v10 : la présentation hors partie (revue d'interface du 27/11/2026, validée par Benoit). Grille 8 / 12 / 16 / 24, cibles
   de 44 px au moins, une seule police (Nunito, plus haut). Ce bloc vient en dernier et remplace les règles d'avant pour
   l'accueil, la note, la feuille de fin, les réglages et le toast. Seuls transform, scale, rotate et opacity s'animent.
   ========================================================================================================================== */
.lecteur { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#fin-titre, #decompte, .eclair-mot, #repli, #consigne { text-wrap: balance; }

/* ---------- Accueil : le titre en haut (logo qui tombe et rebondit), la poêle entière au milieu avec la consigne en
   pictogramme, « Jouer » qui respire, puis une rangée de pastilles rondes (son, Tous les jeux, Le podcast) */
#accueil { justify-content: space-between; padding: calc(14px + var(--haut)) 16px calc(16px + var(--bas)); }
.accueil-titre { width: 100%; display: flex; justify-content: center; pointer-events: none; }
#titre { width: min-content; margin: 0; text-align: center; font-family: var(--titre); font-weight: 900;
  font-size: min(calc(var(--lv) * 0.15), calc(var(--hv) * 0.072), 4.6rem); line-height: 0.86; letter-spacing: -0.005em;
  color: #d8392b; -webkit-text-stroke: 9px var(--encre); paint-order: stroke fill; text-shadow: 0 6px 0 var(--encre);
  rotate: -4deg; animation: titre-tombe 0.9s 0.1s cubic-bezier(.3, 0, .3, 1) both; }
@keyframes titre-tombe {
  0% { translate: 0 -170%; opacity: 0; }
  12% { opacity: 1; }
  48% { translate: 0 0; scale: 1.06 0.9; }
  64% { translate: 0 -14%; scale: 0.97 1.04; }
  80% { translate: 0 0; scale: 1.02 0.97; }
  90% { translate: 0 -3%; scale: 1; }
  100% { translate: 0 0; scale: 1; opacity: 1; }
}
/* la consigne au centre, posée sur la poêle (fond sombre) : gros téléphone qui penche, mot en lettrage de consigne-éclair */
.accueil-consigne { flex: 1 1 0; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.accueil-consigne #aide-incliner { flex-direction: column; gap: 10px; margin: 0; }
.accueil-consigne .aide-tel { height: 122px; gap: 10px; }
.accueil-consigne .aide-plan { width: 74px; height: 122px; perspective: 200px; }
.accueil-consigne .aide-fleche { width: 30px; height: 50px; }
.accueil-consigne .aide-fleche path { stroke: var(--beurre); stroke-width: 4.5; }
.accueil-consigne .aide-fleche path.pointe { fill: var(--beurre); stroke: var(--encre); stroke-width: 1.5; }
.accueil-consigne .aide-mot, .touche-mot, .aide-ordi-phrase { font-family: var(--titre); font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em;
  font-size: 1.6rem; line-height: 1; color: var(--beurre); -webkit-text-stroke: 7px var(--encre); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--encre); rotate: -4deg; }
/* ordinateur : souris / flèches (penchez), ESPACE (faites sauter), touches crème au contour d'encre */
.aide-ordi { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.aide-ordi[hidden] { display: none !important; }
.aide-ordi-phrase { margin: 0; font-size: 1.35rem; text-transform: none; }
.aide-ordi-phrase:empty { display: none; }
.touches { display: flex; align-items: flex-end; justify-content: center; gap: 40px; }
.touche-groupe { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.touche-pictos { display: flex; align-items: center; gap: 10px; min-height: 58px; }
.touche-mot { font-size: 1.3rem; }
.t-ou { font-family: var(--titre); font-weight: 900; font-size: 1.6rem; color: #fff8ee; -webkit-text-stroke: 6px var(--encre); paint-order: stroke fill; }
.t-souris { width: 40px; height: 56px; overflow: visible; }
.t-fleches { width: 78px; height: 54px; overflow: visible; }
.t-corps, .t-touche rect { fill: #fff8ee; stroke: var(--encre); stroke-width: 3.5; }
.t-trait { fill: none; stroke: var(--encre); stroke-width: 3; }
.t-molette, .t-touche path { fill: var(--encre); }
.t-espace { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; height: 46px; padding: 0 20px;
  background: #fff8ee; border: 3.5px solid var(--encre); border-radius: 11px; box-shadow: 0 5px 0 var(--encre);
  font-family: var(--titre); font-weight: 900; font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--encre);
  animation: espace-appui 1.6s ease-in-out infinite; }
@keyframes espace-appui { 0%, 55%, 100% { translate: 0 0; box-shadow: 0 5px 0 var(--encre); }
  65%, 80% { translate: 0 4px; box-shadow: 0 1px 0 var(--encre); } }
/* le bas : « Jouer » 220 × 64, 24 px, puis les pastilles de 48 px à 12 px d'écart, chacune avec son libellé dessous */
#accueil .panel.bas { gap: 24px; width: auto; }
#start { min-width: 220px; min-height: 64px; padding: 10px 40px; font-size: 1.6rem; }
/* « Jouer » respire : un halo de beurre qui gonfle et s'efface autour du bouton (le bouton lui-même ne bouge pas) */
#start::after { content: ""; position: absolute; z-index: -2; inset: -4px; border-radius: 999px; pointer-events: none;
  border: 4px solid var(--beurre); opacity: 0; animation: respirer 2s ease-out infinite; }
@keyframes respirer { 0% { opacity: 0.9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.16, 1.45); } }
.accueil-pastilles { display: flex; justify-content: center; align-items: flex-start; gap: 12px; }
#accueil .pl-sortie { display: flex; gap: 12px; margin: 0; flex-wrap: nowrap; }
#accueil .rondelle, #accueil .pl-sortie a.rondelle { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 48px;
  min-height: 48px; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none;
  filter: none; opacity: 1; color: var(--encre); text-decoration: none; cursor: pointer; font: 800 12px/1.2 var(--titre); }
#accueil .rondelle::before { display: none; }
#accueil .rondelle:active { transform: none; box-shadow: none; }
.rondelle .rond { --b-haut: #ffffff; --b-bas: #ece3d2; --b-prof: 4px; position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--encre);
  background: linear-gradient(180deg, var(--b-haut) 0%, var(--b-haut) 30%, var(--b-bas) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), inset 0 -5px 0 rgba(43, 29, 18, 0.1),
    0 var(--b-prof) 0 var(--encre), 0 calc(var(--b-prof) + 4px) 12px rgba(43, 29, 18, 0.28);
  transition: transform 0.07s ease-out, box-shadow 0.07s ease-out; }
.rondelle .rond::before { content: ""; position: absolute; z-index: -1; left: 16%; right: 16%; top: 3px; height: 42%; pointer-events: none;
  border-radius: 50% 50% 40% 40% / 70% 70% 30% 30%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.4)); }
.rondelle:active .rond { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), 0 1px 0 var(--encre), 0 2px 4px rgba(43, 29, 18, 0.25); }
@media (hover: hover) { .rondelle:hover .rond { filter: brightness(1.05); } }
.rondelle svg { display: block; width: 24px; height: 24px; overflow: visible; }
.rondelle .plein { fill: var(--encre); }
.rondelle .trait { fill: none; stroke: var(--encre); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rondelle .croix { display: none; }
.rondelle.coupe .onde { display: none; }
.rondelle.coupe .croix { display: inline; }
.rondelle .etiquette { padding: 2px 8px; border-radius: 999px; background: rgba(255, 248, 238, 0.95); border: 2px solid var(--encre); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  #titre { animation: sauter-fondu 0.3s linear both; }
  #start::after, .t-espace { animation: none; }
}
/* ordinateur : le titre sur une ligne en haut (au-dessus de la poêle, loin du bol), la consigne au centre */
html.large #titre { width: auto; white-space: nowrap; font-size: min(calc(var(--hv) * 0.068), 4rem); }   /* une ligne, au-dessus de la poêle */
html.large #accueil { padding-bottom: calc(20px + var(--bas)); }

/* ---------- La note : un cartouche opaque (crème, contour d'encre, ombre pleine) ; les chiffres roulent (une bande de
   0 à 9 par chiffre, transform seul) ; la virgule, plus petite et relevée, ne descend plus sur le titre */
.resultat { position: relative; display: inline-block; }
#fin .score { display: inline-flex; align-items: flex-end; justify-content: center; margin: 0; padding: 6px 18px 4px;
  font-size: clamp(3.4rem, calc(var(--lv) * 0.2), 5.2rem); line-height: 1; letter-spacing: 0;
  background: #fff8ee; border: 3px solid var(--encre); border-radius: 22px; box-shadow: 0 5px 0 var(--encre);
  -webkit-text-stroke: 8px var(--encre); text-shadow: 0 5px 0 var(--encre); }
#fin .score small { align-self: flex-end; margin: 0 0 0.2em 6px; font-size: 0.32em; }
.note-roule { display: inline-flex; align-items: flex-end; color: #d8392b; font-variant-numeric: tabular-nums; }
#fin .score.compte .note-roule { color: #e2553f; }
.note-roule .chiffre { display: block; height: 1.12em; overflow: hidden; padding: 0 0.035em; }
.note-roule .bande { display: block; white-space: pre; line-height: 1.12em; transform: translateY(calc(var(--d, 0) * -1.12em));
  transition: transform 90ms ease-out; }
.note-roule .virgule { display: block; font-size: 0.58em; line-height: 1; margin: 0 0.01em 0.3em; }
@media (prefers-reduced-motion: reduce) { .note-roule .bande { transition: none; } }
/* le titre de la note : une pastille crème, à 12 px sous le cartouche */
#fin-titre { display: inline-block; max-width: calc(100% - 32px); margin: 12px auto 0; padding: 5px 16px; border-radius: 999px;
  background: #fff8ee; border: 3px solid var(--encre); font-size: 1.15rem; line-height: 1.2; }
#fin.etape-note #fin-titre { margin-top: 12px; }

/* médaille (bronze, argent, or ; or + tampon « crêpe de compétition ») : tombe sur le coin du cartouche avec un ding */
.medaille { position: absolute; z-index: 2; left: -20px; top: -26px; width: 52px; height: 68px; rotate: -12deg; pointer-events: none;
  --m-clair: #ffe98a; --m-fonce: #d49a12; }
.medaille[hidden], .tampon[hidden], .record[hidden] { display: none; }
.medaille svg { display: block; width: 100%; height: 100%; overflow: visible; }
.medaille .ruban { stroke: var(--encre); stroke-width: 3; stroke-linejoin: round; }
.medaille .r1 { fill: #d8392b; } .medaille .r2 { fill: #3f7fd8; }
.medaille .disque { fill: var(--m-fonce); stroke: var(--encre); stroke-width: 3.5; }
.medaille .anneau { fill: var(--m-clair); stroke: rgba(43, 29, 18, 0.25); stroke-width: 2; }
.medaille .etoile { fill: var(--m-fonce); stroke: rgba(43, 29, 18, 0.35); stroke-width: 1.2; stroke-linejoin: round; }
.medaille .reflet { fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 3.5; stroke-linecap: round; }
.medaille.bronze { --m-clair: #f2b98a; --m-fonce: #b5642c; }
.medaille.argent { --m-clair: #ffffff; --m-fonce: #a9b3bd; }
.medaille.tombe { animation: medaille-tombe 0.7s cubic-bezier(.3, 0, .3, 1) both; }
@keyframes medaille-tombe {
  0% { translate: 0 -260px; rotate: 30deg; opacity: 0; }
  15% { opacity: 1; }
  55% { translate: 0 0; rotate: -18deg; scale: 1.08 0.92; }
  72% { translate: 0 -12px; rotate: -8deg; scale: 1; }
  86% { translate: 0 0; rotate: -14deg; }
  100% { translate: 0 0; rotate: -12deg; opacity: 1; }
}
.tampon { position: absolute; z-index: 2; right: -22px; top: -20px; margin: 0; padding: 3px 7px; rotate: 10deg; pointer-events: none;
  border: 3px double #c8281c; border-radius: 8px; background: rgba(255, 248, 238, 0.6); color: #c8281c;
  font: 900 0.64rem/1.05 var(--titre); text-transform: uppercase; letter-spacing: 0.05em; text-align: center; max-width: 8.5em; }
.tampon.frappe { animation: tampon-frappe 0.38s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes tampon-frappe { 0% { scale: 2.4; opacity: 0; } 60% { scale: 0.92; opacity: 1; } 100% { scale: 1; opacity: 1; } }
/* le record personnel, sur le bord haut du cartouche ; « Nouveau record ! » clignote */
.record { position: absolute; z-index: 2; left: 50%; top: -14px; translate: -50% 0; margin: 0; padding: 2px 10px; white-space: nowrap;
  background: #fff8ee; border: 2.5px solid var(--encre); border-radius: 999px; font: 800 0.8rem/1.3 var(--titre); color: var(--encre); }
.record.nouveau { background: var(--beurre); font-weight: 900; animation: record-clignote 0.35s steps(2, jump-none) 8 alternate both, record-saut 0.4s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes record-clignote { 0% { opacity: 1; } 100% { opacity: 0.25; } }
@keyframes record-saut { from { scale: 0.3; } to { scale: 1; } }
@media (prefers-reduced-motion: reduce) {
  .medaille.tombe, .tampon.frappe, .record.nouveau { animation: sauter-fondu 0.25s linear both; }
}

/* ---------- La feuille de fin en barre de boutons de console : le cartouche et le titre posés sur la scène, puis une
   barre crème à fines rayures collée au bas de l'écran (détail, Rejouer et Partager de même largeur, pastilles, sorties) */
#fin { padding: calc(12px + var(--haut)) 0 0; }
#fin.etape-tout .feuille, #fin .feuille { max-width: none; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; display: flex; flex-direction: column; align-items: center; }
#fin .fin-suite { align-self: stretch; margin-top: 12px; padding: 12px 16px calc(4px + var(--bas));
  background: repeating-linear-gradient(180deg, #fff8ee 0 3px, #f6ecd9 3px 6px); border-top: 3px solid var(--encre); }
#fin.etape-tout .feuille { animation: none; }
#fin-detail.resume { margin: 0 0 24px; }
#fin-detail.resume dd { font-size: 0.9rem; }
#fin-detail.resume dd.fort { font-size: 1.02rem; }
#again, #fin .partage .partage-image button { width: min(280px, calc(100% - 48px)); padding-left: 16px; padding-right: 16px; }
#again { min-height: 64px; font-size: 1.45rem; }
#fin .partage { margin-top: 12px; gap: 16px; width: 100%; }
#fin .partage-image { margin: 0; }
#fin .partage .partage-image button { min-height: 52px; font-size: 1.1rem; }
/* « Partager ma crêpe » : rouge plus sombre et reflet discret, le texte crème reste lisible jusqu'en haut des lettres */
.partage .partage-image button { --b-haut: #e04b37; --b-bas: #a8241a; text-shadow: 0 2px 0 rgba(60, 8, 2, 0.55); }
.partage .partage-image button::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06)); }
.partage button.pastille { width: 48px; height: 48px; }
/* les sorties en texte, chacune avec une zone de 44 px de haut */
#fin .pl-sortie { margin-top: 4px; gap: 0 16px; }
#fin .pl-sortie a, #fin .pl-sortie a:not(.credits) { display: inline-flex; align-items: center; min-height: 44px; padding: 12px 8px; font-size: 0.8rem; }
/* court (375 × 667) : la note rapetisse, les écarts restent */
html.court #fin .score { font-size: clamp(2.8rem, calc(var(--lv) * 0.15), 3.6rem); padding: 4px 14px 2px; }
html.court #fin-titre { font-size: 1.02rem; padding: 4px 14px; }
html.court #fin #again { min-height: 56px; font-size: 1.3rem; padding: 6px 16px; }
html.court #fin .partage .partage-image button { min-height: 48px; padding: 6px 16px; }
html.court #fin .partage { gap: 12px 16px; }
html.court .partage button.pastille { width: 48px; height: 48px; }
html.court #fin-detail.resume { margin: 0 0 16px; }
html.court #fin .pl-sortie { margin-top: 0; }
html.court .medaille { width: 44px; height: 58px; left: -18px; top: -22px; }
/* ordinateur : la barre devient un panneau à droite, bords arrondis */
html.large #fin { padding-bottom: calc(24px + var(--bas)); padding-right: calc(var(--lv) * 0.04); }
html.large #fin .feuille { max-width: 400px; }
html.large #fin .fin-suite { border: 3px solid var(--encre); border-radius: 22px; box-shadow: 0 6px 0 var(--encre); padding-bottom: 4px; }

/* ---------- Pendant le jury et la note : « Touchez pour continuer », chevron qui clignote comme une bulle de dialogue */
.indice { position: absolute; z-index: 7; left: 50%; bottom: calc(16px + var(--bas)); translate: -50% 0; margin: 0;
  display: flex; align-items: center; gap: 8px; padding: 5px 14px; white-space: nowrap; pointer-events: none;
  background: rgba(255, 248, 238, 0.94); border: 2.5px solid var(--encre); border-radius: 999px;
  font: 800 0.86rem/1.2 var(--titre); color: var(--encre); animation: indice-arrive 0.3s 0.9s ease-out both; }
.indice[hidden] { display: none; }
.indice svg { display: block; width: 16px; height: 11px; overflow: visible; animation: chevron 0.9s ease-in-out infinite; }
.indice path { fill: none; stroke: #d8392b; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes indice-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes chevron { 0%, 100% { transform: translateY(-1px); opacity: 1; } 50% { transform: translateY(3px); opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .indice svg { animation: none; } }

/* ---------- Réglages : la roue en haut à droite, le menu 8 px dessous (le jury rangé est à gauche : il n'est plus
   recouvert), boutons crème de 44 px, comme ceux de la feuille */
.reglages-fin { top: calc(12px + var(--haut)); right: 12px; gap: 8px; }
#reglages-menu { padding: 8px; gap: 8px; border-radius: 18px; background: repeating-linear-gradient(180deg, #fff8ee 0 3px, #f6ecd9 3px 6px); }
#reglages-menu .lien { min-height: 44px; padding: 6px 16px; font-size: 0.95rem; border-width: 3px; --b-prof: 4px; white-space: nowrap; }

/* ---------- Toast (« Lien copié ») : dans la police du jeu, au-dessus des pastilles, petit rebond */
#toast { font-family: var(--titre); font-weight: 900; font-size: 1rem; padding: 9px 18px; border: 3px solid #fff8ee;
  box-shadow: 0 4px 0 rgba(43, 29, 18, 0.35); white-space: nowrap; animation: toast-rebond 0.42s cubic-bezier(.2, 1.6, .4, 1) both; }
/* jeu.js (placerToast) pose --toast-x / --toast-y : le haut de la rangée des pastilles, mesuré dans #wrap */
#fin:not([hidden]) ~ #toast.sur-fin { left: var(--toast-x); top: var(--toast-y); bottom: auto; transform: translate(-50%, calc(-100% - 10px)); }
@keyframes toast-rebond { 0% { scale: 0.4; opacity: 0; } 60% { scale: 1.1; opacity: 1; } 100% { scale: 1; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #toast { animation: sauter-fondu 0.2s linear both; } }

/* ---------- v11 : la partie (revue d'interface, points 7, 10, 11, 12, 14 et lot 2 ; agent PARTIE)
   Le tiers inférieur de l'écran (au-dessus du manche, sous la poêle) reçoit les consignes qui ne doivent rien masquer :
   « TOURNEZ ! » (jamais coupé par le filet de pâte, qui monte du point de versement vers le haut de l'écran) et les
   petites réactions (#reaction, posée par jeu.js : Bien !, Super !, Pas encore !, Trop tard !, C'est prêt !).
   « FAITES SAUTER ! », « ATTENDEZ… », le décompte et les verdicts restent où ils étaient. Seuls transform, scale et
   opacity s'animent ; prefers-reduced-motion : fondus (jeu.js choisit les images clés des réactions). */
.eclair.tournez { top: 63%; }
.eclair.tournez .eclair-boite { flex-direction: column; gap: 6px; transform: rotate(-4deg); }
.eclair.tournez .eclair-mot { font-size: min(3.6rem, calc(var(--lv) * 0.148)); text-shadow: 0 7px 0 var(--encre); }
.eclair.tournez .eclair-picto { width: min(84px, calc(var(--lv) * 0.22)); height: min(84px, calc(var(--lv) * 0.22)); }
html.court .eclair.tournez { top: 61%; }
html.court .eclair.tournez .eclair-mot { font-size: min(3.1rem, calc(var(--lv) * 0.13)); }
html.court .eclair.tournez .eclair-picto { width: 64px; height: 64px; }
/* ordinateur : la poêle occupe toute la hauteur, « TOURNEZ ! » reste en haut, sur une ligne */
html.large .eclair.tournez { top: calc(18px + var(--haut)); }
html.large .eclair.tournez .eclair-boite { flex-direction: row; }

.reaction { position: absolute; left: 0; right: 0; top: 70%; z-index: 3; display: flex; justify-content: center; pointer-events: none; }
html.court .reaction { top: 69%; }
html.large .reaction { top: auto; bottom: calc(12% + var(--bas)); }
.reaction span { display: block; margin: 0; padding: 4px 18px 6px; border: 4px solid var(--encre); border-radius: 16px;
  background: #fff8ee; color: var(--encre); box-shadow: 0 6px 0 var(--encre); white-space: nowrap;
  font-family: var(--titre); font-weight: 900; font-size: min(2.3rem, calc(var(--lv) * 0.095)); line-height: 1.05; letter-spacing: 0.005em; }
.reaction.bien span, .reaction.super span { font-size: min(1.9rem, calc(var(--lv) * 0.08)); }
.reaction.bien span { background: #9ddc7a; }
.reaction.super span { background: var(--beurre); }
.reaction.pasEncore span, .reaction.tropTard span { background: #e8473b; color: #fff8ee; }
.reaction.cestPret span { background: var(--beurre); }

/* « 3, 2, 1 » : chaque chiffre « tape » (petit zoom avec rebond) ; deux noms d'animation pour relancer à chaque chiffre */
#decompte.tape-a { animation: chiffre-tape-a 0.34s cubic-bezier(.2, 1.6, .4, 1) both; }
#decompte.tape-b { animation: chiffre-tape-b 0.34s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes chiffre-tape-a { 0% { scale: 1.55; opacity: 0.3; } 100% { scale: 1; opacity: 1; } }
@keyframes chiffre-tape-b { 0% { scale: 1.55; opacity: 0.3; } 100% { scale: 1; opacity: 1; } }

/* Le pictogramme « d'un coup sec » (point 11) : une pastille crème de 90 px, contour et ombre d'encre, collée à droite
   de « FAITES », sous le « ! » de « SAUTER ! » (le texte passe devant), jamais sur le bord de la poêle */
#decompte.retournez { z-index: 2; }
#decompte.retournez ~ #aide-secouer { z-index: 1; top: calc(50px + var(--haut)); left: calc(50% + min(var(--lv) * 0.225, 90px)); transform: none;
  width: 90px; height: 90px; justify-content: center; background: #fff8ee; border: 3px solid var(--encre); border-radius: 22px;
  box-shadow: 0 5px 0 var(--encre); }
#decompte.retournez ~ #aide-secouer svg { width: 84px; height: 66px; }
html.court #decompte.retournez ~ #aide-secouer { top: calc(56px + var(--haut)); left: calc(50% + min(var(--lv) * 0.2, 80px)); width: 78px; height: 78px; }
html.court #decompte.retournez ~ #aide-secouer svg { width: 68px; height: 53px; }

/* La jauge pleine à la fin de la seconde face (« C'est prêt ! ») : un petit bond */
#doree.pret #doree-cadre { animation: doree-pret 0.45s cubic-bezier(.2, 1.6, .4, 1) 1; }
@keyframes doree-pret { 0% { scale: 1; } 40% { scale: 1.06; } 100% { scale: 1; } }
@media (prefers-reduced-motion: reduce) {
  #decompte.tape-a, #decompte.tape-b, #doree.pret #doree-cadre { animation: none; }
}
/* Le bandeau des capteurs absents (décompte et début du versement, avant la jauge) monte en haut : le tiers
   inférieur est celui de « TOURNEZ ! » et des réactions */
#hud #repli { top: calc(14px + var(--haut)); bottom: auto; }
