/* ═══ K1LL YOUR BØT · site v3 ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════
   Le site est le même monde que le jeu : un décor vivant en fond fixe (ciel qui suit l'heure du visiteur, brouillard, pluie, arbres morts qui
   se rapprochent à mesure qu'on descend), et des feuilles de papier posées dessus. Palette du jeu : encre, papier, un seul rouge. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/bricolage-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/bricolage-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1a1818;
  --dgray: #3a3736;
  --gray: #8d8985;
  --skin: #cdc8be;
  --paper: #f4f1ea;
  --red: #9e121a;
  --oil: #7e1313;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ─── Le monde (fond fixe) ─── */
#world, #world-mid, #world-front { position: fixed; inset: 0; width: 100%; height: 100%; height: 100lvh; z-index: 0; pointer-events: none; }
#beasts-far, #beasts-near { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
  background-size: 180px 180px;   /* l'image du grain est fabriquée par v3.js */
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(26, 24, 24, .5) 100%);
}
main, .foot, header.bar { position: relative; z-index: 2; }

/* ─── Barre du haut ─── */
/* (« header.bar » : la classe .bar sert aussi aux barres de jauge et de profil, qui ne doivent pas se coller en haut de l'écran) */
header.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 12px var(--gutter);
  pointer-events: none;
}
header.bar > * { pointer-events: auto; }
.studio img { width: 46px; height: auto; filter: drop-shadow(0 0 0 var(--ink)); opacity: .92; }
.tool {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); border: 2px solid var(--ink); color: var(--ink);
  box-shadow: 3px 3px 0 rgba(26, 24, 24, .85);
  transition: transform .12s, background .12s, color .12s;
}
.tools { display: flex; gap: 8px; }
.tool { width: 40px; height: 40px; justify-content: center; font-weight: 800; font-size: 13px; letter-spacing: .04em; }
.tool svg { width: 20px; height: 20px; }
.tool:hover, .tool:focus-visible { background: var(--ink); color: var(--paper); transform: translate(-1px, -1px); }
.tool[href="#"] { display: none; }
#sound .waves { display: none; }
#sound:not(.off) .waves { display: inline; }
#sound:not(.off) .slash { display: none; }

/* ─── Feuilles de papier ─── */
.sheet {
  position: relative;
  width: min(100% - 2 * var(--gutter), 920px);
  margin: 0 auto;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(26, 24, 24, .88);
  padding: clamp(22px, 4vw, 48px);
}
.sheet.wide { width: min(100% - 2 * var(--gutter), 1180px); }
.sheet.narrow { width: min(100% - 2 * var(--gutter), 560px); text-align: center; }
.sheet::before {  /* hachures de papier d'écolier, très discrètes */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(-58deg, transparent 0 7px, rgba(26, 24, 24, .06) 7px 8px);
}
.sheet > * { position: relative; }
.js .sheet { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s ease; }
.js .sheet.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .sheet { opacity: 1; transform: none; transition: none; } }

.title {
  font-size: clamp(30px, 5.4vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -.02em;
  text-wrap: balance;
}
.label { font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }

/* ─── 1 · Perron ─── */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 64px var(--gutter) 22px;
  gap: 8px;
  text-align: center;
}
.hero-top { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.logo {
  width: auto; height: clamp(120px, 27vh, 300px);
  filter:
    drop-shadow(2.5px 0 0 var(--ink)) drop-shadow(-2.5px 0 0 var(--ink))
    drop-shadow(0 2.5px 0 var(--ink)) drop-shadow(0 -2.5px 0 var(--ink))
    drop-shadow(1.8px 1.8px 0 var(--ink)) drop-shadow(-1.8px -1.8px 0 var(--ink));
}
.genre {
  /* juste sous le titre */
  font-weight: 800; font-size: 14px; letter-spacing: .34em; text-transform: uppercase; color: var(--paper);
  text-shadow: 0 0 3px var(--ink), 0 1px 0 var(--ink), 0 -1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink);
  margin: 2px 0 0;
}
.hero-gap { flex: 1 1 auto; }
.hero-join {
  width: min(100%, 460px); padding: 14px 16px 12px; margin-bottom: 34px;
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(26, 24, 24, .88);
  display: flex; flex-direction: column; gap: 8px;
}
.cue {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  width: 36px; height: 36px; color: var(--paper);
  animation: cue 2.4s ease-in-out infinite;
}
.cue svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 0 var(--ink)) drop-shadow(0 -1px 0 var(--ink)); }
@keyframes cue { 50% { transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .cue { animation: none; } }
.hero { position: relative; }
@media (max-height: 640px) { .cue { display: none; } }

/* ─── Formulaire ─── */
.signup { display: flex; gap: 8px; }
.field {
  flex: 1 1 auto; min-width: 0; padding: 11px 12px; font: inherit; font-size: 16px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 0;
}
.field::placeholder { color: var(--dgray); opacity: .8; }
.field:focus { outline: none; border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
  padding: 8px 16px; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; font-size: 14px; white-space: nowrap;
  transition: background .12s, transform .12s;
}
.btn small { font-size: 9px; letter-spacing: .22em; opacity: .75; margin-top: 2px; }
.btn:hover, .btn:focus-visible { background: var(--red); transform: translate(-1px, -1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.note { min-height: 0; font-size: 14px; }
.note:empty { display: none; }
.note.ok { color: var(--ink); font-weight: 700; }
.note.ko { color: var(--red); font-weight: 700; }
@media (max-width: 420px) { .signup { flex-direction: column; } }

/* ─── 2 · Jauge d'humanité ─── */
.arc, .park, .cast, .join { padding: clamp(56px, 12vh, 140px) 0; }
.arc .lead { margin: 18px 0 34px; max-width: 62ch; font-size: clamp(16px, 1.7vw, 19px); }

.gauge { padding: 30px 6px 40px; }
.track {
  position: relative; height: 22px; border: 2px solid var(--ink); background: var(--paper);
  background-image: repeating-linear-gradient(-58deg, transparent 0 5px, rgba(26, 24, 24, .22) 5px 6px);
}
.fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 20%;
  background: var(--oil);
  background-image: repeating-linear-gradient(-58deg, rgba(0, 0, 0, .28) 0 2px, transparent 2px 6px);
  border-right: 2px solid var(--ink);
  transform-origin: left; transition: transform 1.6s cubic-bezier(.2, .8, .2, 1) .3s;
}
.gauge:not(.in) .fill { transform: scaleX(0); }
.tick { position: absolute; top: -9px; bottom: -9px; width: 0; border-left: 2px solid var(--ink); }
.tick b { position: absolute; top: 100%; left: 0; transform: translateX(-50%); margin-top: 4px; font-size: 13px; letter-spacing: .06em; white-space: nowrap; }
.t20 { left: 20%; } .t50 { left: 50%; } .t100 { left: 100%; }
.t100 b { transform: translateX(-100%); }

.phases { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-bottom: 40px; }
.phases .pct { font-weight: 800; font-size: 13px; letter-spacing: .12em; color: var(--red); }
.phases h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.1; margin: 4px 0 8px; }
.phases p { max-width: 38ch; }

.dims { list-style: none; display: flex; justify-content: space-between; gap: 10px; padding-top: 6px; border-top: 2px solid var(--ink); padding-top: 24px; }
.dims li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dims .bar2, .dims .bar { position: relative; width: 34px; height: 130px; border: 2px solid var(--ink); background: var(--paper);
  background-image: repeating-linear-gradient(-58deg, transparent 0 5px, rgba(26, 24, 24, .2) 5px 6px); }
.dims .bar i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--v) * 100%); background: var(--oil); border-top: 2px solid var(--ink);
  transform-origin: bottom; transition: transform 1.3s cubic-bezier(.2, .8, .2, 1) .4s; }
.dims.rv:not(.in) .bar i { transform: scaleY(0); }
.dims .bar u { position: absolute; left: -7px; right: -7px; bottom: calc(var(--f) * 100%); border-top: 3px solid var(--ink); }
.dims .n { font-weight: 700; font-size: 14px; text-align: center; }
@media (max-width: 640px) {
  .phases { grid-template-columns: 1fr; gap: 20px; }
  .dims .bar { width: 26px; height: 100px; }
  .dims .n { font-size: 12px; }
}

/* ─── 3 · Le parc ─── */
.park-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.plan-wrap { border: 2px solid var(--ink); background: var(--skin); padding: 8px; }
.plan { width: 100%; height: auto; overflow: visible; }
.plan .zone { fill: var(--paper); stroke: var(--ink); stroke-width: .5; }
.plan .zone.dim { fill: var(--skin); }
.plan .hedge { stroke: var(--dgray); stroke-width: .5; fill: none; stroke-linecap: square; }
.plan .water { fill: var(--ink); stroke: var(--ink); stroke-width: .6; }
.plan .water-h { stroke: var(--paper); stroke-width: .3; opacity: .55; }
.plan .house { fill: var(--ink); stroke: var(--ink); stroke-width: .6; }
.plan .win { fill: var(--oil); }
.plan .path { stroke: var(--gray); stroke-width: 1.6; fill: none; opacity: .75; }
.plan .tree { fill: none; stroke: var(--dgray); stroke-width: .35; }
.plan .gate { stroke: var(--oil); stroke-width: 1.4; }
.plan .under { fill: var(--skin); stroke: var(--ink); stroke-width: .5; stroke-dasharray: 1.2 1; }
.plan .under-h { stroke: var(--dgray); stroke-width: .25; opacity: .6; }
.pin { cursor: pointer; }
.pin .dot { fill: var(--paper); stroke: var(--ink); stroke-width: .6; transition: fill .15s, r .15s; }
.pin text { font-family: var(--font); font-size: 3.1px; font-weight: 800; fill: var(--ink); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.pin .halo { fill: none; stroke: var(--oil); stroke-width: .5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pin.on .dot { fill: var(--oil); }
.pin.on text { fill: var(--paper); }
.pin.on .halo { opacity: 1; animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { transform: scale(.7); opacity: 1; } to { transform: scale(2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pin.on .halo { animation: none; } }

.mech { list-style: none; border-top: 2px solid var(--ink); }
.mech li { border-bottom: 2px solid var(--ink); }
.mech button {
  width: 100%; display: flex; align-items: baseline; gap: 14px; text-align: left; padding: 12px 6px;
  transition: background .12s, color .12s, padding .15s;
}
.mech .no { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--red); min-width: 22px; }
.mech .t { font-size: clamp(19px, 2.2vw, 26px); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.mech button:hover, .mech button:focus-visible, .mech li.on button { background: var(--ink); color: var(--paper); padding-left: 14px; }
.mech li.on .no, .mech button:hover .no { color: #e8a0a4; }

.detail { margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--ink); min-height: 0; }
.detail:not(.has) { display: none; }
.detail h3 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1; letter-spacing: -.02em; margin-bottom: 14px; }
.detail p { max-width: 62ch; margin-bottom: 14px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; max-width: 640px; }
.slots span {
  aspect-ratio: 1; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--ink);
  background: var(--paper); opacity: 0; transform: scale(.7); animation: pop .35s ease forwards; animation-delay: calc(var(--i) * 18ms);
}
.slots span.r1 { background: var(--skin); } .slots span.r2 { background: var(--gray); } .slots span.r3 { background: var(--dgray); color: var(--paper); }
.slots span.r4 { background: var(--ink); color: var(--paper); } .slots span.r5 { background: var(--oil); color: var(--paper); } .slots span.r6 { background: var(--red); color: var(--paper); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--red); }
@keyframes pop { to { opacity: 1; transform: none; } }
.count { font-size: clamp(54px, 9vw, 110px); line-height: .9; font-weight: 800; letter-spacing: -.04em; color: var(--oil); }
.strata { max-width: 520px; border: 2px solid var(--ink); }
.strata i { display: block; height: 22px; border-bottom: 2px solid var(--ink); background-image: repeating-linear-gradient(-58deg, transparent 0 5px, rgba(26, 24, 24, calc(.12 + var(--d) * .1)) 5px 6px); background-color: color-mix(in srgb, var(--paper) calc(100% - var(--d) * 14%), var(--ink)); }
.strata i:last-child { border-bottom: 0; }
@media (max-width: 860px) { .park-grid { grid-template-columns: 1fr; } }

/* ─── 4 · La forêt, les personnages ─── */
.cast { position: relative; }
.cast .sheet { background: transparent; border: 0; box-shadow: none; color: var(--paper); }
.cast .sheet::before { display: none; }
.cast .title { z-index: 4; color: var(--paper); text-shadow: 2px 2px 0 var(--ink); margin-bottom: clamp(20px, 4vh, 48px); text-align: center; }
.cards { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2.4vw, 32px); }
.card { text-align: center; }
.card img { position: relative; z-index: 1; width: auto; height: clamp(220px, 44vh, 420px); margin: 0 auto 14px; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .45)); }
.card h3, .card p { position: relative; z-index: 4; text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
.card h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; margin-bottom: 6px; }
.card p { font-size: 15px; line-height: 1.45; max-width: 30ch; margin: 0 auto; color: #e9e5db; }
/* La frontale : tout est dans l'ombre sauf autour du pointeur. */
.cast .night {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(circle clamp(150px, 20vw, 270px) at var(--lx, 50%) var(--ly, 40%), rgba(10, 9, 9, 0) 0, rgba(10, 9, 9, .28) 55%, rgba(10, 9, 9, .84) 100%);
}
/* Sur écran tactile (pas de souris pour promener la lampe) chaque personnage a sa propre lumière autour de lui, le reste est dans le noir.
   Un masque troué par quatre cercles de lumière (leurs centres sont posés par v3.js : --p0x/--p0y … et --pr) ; les trous se combinent par intersection. */
@media (hover: none) {
  .cast .night {
    background: rgba(10, 9, 9, .84);
    --hole0: radial-gradient(circle var(--pr, 140px) at var(--p0x, 20%) var(--p0y, 40%), transparent 0, rgba(0, 0, 0, .33) 55%, #000 100%);
    --hole1: radial-gradient(circle var(--pr, 140px) at var(--p1x, 40%) var(--p1y, 40%), transparent 0, rgba(0, 0, 0, .33) 55%, #000 100%);
    --hole2: radial-gradient(circle var(--pr, 140px) at var(--p2x, 60%) var(--p2y, 40%), transparent 0, rgba(0, 0, 0, .33) 55%, #000 100%);
    --hole3: radial-gradient(circle var(--pr, 140px) at var(--p3x, 80%) var(--p3y, 40%), transparent 0, rgba(0, 0, 0, .33) 55%, #000 100%);
    -webkit-mask-image: var(--hole0), var(--hole1), var(--hole2), var(--hole3);
    mask-image: var(--hole0), var(--hole1), var(--hole2), var(--hole3);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
}
@media (max-width: 760px) {
  .cards { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .card img { height: clamp(180px, 34vh, 300px); }
}

/* ─── 5 · Inscription ─── */
.join .label { margin-bottom: 6px; }
.join .date { font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.1; }
.join .perk { color: var(--red); font-weight: 800; margin: 6px 0 18px; }
.join .note { margin-top: 10px; }

.foot { padding: 28px var(--gutter) 40px; text-align: center; font-size: 13px; color: var(--paper); background: linear-gradient(transparent, rgba(10, 9, 9, .8)); }
.foot p + p { margin-top: 6px; }
.platforms { letter-spacing: .14em; text-transform: uppercase; font-weight: 700; font-size: 12px; }
.foot a { text-underline-offset: 3px; }
.foot a:hover { color: #e8a0a4; }

/* ─── Les lapins mutants qui attaquent l'écran, et le sang (v3.js) ─── */
#beasts { position: fixed; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
.beast { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.beast .spr { position: absolute; will-change: transform; }
.beast .spr svg { display: block; width: 100%; height: 100%; overflow: visible; }
.beast .shadow { position: absolute; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(10, 8, 8, .6), rgba(10, 8, 8, 0) 70%); }
#gore { position: fixed; inset: 0; width: 100%; height: 100%; height: 100lvh; z-index: 9; pointer-events: none; }

/* ─── La fenêtre du drone : ton profil, en direct (v3.js) ─── */
.scan {
  position: fixed; z-index: 7; right: var(--gutter); top: 74px; width: min(330px, calc(100vw - 2 * var(--gutter)));
  background: rgba(18, 16, 16, .94); color: #e6e2d8; border: 1px solid #7e1313;
  box-shadow: 0 0 0 1px #000, 0 0 30px rgba(158, 18, 26, .38), inset 0 0 36px rgba(158, 18, 26, .1);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 11.5px; letter-spacing: .04em; line-height: 1.35;
  padding: 12px 14px 10px; opacity: 0; transform: translateX(24px) scaleY(.2); transform-origin: 50% 0; transition: opacity .35s ease, transform .5s cubic-bezier(.2, .9, .2, 1);
  pointer-events: auto; overflow: hidden;
}
.scan[hidden] { display: none; }
.scan.on { opacity: 1; transform: none; }
.scan::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px); animation: scanlines 6s linear infinite; }
.scan::after { content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 30%; pointer-events: none; background: linear-gradient(transparent, rgba(196, 18, 26, .16), transparent); animation: sweep 3.2s linear infinite; }
@keyframes scanlines { to { background-position-y: 6px; } }
@keyframes sweep { to { top: 110%; } }
.scan-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(158, 18, 26, .6); position: relative; }
.scan-head b { display: block; text-transform: uppercase; letter-spacing: .14em; color: #f4f1ea; font-size: 12px; }
.scan-head small { display: block; color: #a8a29a; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }
.scan-dot { width: 9px; height: 9px; border-radius: 50%; background: #c1121f; box-shadow: 0 0 10px #c1121f; animation: dot 1s ease-in-out infinite; flex: none; }
@keyframes dot { 50% { opacity: .25; } }
.scan-x { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; color: #a8a29a; border: 1px solid #3a3736; font-size: 16px; line-height: 1; position: relative; z-index: 1; }
.scan-x:hover, .scan-x:focus-visible { color: #fff; border-color: #c1121f; background: #7e1313; }
.scan-rows { list-style: none; position: relative; }
.scan-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dotted rgba(168, 162, 154, .22); opacity: 0; transform: translateX(-8px); transition: opacity .25s, transform .25s; }
.scan-rows li.show { opacity: 1; transform: none; }
.scan-rows .l { color: #a8a29a; text-transform: uppercase; font-size: 10px; letter-spacing: .12em; white-space: nowrap; padding-top: 1px; }
.scan-rows .v { color: #ff8a8f; text-align: right; font-variant-numeric: tabular-nums; word-break: break-all; }
.scan-rows li.done .v { color: #f4f1ea; }
.scan-rows li.strong.done .v { color: #ff6b72; font-weight: 800; }
.scan-conf { display: flex; align-items: center; gap: 10px; position: relative; text-transform: uppercase; font-size: 10px; letter-spacing: .12em; color: #a8a29a; }
.scan-conf .bar { flex: 1; height: 7px; border: 1px solid #5a1a1a; background: rgba(0, 0, 0, .5); }
.scan-conf .bar i { display: block; height: 100%; width: 100%; background: repeating-linear-gradient(90deg, #c1121f 0 4px, #7e1313 4px 6px); transform-origin: left; transform: scaleX(0); transition: transform .35s ease; }
.scan-conf .pct { color: #f4f1ea; min-width: 3.4em; text-align: right; font-weight: 700; }
.scan-done { margin-top: 10px; text-align: center; text-transform: uppercase; letter-spacing: .24em; font-weight: 800; font-size: 13px; color: #fff; background: #7e1313; border: 1px solid #c1121f; padding: 5px 0; display: none; position: relative; }
.scan.full .scan-done { display: block; animation: stamp .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes stamp { from { transform: scale(1.5); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 760px) {
  .scan { top: 60px; width: min(196px, calc(100vw - 2 * var(--gutter))); font-size: 8px; letter-spacing: .02em; line-height: 1.25; padding: 5px 7px 5px; }
  .scan-head { gap: 7px; padding-bottom: 5px; }
  .scan-head b { font-size: 8.5px; letter-spacing: .1em; }
  .scan-head small { font-size: 7px; letter-spacing: .08em; }
  .scan-dot { width: 7px; height: 7px; }
  .scan-x { width: 16px; height: 16px; font-size: 12px; }
  .scan-rows li { padding: 0; gap: 6px; }
  .scan-rows .l { font-size: 7px; letter-spacing: .08em; }
  .scan-conf { gap: 7px; font-size: 7px; letter-spacing: .08em; }
  .scan-conf .bar { height: 5px; }
  .scan-done { margin-top: 4px; padding: 2px 0; font-size: 8.5px; letter-spacing: .18em; }
  }
@media (prefers-reduced-motion: reduce) { .scan::before, .scan::after, .scan-dot,  .scan { transition: none; } }

/* portrait du personnage visé, dans un cadre de cible */
.scan-body { display: flex; gap: 12px; align-items: stretch; margin: 8px 0 10px; position: relative; }
.scan-body .scan-rows { margin: 0; flex: 1; min-width: 0; }
.scan-pic { position: relative; overflow: hidden; flex: none; width: 78px; display: grid; place-items: center; border: 1px solid rgba(158, 18, 26, .7); background: radial-gradient(ellipse at 50% 35%, #ddd8cc, #8f8a82 85%); padding: 6px 4px; box-shadow: inset 0 0 18px rgba(126, 19, 19, .45); }
.scan-pic img { width: 100%; height: auto; max-height: 124px; filter: contrast(1.05); position: relative; transform: scale(1.5); transform-origin: 50% 62%; }
.scan-pic i { z-index: 2; position: absolute; width: 9px; height: 9px; border: 2px solid #ff6b72; }
.scan-pic i:nth-of-type(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.scan-pic i:nth-of-type(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.scan-pic i:nth-of-type(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.scan-pic i:nth-of-type(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.scan-pic.glitch img { animation: glitch .6s steps(6) 1; }
@keyframes glitch { 0% { opacity: 0; transform: translateX(-6px); } 20% { opacity: 1; transform: translateX(5px) skewX(8deg); filter: hue-rotate(90deg) contrast(2); } 40% { transform: translateX(-3px); } 60% { opacity: .4; } 100% { opacity: 1; transform: none; } }
@media (max-width: 760px) { .scan-body { gap: 6px; margin: 4px 0 4px; } .scan-pic { width: 32px; } .scan-pic img { max-height: 56px; } }
@media (prefers-reduced-motion: reduce) { .scan-pic.glitch img { animation: none; } }

/* ─── L'arbre des jauges (v3.js) ─── */
.tree { margin: 34px 0 6px; padding-top: 26px; border-top: 2px solid var(--ink); }
.tree-svg { width: 100%; height: auto; display: block; overflow: visible; }
.tree .br { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke .2s, stroke-width .2s, opacity .2s; }
.tree .br.trunk { stroke-width: 7; }
.tree .br.tw { stroke-width: 2.2; opacity: .8; }
.tree .br.tw.sec { stroke-width: 1.6; opacity: .55; }
.tree.rv:not(.in) .br { stroke-dashoffset: 1; stroke-dasharray: 1; }
.tree.rv .br { transition: stroke-dashoffset 1.6s cubic-bezier(.3, .7, .2, 1), stroke .2s, stroke-width .2s, opacity .2s; }
.tree.lit .br:not(.on) { opacity: .12; }
.tree .br.on { stroke: var(--oil); opacity: 1; }
.tree .br.tw.on { stroke-width: 3.6; }
.tree .br.trunk.on { stroke-width: 9; }
.tree .leaf { cursor: pointer; }
.tree .leaf circle { fill: var(--ink); stroke: var(--paper); stroke-width: 2; transition: fill .2s, r .2s; }
.tree .leaf text { fill: var(--ink); font-family: var(--font); font-weight: 700; text-anchor: end; dominant-baseline: central; transition: fill .2s; }
.tree .leaf.on circle { fill: var(--oil); }
.tree .leaf.on text { fill: var(--oil); }
.tree.lit .leaf:not(.on) { opacity: .4; }
.tree .gnode { cursor: pointer; }
.tree .gnode rect { fill: var(--paper); stroke: var(--ink); stroke-width: 2.4; transition: fill .2s; }
.tree .gnode text { fill: var(--ink); font-family: var(--font); font-weight: 800; text-anchor: middle; dominant-baseline: central; transition: fill .2s; }
.tree .gnode.on rect { fill: var(--oil); stroke: var(--ink); }
.tree .gnode.on text { fill: var(--paper); }
.tree.lit .gnode:not(.on) { opacity: .45; }
.tree .root circle { fill: var(--ink); }
.tree .root circle.ring { fill: none; stroke: var(--oil); stroke-width: 3; }
.tree .root text { fill: var(--paper); font-family: var(--font); font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.tree .root text.sub { fill: #ff8a8f; font-weight: 700; }
.tree [tabindex]:focus-visible { outline: none; }
.tree .leaf:focus-visible text, .tree .gnode:focus-visible rect { stroke: var(--red); fill: var(--red); }

/* ─── Quelques ennemis du niveau 1, vus comme des cibles du drone ─── */
.foes { padding: clamp(56px, 12vh, 140px) 0; }
.foes .title { margin-bottom: clamp(18px, 3vh, 34px); }
.targets { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 1.8vw, 24px); }
.target { text-align: center; flex: 1 1 128px; max-width: 180px; }
.bosses .target { flex-basis: 200px; max-width: 300px; }
.bosses .target.wide { flex: 2 1 320px; max-width: 480px; }
.frame {
  position: relative; width: 100%; height: clamp(230px, 34vh, 300px); display: flex; align-items: flex-end; justify-content: center; padding: 12px 8px 10px; overflow: hidden;
  border: 1px solid rgba(126, 19, 19, .75); background: radial-gradient(ellipse at 50% 35%, #ddd8cc, #8f8a82 90%); box-shadow: inset 0 0 22px rgba(126, 19, 19, .4); transition: box-shadow .25s, border-color .25s;
}
.frame img { position: relative; z-index: 1; width: auto; height: calc(var(--h) * clamp(2.4px, .33vw + .8px, 3.6px)); max-width: 100%; object-fit: contain; }
.frame::after { content: ""; position: absolute; left: 0; right: 0; top: -25%; height: 25%; pointer-events: none; z-index: 2; background: linear-gradient(transparent, rgba(196, 18, 26, .22), transparent); animation: sweep 3.6s linear infinite; }
.frame i { position: absolute; z-index: 3; width: 11px; height: 11px; border: 2px solid #c1121f; }
.frame i:nth-of-type(1) { top: 3px; left: 3px; border-right: 0; border-bottom: 0; }
.frame i:nth-of-type(2) { top: 3px; right: 3px; border-left: 0; border-bottom: 0; }
.frame i:nth-of-type(3) { bottom: 3px; left: 3px; border-right: 0; border-top: 0; }
.frame i:nth-of-type(4) { bottom: 3px; right: 3px; border-left: 0; border-top: 0; }
.target:hover .frame { border-color: #c1121f; box-shadow: inset 0 0 30px rgba(196, 18, 26, .6), 0 0 16px rgba(196, 18, 26, .4); }
.target .n { display: block; margin-top: 10px; font-weight: 800; font-size: clamp(15px, 1.4vw, 18px); letter-spacing: .01em; }
@media (max-width: 760px) { .targets { gap: 12px; } .target { flex-basis: 40%; } .frame { height: 230px; } }
@media (prefers-reduced-motion: reduce) { .frame::after { animation: none; } }

/* ─── L'arbre, version tableau : jauge -> facettes (poids) -> sources ─── */
.tree .frow { cursor: pointer; }
.tree .fbox { fill: var(--paper); stroke: var(--ink); stroke-width: 1.8; transition: fill .2s, stroke .2s; }
.tree .fname { fill: var(--ink); font-family: var(--font); font-weight: 800; dominant-baseline: central; transition: fill .2s; }
.tree .fw { fill: var(--dgray); font-family: var(--font); font-weight: 700; text-anchor: end; dominant-baseline: central; transition: fill .2s; font-variant-numeric: tabular-nums; }
.tree .wbar { fill: var(--oil); }
.tree .srcs { fill: var(--ink); font-family: var(--font); text-anchor: end; dominant-baseline: central; transition: fill .2s; }
.tree .srcs .ex { font-weight: 800; }
.tree .srcs .pl { font-weight: 500; fill: #8a857d; font-style: italic; }
.tree .lead { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 2 2; opacity: .6; }
.tree .frow.on .fbox { fill: var(--oil); stroke: var(--oil); }
.tree .frow.on .fname, .tree .frow.on .fw { fill: var(--paper); }
.tree .frow.on .wbar { fill: var(--paper); }
.tree .frow.on .srcs, .tree .frow.on .srcs .pl { fill: var(--oil); }
.tree.lit .frow:not(.on) { opacity: .4; }
.tree .legend text { font-family: var(--font); fill: var(--ink); font-weight: 800; }
.tree .legend text.off { font-weight: 500; font-style: italic; fill: #8a857d; }
.tree .br.tw { stroke-width: 1.8; opacity: .7; }
.tree .br.trunk { stroke-width: 6; }
.tree .root rect { fill: var(--ink); }
.tree .gnode text { font-weight: 800; }
@media (max-width: 719px) { .tree .br.trunk { stroke-width: 4; } .tree .srcs { text-anchor: start; } }
