/* Garage de nuit : asphalte graphite, accent ambre « phare », typographie large façon badge de coffre.
   Thème sombre assumé (une seule ambiance, comme un jeu). */
:root {
  --bg: #0b0c0f;
  --bg-2: #121419;
  --bg-3: #191c23;
  --line: #262a34;
  --fg: #eeece6;
  --mut: #8d929e;
  --dim: #5b606b;
  --amber: #ffb21a;
  --amber-2: #ff8a00;
  --red: #e8362f;
  --ok: #38c172;

  --rC: #8a8f99; --rU: #38c172; --rR: #3d8bff; --rE: #a35bff; --rL: #f5b83d; --rM: #ff5fa2;

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Chakra Petch", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 14px;
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--fg); }
body {
  font-family: var(--f-body); font-size: 15px; line-height: 1.45; margin: 0;
  -webkit-font-smoothing: antialiased; min-height: 100%;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(255,178,26,.10), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 2px, transparent 2px 120px),
    var(--bg);
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 50; background: var(--bg); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }

/* ---------- Barre du haut ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: rgba(11,12,15,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 14px; padding-block: 10px; }
.logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--fg); margin-right: auto; }
.logo b { font-family: var(--f-display); font-weight: 900; font-stretch: 125%; font-style: italic; font-size: 24px; letter-spacing: -.5px; }
.logo b i { color: var(--amber); font-style: inherit; }
.logo span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .25em; color: var(--mut); text-transform: uppercase; }
.tabs { display: flex; gap: 4px; }
.tabs a { position: relative; text-decoration: none; color: var(--mut); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.tabs a:hover { color: var(--fg); background: var(--bg-3); }
.tabs a[aria-current="page"] { color: var(--fg); background: var(--bg-3); box-shadow: inset 0 -2px 0 var(--amber); }
.badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font: 700 11px/17px var(--f-mono); text-align: center; }
.gauges { display: flex; gap: 8px; align-items: center; }
.pill { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 18px; background: var(--bg-3); border: 1px solid var(--line); font-family: var(--f-mono); font-weight: 600; font-size: 14px; white-space: nowrap; }
.pill svg { width: 16px; height: 16px; flex: none; }
.fuel-bar { width: 44px; height: 6px; border-radius: 3px; background: #2a2e38; overflow: hidden; }
.fuel-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--amber)); border-radius: 3px; }
.pill small { color: var(--mut); font-weight: 500; font-size: 11px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line); color: var(--mut); }
.icon-btn:hover { color: var(--fg); }
.icon-btn svg { width: 18px; height: 18px; }

/* barre du bas (téléphone) */
.botnav { display: none; }
@media (max-width: 760px) {
  .tabs, .logo span, .pill small, #soundBtn { display: none; }
  .top .wrap { gap: 8px; }
  .logo b { font-size: 21px; }
  .pill { height: 32px; padding: 0 10px; font-size: 13px; }
  .fuel-bar { width: 30px; }
  .botnav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0; z-index: 40;
    background: rgba(14,15,19,.95); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px var(--gut-r) calc(6px + env(safe-area-inset-bottom, 0px)) var(--gut-l);
  }
  .botnav a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--mut); text-decoration: none; font-size: 11px; font-weight: 600; }
  .botnav a svg { width: 22px; height: 22px; }
  .botnav a[aria-current="page"] { color: var(--amber); }
  .botnav .badge { right: calc(50% - 22px); }
  main { padding-bottom: 90px; }
}

main { padding-block: 22px 60px; }
.view[hidden] { display: none !important; }
.section { margin-top: 36px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-head h2 { font-size: 22px; font-weight: 800; font-stretch: 112%; letter-spacing: -.2px; }
.eyebrow { font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); }
.muted { color: var(--mut); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button { padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--mut); }
.seg button[aria-pressed="true"] { background: var(--bg-3); color: var(--fg); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 24px; font-weight: 800; font-stretch: 110%; font-size: 16px; }
.btn-amber { background: linear-gradient(180deg, #ffc23d, var(--amber-2)); color: #1b1203; box-shadow: 0 8px 28px rgba(255,150,0,.25), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-amber:hover { filter: brightness(1.06); }
.btn-amber:disabled { background: var(--bg-3); color: var(--dim); box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: var(--bg-3); border: 1px solid var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: #3a3f4c; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 18px; }
.btn .sep { width: 1px; height: 20px; background: currentColor; opacity: .3; }
.btn .cost { font-family: var(--f-mono); font-weight: 600; font-size: 14px; }

/* ---------- Pack du jour ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: center;
  padding: 28px 32px; border-radius: 22px; overflow: hidden;
  background: radial-gradient(500px 300px at 15% 50%, color-mix(in srgb, var(--pc, #f2a516) 28%, transparent), transparent 70%), linear-gradient(180deg, #15171d, #0f1014);
  border: 1px solid var(--line);
}
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(-55deg, rgba(255,255,255,.018) 0 14px, transparent 14px 28px); }
.hero .pack { --pw: 150px; }
.hero h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 900; font-stretch: 125%; font-style: italic; line-height: .95; letter-spacing: -1px; margin: 8px 0 10px; }
.hero p { margin: 0 0 18px; color: var(--mut); max-width: 46ch; }
.hero .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero .chips { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-size: 12px; color: var(--mut); }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 24px 18px; gap: 16px; } .hero p { margin-inline: auto; } .hero .row, .hero .chips { justify-content: center; } .hero .pack { --pw: 120px; } }

/* bandeau d'état */
.status { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); text-decoration: none; color: var(--fg); }
.stat .ic { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-3); color: var(--amber); }
.stat .ic svg { width: 18px; height: 18px; }
.stat b { font-family: var(--f-mono); font-size: 18px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--mut); }
@media (max-width: 900px) { .status { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .status { grid-template-columns: repeat(2, 1fr); } .status .stat:last-child { grid-column: span 2; } }

/* ---------- Packs ---------- */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.ptile { display: grid; justify-items: center; gap: 10px; padding: 18px 12px 14px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); text-align: center; transition: transform .15s, border-color .15s; }
.ptile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--pc) 55%, var(--line)); }
.ptile .pack { --pw: 104px; }
.ptile h3 { font-size: 16px; font-weight: 800; font-stretch: 110%; }
.ptile p { margin: -6px 0 0; font-size: 12px; color: var(--mut); }
.ptile .cost-tag { font-family: var(--f-mono); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg-3); color: var(--fg); display: inline-flex; gap: 6px; align-items: center; }
.ptile .cost-tag svg { width: 13px; height: 13px; }
@media (max-width: 420px) { .packs { grid-template-columns: repeat(2, 1fr); gap: 10px; } .ptile .pack { --pw: 88px; } }

/* le sachet */
.pack {
  --pw: 120px; --pc: #f2a516; position: relative; width: var(--pw); aspect-ratio: .68; border-radius: calc(var(--pw) * .06);
  font-size: calc(var(--pw) / 10);
  background:
    linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 45%, transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, color-mix(in srgb, var(--pc) 85%, #fff), var(--pc) 40%, color-mix(in srgb, var(--pc) 55%, #000));
  background-size: 250% 100%, auto, auto;
  box-shadow: 0 calc(var(--pw) * .08) calc(var(--pw) * .2) rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.18);
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; padding: 1.3em .6em .9em; color: #fff;
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { background-position: 120% 0, 0 0, 0 0; } 50% { background-position: -20% 0, 0 0, 0 0; } }
.pack::before, .pack::after { content: ""; position: absolute; left: 0; right: 0; height: .7em; background: radial-gradient(circle at 50% 0, transparent .22em, color-mix(in srgb, var(--pc) 60%, #000) .24em) 0 0 / .55em .7em repeat-x; }
.pack::before { top: 0; transform: scaleY(-1); border-radius: inherit; }
.pack::after { bottom: 0; }
.pack .brandmark { font-family: var(--f-display); font-weight: 900; font-stretch: 125%; font-style: italic; font-size: 1.05em; letter-spacing: .02em; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.pack .brandmark i { font-style: inherit; color: #1b1203; }
.plate { align-self: center; display: flex; width: 92%; height: 2.4em; border-radius: .35em; background: #f4f3ee; color: #111; box-shadow: 0 .15em .4em rgba(0,0,0,.4), inset 0 0 0 .1em #222; overflow: hidden; }
.plate .eu { width: 1.35em; background: #1f45b5; color: #fff; display: grid; place-items: center; font: 700 .62em/1 var(--f-mono); padding-top: .9em; position: relative; letter-spacing: -.02em; }
.plate .eu::before { content: ""; position: absolute; top: .3em; width: .8em; height: .8em; border-radius: 50%; border: .12em dotted #ffd400; }
.plate .tx { flex: 1; display: grid; place-items: center; font: 700 .95em/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; padding: 0 .2em; }
.pack .cnt { font: 600 .62em var(--f-mono); letter-spacing: .15em; text-transform: uppercase; opacity: .9; }

/* ---------- Cartes ---------- */
.card {
  --cw: 180px; --rc: var(--rC);
  position: relative; width: var(--cw); aspect-ratio: 5 / 7; border-radius: calc(var(--cw) * .06);
  font-size: calc(var(--cw) / 16); padding: .22em; background: var(--rc); color: var(--fg);
  box-shadow: 0 .6em 1.4em rgba(0,0,0,.45); transition: transform .2s; text-align: left;
}
.card.r-U { --rc: var(--rU); box-shadow: 0 .6em 1.4em rgba(0,0,0,.45), 0 0 0 1px rgba(56,193,114,.35); }
.card.r-R { --rc: var(--rR); box-shadow: 0 .6em 1.4em rgba(0,0,0,.45), 0 0 1.2em rgba(61,139,255,.35); }
.card.r-E { --rc: var(--rE); box-shadow: 0 .6em 1.4em rgba(0,0,0,.45), 0 0 1.4em rgba(163,91,255,.45); }
.card.r-L { --rc: linear-gradient(135deg, #8a5a12, #ffd36b 30%, #b07a1c 55%, #ffe39a 75%, #8a5a12); box-shadow: 0 .6em 1.4em rgba(0,0,0,.45), 0 0 1.8em rgba(245,184,61,.55); }
.card.r-M { --rc: conic-gradient(from var(--ang), #ff5f6d, #ffc371, #f9f871, #5ef2a8, #4fc3ff, #a77bff, #ff5fa2, #ff5f6d); box-shadow: 0 .6em 1.4em rgba(0,0,0,.45), 0 0 2em rgba(255,120,200,.5); animation: spin 4s linear infinite; }
@keyframes spin { to { --ang: 360deg; } }
.card .in { position: relative; height: 100%; border-radius: calc(var(--cw) * .045); overflow: hidden; display: grid; grid-template-rows: auto auto 1fr auto auto;
  background: radial-gradient(120% 70% at 50% 45%, color-mix(in srgb, var(--tint, #8a8f99) 22%, #1b1e25), #0d0e12 75%); }
.card.r-C .in { --tint: #8a8f99; } .card.r-U .in { --tint: #38c172; } .card.r-R .in { --tint: #3d8bff; }
.card.r-E .in { --tint: #a35bff; } .card.r-L .in { --tint: #f5b83d; } .card.r-M .in { --tint: #ff7ac0; }
.card .hd { display: flex; align-items: center; gap: .4em; padding: .55em .6em 0; }
.card .nm { flex: 1; min-width: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 105%; font-size: 1.12em; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .rb { flex: none; width: 1.55em; height: 1.55em; border-radius: 50%; display: grid; place-items: center; font: 700 .8em/1 var(--f-mono); background: var(--rc); color: #0b0c0f; box-shadow: inset 0 0 0 .12em rgba(255,255,255,.35); }
.card .br { padding: .1em .6em 0; font-size: .74em; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.card .art { position: relative; display: grid; place-items: center; padding: 0 .2em; min-height: 0; }
.card .art::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 22%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); }
.card .art svg { width: 108%; height: auto; max-width: none; filter: drop-shadow(0 .3em .4em rgba(0,0,0,.4)); }
.card .meta { display: flex; justify-content: space-between; align-items: center; padding: 0 .6em .35em; font: 500 .66em var(--f-mono); color: var(--mut); }
.card .meta .cc { padding: .05em .45em; border-radius: .3em; background: #f4f3ee; color: #111; font-weight: 700; }
.card .st { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(0,0,0,.45); border-top: 1px solid rgba(255,255,255,.06); }
.card .st div { padding: .42em .2em .45em; text-align: center; font: 700 .9em/1 var(--f-mono); }
.card .st div + div { border-left: 1px solid rgba(255,255,255,.06); }
.card .st small { display: block; font-size: .62em; font-weight: 500; color: var(--mut); letter-spacing: .08em; margin-top: .25em; }
/* reflet holo */
.card.r-E .in::after, .card.r-L .in::after, .card.r-M .in::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .22;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.55) 40%, rgba(160,120,255,.4) 48%, transparent 60%) var(--hx, 50%) 0 / 250% 100%;
  animation: holo 5s ease-in-out infinite;
}
.card.r-L .in::after { opacity: .3; }
.card.r-M .in::after { opacity: .45; background: linear-gradient(115deg, transparent 20%, #ff5f6d55 30%, #f9f87166 40%, #5ef2a866 50%, #4fc3ff66 60%, #a77bff55 70%, transparent 80%) 0 0 / 250% 100%; }
@keyframes holo { 0%, 100% { background-position: 110% 0; } 50% { background-position: -10% 0; } }
.card .tag { position: absolute; top: -.7em; left: 50%; transform: translateX(-50%); z-index: 2; padding: .2em .7em; border-radius: 999px; background: #fff; color: #111; font: 800 .72em/1.2 var(--f-body); white-space: nowrap; box-shadow: 0 .2em .5em rgba(0,0,0,.4); }
.card .tag.dup { background: var(--bg-3); color: var(--fg); border: 1px solid var(--line); }
.card .qty { position: absolute; bottom: 2.9em; right: .55em; z-index: 2; padding: .1em .45em; border-radius: .4em; background: rgba(0,0,0,.65); font: 700 .72em var(--f-mono); color: var(--fg); }
/* carte manquante */
.card.missing { background: #23262e; box-shadow: none; animation: none; }
.card.missing .in { background: #121318; }
.card.missing .in::after { display: none; }
.card.missing .art svg { color: #1f222a; filter: none; }
.card.missing .nm, .card.missing .br { color: var(--dim); }
.card.missing .rb { background: #2a2d35; color: var(--mut); }
.card.missing .st div { color: var(--dim); }
/* dos de carte */
.cback { position: absolute; inset: 0; border-radius: calc(var(--cw) * .06); overflow: hidden; background: #15161b; backface-visibility: hidden; transform: rotateY(180deg); box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,241,184,.25); }
.cback svg { display: block; width: 100%; height: 100%; }
.cback::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 45%, transparent 60%); background-size: 250% 100%; animation: cbshine 3.5s ease-in-out infinite; }
@keyframes cbshine { 0% { background-position: 120% 0; } 60%, 100% { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) { .cback::after { animation: none; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--gcw, 170px), 1fr)); gap: 18px 14px; justify-items: center; }
.cell { width: 100%; container-type: inline-size; padding: 0; text-align: left; }
.cell .card { --cw: 100cqw; }
.cell:hover .card { transform: translateY(-4px) rotate(-.4deg); }
@media (max-width: 520px) { .grid { --gcw: 140px; gap: 14px 10px; } }

/* ---------- Collection ---------- */
.coll-head { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; padding: 24px 26px; border-radius: 22px; background: linear-gradient(180deg, #15171d, #0f1014); border: 1px solid var(--line); }
.coll-head h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 900; font-stretch: 125%; font-style: italic; letter-spacing: -.8px; }
.bigbar { height: 10px; border-radius: 5px; background: #22252e; overflow: hidden; margin-top: 12px; }
.bigbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber-2), var(--amber)); border-radius: 5px; }
.rbreak { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.rbreak span { font: 600 12px var(--f-mono); padding: 3px 8px; border-radius: 8px; background: var(--bg-3); border: 1px solid var(--line); }
.rbreak span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.coll-head .score { text-align: right; }
.coll-head .score b { font: 700 34px/1 var(--f-mono); color: var(--amber); display: block; }
@media (max-width: 640px) { .coll-head { grid-template-columns: 1fr; } .coll-head .score { text-align: left; } }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0; }
.search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--fg); font: inherit; outline: none; }
.search svg { width: 16px; height: 16px; color: var(--mut); flex: none; }
select.sel { height: 40px; padding: 0 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--fg); font: inherit; }
.rchips { display: flex; gap: 6px; flex-wrap: wrap; }
.rchip { height: 32px; min-width: 34px; padding: 0 10px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); font: 700 13px var(--f-mono); color: var(--mut); }
.rchip[aria-pressed="true"] { color: #0b0c0f; background: var(--c); border-color: transparent; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.album { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); text-align: left; }
.album:hover { border-color: #3a3f4c; }
.album .plate { width: auto; height: 34px; font-size: 14px; grid-row: span 2; min-width: 64px; }
.album h3 { font-size: 16px; font-weight: 800; font-stretch: 110%; }
.album .pb { grid-column: 2; display: flex; align-items: center; gap: 8px; font: 600 12px var(--f-mono); color: var(--mut); }
.album .pb .bar { flex: 1; height: 6px; border-radius: 3px; background: #22252e; overflow: hidden; }
.album .pb .bar i { display: block; height: 100%; background: var(--amber); }
.album.done { border-color: rgba(245,184,61,.5); background: linear-gradient(180deg, rgba(245,184,61,.08), var(--bg-2)); }
.album.done .pb .bar i { background: linear-gradient(90deg, #ffd36b, #f5b83d); }
.empty { padding: 40px 20px; text-align: center; color: var(--mut); border: 1px dashed var(--line); border-radius: 16px; }

/* ---------- Missions ---------- */
.mlist { display: grid; gap: 10px; }
.mission { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.mission h3 { font: 600 15px var(--f-body); }
.mission .pb { display: flex; align-items: center; gap: 10px; font: 600 12px var(--f-mono); color: var(--mut); }
.mission .pb .bar { flex: 1; max-width: 260px; height: 6px; border-radius: 3px; background: #22252e; overflow: hidden; }
.mission .pb .bar i { display: block; height: 100%; background: var(--amber); }
.mission .rw { grid-row: span 2; display: flex; gap: 10px; align-items: center; }
.mission .rw .num { color: var(--amber); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.mission .rw .num svg { width: 14px; height: 14px; }
.mission.done { opacity: .55; }
.mission.ready { border-color: rgba(255,178,26,.5); }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.sday { display: grid; justify-items: center; gap: 4px; padding: 12px 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font: 600 12px var(--f-mono); color: var(--mut); }
.sday b { font-size: 16px; color: var(--fg); }
.sday.got { border-color: rgba(255,178,26,.45); background: linear-gradient(180deg, rgba(255,178,26,.12), var(--bg-2)); color: var(--amber); }
.sday.today { box-shadow: 0 0 0 2px var(--amber); }
@media (max-width: 520px) { .streak { gap: 4px; } .sday { padding: 8px 2px; font-size: 10px; } .sday b { font-size: 13px; } }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* ---------- Profil / tableau ---------- */
.panel { padding: 20px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kv div { padding: 12px; border-radius: 12px; background: var(--bg-3); }
.kv b { display: block; font: 700 22px var(--f-mono); }
.kv span { font-size: 12px; color: var(--mut); }
.tbl-wrap { overflow-x: auto; }
table.rates { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.rates th, table.rates td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.rates th { font: 600 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
table.rates td.num { text-align: right; }
table.rates th.r { text-align: right; }
.rdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; vertical-align: middle; }
.namefield { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.namefield input { flex: 1 1 180px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); color: var(--fg); font: inherit; }
.rules { margin: 12px 0 0; padding-left: 18px; color: var(--mut); }
.rules li { margin: 6px 0; }
.rules b { color: var(--fg); }
.soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.soon div { padding: 14px; border-radius: 12px; border: 1px dashed var(--line); color: var(--mut); font-size: 13px; }
.soon b { display: block; color: var(--fg); font-size: 15px; margin-bottom: 4px; }

/* gros tirages */
.feed { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.feed .fi { flex: none; display: flex; gap: 10px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.feed .fi .mini { width: 74px; }
.feed .fi b { display: block; font-size: 14px; }
.feed .fi span { font-size: 12px; color: var(--mut); }
.feed .fi .rl { font: 700 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c); }

.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.howto div { padding: 18px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.howto i { font: 700 13px var(--f-mono); color: var(--amber); font-style: normal; }
.howto h3 { font-size: 17px; font-weight: 800; font-stretch: 110%; margin: 6px 0; }
.howto p { margin: 0; color: var(--mut); font-size: 14px; }
@media (max-width: 760px) { .howto { grid-template-columns: 1fr; } }

/* ---------- Ouverture ---------- */
.opener { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(700px 500px at 50% 45%, color-mix(in srgb, var(--glow, #ffb21a) 18%, transparent), transparent 70%), #08090b; overflow: hidden;
  padding: env(safe-area-inset-top, 0px) var(--gut-r) env(safe-area-inset-bottom, 0px) var(--gut-l); }
.opener .op-top { display: flex; align-items: center; gap: 10px; padding-block: 12px; }
.opener .op-top .ctr { font: 700 16px var(--f-mono); margin-right: auto; }
.opener .op-top .ctr small { color: var(--mut); }
.op-stage { position: relative; display: grid; place-items: center; min-height: 0; perspective: 1400px; }
.op-bottom { display: grid; justify-items: center; gap: 10px; padding-block: 12px 18px; text-align: center; }
.op-bottom .hint { color: var(--mut); font-size: 14px; }
.op-bottom .odds { font: 500 12px var(--f-mono); color: var(--mut); }
.op-pack { --pw: min(56vw, 230px); touch-action: none; cursor: grab; transition: transform .3s; animation: bob 3s ease-in-out infinite; }
.op-pack:active { cursor: grabbing; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
.op-pack .strip { position: absolute; left: 0; right: 0; top: 0; height: 16%; border-radius: inherit; background: inherit; z-index: 3; display: grid; place-items: center; }
.op-pack .strip::after { content: ""; width: 26%; height: .35em; border-radius: .2em; background: rgba(255,255,255,.75); box-shadow: 0 0 .6em rgba(255,255,255,.7); }
.op-pack .arrow { position: absolute; top: -2.4em; left: 50%; transform: translateX(-50%); font-size: 1.4em; color: var(--amber); animation: up 1.2s ease-in-out infinite; }
@keyframes up { 0%, 100% { transform: translate(-50%, 0); opacity: .5; } 50% { transform: translate(-50%, -8px); opacity: 1; } }
.op-pack.torn { animation: none; }
.op-pack.torn .strip { animation: tear .55s cubic-bezier(.3,.1,.3,1) forwards; }
@keyframes tear { to { transform: translate(60%, -260%) rotate(28deg); opacity: 0; } }
.op-pack.gone { animation: packout .55s .25s ease-in forwards; }
@keyframes packout { to { transform: translateY(70vh) rotate(6deg); opacity: 0; } }
.flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 45%, var(--glow), transparent 60%); opacity: 0; }
.flash.on { animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: .9; } 100% { opacity: 0; } }

.stack { position: relative; width: var(--sw); aspect-ratio: 5 / 7; --sw: min(64vw, 300px, 40vh); }
.stack .fc { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .4s; cursor: pointer; }
.stack .fc .card { --cw: var(--sw); position: absolute; inset: 0; width: 100%; backface-visibility: hidden; }
.stack .fc.face-down { transform: rotateY(180deg); }
.stack .fc.away { transform: translateX(-120vw) rotate(-18deg); opacity: 0; pointer-events: none; }
.stack .fc.shake { animation: shake .5s; }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 3px 0; } }
.rays { position: absolute; width: min(150vmin, 1100px); aspect-ratio: 1; left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--glow) 55%, transparent) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent 100%); mask: radial-gradient(closest-side, #000 25%, transparent 100%); }
.rays.on { opacity: .6; animation: rays 8s linear infinite; }
@keyframes rays { to { rotate: 360deg; } }
.reveal-name { min-height: 64px; display: grid; justify-items: center; gap: 2px; }
.reveal-name .rl { font: 700 12px var(--f-mono); letter-spacing: .25em; text-transform: uppercase; color: var(--c, var(--mut)); }
.reveal-name b { font: 900 22px var(--f-display); font-stretch: 115%; }
.reveal-name span { color: var(--mut); font-size: 13px; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 92vw; }
.thumbs i { width: 22px; height: 30px; border-radius: 4px; background: #1a1c22; border: 1px solid var(--line); }
.thumbs i.done { background: var(--c); border-color: transparent; }
.sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sparks i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--c); left: 50%; top: 45%; animation: spark 1.2s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

.summary { width: 100%; max-width: 1000px; max-height: 100%; overflow-y: auto; padding: 8px 4px 20px; text-align: center; }
.summary h2 { font-size: clamp(24px, 5vw, 36px); font-weight: 900; font-stretch: 120%; font-style: italic; }
.summary h2 em { color: var(--pc, var(--amber)); font-style: inherit; }
.summary .sgrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 14px; margin-top: 22px; }
.summary .sgrid .cell { width: 156px; animation: pop .45s backwards; }
@media (max-width: 520px) { .summary .sgrid .cell { width: 128px; } }
@keyframes pop { from { transform: scale(.6) translateY(20px); opacity: 0; } }
.summary .acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.notice { display: inline-flex; gap: 10px; align-items: center; margin-top: 16px; padding: 8px 14px; border-radius: 12px; background: rgba(255,178,26,.1); border: 1px solid rgba(255,178,26,.35); color: var(--amber); font-size: 14px; }

/* ---------- Modale ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(5,6,8,.78); backdrop-filter: blur(6px); }
.sheet { position: relative; width: min(860px, 100%); max-height: calc(100% - 20px); overflow-y: auto; display: grid; grid-template-columns: auto 1fr; gap: 28px; padding: 26px; border-radius: 22px; background: #111317; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.sheet.narrow { width: min(480px, 100%); grid-template-columns: 1fr; }
.sheet .x { position: absolute; top: 12px; right: 12px; }
.tilt { perspective: 900px; }
.tilt .card { --cw: min(300px, 72vw); transition: transform .1s; }
.spec h2 { font-size: 28px; font-weight: 900; font-stretch: 115%; line-height: 1.05; }
.spec .sub { color: var(--mut); margin: 4px 0 14px; }
.spec dl { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.spec dt, .spec dd { padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0; }
.spec dt { color: var(--mut); font-size: 13px; padding-right: 18px; }
.spec dd { font-family: var(--f-mono); font-weight: 600; text-align: right; }
.spec .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.spec .nav { display: flex; gap: 8px; margin-top: 12px; }
@media (max-width: 720px) { .sheet { grid-template-columns: 1fr; justify-items: center; padding: 22px 16px; } .spec { width: 100%; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(92vw, 440px); }
@media (max-width: 760px) { .toasts { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
.toast { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 14px; background: #1c1f26; border: 1px solid #333846; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px; animation: tin .3s; }
.toast b { color: var(--amber); font-family: var(--f-mono); }
@keyframes tin { from { transform: translateY(14px); opacity: 0; } }

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

/* ---------- Photos réelles ---------- */
.card .art.photo { padding: 0; margin: .35em .45em .3em; border-radius: .4em; overflow: hidden; position: relative; background: #0d0e12; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.card .art.photo::before { display: none; }
.ph { position: absolute; inset: 0; display: block; }
.ph svg { position: absolute; inset: 0; width: 100% !important; height: 100%; filter: none !important; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; filter: contrast(1.06) saturate(1.1); }
.card .art.photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.35)); }
.feed .fi .mini { position: relative; display: block; width: 92px; height: 58px; border-radius: 8px; overflow: hidden; }
.credit { font-size: 12px; color: var(--mut); margin: 12px 0 0; }
.credit a { color: var(--mut); }
.credits { margin-top: 12px; font-size: 12px; color: var(--mut); columns: 2 280px; column-gap: 24px; }
.credits p { margin: 0 0 6px; break-inside: avoid; }
.credits a { color: var(--mut); }
details.panel summary { cursor: pointer; font-weight: 700; }

/* ---------- Compte : écran de connexion ---------- */
.auth { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px 16px; overflow-y: auto;
  background: radial-gradient(circle at 50% 20%, rgba(242,165,22,.18), transparent 55%), repeating-linear-gradient(45deg, #0d0e12 0 12px, #111217 12px 24px); }
.auth-box { width: min(420px, 100%); background: linear-gradient(180deg, #17191f, #111216); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px 18px; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.auth-logo { text-align: center; margin-bottom: 18px; }
.auth-logo b { display: block; font-family: var(--f-display); font-weight: 900; font-stretch: 125%; font-style: italic; font-size: 46px; letter-spacing: -1px; line-height: 1; }
.auth-logo b i { color: var(--amber); font-style: italic; }
.auth-logo span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .4em; color: var(--mut); text-transform: uppercase; }
.auth-box h2 { font-size: 22px; font-weight: 800; margin: 0 0 12px; text-align: center; }
.auth-seg { display: flex; margin: 0 auto 16px; width: fit-content; }
#authForm { display: grid; gap: 12px; }
#authForm p { margin: 0; }
.fld { display: grid; gap: 6px; font-size: 13px; color: var(--mut); }
.fld input { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-3); color: var(--fg, #f4f1ea); padding: 0 14px; font: inherit; font-size: 16px; }
.fld input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--mut); line-height: 1.4; }
.chk input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--amber); flex: none; }
.chk a, .auth-foot a, .legal a { color: var(--amber); }
#authForm .btn { width: 100%; justify-content: center; }
.lnk { background: none; border: 0; color: var(--mut); font: inherit; font-size: 14px; cursor: pointer; padding: 6px; text-decoration: underline; }
.auth-msg { background: rgba(242,165,22,.1); border: 1px solid rgba(242,165,22,.3); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.auth-err { background: rgba(229,72,77,.12); border: 1px solid rgba(229,72,77,.4); color: #ffb4b6; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.auth-foot { text-align: center; font-size: 12px; margin: 16px 0 0; color: var(--mut); }
.btn.loading { opacity: .7; pointer-events: none; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; margin-left: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.danger { color: #ff8a8d; border-color: rgba(229,72,77,.45); }
.legal { text-align: center; font-size: 13px; color: var(--mut); margin: 18px 0 0; }
