@font-face{font-family:"Fredoka";font-weight:600;src:url(fonts/fredoka-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Fredoka";font-weight:700;src:url(fonts/fredoka-latin-700-normal.woff2) format("woff2")}
:root{--acc:#f59e0b;--ink:#0b1020;--paper:#f8fafc}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
html,body{margin:0;height:100%;background:#05070f;overflow:hidden;touch-action:none;
  font-family:"Fredoka","Trebuchet MS",system-ui,sans-serif;font-weight:600;color:var(--paper)}
#stage{position:fixed;left:50%;top:50%;width:540px;height:960px;transform-origin:center;overflow:hidden;
  background:#0b1020;border-radius:10px}
#world{position:absolute;inset:0}
#cv,#gl{position:absolute;left:0;top:0;width:540px;height:960px}
#cv{z-index:4;pointer-events:none}
#gl{display:none}
button{font:inherit;color:inherit;border:0;cursor:pointer}

/* HUD */
#hud{position:absolute;left:0;right:0;top:0;height:58px;padding:12px 14px;display:flex;align-items:center;gap:12px;z-index:5}
#bPause{width:40px;height:40px;border-radius:12px;background:#0008;font-size:15px;letter-spacing:-2px}
#hudMid{flex:1;display:flex;flex-direction:column;line-height:1.05}
#hSpe{font-size:21px}
#hRound{font-size:14px;opacity:.7}
#hearts{display:flex;gap:4px;font-size:30px;line-height:1}
#hearts .h{color:#ef4444;filter:drop-shadow(0 2px 0 #0008);transition:transform .2s}
#hearts .h.off{color:#475569;transform:scale(.8)}
#hearts .h.pop{animation:heartpop .5s}
@keyframes heartpop{0%{transform:scale(1.8)}100%{transform:scale(.8)}}
#hpwrap{position:absolute;left:18px;right:18px;top:58px;z-index:5}
#hpname{font-size:14px;letter-spacing:.06em;text-transform:uppercase;opacity:.85;margin-bottom:3px}
.bar{position:relative;height:16px;background:#0009;border-radius:9px;overflow:hidden;border:2px solid #000a}
.bar i{position:absolute;left:0;top:0;bottom:0;border-radius:9px}
#hpLag{background:#fbbf24;width:100%;transition:width .6s .25s}
#hpFill{background:linear-gradient(#fb7185,#e11d48);width:100%;transition:width .12s}

/* question */
#board{position:absolute;left:18px;right:18px;top:106px;height:132px;z-index:4;border-radius:22px;
  background:linear-gradient(#f8fafc,#dfe7f2);color:#0b1020;display:flex;align-items:center;justify-content:center;
  padding:12px 20px 18px;text-align:center;box-shadow:0 6px 0 #0b1020,0 10px 24px #0007}
#qtxt{font-size:27px;line-height:1.15;font-weight:700}
#board.pop{animation:boardpop .3s}
@keyframes boardpop{0%{transform:scale(.9) translateY(-14px);opacity:0}100%{transform:none;opacity:1}}

#combo{position:absolute;left:20px;top:250px;z-index:4;display:none;align-items:center;gap:8px;font-size:18px;
  text-shadow:0 2px 0 #000a}
#combo.show{display:flex}
#cPips{display:flex;gap:4px}
#cPips u{width:12px;height:12px;border-radius:50%;background:#334155;border:2px solid #0008;display:block;text-decoration:none}
#cPips u.on{background:#fbbf24;box-shadow:0 0 8px #fbbf24}
#cHint{font-style:normal;color:#fbbf24;font-size:15px;display:none}
#combo.sup #cHint{display:inline;animation:blink .5s infinite alternate}
@keyframes blink{to{opacity:.35}}

/* réponses */

@keyframes padbad{0%,100%{transform:translateX(0)}25%{transform:translateX(-10px)}75%{transform:translateX(10px)}}

@keyframes reveal{to{transform:scale(1.07)}}

/* explication */
#expl{position:absolute;left:24px;right:24px;top:705px;z-index:4;padding:12px 16px;border-radius:18px;
  background:#0b1020ee;border:3px solid #334155;font-size:20px;line-height:1.2;text-align:center;display:none}
#expl.show{display:block;animation:boardpop .25s}
#expl b{color:#4ade80}
#expl small{display:block;margin-top:6px;opacity:.55;font-size:14px}
#expl.ok{padding:8px 14px;font-size:17px;border-color:#16a34a;opacity:.95}
#expl.ok b{color:#86efac}

/* annonces */
#stamp{position:absolute;left:0;right:0;top:395px;text-align:center;z-index:6;font-size:68px;line-height:1;
  font-weight:700;pointer-events:none;opacity:0;-webkit-text-stroke:8px #0b1020;paint-order:stroke fill;
  text-shadow:0 8px 0 #0b1020;letter-spacing:.02em}
#stamp.go{animation:stamp .85s ease-out}
#stamp.big{font-size:96px}
@keyframes stamp{0%{opacity:0;transform:scale(2.2) rotate(-8deg)}14%{opacity:1;transform:scale(.92) rotate(-4deg)}
  26%{transform:scale(1.06) rotate(-4deg)}70%{opacity:1;transform:scale(1) rotate(-4deg)}100%{opacity:0;transform:scale(1.1) translateY(-30px) rotate(-4deg)}}
#banner{position:absolute;left:0;right:0;top:360px;text-align:center;z-index:7;opacity:0;pointer-events:none;
  background:linear-gradient(90deg,transparent,#000b 18%,#000b 82%,transparent);padding:20px 0}
#banner b{display:block;font-size:76px;line-height:1;color:var(--acc);-webkit-text-stroke:6px #0b1020;paint-order:stroke fill}
#banner span{display:block;font-size:26px;margin-top:6px}
#banner.go{animation:banner 1.7s ease-out}
@keyframes banner{0%{opacity:0;transform:translateX(-90px)}14%{opacity:1;transform:none}80%{opacity:1}100%{opacity:0;transform:translateX(90px)}}
#flash{position:absolute;inset:0;z-index:8;pointer-events:none;opacity:0;background:#ef4444}
#flash.w{background:#fff}

#hint{position:absolute;left:0;right:0;top:870px;text-align:center;z-index:4;font-size:22px;display:none;pointer-events:none;
  text-shadow:0 3px 0 #05070f,0 0 12px #000}
#hint.show{display:block;animation:hintb 1s ease-in-out infinite alternate}
@keyframes hintb{to{transform:translateY(-8px)}}

#hRound{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:330px}


/* ===== habillage « arène » (d'après la maquette) ===== */
#top{position:absolute;left:12px;right:12px;top:8px;z-index:5;border-radius:16px;padding:7px 12px 9px;
  background:linear-gradient(rgba(22,48,104,.93),rgba(9,22,58,.93));border:2px solid #6aa8ff;
  box-shadow:0 0 18px rgba(59,130,246,.55),inset 0 0 0 1px rgba(255,255,255,.18),0 6px 14px rgba(0,0,0,.35)}
#hud{position:static;height:auto;padding:0;display:flex;align-items:center;gap:10px}
#hpwrap{position:static;margin-top:3px}
#bPause{width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.14);font-size:12px}
#hSpe{font-size:22px}
#hearts{font-size:28px}
#hearts .h{color:#fbbf24;filter:drop-shadow(0 2px 0 #7a4e0a)}
#hearts .h.off{color:#55637e;filter:none}
#hpname{color:#9cc8ff;font-size:13px;margin-bottom:2px}
.bar{height:14px;background:#0a1534;border:2px solid #2c4a8a}
#hpFill{background:linear-gradient(#ffe56b,#f5a50b)}
#hpLag{background:#ff9d2e}
#board{top:122px;height:122px;background:linear-gradient(rgba(255,255,255,.96),rgba(220,232,250,.9));border:2px solid rgba(255,255,255,.9);
  box-shadow:0 0 0 1px #9cc2ff,0 10px 22px rgba(10,30,80,.45);backdrop-filter:blur(6px)}
#combo{top:256px}

/* ===== La Fronde : planches, tirs restants ===== */
#board{height:104px}
#qtxt{font-size:27px}
#qtxt b{color:#c2410c}
#blocks{position:absolute;inset:0;pointer-events:none;z-index:3}
.blk{position:absolute;width:228px;height:72px;margin:-36px 0 0 -114px;border-radius:12px;padding:5px 14px;display:flex;align-items:center;justify-content:center;
  text-align:center;background:linear-gradient(#fff8e0,#f1d99c);border:4px solid #8a5a14;
  box-shadow:inset 0 0 0 2px #ebcd85,0 6px 0 #4a2f08,0 10px 14px rgba(0,0,0,.4);color:#2b1a05;line-height:1.1;font-weight:700;
  opacity:0;transform:scale(.7) translateY(-24px);transition:opacity .25s,transform .25s}
.blk.in{opacity:1;transform:none}
.blk::before,.blk::after{content:"";position:absolute;top:50%;width:7px;height:7px;margin-top:-3px;border-radius:50%;background:#7a4e12;box-shadow:0 0 0 2px rgba(0,0,0,.18)}
.blk::before{left:5px}.blk::after{right:5px}
.blk .bt{position:relative;display:block}
.btag{position:absolute;right:-8px;top:-17px;font-style:normal;font-size:13px;font-weight:700;padding:2px 10px;border-radius:10px;background:#ef4444;color:#fff;display:none;box-shadow:0 2px 0 #7f1d1d}
.blk.boom .btag,.blk.late .btag,.blk.oops .btag{display:block}
.blk.boom{animation:boom .28s forwards}
@keyframes boom{to{transform:scale(1.3) rotate(9deg);opacity:0}}
.blk.oops{border-color:#16a34a;background:linear-gradient(#e9ffee,#b5ecc1);animation:padbad .4s}
.blk.oops .btag{background:#16a34a;box-shadow:0 2px 0 #14532d}
.blk.late{border-color:#ef4444;animation:reveal .5s infinite alternate}
.blk.gone{opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}
#shots{position:absolute;left:18px;top:676px;z-index:4;display:flex;align-items:center;gap:5px;pointer-events:none}
#shots .sb{width:20px;height:20px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff,var(--acc) 55%,#0006);border:2px solid #05070f;display:block}
#shots em{font-style:normal;font-size:15px;margin-left:4px;text-shadow:0 2px 0 #05070f}
#shots.low .sb{background:radial-gradient(circle at 35% 30%,#fff,#ef4444 55%,#0006)}
#expl.ko{border-color:#ef4444}
#expl.ko b{color:#f87171}

/* ===== graphisme « stade » de la fronde ===== */
#top{top:9px;left:40px;right:40px;padding:6px 12px 8px}
#bPause{width:32px;height:32px;font-size:11px}
#spIcon{width:44px;height:44px;border-radius:11px;display:grid;place-items:center;font-style:normal;font-size:27px;
  background:linear-gradient(#3a7cf0,#1a45a8);border:2px solid #a8cbff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)}
#hSpe{font-size:24px;line-height:1}
#hRound{font-size:14px;opacity:.9}
#hpwrap{margin-top:5px}
.bar{position:relative;height:28px;border-radius:15px;background:rgba(4,14,48,.75);border:2px solid #4f8ae6}
.bar i{border-radius:13px}
#hpFill{background:linear-gradient(rgba(255,230,107,.75),rgba(245,165,11,.75))}
#hpLag{background:rgba(255,157,46,.5)}
#hpname{position:absolute;left:0;right:0;top:0;bottom:0;z-index:2;display:flex;align-items:center;justify-content:center;
  margin:0;opacity:1;color:#fff;font-size:14px;letter-spacing:.04em;text-shadow:0 2px 0 rgba(0,0,0,.5)}
#hpname b{color:#5ee0ff;font-size:19px;margin-left:6px}
#board{top:118px;left:34px;right:34px;height:86px;padding:8px 18px 8px 80px;justify-content:flex-start}
#board::before{display:none}
#qtxt{font-size:26px;text-align:left;line-height:1.1}
.tgt{position:absolute;left:14px;top:50%;width:52px;height:52px;margin-top:-26px;border-radius:50%;
  background:radial-gradient(circle,#ff7a1a 0 22%,#fff 23% 40%,#ff7a1a 41% 58%,#fff 59% 70%,transparent 71%);box-shadow:0 0 0 3px rgba(255,122,26,.25)}
.blk{height:78px;border-radius:15px;border:3px solid #e0a23a;padding:5px 12px;flex-direction:column;
  background:linear-gradient(#fffaea,#f6e1ad);
  box-shadow:inset 0 -5px 0 #e7cb8a,inset 0 2px 0 #fff,0 4px 0 #b8801f,0 7px 10px rgba(0,0,0,.4);margin-top:-39px}
.blk::before,.blk::after{display:none}
.blk .bt{text-align:center;color:#1d2a47;font-weight:600;line-height:1.14}
.blk .s{display:block}
.blk .a{display:block;margin-top:2px;font-weight:800;color:#0e1a38}
.blk .a::before{content:"→ ";color:#f97316;font-weight:800}
#shots{left:20px;top:906px}
#hint{top:742px}
#expl{top:716px}

/* ===== bandeau vitreux, textes équilibrés ===== */
#top{background:linear-gradient(rgba(44,86,176,.86),rgba(10,28,78,.92));backdrop-filter:blur(7px) saturate(1.35);-webkit-backdrop-filter:blur(7px) saturate(1.35);
  border:2px solid #86bcff;box-shadow:0 0 22px rgba(90,160,255,.65),inset 0 1px 0 rgba(255,255,255,.6),inset 0 0 0 1px rgba(255,255,255,.14),0 6px 14px rgba(0,0,0,.35)}
#top::before{content:"";position:absolute;left:10px;right:10px;top:3px;height:26px;border-radius:12px 12px 20px 20px;background:linear-gradient(rgba(255,255,255,.28),rgba(255,255,255,0));pointer-events:none}
.blk .bt{text-wrap:balance}
#qtxt{text-wrap:balance}

/* le compteur de combo quitte les planches : il se pose sur la pelouse, à gauche */
#combo{top:672px;left:20px}

/* ===== néon du bandeau, soleil autour de la cible ===== */
#top{border:2px solid #6fb8ff;box-shadow:0 0 0 2px rgba(80,160,255,.28),0 0 28px rgba(70,150,255,.9),inset 0 1px 0 rgba(255,255,255,.6),inset 0 0 0 1px rgba(255,255,255,.14),0 6px 14px rgba(0,0,0,.35)}
.tgt::before{content:"";position:absolute;inset:-13px;border-radius:50%;
  background:repeating-conic-gradient(from 8deg,#ff8a2a 0 7deg,transparent 7deg 30deg);
  -webkit-mask:radial-gradient(circle,transparent 62%,#000 64%,#000 100%);mask:radial-gradient(circle,transparent 62%,#000 64%,#000 100%);opacity:.85}
.tgt{overflow:visible}

/* titre sur une ligne */
#board{padding:8px 12px 8px 76px}
#qtxt{font-size:23px;white-space:nowrap;letter-spacing:-.01em}

/* compteur de lancers : au centre bas, entre les deux mains */
#shots{left:50%;transform:translateX(-50%);top:918px}
#hint{top:700px}
#hint{top:872px;font-size:20px;line-height:1.1}
#shots{top:930px}

/* ouverture sans saut */
#stage{transform:translate(-50%,-50%) scale(var(--k,1))}
html:not(.pret) #stage{opacity:0}
html.pret #stage{animation:stageEntree .25s ease-out}
@keyframes stageEntree{from{opacity:0}to{opacity:1}}
html:not(.pret) body::before{content:"";position:fixed;left:50%;top:50%;width:34px;height:34px;margin:-17px 0 0 -17px;border:3px solid rgba(255,255,255,.18);border-top-color:#f5b942;border-radius:50%;animation:stageTourne .8s linear infinite}
@keyframes stageTourne{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){html.pret #stage{animation:none}}

/* ===== menus : le monde des massues en bois ===== */
:root{--creme:#fff3d6;--cuir:#2e1604;--or:#f5c542}
/* matière commune : planche de bois clouée, veinée, bord sombre, relief clair en haut */
.sign,.panneau,.card,.chrow,.big,.ghost,.snd,.back,.foot,#eStats div{
  --w1:#b97a35;--w2:#8c5320;
  background:
    repeating-linear-gradient(91deg,rgba(60,26,4,0) 0 9px,rgba(60,26,4,.17) 9px 10px,rgba(255,226,160,.08) 10px 14px,rgba(60,26,4,0) 14px 24px),
    repeating-linear-gradient(1.5deg,rgba(50,20,2,.11) 0 2px,rgba(0,0,0,0) 2px 8px),
    linear-gradient(var(--w1),var(--w2));
  border:3px solid var(--cuir);border-radius:10px;
  box-shadow:inset 0 2px 0 rgba(255,226,170,.55),inset 0 -5px 0 rgba(48,20,2,.5),0 5px 0 #20100a,0 10px 14px rgba(0,0,0,.45);
  color:var(--creme);text-shadow:0 2px 0 rgba(30,12,0,.8)}
/* décors : le stade reste visible derrière les menus */
#stage.inmenu #top,#stage.inmenu #board,#stage.inmenu #combo,#stage.inmenu #blocks,#stage.inmenu #shots,#stage.inmenu #hint,#stage.inmenu #expl,#stage.inmenu #stamp,#stage.inmenu #banner,
#stage.finie #top,#stage.finie #board,#stage.finie #combo,#stage.finie #blocks,#stage.finie #shots,#stage.finie #hint,#stage.finie #expl{display:none}
.screen{position:absolute;inset:0;z-index:20;display:none;background:none;padding:0}
.screen.show{display:block;animation:ecranEntre .28s ease-out}
@keyframes ecranEntre{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
#sPause,#sEnd{background:radial-gradient(110% 80% at 50% 48%,rgba(18,9,2,.30),rgba(8,4,0,.80))}
button{font-family:inherit}

/* panneau-enseigne : suspendu au toit par deux cordes */
.sign{position:absolute;left:36px;right:36px;top:22px;height:190px;padding:12px 16px 0;text-align:center;
  border-color:#6a420c;border-width:4px;box-shadow:inset 0 0 0 3px #e0b04a,inset 0 0 0 5px var(--cuir),0 6px 0 #20100a,0 12px 18px rgba(0,0,0,.5)}
.sign::before,.sign::after,.panneau::before,.panneau::after{content:"";position:absolute;top:-30px;width:6px;height:30px;
  background:repeating-linear-gradient(0deg,#caa05c 0 4px,#6a4a1c 4px 6px);border-radius:2px;box-shadow:0 0 0 1px var(--cuir)}
.sign::before,.panneau::before{left:54px}.sign::after,.panneau::after{right:54px}
.sign.petit{height:132px;padding-top:14px}
.logo{display:flex;flex-direction:column;align-items:center;line-height:.92;margin:0}
.logo .l1{font-size:78px;font-weight:700;letter-spacing:.03em;color:#fff3d6;-webkit-text-stroke:7px #2a1204;paint-order:stroke fill;
  text-shadow:0 2px 0 #2a1204,0 4px 0 #2a1204,0 6px 0 #2a1204,0 8px 6px rgba(0,0,0,.4)}
.logo .l2{display:flex;align-items:baseline;gap:10px;margin-top:2px}
.logo small{font-size:30px;font-weight:700;color:#e9cf9c;-webkit-text-stroke:5px #2a1204;paint-order:stroke fill;text-shadow:0 3px 0 #2a1204}
.logo .y{font-size:56px;font-weight:700;color:var(--or);-webkit-text-stroke:7px #2a1204;paint-order:stroke fill;text-shadow:0 2px 0 #2a1204,0 4px 0 #2a1204,0 6px 0 #2a1204,0 8px 6px rgba(0,0,0,.4)}
.tag{display:inline-block;margin:8px auto 0;padding:5px 16px 6px;border-radius:8px;background:rgba(36,14,2,.62);box-shadow:inset 0 1px 0 rgba(255,226,170,.3);
  font-size:18px;line-height:1.15;color:#ffe7b4;text-shadow:0 2px 0 rgba(0,0,0,.6)}
.sign.petit .tag{margin-top:6px}
h2{margin:0;font-size:56px;text-align:center;line-height:1;color:#fff3d6;-webkit-text-stroke:6px #2a1204;paint-order:stroke fill;text-shadow:0 2px 0 #2a1204,0 4px 0 #2a1204,0 7px 6px rgba(0,0,0,.4)}
.sign.petit h2{font-size:44px;margin-top:0}
.snd{position:absolute;right:16px;top:12px;width:52px;height:52px;padding:0;border-radius:50%;font-size:24px;
  --w1:#e8b24a;--w2:#a8701c;text-shadow:none}
.snd:active{transform:translateY(3px);box-shadow:0 2px 0 #20100a}

/* les spés : des écus peints sur des planches clouées aux étagères de la charpente */
#cards{position:absolute;left:62px;top:257px;width:416px;display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:66px;gap:10px 8px}
.card{position:relative;display:flex;align-items:center;gap:8px;height:66px;padding:5px 8px 5px 7px;text-align:left;border-radius:9px;transition:transform .1s}
.card:active{transform:translateY(3px);box-shadow:inset 0 2px 0 rgba(255,226,170,.55),inset 0 -5px 0 rgba(48,20,2,.5),0 2px 0 #20100a}
.card::before,.card::after,.chrow::before{content:"";position:absolute;width:6px;height:6px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffeaa0,#b8860b 70%);box-shadow:0 1px 0 var(--cuir)}
.card::before{left:4px;top:4px}.card::after{right:4px;top:4px}
.card .em{flex:none;width:44px;height:52px;display:grid;place-items:center;background:var(--or);clip-path:polygon(50% 100%,7% 80%,0 14%,50% 0,100% 14%,93% 80%)}
.card .em i{display:grid;place-items:center;width:38px;height:45px;font-style:normal;font-size:23px;text-shadow:none;margin-top:-2px;
  background:radial-gradient(circle at 36% 24%,color-mix(in srgb,var(--c) 55%,#fff),var(--c) 52%,color-mix(in srgb,var(--c) 55%,#000));
  clip-path:polygon(50% 100%,8% 78%,2% 14%,50% 2%,98% 14%,92% 78%)}
.card .txt{min-width:0}
.card b{display:block;font-size:18px;line-height:1.04;color:var(--creme)}
.stars{display:block;margin-top:2px;font-size:18px;line-height:1;letter-spacing:1px}
.stars .on{color:var(--or);-webkit-text-stroke:2px #2a1204;paint-order:stroke fill;text-shadow:none}
.stars .off{color:#4a2608;text-shadow:0 1px 0 rgba(255,220,150,.35)}
.foot{position:absolute;left:142px;width:256px;top:872px;margin:0;padding:6px 8px 8px;border-radius:9px;text-align:center;font-size:16px;line-height:1.2;color:#ffe7b4}

/* chapitres : planches à la suite sur le tableau de bois ; « Tout le programme » en grande planche claire */
.back{position:absolute;left:12px;top:12px;padding:6px 14px 8px;font-size:17px;border-radius:9px}
.back:active{transform:translateY(3px)}
#chList{position:absolute;left:62px;top:250px;width:420px;height:388px;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:10px;padding:2px 8px 16px 2px;touch-action:pan-y;
  scrollbar-width:thin;scrollbar-color:#e0b04a #3a1c06}
.chrow{position:relative;flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:60px;padding:6px 14px 8px 20px;text-align:left;font-size:18px;line-height:1.08;border-radius:9px;transition:transform .1s}
.chrow::before{left:6px;top:50%;margin-top:-3px}
.chrow:active:not(.off){transform:translateY(3px)}
.chrow .cn{display:block;min-width:0}
.chrow small{display:block;margin-top:2px;font-size:16px;color:#ffe0a0}
.chrow .stars{margin:0;white-space:nowrap;font-size:19px}
.chrow:first-child{min-height:84px;--w1:#fff6da;--w2:#f0d08a;border-color:#a8721a;color:#3a1c06;text-shadow:none;font-size:23px;
  box-shadow:inset 0 0 0 3px #e8b64c,inset 0 -5px 0 rgba(150,98,20,.45),0 5px 0 #20100a,0 10px 14px rgba(0,0,0,.45);
  background:repeating-linear-gradient(90deg,rgba(150,98,20,0) 0 22px,rgba(150,98,20,.13) 22px 23px),linear-gradient(var(--w1),var(--w2))}
.chrow:first-child small{color:#6a4412}
.chrow:first-child .stars .off{color:#c8a86a;text-shadow:none}
.chrow.off{opacity:.55;filter:saturate(.6)}
.chrow .soon{font-size:16px;white-space:nowrap;color:#ffe0a0}

/* boutons-planches */
.big{display:block;width:100%;padding:13px 20px 15px;font-size:25px;font-weight:700;color:#3a1c06;text-shadow:0 1px 0 rgba(255,244,200,.7);
  --w1:#ffd866;--w2:#ee9d16;border-color:#6a3c06;box-shadow:inset 0 2px 0 rgba(255,250,210,.8),inset 0 -5px 0 rgba(150,80,0,.5),0 6px 0 #20100a,0 10px 14px rgba(0,0,0,.45)}
.big:active{transform:translateY(4px);box-shadow:inset 0 2px 0 rgba(255,250,210,.8),inset 0 -5px 0 rgba(150,80,0,.5),0 2px 0 #20100a}
.ghost{display:block;width:100%;padding:11px 18px 13px;font-size:20px}
.ghost:active{transform:translateY(3px);box-shadow:inset 0 2px 0 rgba(255,226,170,.55),inset 0 -5px 0 rgba(48,20,2,.5),0 2px 0 #20100a}
.row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:6px}
.row .big{grid-column:1/-1}

/* pause et fin : un panneau de bois accroché au toit */
.panneau{position:absolute;left:80px;right:80px;top:260px;padding:26px 26px 28px;text-align:center;display:flex;flex-direction:column;gap:14px;border-color:#6a420c;border-width:4px;
  box-shadow:inset 0 0 0 3px #e0b04a,inset 0 0 0 5px var(--cuir),0 6px 0 #20100a,0 14px 24px rgba(0,0,0,.6)}
.panneau .tag{margin:-2px auto 4px}
.panneau.large{left:28px;right:28px;top:78px;max-height:810px;gap:12px;padding:24px 22px 26px}
#sEnd .panneau::before{left:90px}#sEnd .panneau::after{right:90px}
#eTitle{font-size:54px;color:var(--or)}
#eStars{font-size:58px;line-height:1;letter-spacing:8px;text-align:center}
#eStars .on{color:var(--or);-webkit-text-stroke:5px #2a1204;paint-order:stroke fill;text-shadow:0 4px 0 #2a1204}
#eStars .o{color:#4a2608;text-shadow:0 2px 0 rgba(255,220,150,.3)}
#eStars .perdu{display:block;font-size:20px;letter-spacing:0;color:#ffe7b4;text-shadow:0 2px 0 rgba(0,0,0,.6)}
#eStats{display:flex;gap:10px;justify-content:center}
#eStats div{flex:1;padding:8px 6px 10px;text-align:center;border-radius:9px;--w1:#fff6da;--w2:#f0d08a;border-color:#a8721a;color:#3a1c06;text-shadow:none}
#eStats b{display:block;font-size:28px;line-height:1.05}
#eStats span{font-size:16px;color:#6a4412}
#eMiss{max-height:290px;overflow-y:auto;display:flex;flex-direction:column;gap:9px;padding:2px 6px 4px 2px;text-align:left;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#e0b04a #3a1c06}
#eMiss h3{margin:0;font-size:19px;color:#ffe7b4;text-shadow:0 2px 0 rgba(0,0,0,.6)}
#eMiss .m{position:relative;padding:8px 12px 9px 16px;border-radius:5px;font-size:16px;line-height:1.2;background:#fff6e0;color:#2b1a05;text-shadow:none;border-left:7px solid #c0392b;box-shadow:0 3px 0 rgba(30,12,0,.55)}
#eMiss .m b{color:#1f7a3a}
#eMiss .m i{display:block;margin-top:3px;font-style:normal;font-size:16px;color:#6a4a22}
#stage.enpause #hint,#stage.enpause #shots{display:none}


/* ===== Fronde des SES : seulement ce que le nouveau contenu demande. Le reste est le design d'origine, inchangé. ===== */

/* plus de pictogramme de police : pause, cœurs, étoiles et flèche sont dessinés à la taille exacte des signes d'origine (mesurée dans le jeu d'origine) */
#bPause{display:flex;align-items:center;justify-content:center;padding:0;letter-spacing:0}
#bPause i{display:block;width:6px;height:9px;border-radius:1px;background:#fff}
#spIcon{font-size:17px;font-weight:700;color:#fff;letter-spacing:0}
#hearts .h{display:flex;align-items:center;justify-content:center;width:19.2px;height:28px;line-height:0}
#hearts .h svg{display:block;width:18.3px;height:18px;overflow:visible}
.stars svg{display:block;width:.95em;height:.9em;overflow:visible}
.stars{display:flex;align-items:center;gap:2px}
.stars .on path{stroke:#2a1204;stroke-width:1.6;paint-order:stroke;stroke-linejoin:round}
#eStars .on,#eStars .o{display:inline-block;width:48.3px;height:58px;margin-right:8px;vertical-align:top}
#eStars svg{display:block;width:54.9px;height:50px;margin:5px 0 0 -3.2px;overflow:visible}
#eStars .on{-webkit-text-stroke:0;text-shadow:none;filter:drop-shadow(0 4px 0 #2a1204)}
#eStars .on path{stroke:#2a1204;stroke-width:2.45;paint-order:stroke;stroke-linejoin:round}
#eStars .o{text-shadow:none;filter:drop-shadow(0 2px 0 rgba(255,220,150,.3))}
.blk .a::before{content:"";display:inline-block;width:.85em;height:.5em;margin-right:.3em;vertical-align:.05em;
  background:center/contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 10'><path d='M1 5h14M11 1l4 4-4 4' fill='none' stroke='%23f97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>")}
#bSnd1{font-size:15px;font-weight:700;line-height:1;color:#3a1c06}

/* bouton « Comprendre » pendant la partie */
#bComp{position:absolute;z-index:5;right:34px;top:210px;display:none;padding:5px 14px 7px;font-size:16px;border-radius:9px;
  --w1:#b97a35;--w2:#8c5320;
  background:repeating-linear-gradient(91deg,rgba(60,26,4,0) 0 9px,rgba(60,26,4,.17) 9px 10px,rgba(255,226,160,.08) 10px 14px,rgba(60,26,4,0) 14px 24px),repeating-linear-gradient(1.5deg,rgba(50,20,2,.11) 0 2px,rgba(0,0,0,0) 2px 8px),linear-gradient(var(--w1),var(--w2));
  border:3px solid var(--cuir);box-shadow:inset 0 2px 0 rgba(255,226,170,.55),inset 0 -5px 0 rgba(48,20,2,.5),0 5px 0 #20100a,0 10px 14px rgba(0,0,0,.45);color:var(--creme);text-shadow:0 2px 0 rgba(30,12,0,.8)}
#bComp.show{display:block}
#stage.inmenu #bComp,#stage.finie #bComp,#stage.enpause #bComp{display:none}
#bComp:active{transform:translateY(3px)}

/* le choix : les planches des menus d'origine, posées sur les mêmes étagères de la charpente */
.rb,.fr{
  --w1:#b97a35;--w2:#8c5320;
  background:
    repeating-linear-gradient(91deg,rgba(60,26,4,0) 0 9px,rgba(60,26,4,.17) 9px 10px,rgba(255,226,160,.08) 10px 14px,rgba(60,26,4,0) 14px 24px),
    repeating-linear-gradient(1.5deg,rgba(50,20,2,.11) 0 2px,rgba(0,0,0,0) 2px 8px),
    linear-gradient(var(--w1),var(--w2));
  border:3px solid var(--cuir);border-radius:9px;
  box-shadow:inset 0 2px 0 rgba(255,226,170,.55),inset 0 -5px 0 rgba(48,20,2,.5),0 5px 0 #20100a,0 10px 14px rgba(0,0,0,.45);
  color:var(--creme);text-shadow:0 2px 0 rgba(30,12,0,.8)}
#nivs{position:absolute;left:62px;top:257px;width:416px;display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:66px;gap:10px 8px}
.niv .em i{font-size:17px;font-weight:700;color:#fff;text-shadow:0 1px 0 rgba(0,0,0,.5);margin-top:0}
.niv small{display:block;margin-top:3px;font-size:15px;font-weight:600;color:#ffe0a0}
.niv.on{--w1:#fff6da;--w2:#f0d08a;border-color:#a8721a;color:#3a1c06;text-shadow:none;
  box-shadow:inset 0 0 0 3px #e8b64c,inset 0 -5px 0 rgba(150,98,20,.45),0 5px 0 #20100a,0 10px 14px rgba(0,0,0,.45);
  background:repeating-linear-gradient(90deg,rgba(150,98,20,0) 0 22px,rgba(150,98,20,.13) 22px 23px),linear-gradient(var(--w1),var(--w2))}
.niv.on b{color:#3a1c06}.niv.on small{color:#6a4412}
#rub{position:absolute;left:62px;top:333px;width:416px;height:304px;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:10px;padding:0 6px 10px 0;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#e0b04a #3a1c06}
.rb{flex:none;min-height:66px;padding:0}
.rb.on{--w1:#d89a45;--w2:#a2631f}
.rbh{display:flex;align-items:stretch;height:60px}
.rbm{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:0 6px 0 14px;text-align:left;background:none;color:inherit;text-shadow:inherit}
.rn{display:block;min-width:0;font-size:17px;line-height:1.1}
.rn b{display:block;font-size:19px;line-height:1.05}
.rn small{display:block;margin-top:3px;font-size:13.5px;font-weight:600;color:#ffe0a0}
.ck{position:relative;flex:none;width:28px;height:28px;border-radius:7px;border:3px solid var(--cuir);background:#fff6da;box-shadow:inset 0 2px 0 rgba(0,0,0,.15)}
.rb.on .rbm .ck,.fr.on .ck{background:#ffd24a}
.rb.on .rbm .ck::after,.fr.on .ck::after{content:"";position:absolute;left:7px;top:1px;width:8px;height:15px;border:solid #3a1c06;border-width:0 4px 4px 0;transform:rotate(45deg)}
.rb.part .rbm .ck::after{content:"";position:absolute;left:4px;top:9px;width:14px;height:4px;border-radius:2px;background:#3a1c06}
.ar{flex:none;align-self:center;margin:0 10px 0 0;padding:6px 10px 8px;font-size:15px;line-height:1;border-radius:8px;color:#3a1c06;text-shadow:0 1px 0 rgba(255,244,200,.6);
  background:linear-gradient(#e8b24a,#a8701c);border:3px solid var(--cuir);box-shadow:inset 0 2px 0 rgba(255,250,210,.7),inset 0 -3px 0 rgba(120,70,0,.45),0 3px 0 #20100a}
.ar:active,.fi:active{transform:translateY(2px)}
.fl{display:flex;flex-direction:column;gap:7px;padding:0 10px 12px}
.fr{display:flex;align-items:center;gap:8px;padding:0 8px 0 0;--w1:#c58a44;--w2:#9a6026;border-width:2px;box-shadow:inset 0 2px 0 rgba(255,226,170,.45),inset 0 -4px 0 rgba(48,20,2,.45),0 3px 0 #20100a}
.fr.on{--w1:#e0aa55;--w2:#b7762c}
.frm{flex:1;min-width:0;display:flex;align-items:center;gap:10px;padding:7px 4px 8px 10px;text-align:left;background:none;color:inherit;text-shadow:inherit}
.frm .rn{font-size:16px;line-height:1.08}
.frm .rn small{font-size:13px}
.fr .stars{font-size:15px;flex:none}
.fi{flex:none;padding:5px 8px 6px;font-size:13.5px;line-height:1;border-radius:7px;background:rgba(36,14,2,.55);color:#ffe7b4;text-shadow:none;box-shadow:inset 0 1px 0 rgba(255,226,170,.3)}
#go{position:absolute;left:130px;width:280px;top:792px;width:280px;padding:11px 12px 13px;font-size:22px;line-height:1.15}
#go small{display:block;margin-top:2px;font-size:15px;font-weight:600;color:#6a3c06;text-shadow:none}
#go:disabled{opacity:.62;filter:saturate(.6)}
#qk{position:absolute;left:130px;width:280px;top:874px;display:flex;gap:10px}
#qk .ghost{flex:1;width:auto;padding:8px 6px 10px;font-size:16px;line-height:1.1;white-space:nowrap}

/* « À retenir » et « Comprendre » : une carte de bois sur le stade (même panneau que la pause et la fin) */
#sRappel,#sComp{background:radial-gradient(110% 80% at 50% 48%,rgba(18,9,2,.30),rgba(8,4,0,.80))}
.panneau.carte{left:30px;right:30px;top:96px;max-height:780px;text-align:left;gap:12px}
.panneau.carte h2{font-size:38px;text-align:center}
#rTitre{font-size:27px!important;line-height:1.1}
#rBody{max-height:560px;overflow-y:auto;padding-right:6px;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#e0b04a #3a1c06}
#rBody .rin{margin:0 0 10px;font-size:16px;color:#ffe0a0}
#rBody ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
#rBody li{padding:8px 12px 9px;border-radius:6px;font-size:16.5px;line-height:1.2;background:#fff6e0;color:#2b1a05;text-shadow:none;border-left:7px solid #1f7a3a;box-shadow:0 3px 0 rgba(30,12,0,.55)}
.cq{margin:0;padding:12px 14px;border-radius:8px;font-size:21px;line-height:1.18;background:#fff6e0;color:#2b1a05;text-shadow:none;box-shadow:0 3px 0 rgba(30,12,0,.55)}
#cVerdict span{display:inline-block;padding:4px 12px 5px;border-radius:7px;font-size:19px;color:#fff;text-shadow:none}
#cVerdict .v{background:#1f7a3a}#cVerdict .f{background:#b3342a}
#cBonne{font-size:19px}#cBonne:empty{display:none}
#cBonne b{color:#ffd866}
#cExpl{margin:0;padding:10px 14px 12px;border-radius:8px;font-size:18px;line-height:1.22;background:rgba(36,14,2,.62);color:#fff3d6;box-shadow:inset 0 1px 0 rgba(255,226,170,.3)}
.crep{margin:0;font-size:16px;color:#ffe0a0}
.cchap{margin:0;font-size:14.5px;color:#e9cf9c}

/* ===== Sur le site (window.CRUE_SITE) : retour, chapitres réservés, message du verrou. Rien de visible dans le jeu seul. ===== */
#bBack{display:none;position:absolute;left:16px;top:12px;width:52px;height:52px;padding:0;border-radius:50%;font-size:14px;font-weight:700;line-height:1;
  --w1:#e8b24a;--w2:#a8701c;color:#3a1c06;text-shadow:none}
.site #bBack{display:block}
#bBack:active{transform:translateY(3px);box-shadow:0 2px 0 #20100a}
.fr.lock{opacity:.6;filter:saturate(.6)}
.rb.lock{opacity:.78}
.fr .soon{flex:none;padding-right:6px;font-size:15px;white-space:nowrap;color:#ffe0a0}
#lock{position:absolute;z-index:8;left:46px;right:46px;top:700px;padding:10px 14px 12px;border-radius:9px;display:none;text-align:center;font-size:15.5px;line-height:1.22;color:var(--creme);
  --w1:#b97a35;--w2:#8c5320;
  background:repeating-linear-gradient(91deg,rgba(60,26,4,0) 0 9px,rgba(60,26,4,.17) 9px 10px,rgba(255,226,160,.08) 10px 14px,rgba(60,26,4,0) 14px 24px),repeating-linear-gradient(1.5deg,rgba(50,20,2,.11) 0 2px,rgba(0,0,0,0) 2px 8px),linear-gradient(var(--w1),var(--w2));
  border:3px solid var(--cuir);box-shadow:inset 0 2px 0 rgba(255,226,170,.55),inset 0 -5px 0 rgba(48,20,2,.5),0 5px 0 #20100a,0 10px 14px rgba(0,0,0,.45);text-shadow:0 2px 0 rgba(30,12,0,.8)}
#lock.show{display:block;animation:ecranEntre .26s ease-out}
#lock a{color:#ffd866;font-weight:700;white-space:nowrap}
