:root{--brand:#0E3B2C;--light:#2E9E6A;--glow:#7CF0B0;--blue:#1F6FEB;--ink:#0E2A20;--muted:#5B6B63;--surface:#FFFFFF;--line:#D9DED9}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ink:#E8F0EC;--muted:#9DB0A6;--surface:#10261E;--line:#24443A}}
:root[data-theme="dark"]{--ink:#E8F0EC;--muted:#9DB0A6;--surface:#10261E;--line:#24443A}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{font-family:"Archivo",system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:#EDEDE8;overscroll-behavior:none}
#map{position:fixed;inset:0}
.top{position:fixed;left:0;right:0;top:0;z-index:5;padding:calc(env(safe-area-inset-top,0px) + 10px) 12px 0;pointer-events:none;display:grid;gap:8px}
.bar{pointer-events:auto;background:var(--brand);color:#fff;border-radius:16px;box-shadow:0 4px 18px rgba(14,42,32,.25);padding:10px 14px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;max-width:720px}
.logo{width:46px;height:46px;flex:none;border-radius:50%;box-shadow:0 0 0 2px rgba(255,255,255,.25)}
.bar .brand{font-size:.8rem;color:rgba(255,255,255,.7);font-weight:700}
.bar h1{margin:0;font-stretch:75%;font-weight:900;font-size:1.5rem;line-height:1}
.count{display:flex;gap:14px;margin-left:auto;font-size:.9rem;color:rgba(255,255,255,.75)}
.count b{font-stretch:75%;font-weight:900;font-size:1.3rem;color:#fff;margin-right:4px}
.testtag{pointer-events:none;justify-self:start;background:#fff;color:var(--brand);font-weight:700;font-size:.85rem;border-radius:999px;padding:6px 12px;box-shadow:0 2px 8px rgba(14,42,32,.15)}
.fab{position:fixed;right:12px;z-index:5;bottom:calc(env(safe-area-inset-bottom,0px) + 24px);border:0;width:52px;height:52px;border-radius:50%;background:var(--surface);box-shadow:0 4px 18px rgba(14,42,32,.25);cursor:pointer;display:grid;place-items:center;transition:bottom .25s}
.fab svg{width:24px;height:24px;fill:var(--blue)}
body.open .fab{bottom:calc(env(safe-area-inset-bottom,0px) + var(--sheet-h,260px) + 12px)}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:6;background:var(--surface);border-radius:18px 18px 0 0;box-shadow:0 -6px 24px rgba(14,42,32,.22);padding:10px 18px calc(env(safe-area-inset-bottom,0px) + 18px);max-width:560px;margin:0 auto;transform:translateY(110%);transition:transform .25s ease}
body.open .sheet{transform:none}
.grab{width:40px;height:4px;border-radius:2px;background:var(--line);margin:0 auto 10px}
.sheet h2{margin:0 0 6px;font-stretch:80%;font-weight:800;font-size:1.45rem;line-height:1.1}
.sheet .row{display:flex;align-items:center;gap:12px}
.sheet .row .grow{flex:1;min-width:0}
.sheet .dist{font-stretch:75%;font-weight:900;font-size:1.6rem}
.chip{display:inline-block;font-weight:800;border-radius:6px;padding:2px 8px;background:var(--brand);color:#fff}
.hint{font-size:1.05rem;margin:12px 0}
.locked{border:1px dashed var(--line);border-radius:10px;padding:10px 12px;color:var(--muted)}
.unlocked{border-left:4px solid var(--light);padding:6px 12px}
.meta{font-size:.9rem;color:var(--muted);margin:10px 0 0}
.acts{display:flex;gap:8px;margin-top:14px}
.btn{border:0;font:inherit;font-weight:700;border-radius:10px;padding:11px 16px;cursor:pointer;background:var(--brand);color:#fff;text-decoration:none;display:inline-block}
.btn.ghost{background:none;color:var(--ink);border:1px solid var(--line)}
.btn:focus-visible,.fab:focus-visible{outline:3px solid var(--light);outline-offset:2px}
.me{width:18px;height:18px;border-radius:50%;background:var(--blue);border:3px solid #fff;box-shadow:0 0 0 8px rgba(31,111,235,.2),0 1px 4px rgba(0,0,0,.3)}
.maplibregl-ctrl-attrib{font-size:10px}
/* détecteur */
.det{position:fixed;inset:0;z-index:20;background:radial-gradient(circle at 50% 50%,#155A42 0%,#0E3B2C 55%,#071F17 100%);color:#fff;display:none;flex-direction:column;align-items:center;justify-content:space-between;padding:calc(env(safe-area-inset-top,0px) + 24px) 20px calc(env(safe-area-inset-bottom,0px) + 24px);overflow:hidden;text-align:center}
body.detect .det{display:flex}
.det .label{font-weight:700;color:rgba(255,255,255,.7);margin:0}
.det .zname{font-stretch:75%;font-weight:900;font-size:1.9rem;margin:4px 0 0}
.stage{position:relative;width:min(80vw,380px);aspect-ratio:1;display:grid;place-items:center}
.core{width:26%;aspect-ratio:1;border-radius:50%;background:#fff;box-shadow:0 0 0 10px rgba(255,255,255,.12);z-index:2;display:grid;place-items:center;overflow:hidden}
.core img{width:100%;height:100%}
.ring{position:absolute;left:50%;top:50%;width:26%;aspect-ratio:1;border-radius:50%;border:3px solid rgba(255,255,255,.45);transform:translate(-50%,-50%) scale(1);animation:wave 1.6s ease-out forwards;pointer-events:none}
.ring.good{border-color:var(--glow);border-width:5px;box-shadow:0 0 24px rgba(124,240,176,.5)}
@keyframes wave{to{transform:translate(-50%,-50%) scale(3.8);opacity:0}}
.status{font-stretch:75%;font-weight:900;font-size:clamp(2rem,9vw,3rem);line-height:1;margin:0}
.status.good{color:var(--glow)}
.signal{display:flex;gap:6px;justify-content:center;margin:14px 0 18px}
.signal i{width:10px;border-radius:3px;background:rgba(255,255,255,.2)}
.signal i.on{background:var(--glow)}
.det .tip{color:rgba(255,255,255,.7);max-width:34ch;margin:0 auto 16px;font-size:.95rem}
.found{display:none;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:14px;width:100%;max-width:440px}
body.arrived .found{display:flex}
body.arrived .stage,body.arrived #dStatus,body.arrived #dSignal,body.arrived #dTip{display:none}
.found .flabel{margin:0;color:rgba(255,255,255,.7);font-weight:700}
.found .ftitle{margin:0;font-stretch:75%;font-weight:900;font-size:clamp(2.6rem,12vw,3.6rem);line-height:.95;color:var(--glow)}
.found .fsub{margin:0;font-size:1.15rem;color:#fff}
.fhint{background:#fff;color:var(--brand);border-radius:18px;padding:20px 22px;width:100%;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.fhint span{display:block;font-weight:800;font-size:.95rem;color:var(--light);margin-bottom:6px}
.fhint p{margin:0;font-stretch:85%;font-weight:800;font-size:clamp(1.5rem,6.5vw,2rem);line-height:1.15}
.found .fnote{margin:0;color:rgba(255,255,255,.75);font-size:.95rem}
.det .btn{background:#fff;color:var(--brand)}
.help{margin-left:4px;display:grid;place-items:center;padding:0;width:34px;height:34px;flex:none;border-radius:50%;border:2px solid rgba(255,255,255,.5);background:none;color:#fff;font:inherit;font-weight:900;font-size:1.05rem;cursor:pointer}
.intro{position:fixed;inset:0;z-index:30;background:rgba(7,31,23,.55);display:none;align-items:flex-end;justify-content:center;padding:12px}
body.intro-open .intro{display:flex}
@media (min-width:600px){.intro{align-items:center}}
.ibox{background:var(--surface);color:var(--ink);width:100%;max-width:460px;max-height:calc(100dvh - 24px);overflow:auto;border-radius:20px;box-shadow:0 12px 40px rgba(0,0,0,.35)}
.ihead{background:var(--brand);color:#fff;padding:28px 22px 22px;display:flex;flex-direction:column;gap:14px;align-items:center;text-align:center}
.ihead img{width:min(42vw,150px);height:auto;aspect-ratio:1;border-radius:50%;flex:none;box-shadow:0 0 0 3px rgba(255,255,255,.2)}
.ihead h2{margin:0;font-stretch:75%;font-weight:900;font-size:2.1rem;line-height:1}
.ihead p{margin:6px auto 0;color:rgba(255,255,255,.8);max-width:30ch}
.ibody{padding:18px 22px 22px}
.ibody h3{font-size:1rem;margin:0 0 8px}
.isteps{margin:0 0 18px;padding:0;list-style:none;counter-reset:s;display:grid;gap:10px}
.isteps li{counter-increment:s;display:grid;grid-template-columns:30px 1fr;gap:10px;align-items:start;line-height:1.35}
.isteps li::before{content:counter(s);width:30px;height:30px;border-radius:50%;background:var(--brand);color:#fff;font-weight:800;display:grid;place-items:center}
.agency{width:46px;height:46px;border-radius:50%;border:3px solid #fff;box-shadow:0 3px 10px rgba(0,0,0,.35);cursor:pointer;overflow:hidden;background:#0E3B2C}
.agency img{width:100%;height:100%;display:block}
.where{border:2px solid var(--brand);border-radius:14px;padding:12px 14px;margin:0 0 18px}
.where p{margin:2px 0 10px;color:var(--muted)}
.where .btn{width:auto;padding:9px 14px;font-size:.95rem}
.ifoot{margin:14px 0 0;font-size:.85rem;color:var(--muted);text-align:center}
.gain{background:var(--brand);color:#fff;border-radius:14px;padding:14px 16px;margin:0 0 18px}
.gain strong{display:block;font-stretch:75%;font-weight:900;font-size:1.5rem;line-height:1.05;margin-bottom:4px}
.gain span{color:rgba(255,255,255,.85)}
.irules{margin:0 0 20px;padding-left:1.1em;display:grid;gap:6px;color:var(--muted);line-height:1.35}
.ibody .btn{width:100%;padding:14px;font-size:1.05rem}
@media (prefers-reduced-motion:reduce){.sheet,.fab{transition:none}.ring{animation-duration:.01s}}
/* ---------- Carte au trésor ---------- */
body.tresor{--brand:#0E3B2C;--ink:#3B2614;--muted:#6E5235;--surface:#F3E7C9;--line:#C9AE7C;--light:#8B2A1A;background:#E9D7AE}
body.tresor .paper{position:fixed;inset:0;pointer-events:none;z-index:2;
  background:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22240%22%20height%3D%22240%22%3E%3Cfilter%20id%3D%22n%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.8%22%20numOctaves%3D%223%22%20stitchTiles%3D%22stitch%22/%3E%3CfeColorMatrix%20values%3D%220%200%200%200%20.35%200%200%200%200%20.22%200%200%200%200%20.08%200%200%200%20.55%200%22/%3E%3C/filter%3E%3Crect%20width%3D%22240%22%20height%3D%22240%22%20filter%3D%22url%28%23n%29%22/%3E%3C/svg%3E"),url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22900%22%20height%3D%22900%22%3E%3Cfilter%20id%3D%22s%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.006%22%20numOctaves%3D%224%22%20seed%3D%227%22/%3E%3CfeColorMatrix%20values%3D%220%200%200%200%20.45%200%200%200%200%20.28%200%200%200%200%20.1%200%200%200%201.2%20-.55%22/%3E%3C/filter%3E%3Crect%20width%3D%22900%22%20height%3D%22900%22%20filter%3D%22url%28%23s%29%22/%3E%3C/svg%3E");background-size:240px 240px,900px 900px;mix-blend-mode:multiply;opacity:.55}
body.tresor .vignette{position:fixed;inset:0;pointer-events:none;z-index:2;box-shadow:inset 0 0 140px 30px rgba(70,38,10,.55),inset 0 0 40px 6px rgba(50,25,5,.5)}
body.tresor .compass{display:block}
.paper,.vignette,.compass{display:none}
body.tresor .paper,body.tresor .vignette{display:block}
.compass{position:fixed;left:14px;bottom:calc(env(safe-area-inset-bottom,0px) + 34px);width:96px;height:96px;pointer-events:none;z-index:3;opacity:.85}
body.tresor .bar{background:#F1E2BC;color:var(--ink);border:2px solid #7A5230;box-shadow:0 0 0 4px #F1E2BC,0 0 0 5px #7A5230,0 6px 20px rgba(60,30,5,.35)}
body.tresor .bar .brand{color:#8B2A1A;font-family:"IM Fell English SC",Georgia,serif;font-weight:400;letter-spacing:.06em}
body.tresor .bar h1{font-family:"IM Fell English SC",Georgia,serif;font-weight:400;font-stretch:100%;font-size:1.75rem;color:#3B2614}
body.tresor .count{color:#6E5235}
body.tresor .count b{color:#3B2614;font-family:"IM Fell English SC",Georgia,serif;font-weight:400;font-stretch:100%}
body.tresor .help{border-color:#7A5230;color:#3B2614;font-family:"IM Fell English SC",Georgia,serif}
body.tresor #themeBtn{display:none}
body.tresor .logo{box-shadow:0 2px 6px rgba(60,30,5,.35)}
body.tresor .agency{border-color:#F1E2BC;background:#EBD9AC}
body.tresor .core{background:#EBD9AC}
body.tresor .sheet,body.tresor .ibox{background:#F3E7C9;color:#3B2614;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22240%22%20height%3D%22240%22%3E%3Cfilter%20id%3D%22n%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.8%22%20numOctaves%3D%223%22%20stitchTiles%3D%22stitch%22/%3E%3CfeColorMatrix%20values%3D%220%200%200%200%20.35%200%200%200%200%20.22%200%200%200%200%20.08%200%200%200%20.55%200%22/%3E%3C/filter%3E%3Crect%20width%3D%22240%22%20height%3D%22240%22%20filter%3D%22url%28%23n%29%22/%3E%3C/svg%3E");background-size:240px}
body.tresor .sheet h2,body.tresor .ibody h3{font-family:"IM Fell English SC",Georgia,serif;font-weight:400;font-stretch:100%}
body.tresor .hint,body.tresor .fhint p{font-family:"IM Fell English",Georgia,serif;font-style:italic}
body.tresor .ihead{background:#E6D2A4;color:#3B2614;border-bottom:2px dashed #7A5230}
body.tresor .ihead h2{font-family:"IM Fell English SC",Georgia,serif;font-weight:400;font-stretch:100%;font-size:2.3rem;color:#3B2614}
body.tresor .ihead p{color:#6E5235}
body.tresor .ihead img{box-shadow:0 6px 18px rgba(60,30,5,.35)}
body.tresor .gain{background:#0E3B2C}
body.tresor .gain strong{font-family:"IM Fell English SC",Georgia,serif;font-weight:400;font-stretch:100%}
body.tresor .isteps li::before{background:#8B2A1A;font-family:"IM Fell English SC",Georgia,serif;font-weight:400}
body.tresor .where{border-color:#7A5230}
body.tresor .chip{background:#8B2A1A}
body.tresor .btn.ghost{color:#3B2614;border-color:#C9AE7C}
body.tresor .det{background:radial-gradient(circle at 50% 50%,#5A3A1C 0%,#3B2614 55%,#1E1209 100%)}
body.tresor .ring{border-color:rgba(241,226,188,.45)}
body.tresor .ring.good{border-color:#F1E2BC;box-shadow:0 0 24px rgba(241,226,188,.5)}
body.tresor .status,body.tresor .det .zname,body.tresor .found .ftitle{font-family:"IM Fell English SC",Georgia,serif;font-weight:400;font-stretch:100%}
body.tresor .status.good,body.tresor .found .ftitle{color:#F1E2BC}
body.tresor .signal i.on{background:#F1E2BC}
body.tresor .fhint span{color:#8B2A1A}
/* ---------- Halloween ---------- */
body.halloween .bar{position:relative;overflow:visible}
body.halloween .bar::after{content:"";position:absolute;left:14px;right:14px;bottom:-16px;height:22px;background:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22120%22%20height%3D%2222%22%20viewBox%3D%220%200%20120%2022%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%237A0010%22/%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23B3001B%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg%20fill%3D%22url%28%23g%29%22%3E%3Crect%20width%3D%22120%22%20height%3D%225%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%225%22%20r%3D%223%22/%3E%3Ccircle%20cx%3D%2231%22%20cy%3D%225%22%20r%3D%223.5%22/%3E%3Ccircle%20cx%3D%2258%22%20cy%3D%225%22%20r%3D%222.5%22/%3E%3Ccircle%20cx%3D%2283%22%20cy%3D%225%22%20r%3D%223%22/%3E%3Ccircle%20cx%3D%22104%22%20cy%3D%225%22%20r%3D%223.5%22/%3E%3Cpath%20d%3D%22M16%204h4v10a2%202%200%200%201-4%200z%22/%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2215%22%20r%3D%222.8%22/%3E%3Cpath%20d%3D%22M44%204h3v6a1.5%201.5%200%200%201-3%200z%22/%3E%3Ccircle%20cx%3D%2245.5%22%20cy%3D%2210.5%22%20r%3D%222.1%22/%3E%3Cpath%20d%3D%22M68%204h5v13a2.5%202.5%200%200%201-5%200z%22/%3E%3Ccircle%20cx%3D%2270.5%22%20cy%3D%2218%22%20r%3D%223.4%22/%3E%3Cpath%20d%3D%22M93%204h3v8a1.5%201.5%200%200%201-3%200z%22/%3E%3Ccircle%20cx%3D%2294.5%22%20cy%3D%2212.5%22%20r%3D%222.2%22/%3E%3Cpath%20d%3D%22M113%204h3v5a1.5%201.5%200%200%201-3%200z%22/%3E%3C/g%3E%3C/svg%3E") repeat-x;background-size:120px 22px;pointer-events:none}
body.halloween .ihead{position:relative;overflow:hidden}
body.halloween .ihead::after{content:"";position:absolute;left:0;right:0;bottom:-6px;height:22px;background:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22120%22%20height%3D%2222%22%20viewBox%3D%220%200%20120%2022%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%237A0010%22/%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23B3001B%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg%20fill%3D%22url%28%23g%29%22%3E%3Crect%20width%3D%22120%22%20height%3D%225%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%225%22%20r%3D%223%22/%3E%3Ccircle%20cx%3D%2231%22%20cy%3D%225%22%20r%3D%223.5%22/%3E%3Ccircle%20cx%3D%2258%22%20cy%3D%225%22%20r%3D%222.5%22/%3E%3Ccircle%20cx%3D%2283%22%20cy%3D%225%22%20r%3D%223%22/%3E%3Ccircle%20cx%3D%22104%22%20cy%3D%225%22%20r%3D%223.5%22/%3E%3Cpath%20d%3D%22M16%204h4v10a2%202%200%200%201-4%200z%22/%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2215%22%20r%3D%222.8%22/%3E%3Cpath%20d%3D%22M44%204h3v6a1.5%201.5%200%200%201-3%200z%22/%3E%3Ccircle%20cx%3D%2245.5%22%20cy%3D%2210.5%22%20r%3D%222.1%22/%3E%3Cpath%20d%3D%22M68%204h5v13a2.5%202.5%200%200%201-5%200z%22/%3E%3Ccircle%20cx%3D%2270.5%22%20cy%3D%2218%22%20r%3D%223.4%22/%3E%3Cpath%20d%3D%22M93%204h3v8a1.5%201.5%200%200%201-3%200z%22/%3E%3Ccircle%20cx%3D%2294.5%22%20cy%3D%2212.5%22%20r%3D%222.2%22/%3E%3Cpath%20d%3D%22M113%204h3v5a1.5%201.5%200%200%201-3%200z%22/%3E%3C/g%3E%3C/svg%3E") repeat-x;background-size:120px 22px;pointer-events:none}
body.halloween .bar h1,body.halloween .ihead h2,body.halloween .det .zname,body.halloween .status,body.halloween .found .ftitle,body.halloween .gain strong{font-family:"Creepster","Archivo",system-ui,sans-serif;font-weight:400;letter-spacing:.04em;font-stretch:100%}
body.halloween .bar h1{font-size:1.7rem;color:#FF7A1A;text-shadow:0 2px 0 #4A0000}
body.halloween .ihead h2{font-size:2.6rem;color:#FF7A1A;text-shadow:0 3px 0 #4A0000}
body.halloween .found .ftitle{color:#FF7A1A;text-shadow:0 3px 0 #4A0000}
body.halloween .status.good{color:#FF9A3D}
.bloody{position:relative;display:inline-block;flex:none;line-height:0}
.bloody > svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.bloody .ooze{transform-box:fill-box;transform-origin:50% 0;animation:ooze 5s ease-in-out infinite alternate}
.bloody .ooze:nth-of-type(2n){animation-duration:7s;animation-delay:-2s}
.bloody .ooze:nth-of-type(3n){animation-duration:6s;animation-delay:-4s}
.bloody .drop{animation:drop 3.2s ease-in infinite;opacity:0}
.bloody .drop.d2{animation-delay:1.1s;animation-duration:3.8s}
.bloody .drop.d3{animation-delay:2.3s;animation-duration:2.9s}
@keyframes ooze{from{transform:scaleY(.82)}to{transform:scaleY(1.12)}}
@keyframes drop{0%{transform:translateY(0);opacity:0}10%{opacity:1}80%{opacity:1}100%{transform:translateY(46px);opacity:0}}
.fog{position:fixed;left:-20%;right:-20%;bottom:-6vh;height:38vh;pointer-events:none;z-index:3;display:none;
  background:radial-gradient(ellipse 30% 45% at 20% 70%,rgba(190,170,230,.20),transparent 70%),radial-gradient(ellipse 35% 40% at 60% 80%,rgba(200,185,235,.16),transparent 70%),radial-gradient(ellipse 30% 50% at 90% 65%,rgba(180,160,220,.18),transparent 70%);
  animation:fog 22s ease-in-out infinite alternate}
body.halloween .fog{display:block}
@keyframes fog{from{transform:translateX(-6%)}to{transform:translateX(6%)}}
.moon{position:absolute;top:16px;right:22px;width:46px;height:46px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#FFF4E0,#E9D8C0 60%,#CDB89C);box-shadow:0 0 30px rgba(255,240,220,.45)}
.moon::after{content:"";position:absolute;top:-4px;left:12px;width:46px;height:46px;border-radius:50%;background:#2B1340}
.web{position:absolute;top:0;left:0;width:90px;height:90px;opacity:.35;pointer-events:none}
@media (prefers-reduced-motion:reduce){.bloody .ooze,.bloody .drop,.fog{animation:none}.bloody .drop{display:none}}

body.halloween{--brand:#2A1240;--light:#FF7A1A;--glow:#FF9A3D;background:#120A1A}
body.halloween .bar{background:linear-gradient(135deg,#1B1026,#3A1550);box-shadow:0 4px 22px rgba(255,122,26,.25)}
body.halloween .bar .brand{color:#FF9A3D}
body.halloween .logo{box-shadow:0 0 0 2px #4A0000}
body.halloween .ihead{background:linear-gradient(160deg,#1B1026,#3A1550)}
body.halloween .ihead img{box-shadow:0 0 0 3px #4A0000,0 0 40px rgba(179,0,27,.45)}
body.halloween .gain{background:#3A1550}
body.halloween .gain strong{color:#FF9A3D}
body.halloween .btn{background:#FF7A1A;color:#1B1026}
body.halloween .btn.ghost{background:none;color:var(--ink)}
body.halloween .chip{background:#FF7A1A;color:#1B1026}
body.halloween .isteps li::before{background:#FF7A1A;color:#1B1026}
body.halloween .where{border-color:#FF7A1A}
body.halloween .det{background:radial-gradient(circle at 50% 50%,#4A1D6B 0%,#2A1240 55%,#0D0614 100%)}
body.halloween .ring{border-color:rgba(255,154,61,.45)}
body.halloween .ring.good{border-color:#FF9A3D;box-shadow:0 0 26px rgba(255,122,26,.6)}
body.halloween .core{box-shadow:0 0 0 10px rgba(255,122,26,.25)}
body.halloween .fhint span{color:#6B2FA3}
body.halloween .fhint p{color:#2A1240}
body.halloween #themeBtn{display:none}
.bats{position:fixed;inset:0;pointer-events:none;z-index:4;overflow:hidden;display:none}
body.halloween .bats{display:block}
.bat{position:absolute;left:-60px;width:44px;opacity:.85;animation:fly 14s linear infinite}
.bat svg{width:100%;height:auto;fill:#1B1026;filter:drop-shadow(0 0 4px rgba(255,122,26,.7));animation:flap .25s ease-in-out infinite alternate;transform-origin:center}
.bat:nth-child(1){top:18%;animation-delay:0s}
.bat:nth-child(2){top:34%;width:30px;animation-delay:-5s;animation-duration:18s}
.bat:nth-child(3){top:55%;width:36px;animation-delay:-10s;animation-duration:16s}
@keyframes fly{0%{transform:translate(0,0)}25%{transform:translate(30vw,-30px)}50%{transform:translate(60vw,20px)}75%{transform:translate(90vw,-20px)}100%{transform:translate(calc(100vw + 120px),0)}}
@keyframes flap{from{transform:scaleY(1)}to{transform:scaleY(.55)}}
@media (prefers-reduced-motion:reduce){.bats{display:none!important}}

/* Mode intégré dans le site : laisse la place au bouton fermer */
html.embed .top{padding-right:68px}