@charset "UTF-8";
/* Polices hébergées sur le site (SIL Open Font License) : Martian Mono, Silkscreen, Tektur */
/* Martian Mono · latin-ext */
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 75% 112.5%;
  font-display: swap;
  src: url(fonts/martian-mono-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;
}
/* Martian Mono · latin */
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 75% 112.5%;
  font-display: swap;
  src: url(fonts/martian-mono-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;
}
/* Silkscreen · latin-ext */
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/silkscreen-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;
}
/* Silkscreen · latin */
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/silkscreen-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;
}
/* Tektur · latin-ext */
@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(fonts/tektur-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;
}
/* Tektur · latin */
@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(fonts/tektur-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;
}

/* ============ TOKENS ============ */
:root {
  --bg: #06070a;
  --bg-2: #0b0d12;
  --panel: rgba(14, 17, 23, 0.82);
  --line: #1d222c;
  --line-2: #2a3140;
  --ink: #e9ecef;
  --muted: #8a93a3;
  --dim: #7a8292;
  --acid: #c8ff2e;
  --hot: #ff4d2e;
  --c: var(--acid);

  --legend: #ff9f1c;
  --epic: #b77bff;
  --rare: #4da3ff;
  --common: #8a93a3;
  --unique: #ff6bd6;
  --silver: #c3ccd8;

  --f-display: "Tektur", "Arial Narrow", sans-serif;
  --f-mono: "Martian Mono", ui-monospace, monospace;
  --f-pixel: "Silkscreen", var(--f-mono);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-mono);
  font-variation-settings: "wdth" 90;
  font-size: 14px;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: crosshair;
}
::selection { background: var(--acid); color: var(--bg); }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

.skip {
  position: absolute; left: 16px; top: -40px; z-index: 100;
  background: var(--acid); color: var(--bg); padding: 6px 10px; text-decoration: none;
}
.skip:focus { top: 16px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ BACKDROP ============ */
.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.crt {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.22) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
}

main, .foot { position: relative; z-index: 1; }

/* ============ BOOT ============ */
.boot {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--gutter); transition: opacity .45s ease, visibility .45s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot__log {
  margin: 0; font-family: var(--f-mono); font-size: clamp(11px, 1.4vw, 14px);
  color: var(--acid); white-space: pre-wrap; text-shadow: 0 0 8px rgba(200,255,46,.45);
}
.boot__log .w { color: var(--muted); text-shadow: none; }
.boot__skip { font-family: var(--f-pixel); color: var(--dim); font-size: 11px; margin: 1.2em 0 0; }

/* ============ HUD ============ */
.hud > div {
  position: fixed; z-index: 60; font-family: var(--f-pixel); font-size: 10px;
  letter-spacing: .08em; color: var(--muted); text-transform: uppercase;
  padding: 14px var(--gutter); display: flex; align-items: center; gap: 8px; pointer-events: none;
}
.hud b { color: var(--acid); font-weight: 400; }
.hud__tl { top: 0; left: 0; }
.hud__tr { top: 0; right: 0; }
.hud__bl { bottom: 0; left: 0; }
.hud__br { bottom: 0; right: 0; }
.hud .dot { width: 6px; height: 6px; background: var(--acid); box-shadow: 0 0 8px var(--acid); animation: blink 1.2s steps(2) infinite; }
.xp { width: 90px; height: 6px; border: 1px solid var(--line-2); display: inline-block; position: relative; }
.xp i { position: absolute; inset: 0; width: 0; background: var(--acid); }

/* ============ TITLE SCREEN ============ */
.start {
  min-height: 100svh; max-width: var(--max); margin: 0 auto;
  padding: 90px var(--gutter) 70px;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center; gap: clamp(24px, 4vw, 60px);
}
.eyebrow {
  font-family: var(--f-pixel); font-size: 12px; color: var(--acid);
  letter-spacing: .12em; text-transform: uppercase; margin: 0 0 18px;
}
.name {
  margin: 0; font-family: var(--f-display); font-weight: 900;
  font-variation-settings: "wdth" 75;
  font-size: clamp(60px, 10.4vw, 158px); line-height: .82; letter-spacing: -.01em;
  display: flex; flex-direction: column;
}
.glitch { position: relative; display: inline-block; width: max-content; }
.glitch--outline { color: transparent; -webkit-text-stroke: 2px var(--acid); }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.glitch::before { color: var(--hot); -webkit-text-stroke: 0; transform: translateX(-3px); clip-path: inset(0 0 100% 0); animation: slice 4.2s infinite steps(1); mix-blend-mode: screen; }
.glitch::after { color: #3ad6ff; -webkit-text-stroke: 0; transform: translateX(3px); clip-path: inset(100% 0 0 0); animation: slice2 4.2s infinite steps(1); mix-blend-mode: screen; }
.glitch--outline::before, .glitch--outline::after { color: transparent; -webkit-text-stroke: 2px var(--hot); }
.glitch--outline::after { -webkit-text-stroke-color: #3ad6ff; }
@keyframes slice {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); }
  88% { clip-path: inset(12% 0 64% 0); transform: translateX(-6px); }
  90% { clip-path: inset(58% 0 20% 0); transform: translateX(5px); }
  92% { clip-path: inset(30% 0 52% 0); transform: translateX(-2px); }
}
@keyframes slice2 {
  0%, 87%, 100% { clip-path: inset(100% 0 0 0); }
  89% { clip-path: inset(70% 0 8% 0); transform: translateX(6px); }
  91% { clip-path: inset(18% 0 70% 0); transform: translateX(-4px); }
}
.role {
  font-family: var(--f-display); font-size: clamp(18px, 2.2vw, 26px);
  font-variation-settings: "wdth" 85; letter-spacing: .02em;
  margin: 26px 0 0; text-transform: uppercase;
}
.role b { color: var(--acid); }
.role .sep { color: var(--dim); margin: 0 .3em; }
.lede { color: var(--muted); max-width: 54ch; margin: 18px 0 34px; font-size: 13.5px; }
.press {
  display: inline-block; font-family: var(--f-pixel); font-size: 16px; letter-spacing: .1em;
  text-decoration: none; color: var(--bg); background: var(--acid);
  padding: 14px 22px; box-shadow: 6px 6px 0 var(--hot);
  transition: transform .12s, box-shadow .12s;
}
.press:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--hot); }
.press:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--hot); }

/* Terminal d'activité */
.term {
  margin: 0; border: 1px solid var(--line-2); background: rgba(5, 6, 10, .88);
  box-shadow: 0 0 0 1px rgba(200,255,46,.06), 0 30px 80px -30px rgba(200,255,46,.18);
  min-width: 0;
}
.term__bar {
  display: flex; align-items: center; gap: 7px; padding: 9px 12px;
  border-bottom: 1px solid var(--line-2); background: var(--bg-2);
}
.term__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.term__bar i:first-child { background: var(--hot); }
.term__bar i:nth-child(2) { background: #ffb547; }
.term__bar i:nth-child(3) { background: var(--acid); }
.term__bar b {
  margin-left: 8px; font-weight: 400; font-size: 10.5px; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.term__log {
  margin: 0; padding: 14px 16px 16px; height: 25.5em; overflow: hidden;
  font-family: var(--f-mono); font-size: 12px; line-height: 1.7; white-space: pre;
  color: var(--ink); font-variation-settings: "wdth" 85;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%);
          mask-image: linear-gradient(180deg, transparent 0, #000 18%);
}
.term__log .ts { color: var(--dim); }
.term__log .tag { display: inline-block; width: 11.5ch; }
.term__log .ok { color: #3ddc84; }
.term__log .ko { color: var(--hot); }
.term__log .line { display: block; overflow: hidden; text-overflow: ellipsis; animation: lineIn .25s ease-out; }
.term__log .cur::after { content: "▍"; color: var(--acid); animation: blink 1s steps(2) infinite; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px); } }

.blink { animation: blink 1s steps(2) infinite; }
.blink-soft { animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ============ SECTIONS ============ */
section.profile { max-width: var(--max); margin: 0 auto; padding: 80px var(--gutter); }
.sectionhead { display: flex; align-items: baseline; gap: 16px; margin-bottom: 36px; }
.sectionhead__num { font-family: var(--f-pixel); color: var(--acid); font-size: 14px; }
.sectionhead h2 {
  margin: 0; font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(30px, 5vw, 58px); line-height: 1; font-variation-settings: "wdth" 80;
}
.sectionhead__line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); align-self: center; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============ CARDS ============ */
.card {
  background: var(--panel); border: 1px solid var(--line); position: relative; padding: 24px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.card::before { content: ""; position: absolute; top: 0; left: 0; width: 28px; height: 2px; background: var(--acid); }
.card__title {
  margin: 0 0 18px; font-family: var(--f-pixel); font-weight: 400; font-size: 12px; color: var(--acid);
  letter-spacing: .1em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 10px;
}
.card__hint { color: var(--dim); font-size: 10px; }

.profile__grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px;
  grid-template-areas: "id stats" "buffs buffs" "inv trophies";
}
.id { grid-area: id; display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: start; }
.stats { grid-area: stats; }
.inv { grid-area: inv; }
.trophies { grid-area: trophies; }
.buffs { grid-area: buffs; }
.id__avatar { background: var(--bg-2); border: 1px solid var(--line-2); padding: 10px; aspect-ratio: 1; }
.id__avatar svg { width: 100%; height: 100%; display: block; }
.px-hair { fill: #2b2f3a; } .px-skin { fill: #e8c4a0; } .px-eye { fill: #06070a; } .px-shirt { fill: var(--acid); }
.id__rows { margin: 0; display: grid; gap: 2px; }
.id__rows div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.id__rows dt { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.id__rows dd { margin: 0; font-size: 13px; }
.id__rows .ok { color: var(--acid); }

/* Buffs */
.buffs__groups { display: grid; gap: 22px; }
.buffs__group:first-child .buff-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.buffs__group:last-child .buff-row { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1180px) { .buffs__group:last-child .buff-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.buff.hot {
  display: grid; grid-template-columns: 64px 1fr auto; grid-template-areas: "f b e" "f d e";
  column-gap: 18px; align-items: center; text-align: left; padding: 14px 20px 14px 14px;
}
.buff.hot .buff__frame { grid-area: f; margin: 0; }
.buff.hot b { grid-area: b; align-self: end; font-size: 13px; }
.buff.hot .buff__desc { grid-area: d; align-self: start; font-size: 11.5px; }
.buff.hot em { grid-area: e; margin: 0; padding: 0; font-size: 10px; }
.buffs__label {
  margin: 0 0 12px; font-family: var(--f-pixel); font-size: 9.5px; color: var(--dim); text-transform: uppercase;
  letter-spacing: .1em; display: flex; align-items: center; gap: 10px;
}
.buffs__label::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.buff-row { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.buff {
  --b: var(--silver); position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 16px 12px 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--b) 7%, var(--bg-2)), var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--b) 28%, var(--line)); transition: transform .15s, border-color .15s, box-shadow .15s;
}
.buff:hover { border-color: color-mix(in srgb, var(--b) 55%, var(--line)); }
.buff.hot { --b: var(--acid); }
.buff__frame {
  position: relative; width: 64px; height: 64px; padding: 3px; margin-bottom: 12px; overflow: hidden;
  background: color-mix(in srgb, var(--b) 55%, #000);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--b) 80%, #fff), 0 0 0 1px #000;
}
.buff__ico {
  position: relative; z-index: 1; display: block; width: 100%; height: 100%; padding: 9px;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--b) 22%, #10131a), #07080b 75%);
  color: var(--b);
}
.buff__ico svg { display: block; width: 100%; height: 100%; }
/* anneau de recharge qui tourne autour des buffs actifs */
.buff.hot .buff__frame { background: #0b0d12; }
.buff.hot .buff__frame::before {
  content: ""; position: absolute; inset: -50%;
  background: conic-gradient(from 0deg, var(--acid) 0 22%, transparent 22% 50%, var(--acid) 50% 72%, transparent 72%);
  animation: spin 3.2s linear infinite;
}
.buff.hot:nth-child(2) .buff__frame::before { animation-duration: 4.4s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(1turn); } }
.buff__stack {
  position: absolute; z-index: 2; right: 3px; bottom: 1px; font-family: var(--f-pixel); font-size: 14px; line-height: 1;
  color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
.buff b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; line-height: 1.3; }
.buff__desc { display: block; margin-top: 5px; font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.buff em {
  margin-top: auto; padding-top: 10px; font-style: normal; font-family: var(--f-pixel); font-size: 9px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--b);
}

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.bars li { display: grid; grid-template-columns: 1fr 70px; grid-template-areas: "l n" "b b"; gap: 6px 10px; }
.bars span { grid-area: l; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.bars b { grid-area: n; text-align: right; font-family: var(--f-pixel); font-weight: 400; color: var(--acid); }
.bars i {
  grid-area: b; height: 12px; display: block; position: relative;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 10px);
}
.bars i::after {
  content: ""; position: absolute; inset: 0; width: 0;
  background: repeating-linear-gradient(90deg, var(--acid) 0 8px, transparent 8px 10px);
  transition: width 1.4s cubic-bezier(.2,.8,.2,1);
}
.in .bars i::after { width: calc(var(--v) * 1%); }
.bars li:nth-child(2) i::after { transition-delay: .1s; }
.bars li:nth-child(3) i::after { transition-delay: .2s; }
.bars li:nth-child(4) i::after { transition-delay: .3s; }
.bars li:nth-child(5) i::after { transition-delay: .4s; }
.bars li:nth-child(6) i::after { transition-delay: .5s; }
.bars .low b { color: var(--hot); }
.bars .low i::after { background: repeating-linear-gradient(90deg, var(--hot) 0 8px, transparent 8px 10px); animation: blink 1s steps(2) infinite 1.6s; }
.bars .max i::after { box-shadow: 0 0 12px rgba(200,255,46,.5); }
.bars b.inf { font-family: var(--f-mono); font-weight: 700; font-size: 19px; line-height: .8; }

/* Inventaire */
.items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 7px; }
.item {
  all: unset; box-sizing: border-box; cursor: help; position: relative; width: 100%;
  display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 9px;
  padding: 7px 9px 7px 7px; background: var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--r) 45%, var(--line));
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.item__ico {
  width: 30px; height: 30px; display: grid; place-items: center;
  font-family: var(--f-pixel); font-size: 11px; color: var(--bg); background: var(--r);
}
.item__name { font-size: 11px; line-height: 1.25; }
.item:hover, .item:focus-visible { transform: translateY(-2px); border-color: var(--r); box-shadow: 0 0 18px -4px var(--r); z-index: 5; }
.item:focus-visible { outline: 2px solid var(--r); outline-offset: 2px; }
.item__tip {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); transform: translateY(4px);
  padding: 8px 10px; background: #0d1016; border: 1px solid var(--r);
  font-size: 10.5px; line-height: 1.45; color: var(--muted); opacity: 0; pointer-events: none;
  transition: opacity .15s, transform .15s; z-index: 10;
}
.item__tip b { display: block; font-family: var(--f-pixel); font-weight: 400; font-size: 9px; color: var(--r); text-transform: uppercase; letter-spacing: .08em; }
.item:hover .item__tip, .item:focus-visible .item__tip, .item.tip-open .item__tip { opacity: 1; transform: none; pointer-events: auto; }
.item.tip-below .item__tip { bottom: auto; top: calc(100% + 8px); transform: translateY(-4px); }
.item.tip-below .item__tip::after { top: auto; bottom: 100%; }
.item.tip-below:hover .item__tip, .item.tip-below:focus-visible .item__tip, .item.tip-below.tip-open .item__tip { transform: none; }
.item__tip::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.items .item.tip-off .item__tip { opacity: 0; pointer-events: none; }
.r-legend { --r: var(--legend); }
.r-epic { --r: var(--epic); }
.r-rare { --r: var(--rare); }
.r-common { --r: var(--common); }
.r-unique { --r: var(--unique); }
.item__ico svg { display: block; width: 72%; height: 72%; }
.r-empty { --r: var(--line-2); cursor: default; border-style: dashed; }
.r-empty .item__ico { background: transparent; color: var(--dim); border: 1px dashed var(--line-2); }
.r-empty .item__name { color: var(--dim); }
.r-legend .item__ico { background: linear-gradient(120deg, var(--legend) 30%, #ffe08a 50%, var(--legend) 70%); background-size: 250% 100%; animation: shine 3s linear infinite; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 0; font-size: 10px; }
.legend span { color: var(--r); font-family: var(--f-pixel); text-transform: uppercase; letter-spacing: .06em; }

/* Trophées */
.trophies__bar { height: 6px; background: var(--line); margin: -6px 0 16px; }
.trophies__bar i { display: block; height: 100%; width: calc(var(--p) * 1%); background: var(--acid); transition: width .6s; }
.tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.trophy {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center;
  padding: 7px 10px 7px 7px; background: var(--bg-2); border: 1px solid var(--line);
}
.trophy__ico {
  width: 34px; height: 34px; display: grid; place-items: center; color: var(--bg); background: var(--acid); font-size: 13px;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.trophy b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.trophy div span { font-size: 11px; color: var(--muted); line-height: 1.4; display: block; }
.trophy em { font-style: normal; font-family: var(--f-pixel); font-size: 9px; color: var(--dim); text-align: right; white-space: nowrap; }

/* ============ LEVEL SELECT ============ */
.quests { position: relative; }
.quests__pin { max-width: var(--max); margin: 0 auto; padding: 80px var(--gutter); }
.quests__count { font-family: var(--f-pixel); font-size: 11px; color: var(--muted); white-space: nowrap; align-self: center; }
.quests__count b { color: var(--acid); font-weight: 400; font-size: 14px; }
.quests__hint { color: var(--dim); margin-left: 8px; animation: blink 1.6s steps(2) infinite; }

.select { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.select__list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 70px; z-index: 4; }
.select__list button {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative;
  display: grid; grid-template-columns: 34px 1fr; grid-template-areas: "i n" "i t";
  padding: 9px 14px; background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid transparent; transition: border-color .15s, background .15s, transform .15s;
}
.t-idx { grid-area: i; font-family: var(--f-pixel); font-size: 11px; color: var(--dim); align-self: center; }
.t-name { grid-area: n; font-family: var(--f-display); font-weight: 700; font-size: 18px; text-transform: uppercase; line-height: 1.1; font-variation-settings: "wdth" 85; }
.t-tag { grid-area: t; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.select__list button:hover { border-color: var(--line-2); transform: translateX(4px); }
.select__list button[aria-current="true"] {
  border-color: var(--c); border-left-color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--bg-2));
  transform: translateX(8px);
}
.select__list button[aria-current="true"] .t-idx,
.select__list button[aria-current="true"] .t-name { color: var(--c); }
.select__list button[aria-current="true"]::after {
  content: "◂"; content: "◂" / ""; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--c); font-family: var(--f-pixel); animation: blink 1s steps(2) infinite;
}
.select__list button:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }

.select__panels { display: grid; gap: 22px; }
.panel {
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line));
  display: grid; grid-template-columns: minmax(0, 1fr); scroll-margin-top: 90px;
}
.panel.enter { animation: panelIn .24s ease-out; }
.panel.enter .screen::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: var(--c); mix-blend-mode: overlay; animation: flash .3s ease-out forwards;
}
@keyframes panelIn { from { opacity: .35; transform: translateY(6px); } }
@keyframes flash { from { opacity: .45; } to { opacity: 0; } }
.screen {
  position: relative; aspect-ratio: 16 / 7; background: #05060a; overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--c) 40%, var(--line));
}
.screen--paper { background: #f3ece0; }
.screen--paper .screen__label { background: rgba(5,6,10,.85); }
.screen canvas { width: 100%; height: 100%; display: block; }
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
}
.screen--paper::after { background: repeating-linear-gradient(0deg, rgba(0,0,0,.035) 0 1px, transparent 1px 3px); }
.screen__label {
  position: absolute; left: 14px; top: 12px; z-index: 2; font-family: var(--f-pixel); font-size: 10px;
  color: var(--c); letter-spacing: .1em; text-transform: uppercase;
  background: rgba(5,6,10,.7); padding: 3px 7px; line-height: 1.3;
}
.panel__body {
  padding: clamp(20px, 2.6vw, 30px); display: grid; gap: clamp(18px, 2.5vw, 32px);
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start;
}
.panel__kicker { margin: 0; font-family: var(--f-pixel); font-size: 10.5px; color: var(--c); letter-spacing: .08em; text-transform: uppercase; }
.panel__title {
  margin: 4px 0 12px; font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(30px, 3.8vw, 52px); line-height: .95; font-variation-settings: "wdth" 78;
}
.panel__main > p { color: #bfc6d1; margin: 0 0 16px; font-size: 13px; line-height: 1.6; }
.stack { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 5px; }
.stack li { font-size: 10.5px; padding: 3px 8px; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); }
.stack li::before { content: "+"; opacity: .6; margin-right: 4px; }
.go {
  display: inline-block; font-family: var(--f-pixel); font-size: 12px; text-decoration: none; letter-spacing: .06em;
  background: var(--c); color: var(--bg); padding: 10px 16px; box-shadow: 5px 5px 0 color-mix(in srgb, var(--c) 35%, transparent);
  transition: transform .12s, box-shadow .12s;
}
a.go:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 color-mix(in srgb, var(--c) 35%, transparent); }
.go--locked { background: var(--line-2); color: #a3abb9; box-shadow: none; }
.go.denied { animation: denied .45s steps(6); }
@keyframes denied { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.go--locked::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 9px; vertical-align: -1px;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath d='M2 0h1v1h-1zM3 0h1v1h-1zM4 0h1v1h-1zM5 0h1v1h-1zM6 0h1v1h-1zM1 1h1v1h-1zM2 1h1v1h-1zM6 1h1v1h-1zM7 1h1v1h-1zM1 2h1v1h-1zM7 2h1v1h-1zM1 3h1v1h-1zM7 3h1v1h-1zM0 4h1v1h-1zM1 4h1v1h-1zM2 4h1v1h-1zM3 4h1v1h-1zM4 4h1v1h-1zM5 4h1v1h-1zM6 4h1v1h-1zM7 4h1v1h-1zM8 4h1v1h-1zM0 5h1v1h-1zM1 5h1v1h-1zM2 5h1v1h-1zM3 5h1v1h-1zM5 5h1v1h-1zM6 5h1v1h-1zM7 5h1v1h-1zM8 5h1v1h-1zM0 6h1v1h-1zM1 6h1v1h-1zM2 6h1v1h-1zM3 6h1v1h-1zM5 6h1v1h-1zM6 6h1v1h-1zM7 6h1v1h-1zM8 6h1v1h-1zM0 7h1v1h-1zM1 7h1v1h-1zM2 7h1v1h-1zM3 7h1v1h-1zM4 7h1v1h-1zM5 7h1v1h-1zM6 7h1v1h-1zM7 7h1v1h-1zM8 7h1v1h-1zM0 8h1v1h-1zM1 8h1v1h-1zM2 8h1v1h-1zM3 8h1v1h-1zM4 8h1v1h-1zM5 8h1v1h-1zM6 8h1v1h-1zM7 8h1v1h-1zM8 8h1v1h-1z'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath d='M2 0h1v1h-1zM3 0h1v1h-1zM4 0h1v1h-1zM5 0h1v1h-1zM6 0h1v1h-1zM1 1h1v1h-1zM2 1h1v1h-1zM6 1h1v1h-1zM7 1h1v1h-1zM1 2h1v1h-1zM7 2h1v1h-1zM1 3h1v1h-1zM7 3h1v1h-1zM0 4h1v1h-1zM1 4h1v1h-1zM2 4h1v1h-1zM3 4h1v1h-1zM4 4h1v1h-1zM5 4h1v1h-1zM6 4h1v1h-1zM7 4h1v1h-1zM8 4h1v1h-1zM0 5h1v1h-1zM1 5h1v1h-1zM2 5h1v1h-1zM3 5h1v1h-1zM5 5h1v1h-1zM6 5h1v1h-1zM7 5h1v1h-1zM8 5h1v1h-1zM0 6h1v1h-1zM1 6h1v1h-1zM2 6h1v1h-1zM3 6h1v1h-1zM5 6h1v1h-1zM6 6h1v1h-1zM7 6h1v1h-1zM8 6h1v1h-1zM0 7h1v1h-1zM1 7h1v1h-1zM2 7h1v1h-1zM3 7h1v1h-1zM4 7h1v1h-1zM5 7h1v1h-1zM6 7h1v1h-1zM7 7h1v1h-1zM8 7h1v1h-1zM0 8h1v1h-1zM1 8h1v1h-1zM2 8h1v1h-1zM3 8h1v1h-1zM4 8h1v1h-1zM5 8h1v1h-1zM6 8h1v1h-1zM7 8h1v1h-1zM8 8h1v1h-1z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Fiche de niveau */
.fiche {
  margin: 0; border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); background: rgba(5,6,10,.5);
  position: relative; padding: 26px 16px 10px;
}
.fiche::before {
  content: "FICHE DE NIVEAU"; position: absolute; top: -1px; left: -1px; padding: 3px 8px;
  font-family: var(--f-pixel); font-size: 9px; letter-spacing: .1em; background: var(--c); color: var(--bg);
}
.fiche div { display: grid; grid-template-columns: 86px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.fiche div:last-child { border-bottom: 0; }
.fiche dt { font-family: var(--f-pixel); font-size: 9.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.fiche dd { margin: 0; font-size: 12px; line-height: 1.45; }
.fiche .stars { color: var(--c); letter-spacing: .15em; font-size: 14px; line-height: 1.1; }
.fiche .stars s { text-decoration: none; color: var(--line-2); }
.fiche .boss dt { color: var(--hot); }
.fiche .boss dd { color: var(--ink); }
.fiche .lost {
  display: inline-block; margin-top: 6px; padding: 2px 7px; font-family: var(--f-pixel); font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--hot); border: 1px solid var(--hot);
}

/* Mode épinglé : la section se fige, le défilement fait défiler les niveaux */
.quests.pinned { height: calc(var(--n, 8) * 70vh + 100vh); }
.quests.pinned .quests__pin {
  position: sticky; top: max(0px, calc((100vh - 1000px) / 2)); height: min(100vh, 1000px); padding-top: 58px; padding-bottom: 46px;
  display: flex; flex-direction: column;
}
.quests.pinned .sectionhead { margin-bottom: 20px; }
.quests.pinned .select { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.quests.pinned .select__list { position: static; }
.quests.pinned .select__panels { display: block; height: 100%; }
.quests.pinned .panel { display: none; max-height: 100%; }
.quests.pinned .panel.is-active { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.quests.pinned .screen { aspect-ratio: auto; height: clamp(160px, 28vh, 300px); }
.quests.pinned .panel__body { overflow: auto; scrollbar-width: thin; }
.quests.pinned .panel__title { font-size: clamp(28px, 3vw, 44px); }
.quests:not(.pinned) .quests__hint { display: none; }
@media (max-height: 920px) {
  .quests.pinned .quests__pin { padding-top: 50px; padding-bottom: 40px; }
  .quests.pinned .sectionhead { margin-bottom: 12px; }
  .quests.pinned .sectionhead h2 { font-size: clamp(28px, 3.4vw, 42px); }
  .quests.pinned .screen { height: clamp(184px, calc(100vh - 520px), 28vh); }
  .quests.pinned .panel__body { padding: 16px 22px; gap: 20px; }
  .quests.pinned .panel__title { margin-bottom: 8px; }
  .quests.pinned .panel__main > p { font-size: 12.5px; line-height: 1.5; margin-bottom: 12px; }
  .quests.pinned .stack { margin-bottom: 14px; }
  .quests.pinned .fiche div { padding: 7px 0; }
}
@media (min-width: 961px) and (max-width: 1100px) {
  .quests.pinned .select { grid-template-columns: 190px minmax(0, 1fr); }
  .quests.pinned .panel__body { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .quests.pinned .fiche div { grid-template-columns: 70px 1fr; }
}
@media (min-height: 1000px) { .quests.pinned .screen { height: clamp(300px, 32vh, 360px); } }


/* ============ CONTINUE ============ */
.continue { max-width: 900px; margin: 0 auto; padding: 120px var(--gutter) 100px; text-align: center; }
.continue__title {
  margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(56px, 12vw, 150px); line-height: .9; font-variation-settings: "wdth" 75;
}
.continue__title .q { color: var(--acid); }
.continue__count {
  font-family: var(--f-pixel); font-size: clamp(60px, 10vw, 110px); color: var(--hot); margin: 10px 0;
  line-height: 1; text-shadow: 0 0 24px rgba(255,77,46,.5);
}
.continue__count.pop { animation: pop .3s ease; }
@keyframes pop { from { transform: scale(1.35); } }
.continue__text { color: var(--muted); max-width: 52ch; margin: 0 auto 34px; }
.coins { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.coins a {
  display: inline-flex; gap: 10px; align-items: center; text-decoration: none; padding: 13px 20px;
  border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; font-size: 13px; letter-spacing: .04em;
  transition: border-color .15s, color .15s, transform .15s;
}
.coins a:hover { border-color: var(--acid); color: var(--acid); transform: translateY(-3px); }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  max-width: var(--max); margin: 0 auto; padding: 26px var(--gutter) 60px;
  border-top: 1px solid var(--line); font-size: 11px; color: var(--dim);
}
.konami { all: unset; cursor: pointer; padding: 4px 0; font-family: var(--f-pixel); letter-spacing: .1em; }
.konami:hover { color: var(--acid); }
.konami:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

.toast {
  position: fixed; left: 50%; top: 22%; transform: translate(-50%, -10px); z-index: 88;
  font-family: var(--f-pixel); font-size: clamp(16px, 3vw, 28px); color: var(--bg); background: var(--acid);
  padding: 14px 24px; box-shadow: 8px 8px 0 var(--hot); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; text-align: center; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Cheat mode */
body.cheat { --acid: #ff3df0; --hot: #2effc8; }
body.cheat .bg { animation: hueCycle 5s linear infinite; }
@keyframes hueCycle { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
/* GOD MODE : tremblement, flash RVB, pluie de pixels, ovni */
html.wtf main { animation: shake .5s steps(8) 2; }
@keyframes shake {
  0% { transform: none; } 20% { transform: translate(-7px, 3px) skewX(-2deg); } 40% { transform: translate(6px, -4px); }
  60% { transform: translate(-4px, -2px) skewX(2deg); } 80% { transform: translate(3px, 4px); } 100% { transform: none; }
}
html.wtf body::after {
  content: ""; position: fixed; inset: 0; z-index: 84; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(90deg, rgba(255, 0, 110, .35), rgba(0, 255, 220, .35));
  animation: rgbFlash 1s steps(6) forwards;
}
@keyframes rgbFlash { 0%, 34%, 67% { opacity: 1; } 17%, 50%, 84%, 100% { opacity: 0; } }
.fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 85; pointer-events: none; }
.ufo { position: fixed; top: 12vh; left: 0; z-index: 86; width: 110px; pointer-events: none; animation: ufoFly 3.4s linear forwards; }
@keyframes ufoFly { from { transform: translateX(-160px); } to { transform: translateX(calc(100vw + 60px)); } }
.ufo__ship { position: relative; display: block; width: 110px; height: 110px; color: #7dff8a; filter: drop-shadow(0 0 12px #7dff8a); animation: wobble .55s ease-in-out infinite alternate; }
.ufo__ship svg { display: block; width: 100%; height: 100%; }
@keyframes wobble { to { transform: translateY(12px) rotate(-5deg); } }
.ufo__beam {
  position: absolute; top: 78px; left: 50%; width: 260px; height: 70vh; transform: translateX(-50%); opacity: 0;
  background: linear-gradient(180deg, rgba(125, 255, 138, .5), rgba(125, 255, 138, 0));
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); animation: ufoBeam 3.4s linear forwards;
}
@keyframes ufoBeam { 0%, 30% { opacity: 0; } 38%, 64% { opacity: 1; } 72%, 100% { opacity: 0; } }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .panel__body { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .start { grid-template-columns: 1fr; padding-top: 80px; min-height: auto; }
  .term__log { height: 17em; font-size: 11px; }
  .profile__grid { grid-template-columns: 1fr; grid-template-areas: "id" "stats" "buffs" "inv" "trophies"; }
  .buffs__group:first-child .buff-row { grid-template-columns: 1fr; }
  .buffs__group:last-child .buff-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .select { grid-template-columns: 1fr; }
  .select__list {
    position: sticky; top: 0; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1); padding: 40px var(--gutter) 10px; scrollbar-width: none;
    scroll-padding-inline: var(--gutter);
    background: linear-gradient(180deg, var(--bg) 90%, transparent);
  }
  .select__list::-webkit-scrollbar { display: none; }
  .select__list button { flex: 0 0 auto; min-width: 150px; scroll-snap-align: start; }
  .select__list button:hover, .select__list button[aria-current="true"] { transform: none; }
  .select__list button[aria-current="true"]::after { content: none; }
  .panel { scroll-margin-top: 130px; }
  .hud__br { display: none !important; }
}
@media (max-width: 600px) {
  body { font-size: 13px; }
  .hud > div { padding: 10px 16px; font-size: 9px; }
  .hud__bl { display: none !important; }
  .id { grid-template-columns: 1fr; }
  .id__avatar { width: 96px; }
  .id__rows div { grid-template-columns: 1fr; gap: 0; }
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trophy { grid-template-columns: 30px 1fr; }
  .trophy em { grid-column: 2; text-align: left; }
  .buff.hot { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "f b" "f d" "f e"; column-gap: 14px; padding: 14px; }
  .buff.hot .buff__frame { width: 56px; height: 56px; }
  .buff.hot em { justify-self: start; padding-top: 6px; }
  .card__title { flex-wrap: wrap; row-gap: 4px; align-items: baseline; }
  .card__hint { white-space: nowrap; }
  .screen { aspect-ratio: 4 / 3; }
  .glitch--outline { -webkit-text-stroke-width: 1.5px; }
  .quests__count { display: none; }
  .foot { padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .bars i::after { width: calc(var(--v) * 1%); }
}

.heart { color: var(--hot); }

/* animations en pause hors écran */
.off, .off *, .off *::before, .off *::after { animation-play-state: paused !important; }

/* 320 px : noms d'objets plus serrés */
@media (max-width: 360px) {
  .item { grid-template-columns: 24px minmax(0, 1fr); gap: 7px; padding: 6px 7px 6px 6px; }
  .item__ico { width: 24px; height: 24px; font-size: 10px; }
  .item__name { font-size: 10.5px; overflow-wrap: anywhere; }
}
/* bandes de fondu sous le HUD fixe */
.hud::before, .hud::after { content: ""; position: fixed; left: 0; right: 0; height: 44px; z-index: 59; pointer-events: none; }
.hud::before { top: 0; background: linear-gradient(180deg, var(--bg) 35%, transparent); }
.hud::after { bottom: 0; background: linear-gradient(0deg, var(--bg) 35%, transparent); }
/* la légende des raretés descend en bas de la carte d'inventaire */
@media (min-width: 961px) {
  .inv { display: flex; flex-direction: column; }
  .inv .legend { margin-top: auto; padding-top: 18px; }
  .inv .items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .inv .item { padding-top: 9px; padding-bottom: 9px; }
}
