/* Gamestimate · direction « Ranked » */
:root {
  --bg: #090d16; --panel: #111827; --panel2: #172033; --line: #26324a; --line2: #1c2538;
  --ink: #eef2f8; --dim: #7f8aa3; --dim2: #5a6580;
  --hot: #ff4d3d; --cyan: #3ee8ff; --gold: #f5c542;
  --perfect: #3ee8ff; --great: #34e39b; --good: #f5c542; --miss: #ff8a3d; --wipe: #ff4d3d;
  --bronze: #d08a4f; --argent: #c3ccd9; --or: #f5c542; --platine: #3fe0b8; --diamant: #6fb6ff; --legende: #ff5cc8;
  --cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --cut-s: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  --font: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --num: "Rajdhani", "Chakra Petch", ui-sans-serif, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(120% 50% at 100% 0%, rgba(255,77,61,.16), transparent 60%),
    radial-gradient(90% 40% at 0% 100%, rgba(62,232,255,.08), transparent 60%),
    var(--bg) fixed;
  color: var(--ink); font-family: var(--font); font-weight: 500;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.022) 0 2px, transparent 2px 9px); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--cyan); }
[hidden] { display: none !important; }
.num { font-family: var(--num); font-weight: 700; font-variant-numeric: tabular-nums; }
.tag { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.cut { clip-path: var(--cut); } .cut-s { clip-path: var(--cut-s); }
.panel { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); padding: 12px; }
.hotline { height: 3px; background: linear-gradient(90deg, var(--hot), transparent); }

#app { max-width: 460px; margin: 0 auto; min-height: 100dvh; position: relative; display: flex; flex-direction: column; }
.view { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); animation: viewIn .28s ease both; }
.view.with-nav { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

/* Barre du haut */
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.logo { font-weight: 700; letter-spacing: .14em; font-size: 14px; }
.logo b { color: var(--hot); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); clip-path: var(--cut-s); color: var(--dim); font-size: 15px; }
.icon-btn:hover { color: var(--ink); }
.back { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.back:hover { color: var(--ink); }

/* Badge de rang (hexagone) */
.badge { width: 58px; height: 64px; display: grid; place-items: center; position: relative; flex-shrink: 0; }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge span { position: relative; font-family: var(--num); font-weight: 700; font-size: 16px; color: #120d02; }
.badge.sm { width: 20px; height: 22px; } .badge.sm span { display: none; }
.badge.md { width: 44px; height: 48px; } .badge.md span { font-size: 13px; }

/* Carte joueur */
.player { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; }
.pname { font-weight: 700; font-size: 19px; letter-spacing: .02em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.pname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname button { font-size: 10px; color: var(--cyan); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.prank { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--tier); }
.rp { height: 6px; background: #1f2a40; margin-top: 7px; position: relative; overflow: hidden; }
.rp i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--tier); box-shadow: 0 0 10px var(--tier); transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.rp-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 4px; }
.streak { text-align: center; min-width: 48px; }
.streak b { display: block; font-size: 26px; color: var(--hot); line-height: 1; }
.streak b.off { color: var(--dim2); }
.streak small { font-size: 9px; letter-spacing: .14em; color: var(--dim); }

/* Opération du jour */
.op h3 { margin: 4px 0 0; font-size: 21px; font-weight: 700; }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.slot { background: #0d1422; border: 1px solid var(--line); text-align: center; padding: 9px 0 7px; position: relative; }
.slot .ic { font-size: 18px; line-height: 1.2; }
.slot .x { font-size: 13px; color: var(--dim); margin-top: 3px; }
.slot.m2 .x { color: var(--cyan); } .slot.m3 .x { color: var(--hot); }
.slot.m3 { border-color: rgba(255,77,61,.45); box-shadow: inset 0 0 14px rgba(255,77,61,.16); }
.slot[class*="v-"] { border-color: var(--v); box-shadow: inset 0 0 14px color-mix(in srgb, var(--v) 25%, transparent); }
.slot[class*="v-"] .x { color: var(--v); }
.launch { display: block; width: 100%; background: var(--hot); color: #fff; font-weight: 700; font-size: 20px; letter-spacing: .14em; text-align: center; padding: 16px; box-shadow: 0 10px 30px -8px rgba(255,77,61,.7); transition: transform .1s, filter .15s; text-decoration: none; }
.launch:hover { filter: brightness(1.08); } .launch:active { transform: scale(.98); }
.launch small { display: block; font-size: 10px; letter-spacing: .2em; opacity: .85; font-weight: 600; }
.launch.ghost { background: var(--panel); border: 1px solid var(--line); box-shadow: none; color: var(--ink); }

/* Classement */
.lb-head { display: flex; justify-content: space-between; align-items: center; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 11px; letter-spacing: .14em; text-align: center; font-weight: 600; }
.tabs button { padding: 10px 0; color: var(--dim); border-bottom: 2px solid var(--line); text-transform: uppercase; }
.tabs button.on { color: var(--ink); border-color: var(--hot); }
.ladder { display: flex; flex-direction: column; }
.ladder .row { display: grid; grid-template-columns: 34px 20px 1fr auto 50px; gap: 8px; align-items: center; padding: 7px 6px; font-size: 14px; border-bottom: 1px solid var(--line2); }
.ladder .row .n { font-size: 17px; color: var(--dim); }
.ladder .row.top1 .n { color: var(--gold); } .ladder .row.top2 .n { color: var(--argent); } .ladder .row.top3 .n { color: var(--bronze); }
.ladder .row .t { text-align: right; font-size: 18px; }
.ladder .row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ladder .row.me { background: rgba(62,232,255,.1); outline: 1px solid var(--cyan); outline-offset: -1px; color: var(--cyan); }
.ladder .row.me.pinned { margin-bottom: 6px; }
.ladder .gapline { text-align: center; color: var(--dim2); font-size: 12px; padding: 4px; letter-spacing: .3em; }
.dots { display: flex; gap: 2px; } .dots i { width: 6px; height: 11px; display: block; transform: skewX(-14deg); background: #222c40; }
.v-perfect { --v: var(--perfect); } .v-great { --v: var(--great); } .v-good { --v: var(--good); } .v-miss { --v: var(--miss); } .v-wipe { --v: var(--wipe); }
.dots i[class*="v-"] { background: var(--v); }
.chase { font-size: 13px; color: var(--cyan); text-align: center; padding: 8px; background: rgba(62,232,255,.06); border: 1px dashed rgba(62,232,255,.35); }
.empty { color: var(--dim); text-align: center; padding: 18px 8px; font-size: 14px; line-height: 1.5; }
.daynav { display: flex; align-items: center; justify-content: space-between; }
.daynav button { width: 40px; height: 40px; color: var(--dim); font-size: 20px; }
.daynav button:disabled { opacity: .2; cursor: default; }
.daynav .d { text-align: center; } .daynav .d b { display: block; font-size: 17px; }
.lb-meta { font-size: 12px; color: var(--dim); text-align: center; }

/* Barre de navigation */
.navbar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 460px; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(9,13,22,.7), rgba(9,13,22,.97) 30%); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line2); }
.navbar a { text-decoration: none; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; padding: 6px 0; position: relative; }
.navbar a .i { font-size: 19px; filter: grayscale(1) brightness(1.3); opacity: .65; }
.navbar a.on { color: var(--ink); } .navbar a.on .i { filter: none; opacity: 1; }
.navbar a.on::before { content: ""; position: absolute; top: -9px; left: 30%; right: 30%; height: 2px; background: var(--hot); box-shadow: 0 0 10px var(--hot); }
.navbar a .dot { position: absolute; top: 3px; right: 30%; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 8px var(--hot); }

/* ───── Jeu ───── */
.hud { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.pips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.pip { height: 28px; background: #141d2e; border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; color: var(--dim); font-weight: 700; font-family: var(--num); transform: skewX(-14deg); transition: all .3s; }
.pip > span { transform: skewX(14deg); }
.pip.now { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px rgba(62,232,255,.35); }
.pip[class*="v-"] { background: color-mix(in srgb, var(--v) 18%, transparent); border-color: var(--v); color: var(--v); }
.hud .score { text-align: right; min-width: 64px; }
.hud .score b { font-size: 30px; line-height: 1; display: block; transition: color .3s; }
.mode-banner { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-align: center; padding: 6px; border: 1px dashed rgba(245,197,66,.4); font-weight: 600; }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qhead .game { color: var(--cyan); }
.mult { font-family: var(--num); font-weight: 700; font-size: 14px; padding: 2px 9px; border: 1px solid currentColor; }
.mult.m1 { color: var(--dim); } .mult.m2 { color: var(--cyan); } .mult.m3 { color: var(--hot); box-shadow: inset 0 0 10px rgba(255,77,61,.25); }
.qtext { margin: 2px 0 0; font-size: clamp(20px, 5.8vw, 24px); line-height: 1.15; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }

.readout { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; margin-top: 4px; }
.readout .val { text-align: center; min-width: 0; }
.readout .val b { font-size: clamp(50px, 15vw, 68px); line-height: .95; letter-spacing: -.01em; display: inline-block; white-space: nowrap; }
.readout .val b sub { font-size: .32em; vertical-align: baseline; margin-left: 4px; color: var(--dim); font-weight: 600; }
.nudge { height: 44px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); font-size: 22px; clip-path: var(--cut-s); font-family: var(--num); font-weight: 700; }
.nudge:hover { color: var(--cyan); border-color: var(--cyan); }
.nudge:disabled { visibility: hidden; }

/* Télémètre */
.ruler { position: relative; height: 92px; margin: 2px 16px 0; touch-action: none; }
.ruler .ticks { position: absolute; left: -16px; right: -16px; top: 32px; height: 22px;
  background: repeating-linear-gradient(90deg, #2b3852 0 1px, transparent 1px 8px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ruler .major { position: absolute; top: 26px; width: 2px; height: 34px; background: #4a5a7c; transform: translateX(-1px); }
.ruler .lab { position: absolute; top: 66px; transform: translateX(-50%); font-size: 12px; color: var(--dim); white-space: nowrap; font-family: var(--num); font-weight: 600; }
.ruler .fill { position: absolute; top: 41px; left: 0; height: 4px; background: linear-gradient(90deg, transparent, var(--cyan)); }
.ruler input { position: absolute; top: 0; bottom: 0; left: -16px; width: calc(100% + 32px); height: 100%; opacity: 0; margin: 0; cursor: grab; z-index: 6; }
.ruler input:active { cursor: grabbing; }
.ruler input:disabled { cursor: default; }
.reticle { position: absolute; top: 12px; width: 62px; height: 62px; transform: translateX(-50%); pointer-events: none; z-index: 3; transition: transform .25s, opacity .25s; }
.reticle::before, .reticle::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--cyan); border-radius: 50%; box-shadow: 0 0 14px rgba(62,232,255,.55); }
.reticle::after { inset: 26px; background: var(--cyan); border: 0; }
.reticle i { position: absolute; background: var(--cyan); }
.reticle i:nth-child(1) { left: 29px; top: -6px; width: 2px; height: 14px; } .reticle i:nth-child(2) { left: 29px; bottom: -6px; width: 2px; height: 14px; }
.reticle i:nth-child(3) { top: 29px; left: -6px; height: 2px; width: 14px; } .reticle i:nth-child(4) { top: 29px; right: -6px; height: 2px; width: 14px; }
.ruler:focus-within .reticle::before { box-shadow: 0 0 0 4px rgba(62,232,255,.22), 0 0 18px rgba(62,232,255,.7); }
.locked .reticle { transform: translateX(-50%) scale(.55); opacity: .7; }
.ruler .truth { position: absolute; top: 14px; width: 4px; height: 56px; background: var(--v); box-shadow: 0 0 16px var(--v); transform: translateX(-50%); z-index: 4; transition: left 1s cubic-bezier(.2,.8,.2,1); }
.ruler .flag { position: absolute; top: -8px; transform: translateX(-50%); font-size: 13px; font-weight: 700; color: var(--v); white-space: nowrap; letter-spacing: .06em; transition: left 1s cubic-bezier(.2,.8,.2,1); font-family: var(--num); z-index: 4; }
.ruler .gap { position: absolute; top: 41px; height: 4px; background: repeating-linear-gradient(90deg, var(--v) 0 6px, transparent 6px 10px); transition: left 1s cubic-bezier(.2,.8,.2,1), width 1s cubic-bezier(.2,.8,.2,1); z-index: 2; }
.ruler .crowd { position: absolute; top: 32px; width: 2px; height: 22px; background: #9aa5bf; transform: translateX(-50%); z-index: 2; }

.hint { font-size: 13px; color: var(--dim); text-align: center; line-height: 1.4; }
.hold { margin-top: auto; position: relative; overflow: hidden; border: 2px solid var(--cyan); text-align: center; padding: 15px; font-weight: 700; font-size: 15px; letter-spacing: .12em; color: var(--cyan); width: 100%; user-select: none; -webkit-user-select: none; touch-action: none; }
.hold::before { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: rgba(62,232,255,.3); }
.hold span, .hold small { position: relative; }
.hold small { display: block; font-size: 10px; letter-spacing: .16em; color: var(--dim); margin-top: 3px; font-weight: 600; }
.hold:focus-visible, .launch:focus-visible, .next:focus-visible, .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Révélation */
.banner { margin: 0 -16px; padding: 12px 16px; transform: skewY(-3deg); background: linear-gradient(90deg, var(--v), color-mix(in srgb, var(--v) 50%, transparent)); color: #0a0f18; animation: bannerIn .45s cubic-bezier(.2,1.3,.4,1) both; }
.banner > div { transform: skewY(3deg); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.banner b { font-size: 34px; font-weight: 700; letter-spacing: .08em; }
.banner .num { font-size: 22px; }
@keyframes bannerIn { from { transform: skewY(-3deg) translateX(-110%); } }
.quip { font-size: 15px; font-weight: 600; text-align: center; font-style: italic; color: var(--ink); }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip { background: #0d1422; border: 1px solid var(--line); padding: 9px 10px; min-width: 0; }
.chip b { display: block; font-size: 21px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.context { font-size: 13px; color: var(--dim); line-height: 1.5; }
.context b { color: var(--ink); font-weight: 600; }
.context details { margin-top: 4px; }
.context summary { cursor: pointer; color: var(--cyan); }
.context blockquote { margin: 6px 0; padding-left: 10px; border-left: 2px solid var(--line); font-style: italic; }
.next { margin-top: auto; background: var(--ink); color: var(--bg); font-weight: 700; letter-spacing: .14em; text-align: center; padding: 17px; width: 100%; font-size: 15px; }
.next.hot { background: var(--hot); color: #fff; }

.toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50; width: min(428px, calc(100% - 24px));
  display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 10px 12px; background: #0d1422; border: 1px solid var(--gold); box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 20px rgba(245,197,66,.25);
  animation: toastIn .5s cubic-bezier(.2,1.4,.4,1) both, toastOut .4s ease 3.4s forwards; }
.toast .cart { width: 40px; padding: 2px; } .toast .cart .ini { font-size: 13px; } .toast .cart .st { display: none; }
.toast small { color: var(--gold); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.toast div div { font-size: 15px; font-weight: 600; }
@keyframes toastIn { from { transform: translate(-50%, -150%); } }
@keyframes toastOut { to { transform: translate(-50%, -150%); opacity: 0; } }

/* Résultats */
.victory { text-align: center; margin-top: 4px; }
.victory .tag { color: var(--hot); }
.victory h2 { margin: 4px 0 0; font-size: 27px; letter-spacing: .1em; font-weight: 700; }
.total { text-align: center; } .total b { font-size: 84px; line-height: .9; } .total span { color: var(--dim); font-size: 20px; }
.tiles { display: flex; justify-content: center; gap: 6px; }
.tiles i { width: 30px; height: 12px; transform: skewX(-14deg); background: var(--v); box-shadow: 0 0 10px color-mix(in srgb, var(--v) 60%, transparent); }
.rankup { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.rankup .gain { font-size: 24px; }
.gain.up { color: var(--great); } .gain.down { color: var(--wipe); } .gain.flat { color: var(--dim); }
.promo { font-size: 11px; letter-spacing: .14em; color: var(--gold); margin-top: 5px; font-weight: 700; animation: pulse 1s ease-in-out 3; }
@keyframes pulse { 50% { opacity: .35; } }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats3 > div { padding: 10px 4px; }
.stats3 b { display: block; font-size: 22px; }
.debrief { font-size: 13px; color: var(--dim); line-height: 1.5; }
.debrief b { color: var(--ink); } .debrief .bad { color: var(--wipe); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn { display: block; text-align: center; padding: 14px 4px; font-weight: 700; letter-spacing: .12em; font-size: 13px; border: 1px solid var(--line); background: var(--panel); text-transform: uppercase; text-decoration: none; color: var(--ink); }
.btn.f { background: var(--hot); border-color: var(--hot); color: #fff; }
.btn:hover { filter: brightness(1.15); }
.countdown { text-align: center; color: var(--dim); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.countdown b { color: var(--ink); font-size: 16px; letter-spacing: .04em; }
.feedback { text-align: center; color: var(--great); font-size: 13px; min-height: 18px; }

/* Formulaires */
.field { display: flex; gap: 8px; }
.field input { flex: 1; min-width: 0; background: #0d1422; border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 16px; padding: 12px; outline: none; clip-path: var(--cut-s); }
.field input:focus { border-color: var(--cyan); }
.field button { padding: 0 16px; background: var(--cyan); color: #04121a; font-weight: 700; letter-spacing: .1em; clip-path: var(--cut-s); }
.err { color: var(--wipe); font-size: 13px; min-height: 16px; }
.code { font-family: var(--num); font-weight: 700; font-size: 24px; letter-spacing: .22em; color: var(--gold); }

/* Ludothèque (cartouches) */
.ludo-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.ludo-head h1 { margin: 0; font-size: 26px; letter-spacing: .04em; }
.ludo-head .count { text-align: right; } .ludo-head .count b { font-size: 34px; line-height: 1; display: block; }
.prog { height: 8px; background: #1f2a40; position: relative; overflow: hidden; }
.prog i { position: absolute; top: 0; bottom: 0; left: 0; background: linear-gradient(90deg, #8a5cff, var(--cyan)); box-shadow: 0 0 10px rgba(62,232,255,.5); transition: width 1s; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 10px; border: 1px solid var(--line); color: var(--dim); font-weight: 600; clip-path: var(--cut-s); }
.filters button.on { color: var(--ink); border-color: var(--cyan); background: rgba(62,232,255,.08); }
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.cart { position: relative; aspect-ratio: 5 / 6; background: linear-gradient(160deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 35) 65% 28%)); clip-path: polygon(0 10%, 22% 10%, 22% 0, 78% 0, 78% 10%, 100% 10%, 100% 100%, 0 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 8px; overflow: hidden; }
.cart::before { content: ""; position: absolute; left: 10%; right: 10%; top: 18%; bottom: 32%; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.25); }
.cart .ini { position: absolute; left: 10%; right: 10%; top: 18%; bottom: 32%; display: grid; place-items: center; font-family: var(--num); font-weight: 700; font-size: 26px; color: rgba(255,255,255,.95); text-shadow: 0 2px 8px rgba(0,0,0,.5); z-index: 1; }
.cart .st { position: relative; z-index: 1; font-size: 12px; letter-spacing: 1px; color: #fff; text-shadow: 0 1px 2px #000; text-align: center; }
.cart .st .off { opacity: .3; }
.cart.locked { background: repeating-linear-gradient(135deg, #151d2d 0 6px, #111827 6px 12px); }
.cart.locked::before { background: rgba(0,0,0,.25); border-color: var(--line); }
.cart.locked .ini { color: var(--dim2); font-size: 22px; text-shadow: none; }
.shelf .item { display: flex; flex-direction: column; gap: 6px; }
.shelf .item .ttl { font-size: 12px; line-height: 1.2; font-weight: 600; min-height: 2.4em; }
.shelf .item.locked .ttl { color: var(--dim2); }
.mini-shelf { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mini-shelf .cart { padding: 3px; } .mini-shelf .cart .ini { font-size: 14px; } .mini-shelf .cart .st { font-size: 7px; letter-spacing: 0; }

/* Archives */
.arch { display: flex; flex-direction: column; gap: 8px; }
.arch .day { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px; }
.arch .day b { font-size: 17px; }
.arch .day .meta { font-size: 12px; color: var(--dim); }
.arch .day .go { grid-row: 1 / span 2; grid-column: 2; padding: 10px 14px; border: 1px solid var(--cyan); color: var(--cyan); font-weight: 700; letter-spacing: .1em; font-size: 12px; clip-path: var(--cut-s); text-decoration: none; }
.arch .day .go.done { border-color: var(--line); color: var(--dim); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* Partage */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(4,7,12,.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.sheet-wrap.in { opacity: 1; } .sheet-wrap.out { opacity: 0; }
.sheet { width: 100%; max-width: 460px; max-height: 94dvh; overflow: auto; background: linear-gradient(180deg, var(--panel2), var(--bg)); border-top: 2px solid var(--hot); padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; transform: translateY(30px); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.sheet-wrap.in .sheet { transform: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-preview { display: grid; place-items: center; background: #05080e; border: 1px solid var(--line); min-height: 160px; max-height: 44dvh; overflow: hidden; }
.sheet-preview img { max-width: 100%; max-height: calc(44dvh - 2px); width: auto; height: auto; display: block; object-fit: contain; }
.sheet-preview pre { margin: 0; padding: 16px; font-family: var(--font); font-size: 15px; white-space: pre-wrap; line-height: 1.5; color: var(--ink); width: 100%; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.sbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-decoration: none; color: var(--ink); clip-path: var(--cut-s); text-align: center; }
.sbtn span { font-size: 20px; line-height: 1; }
.sbtn.main { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 10px; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; padding: 14px; background: var(--hot); border-color: var(--hot); color: #fff; }
.sbtn.main + .sbtn.main { background: var(--panel); border-color: var(--cyan); color: var(--cyan); }
.sbtn:hover { filter: brightness(1.15); }
.sheet-tip { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.45; }
.launch:disabled { opacity: .7; cursor: wait; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 8px; }
.vs b.num { display: block; font-size: 34px; line-height: 1; margin-top: 4px; }
.vs .vs-mid { font-family: var(--num); font-weight: 700; font-size: 22px; color: var(--hot); line-height: 1.3; }
.vs .vs-mid b { font-size: 11px; letter-spacing: .1em; font-family: var(--font); }

/* Chrono */
.timer { display: grid; grid-template-columns: 1fr 34px; gap: 10px; align-items: center; }
.timer .tb { height: 5px; background: #1f2a40; position: relative; overflow: hidden; }
.timer .tb i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, var(--hot), var(--cyan)); box-shadow: 0 0 10px rgba(62,232,255,.5); }
.timer span { text-align: right; font-size: 20px; color: var(--cyan); line-height: 1; }
.timer.low .tb i { background: var(--hot); box-shadow: 0 0 12px var(--hot); }
.timer.low span { color: var(--hot); animation: pulse .5s ease-in-out infinite; }

/* Bouton de validation (un tap) */
.validate { margin-top: auto; width: 100%; display: flex; align-items: baseline; justify-content: center; gap: 12px; padding: 16px; background: var(--cyan); color: #04121a; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 10px 30px -10px rgba(62,232,255,.8); transition: transform .08s, filter .15s; }
.validate small { font-size: 15px; }
.validate span { font-family: var(--num); font-size: 22px; letter-spacing: .02em; text-transform: none; }
.validate:hover { filter: brightness(1.08); }
.validate:active, .validate.sent { transform: scale(.97); }
.validate.sent { filter: saturate(.4) brightness(.8); }
.validate:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Connexion */
.auth h2 { margin: 2px 0 4px; font-size: 24px; letter-spacing: .02em; }
.auth .sub { margin: 0 0 12px; color: var(--dim); font-size: 14px; line-height: 1.45; }
.auth .sub b { color: var(--ink); }
.perks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px; margin-bottom: 8px; font-weight: 700; font-size: 15px; text-decoration: none; clip-path: var(--cut-s); position: relative; }
.auth-btn.google { background: #fff; color: #1f1f1f; }
.auth-btn.discord { background: #5865f2; color: #fff; }
.auth-btn:disabled { opacity: .45; cursor: not-allowed; }
.auth-btn small { position: absolute; right: 12px; font-size: 10px; font-weight: 600; opacity: .8; }
.or { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin: 8px 0 10px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth .field button { white-space: nowrap; }
.fine { font-size: 12px; color: var(--dim); line-height: 1.45; margin: 10px 0 0; }
.otp { width: 100%; text-align: center; font-family: var(--num); font-weight: 700; font-size: 40px; letter-spacing: .4em; padding: 12px 0 12px .4em; background: #0d1422; border: 1px solid var(--cyan); color: var(--ink); clip-path: var(--cut-s); outline: none; margin-bottom: 4px; }
.auth .duo { margin-top: 12px; }
.save-cta { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border-color: rgba(245,197,66,.5); }
.save-cta b { display: block; font-size: 15px; } .save-cta span { font-size: 13px; color: var(--dim); line-height: 1.4; }
.save-cta .btn { padding: 12px 14px; }
.ladder .row.unranked .n { color: var(--dim2); }
button.link { color: var(--cyan); text-decoration: underline; font-weight: 600; }
.acct { font-size: 12px; color: var(--dim); text-align: right; margin-top: -4px; }
.auth [data-email] { flex-direction: column; }
.auth [data-email] button { padding: 14px; }
.auth-btn small { position: static; margin-left: 4px; }

/* Classement : groupes et escouades */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex-shrink: 0; scroll-snap-align: start; font-size: 13px; font-weight: 600; padding: 9px 12px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); clip-path: var(--cut-s); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.chips button.on { color: var(--ink); border-color: var(--hot); background: rgba(255,77,61,.12); }
.chips button.add { color: var(--cyan); border-style: dashed; border-color: rgba(62,232,255,.5); }
.tabs.two { grid-template-columns: 1fr 1fr; margin-top: 10px; }
.squad-head { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-top: 10px; }
.squad-head b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.squad-head span { font-size: 12px; color: var(--dim); }
.squad-head .btn { padding: 10px 14px; }
.sheet-title { margin: 2px 0 4px; font-size: 24px; letter-spacing: .02em; }
.sheet .sub { margin: 0 0 12px; color: var(--dim); font-size: 14px; line-height: 1.45; }
.field.col { flex-direction: column; } .field.col button { padding: 14px; }
.invite-link { padding: 14px; text-align: center; background: #0d1422; border: 1px dashed rgba(62,232,255,.5); color: var(--cyan); font-size: 18px; word-break: break-all; }
.btn.danger { color: var(--wipe); border-color: rgba(255,77,61,.5); width: 100%; margin-top: 10px; }
.squad-cta { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.squad-cta b { display: block; font-size: 15px; } .squad-cta span { font-size: 13px; color: var(--dim); line-height: 1.4; }

/* Débrief : détail par cible */
.breakdown { display: flex; flex-direction: column; gap: 10px; }
.brow { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; }
.bq { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.bq .num { font-size: 16px; color: var(--v); }
.bq .mult { font-size: 11px; padding: 0 5px; }
.bmain { min-width: 0; }
.bmain b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmain span { display: block; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bbar { height: 5px; background: #1f2a40; margin-top: 5px; overflow: hidden; transform: skewX(-14deg); }
.bbar i { display: block; height: 100%; background: var(--v); box-shadow: 0 0 8px color-mix(in srgb, var(--v) 60%, transparent); }
.bpts { font-size: 20px; color: var(--v); min-width: 52px; text-align: right; }

/* Comment ça marche */
.topbar .help { margin-left: auto; margin-right: 8px; text-decoration: none; font-weight: 700; color: var(--cyan); }
.rules { display: flex; flex-direction: column; gap: 12px; }
.rules h1 { margin: 4px 0 2px; font-size: 26px; letter-spacing: .04em; }
.rules h2 { margin: 0 0 8px; font-size: 17px; letter-spacing: .04em; }
.rules p, .rules li { font-size: 14px; line-height: 1.55; color: #c9d1e0; }
.rules p { margin: 8px 0 0; } .rules ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.rules b { color: var(--ink); }
.rules .note { font-size: 12px; color: var(--dim); }
.curve { width: 100%; height: auto; display: block; margin-top: 10px; font-family: var(--num); }
.mults { display: flex; gap: 6px; flex-wrap: wrap; }
.vchips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.vchip { text-align: center; padding: 8px 2px; border: 1px solid var(--v); background: color-mix(in srgb, var(--v) 12%, transparent); }
.vchip b { display: block; font-size: 11px; color: var(--v); letter-spacing: .06em; } .vchip span { font-size: 11px; color: var(--dim); }
.legal-links { text-align: center; font-size: 12px; color: var(--dim); }
.legal-links a { color: var(--dim); }

.foot { display: grid; gap: 6px; text-align: center; font-size: 12px; color: var(--dim2); padding: 6px 0 4px; }
.foot a, .foot .link { color: var(--dim); font-weight: 500; text-decoration: none; }
.foot .link.danger { color: #b0646a; }
.bmain .bdet { white-space: normal; color: var(--dim); } .bmain .bdet b { display: inline; font-size: 12px; color: var(--ink); }

/* Texte indexable sous le lobby (rendu côté serveur) */
.seo-home { max-width: 460px; margin: 0 auto; padding: 8px 16px 110px; color: var(--dim2); font-size: 12px; line-height: 1.6; }
.seo-home h2 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 14px 0 4px; }
.seo-home p { margin: 0 0 8px; }
.seo-home a { color: var(--dim); text-decoration: none; }
.seo-home a:hover { color: var(--ink); }
body:not(.at-lobby) .seo-home { display: none; }
