/* LUCARNE : bleu nuit, accents citron vert et cyan, panneaux vitrés, titres italiques condensés */
:root {
  --bg: #060b18; --ink: #eef3ff; --muted: #8b97b8; --line: rgba(255,255,255,.09);
  --glass: rgba(12,20,40,.62); --glass2: rgba(255,255,255,.05);
  --acc: #c6ff3d; --acc2: #2de2ff; --bad: #ff5470;
  --title: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 15px/1.45 Inter, system-ui, sans-serif; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--acc); color: #000; }

#bg, #bg canvas { position: fixed; inset: 0; width: 100%; height: 100%; }
#shade { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 70% 50%, transparent 20%, rgba(6,11,24,.55) 70%), linear-gradient(90deg, rgba(6,11,24,.92) 0%, rgba(6,11,24,.55) 45%, rgba(6,11,24,.15) 100%); }
body[data-screen=game] #shade, body[data-screen=game] #bg { display: none; }
body[data-screen=room] #shade { background: linear-gradient(180deg, rgba(6,11,24,.75), rgba(6,11,24,.88)); }

.screen { display: none; position: fixed; inset: 0; }
.screen.active { display: flex; flex-direction: column; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font: italic 900 64px/1 var(--title); letter-spacing: .02em; }
.logo span { background: linear-gradient(100deg, #fff 30%, var(--acc) 75%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo i { width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--acc); box-shadow: 0 0 24px var(--acc); position: relative; top: -14px; }
.logo.small { font-size: 34px; } .logo.small i { width: 16px; height: 16px; border-width: 3px; top: -8px; }

/* panneaux et champs */
.panel { background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.lbl { display: block; font: 800 12px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.lbl:first-child { margin-top: 0; }
input, select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.3); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: var(--acc2); box-shadow: 0 0 0 3px rgba(45,226,255,.18); }
select:disabled { opacity: .6; }
.row { display: flex; gap: 8px; }
.code-in { font: italic 800 22px/1 var(--title); letter-spacing: .35em; text-align: center; text-transform: uppercase; }
.err { color: var(--bad); min-height: 1.2em; margin: 10px 0 0; font-weight: 600; }
.muted { color: var(--muted); font-size: 13px; }
.sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .15em; margin: 18px 0; }
.sep::before, .sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.btn { border: 1px solid var(--line); background: var(--glass2); padding: 12px 18px; border-radius: 12px; cursor: pointer; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; font-size: 13px; white-space: nowrap; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:hover:not(:disabled) { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--acc); color: #071000; border-color: transparent; box-shadow: 0 8px 30px rgba(198,255,61,.25); }
.btn.primary:hover:not(:disabled) { background: #d6ff6e; box-shadow: 0 10px 36px rgba(198,255,61,.4); }
.btn.ghost { background: transparent; }
.btn.big { width: 100%; padding: 16px; font: italic 800 22px/1 var(--title); letter-spacing: .06em; }
.btn.mini { padding: 7px 12px; font-size: 11px; border-radius: 9px; }
#solo { width: 100%; margin-top: 10px; }

/* accueil */
#home { padding: 6vh 6vw; justify-content: center; gap: 28px; }
.brand p { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.home-grid { display: grid; grid-template-columns: 380px minmax(0, 520px); gap: 20px; align-items: start; }
.hint { color: var(--muted); font-size: 13px; }

/* cartes de stade */
.stads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stad { position: relative; text-align: left; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-height: 104px; cursor: pointer;
  background: linear-gradient(160deg, var(--g1), var(--g2)); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .15s, border-color .15s, box-shadow .15s; }
.stad::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 70%); }
.stad > * { position: relative; z-index: 1; }
.stad b { font: italic 800 22px/1.05 var(--title); text-transform: uppercase; }
.stad small { color: rgba(255,255,255,.72); font-size: 12px; }
.stad .fmt { position: absolute; top: 10px; right: 10px; font: italic 800 15px/1 var(--title); background: rgba(0,0,0,.45); padding: 5px 8px; border-radius: 7px; color: var(--acc); }
.stad:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.25); }
.stad.sel { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc), 0 10px 30px rgba(198,255,61,.18); }
.th-mountain { --g1: #23407a; --g2: #0b1430; }
.th-harbor { --g1: #e0743a; --g2: #4a1f3c; }
.th-rooftop { --g1: #8b2bd9; --g2: #120a2e; }
.th-street { --g1: #a1502e; --g2: #241612; }
.stads.compact { grid-template-columns: 1fr 1fr; }
.stads.compact .stad { min-height: 72px; padding: 10px; }
.stads.compact .stad b { font-size: 16px; } .stads.compact .stad small { display: none; }
.stads.locked .stad { cursor: default; } .stads.locked .stad:not(.sel) { opacity: .45; }

/* salon */
#room { padding: 22px 28px; gap: 18px; }
.room-top { display: flex; align-items: center; gap: 24px; }
.code-box { margin-left: auto; display: flex; align-items: center; gap: 14px; background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px 8px 18px; }
.code-box small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.code-box b { font: italic 900 34px/1 var(--title); letter-spacing: .2em; color: var(--acc); }
.room-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 360px; gap: 18px; }
.teams { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 18px; min-height: 0; }
.team { --kit: #888; position: relative; overflow: hidden; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.team::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--kit); box-shadow: 0 0 30px var(--kit); }
.team .crest { position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--kit), transparent 70%); opacity: .2; }
.team h3 { margin: 0; display: flex; align-items: center; gap: 10px; font: italic 800 30px/1 var(--title); text-transform: uppercase; }
.team h3 input { font: inherit; padding: 4px 8px; background: transparent; border-color: transparent; }
.team h3 input:hover { border-color: var(--line); }
.count { margin-left: auto; font: 800 13px/1 Inter, sans-serif; background: rgba(255,255,255,.08); padding: 6px 10px; border-radius: 999px; font-style: normal; color: var(--muted); }
.team ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; overflow: auto; }
.team li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); font-weight: 600; }
.team li.me { background: rgba(198,255,61,.1); box-shadow: inset 0 0 0 1px rgba(198,255,61,.4); }
.team li em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--acc2); text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--kit); color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.bench .av { background: #334; }
.team > .btn { align-self: stretch; }
.bench { grid-column: 1 / 3; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 20px; }
.bench::before { display: none; }
.bench h3 { font-size: 20px; } .bench ul { flex-direction: row; flex-wrap: wrap; flex: 1; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 24px; height: 24px; border-radius: 50%; background: var(--c); cursor: pointer; border: 2px solid rgba(255,255,255,.15); transition: transform .12s; }
.swatch:hover { transform: scale(1.15); }
.swatch.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.swatch.off { opacity: .2; cursor: not-allowed; }
.side { display: flex; flex-direction: column; overflow: auto; }
.settings { margin-bottom: 18px; }
.seg { display: flex; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--acc2); color: #001218; }
.seg button:disabled:not(.on) { opacity: .4; cursor: default; }
.seg button:disabled.on { cursor: default; }
#lastResult { margin: 12px 0 0; }
.chat { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
#chatLog { flex: 1; overflow: auto; font-size: 13px; display: flex; flex-direction: column; gap: 4px; max-height: 200px; }
#chatLog b, #gameChatLog b { color: var(--acc2); margin-right: 4px; }

/* match */
#view, #view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: absolute; inset: 0; pointer-events: none; user-select: none; }
.scorebug { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: stretch; height: 46px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); font: italic 800 22px/1 var(--title); text-transform: uppercase; }
.sb-team { --kit: #888; display: flex; align-items: center; background: rgba(8,13,28,.85); backdrop-filter: blur(10px); }
.sb-team span { padding: 0 16px; min-width: 130px; letter-spacing: .04em; }
.sb-team.t0 span { text-align: right; border-left: 6px solid var(--kit); }
.sb-team.t1 span { border-right: 6px solid var(--kit); }
.sb-team b { background: var(--kit); color: #fff; width: 48px; height: 100%; display: grid; place-items: center; font-size: 28px; text-shadow: 0 2px 4px rgba(0,0,0,.4); }
.sb-clock { background: var(--acc); color: #071000; display: grid; place-items: center; padding: 0 14px; min-width: 76px; font-size: 22px; font-style: normal; font-variant-numeric: tabular-nums; }
#feed { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
#feed div { background: rgba(8,13,28,.7); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; animation: fade .2s; }
#toast { --kit: var(--acc); position: absolute; top: 28%; left: 50%; transform: translate(-50%, -50%) scale(.9); opacity: 0; transition: opacity .2s, transform .25s; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#toast b { display: block; font: italic 900 96px/1 var(--title); text-transform: uppercase; color: #fff; text-shadow: 0 0 40px var(--kit), 0 6px 0 rgba(0,0,0,.35); letter-spacing: .02em; }
#toast small { display: inline-block; margin-top: 10px; padding: 6px 16px; background: var(--kit); color: #fff; border-radius: 8px; font: italic 800 22px/1 var(--title); text-transform: uppercase; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
#toast.small b { font-size: 40px; }
#toast.small small { font-size: 16px; }
#lockHint { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); background: rgba(8,13,28,.8); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; border: 1px solid rgba(198,255,61,.4); display: none; }
#lockHint.show { display: block; }
.bottom-left { position: absolute; left: 18px; bottom: 18px; }
#mini { display: block; background: rgba(8,13,28,.7); border-radius: 12px; border: 1px solid var(--line); }
.meta { margin-top: 6px; font-size: 11px; color: var(--muted); font-weight: 600; }
.bars { position: absolute; right: 18px; bottom: 18px; width: 260px; display: flex; flex-direction: column; gap: 8px; }
.bar label { display: block; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.bar div { height: 8px; background: rgba(8,13,28,.75); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc2), #7cf3ff); border-radius: 99px; }
@keyframes pulse { to { filter: brightness(1.6); box-shadow: 0 0 12px #ffb000; } }
.pow { opacity: 0; transition: opacity .1s; } .pow.on { opacity: 1; }
#pow { background: linear-gradient(90deg, var(--acc), #ffd84d, var(--bad)); transition: none; }
#hud.spect .bars, #hud.spect #lockHint { display: none; }
#controls { position: absolute; top: 18px; left: 18px; width: 330px; background: rgba(8,13,28,.82); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; transition: opacity .25s, transform .25s; }
#controls.hide { opacity: 0; transform: translateX(-10px); }
#controls h4 { margin: 0 0 8px; font: italic 800 20px/1 var(--title); text-transform: uppercase; }
#controls h4 small { font: 600 11px Inter, sans-serif; color: var(--muted); text-transform: none; margin-left: 6px; }
#controls ul { list-style: none; margin: 0; padding: 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; }
kbd { display: inline-block; min-width: 22px; padding: 2px 6px; margin-right: 3px; border-radius: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-bottom-width: 2px; font: 700 11px Inter, sans-serif; text-align: center; }
#gameChat { position: absolute; left: 18px; bottom: 200px; width: 320px; pointer-events: auto; }
#gameChatLog { display: flex; flex-direction: column; gap: 3px; font-size: 13px; opacity: 0; transition: opacity .3s; }
#gameChatLog div { background: rgba(8,13,28,.65); padding: 4px 10px; border-radius: 8px; width: fit-content; }
#gameChat.recent #gameChatLog, #gameChat.typing #gameChatLog { opacity: 1; }
#gameChatIn { margin-top: 6px; padding: 8px 12px; display: none; background: rgba(8,13,28,.85); }
#gameChat.typing #gameChatIn { display: block; }
#menu { position: absolute; inset: 0; display: none; place-items: center; background: rgba(4,8,18,.55); backdrop-filter: blur(6px); }
#menu.show { display: grid; }
#menu .panel { width: 340px; display: flex; flex-direction: column; gap: 10px; }
#menu h3 { margin: 0; font: italic 900 40px/1 var(--title); text-transform: uppercase; }
#menu input[type=range] { padding: 0; accent-color: var(--acc); background: none; border: 0; }

#loading { position: fixed; inset: 0; z-index: 9; display: grid; place-content: center; text-align: center; background: var(--bg); transition: opacity .4s; }
#loading p { color: var(--muted); }
#loading.done { opacity: 0; pointer-events: none; }

@media (max-width: 960px) {
  .home-grid, .room-grid { grid-template-columns: 1fr; }
  html, body { overflow: auto; }
  .screen { position: absolute; min-height: 100%; }
}


/* comptes (accueil) */
.acct[hidden] { display: none; }
.acct { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.acct .row .btn { flex: 1; }
#acctIn { flex-direction: row; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
#acctIn b { color: var(--acc); }
input:disabled { opacity: .7; }

/* caisses de skins */
.cases-btn { width: 100%; margin-top: 8px; border: 0; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  background: linear-gradient(90deg, #ff3ea5, #b44dff, #3b6cff, #2de2ff, #3ddc84, #ffb020); background-size: 300% 100%; animation: rainbow 6s linear infinite; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .row2 .btn { margin-top: 8px; }
.inv-btn { border: 1px solid var(--line); }
body[data-screen=inventory] #shade { background: radial-gradient(ellipse at 50% 40%, rgba(40,10,70,.55), rgba(6,11,24,.94) 70%); }
.inv-body { flex: 1; display: flex; justify-content: center; align-items: start; padding: 10px 40px; }
.inv-body .inv { width: min(900px, 100%); }
.inv-body .inv-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-height: 66vh; }
.case-pick { display: grid; gap: 10px; }
.case-pick button { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 12px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text, #fff); cursor: pointer; }
.case-pick button i { grid-row: span 2; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font: italic 900 24px/1 var(--title); font-style: normal;
  background: linear-gradient(135deg, #ff3ea5, #b44dff 40%, #3b6cff 75%, #2de2ff); }
.case-pick button b { font-weight: 800; } .case-pick button small { color: #ffd36b; font-weight: 700; }
.case-pick button.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 0 18px rgba(198,255,61,.3); background: rgba(198,255,61,.08); }
@keyframes rainbow { to { background-position: 300% 0; } }
body[data-screen=cases] #shade { background: radial-gradient(ellipse at 50% 40%, rgba(40,10,70,.55), rgba(6,11,24,.94) 70%); }
.cases-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 40px; }
.coins { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.coins i { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6b0, #ffb020 55%, #b86b00); box-shadow: 0 0 12px rgba(255,176,32,.6); }
.coins b { font: italic 900 26px/1 var(--title); color: #ffd36b; }
.cases-body { flex: 1; display: grid; grid-template-columns: minmax(220px, 280px) minmax(300px, 400px) minmax(240px, 300px); gap: 28px; justify-content: center; align-items: start; padding: 10px 40px; }
.case-card { text-align: center; }
.case-card h2 { margin: 8px 0 14px; font: italic 900 34px/1 var(--title); letter-spacing: .04em; }
.case-note { color: var(--muted); font-size: 13px; margin: 10px 0 0; min-height: 1em; }
.crate { position: relative; height: 230px; display: grid; place-items: center; perspective: 600px; }
.crate .box { width: 190px; height: 130px; margin-top: 50px; border-radius: 14px; display: grid; place-items: center; position: relative; z-index: 2;
  background: linear-gradient(135deg, #ff3ea5 0%, #b44dff 30%, #3b6cff 60%, #2de2ff 100%);
  box-shadow: inset 0 -14px 0 rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.4), 0 18px 50px rgba(180,77,255,.55); animation: float 3s ease-in-out infinite; }
.crate .box::before { content: ''; position: absolute; inset: 0 44%; background: linear-gradient(#ffe27a, #ffb020); box-shadow: 0 0 14px #ffb020; }
.crate .box span { position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: #0b1230; border: 3px solid #ffd36b;
  font: italic 900 36px/1 var(--title); color: var(--acc); box-shadow: 0 0 18px rgba(198,255,61,.6); }
.crate .lid { position: absolute; top: 52px; width: 210px; height: 40px; border-radius: 12px; z-index: 3;
  background: linear-gradient(135deg, #ff6fc0, #c77dff 40%, #5b86ff 75%, #5feaff); box-shadow: inset 0 -6px 0 rgba(0,0,0,.2); animation: float 3s ease-in-out infinite; }
.crate .lid::before { content: ''; position: absolute; inset: 0 44%; background: linear-gradient(#ffe27a, #ffb020); }
.crate .rays { position: absolute; inset: 0; z-index: 1; border-radius: 50%; filter: blur(6px); opacity: .55;
  background: conic-gradient(from 0deg, #ff3ea5, #ffb020, #3ddc84, #2de2ff, #3b6cff, #b44dff, #ff3ea5); mask: radial-gradient(circle, #000 0 30%, transparent 62%);
  -webkit-mask: radial-gradient(circle, #000 0 30%, transparent 62%); animation: spin 9s linear infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.crate.shake .box, .crate.shake .lid { animation: shake .12s linear infinite; }
@keyframes shake { 25% { transform: translate(-3px, 1px) rotate(-1deg); } 75% { transform: translate(3px, -1px) rotate(1deg); } }
#oddsList { display: grid; gap: 8px; }
.odd { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 75%); border-left: 3px solid var(--c); }
.odd i { width: 14px; height: 14px; transform: rotate(45deg); border-radius: 3px; background: var(--c); box-shadow: 0 0 10px var(--c); }
.odd b { font-weight: 800; } .odd small { color: var(--muted); font-weight: 600; }

/* bande qui défile */
.spinner { position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 220px; z-index: 20;
  background: linear-gradient(180deg, rgba(6,11,24,.0), rgba(6,11,24,.92) 12%, rgba(6,11,24,.92) 88%, rgba(6,11,24,0)); }
.spinner .track { position: absolute; inset: 20px 0; overflow: hidden;
  mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.strip { display: flex; gap: 8px; height: 100%; will-change: transform; }
.spinner .marker { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 4px; margin-left: -2px; border-radius: 2px; background: #fff;
  box-shadow: 0 0 12px #fff, 0 0 30px var(--acc); }
.spinner .marker::before, .spinner .marker::after { content: ''; position: absolute; left: -8px; border: 10px solid transparent; }
.spinner .marker::before { top: -6px; border-top-color: #fff; } .spinner .marker::after { bottom: -6px; border-bottom-color: #fff; }
.tile { flex: 0 0 150px; height: 100%; border-radius: 12px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--c) 70%, #fff 0%) 0%, color-mix(in srgb, var(--c) 45%, #0b1230) 45%, #0b1230 100%);
  border: 2px solid color-mix(in srgb, var(--c) 70%, transparent); box-shadow: inset 0 -5px 0 var(--c); }
.tile .gem { width: 58px; height: 58px; transform: rotate(45deg); border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #fff, var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000)); box-shadow: 0 0 22px var(--c); }
.tile .gem b { transform: rotate(-45deg); font: italic 900 30px/1 var(--title); color: #0b1230; }
.tile small { font: italic 800 15px/1 var(--title); letter-spacing: .05em; text-transform: uppercase; text-shadow: 0 1px 3px #000; }

/* révélation */
.reveal { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, rgba(6,11,24,.9)), rgba(6,11,24,.96) 65%); animation: fade .3s ease; }
.reveal[hidden] { display: none; }
.reveal .burst { position: absolute; width: 900px; height: 900px; border-radius: 50%; opacity: .5;
  background: repeating-conic-gradient(var(--c) 0 6deg, transparent 6deg 18deg); mask: radial-gradient(circle, #000 0 15%, transparent 60%);
  -webkit-mask: radial-gradient(circle, #000 0 15%, transparent 60%); animation: spin 14s linear infinite; }
.tile.big { flex: none; width: 240px; height: 270px; z-index: 1; animation: pop .55s cubic-bezier(.2,1.6,.4,1); }
.tile.big .gem { width: 100px; height: 100px; } .tile.big .gem b { font-size: 52px; } .tile.big small { font-size: 22px; }
@keyframes pop { from { transform: scale(.3) rotate(-8deg); opacity: 0; } }
.reveal h3 { z-index: 1; margin: 12px 0 0; font: italic 900 44px/1 var(--title); color: var(--c); text-shadow: 0 0 24px var(--c); text-transform: uppercase; }
.reveal p { z-index: 1; margin: 0 0 10px; color: var(--muted); }
.reveal .btn { z-index: 1; }
#revealSell { margin-bottom: 8px; } #revealSell[hidden] { display: none; }
.confetti { position: fixed; top: -20px; width: 10px; height: 16px; z-index: 31; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
#cases.spinning .cases-body { opacity: .18; filter: blur(3px); transition: opacity .4s, filter .4s; pointer-events: none; }
.tile .gem { margin: 8px 0 10px; }
.tile.big { gap: 12px; } .tile.big .gem { margin: 26px 0 30px; }

.inv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; }
.inv-list .empty { grid-column: 1 / -1; color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }
.inv-item { display: flex; flex-direction: column; gap: 6px; }
.inv-item .tile { flex: none; height: 110px; position: relative; } .inv-item .tile .gem { width: 40px; height: 40px; margin: 4px 0 6px; } .inv-item .tile small { font-size: 12px; }
.inv-item .n { position: absolute; top: 6px; right: 8px; font: italic 900 16px/1 var(--title); text-shadow: 0 1px 3px #000; }
.inv-item .btn { padding: 6px 4px; font-size: 10px; }
/* skin ami : sa photo dans un médaillon rond à la place de la pierre */
.tile .gem.photo { transform: none; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #3a4670, #141a30) ; background-position: center; background-size: cover; background-repeat: no-repeat; box-shadow: 0 0 0 3px var(--c), 0 0 18px var(--c); }
.inv-item .btn.mini.on { background: #c6ff3d; color: #0b1230; }

/* caisse d'émotes : l'émoji tient lieu de gemme ; barre d'émotes en match (touche B) */
.tile .gem.emo { transform: none; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #3a4670, #141a30); box-shadow: 0 0 0 3px var(--c); }
.tile .gem.emo b { transform: none; font: 34px/1 system-ui; } .tile.big .gem.emo b { font-size: 60px; } .inv-item .tile .gem.emo b { font-size: 22px; }
.emo-note { color: var(--muted, #9aa); font-size: 11px; }
#caseTabs { justify-content: center; margin-bottom: 6px; }
#emoteBar { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); display: flex; gap: 8px; padding: 8px 10px; border-radius: 16px; background: rgba(8,12,24,.75); z-index: 20; }
#emoteBar button { width: 54px; height: 54px; border-radius: 12px; border: 0; background: rgba(255,255,255,.08); font: 28px/1 system-ui; position: relative; cursor: pointer; }
#emoteBar button small { position: absolute; top: 2px; left: 5px; font: 700 11px system-ui; color: #ffd36b; }
#emoteBar p { margin: 0; color: #cfd6ea; font: 14px system-ui; padding: 6px 8px; }
#emoteBar[hidden] { display: none; }

/* tableau des stats (Tab maintenu) */
#board { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 6; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: min(860px, 92vw);
  background: rgba(8,13,28,.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); border: 1px solid var(--line); border-radius: 18px; padding: 18px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
#board .team { background: rgba(8,13,28,.38); backdrop-filter: none; -webkit-backdrop-filter: none; }
#board[hidden] { display: none; }
body:has(#board:not([hidden])) #controls { visibility: hidden; } /* le fond du tableau est translucide */
#board .team h3 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--kit) 55%, transparent), transparent); border-left: 4px solid var(--kit); font: italic 900 22px/1 var(--title); text-transform: uppercase; }
#board .team h3 b { font-size: 30px; }
#board .row { display: grid; grid-template-columns: 1fr 52px 76px; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
#board .row:nth-child(odd):not(.head) { background: rgba(255,255,255,.04); }
#board .row span:not(:first-child) { text-align: center; font-weight: 800; }
#board .row.head { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
#board .row.me { background: rgba(198,255,61,.14); outline: 1px solid rgba(198,255,61,.5); }
#board .row i { display: inline-block; width: 24px; margin-right: 6px; color: var(--muted); font-style: normal; font-weight: 700; }
