/* ════════════════════════════════════════════════════════════════════
   Design system — thème sombre, accents néon violet → cyan.
   Aucune police ni ressource externe : tout fonctionne même derrière
   un pare-feu qui bloque les CDN.
   ════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #07070f;
  --bg-2: #0d0d1a;
  --surface: #131326;
  --surface-2: #1a1a33;
  --surface-3: #232344;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f1fa;
  --text-2: #a9a9c8;
  --text-3: #6f6f92;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --grad: linear-gradient(120deg, var(--violet), var(--cyan));
  --glow: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 8px 32px -8px rgba(139, 92, 246, 0.55);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.7);
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Segoe UI Variable Display', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
  --nav-h: 64px;
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(34, 211, 238, 0.09), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(139, 92, 246, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(139, 92, 246, 0.45); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ─────────────── Barre de navigation ─────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(7, 7, 15, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 19px/1 var(--font-display); letter-spacing: -0.02em; flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { background: linear-gradient(90deg, #fff, #c9c4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550;
  transition: color .15s, background .15s;
}
.nav-link svg { width: 18px; height: 18px; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); background: var(--surface-2); }
.nav-search { flex: 1; min-width: 0; max-width: 460px; margin-left: auto; position: relative; }
.nav-search input {
  width: 100%; height: 40px; padding: 0 14px 0 40px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.nav-search input::placeholder { color: var(--text-3); }
.nav-search input:focus { border-color: rgba(139, 92, 246, 0.6); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15); background: var(--surface-2); }
.nav-search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; color: var(--text-3); pointer-events: none; }
.search-pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; display: none; max-height: 70vh; overflow: auto;
}
.search-pop.open { display: block; animation: pop .16s var(--ease); }
.search-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.search-item img { width: 56px; aspect-ratio: 4/3; border-radius: 7px; object-fit: cover; background: var(--surface-2); }
.search-item:hover, .search-item.sel { background: var(--surface-2); }
.search-item small { display: block; color: var(--text-3); }
.search-empty { padding: 14px; color: var(--text-3); text-align: center; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; background: transparent; border: 1px solid transparent; color: var(--text-2);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--surface); color: var(--text); border-color: var(--border); }
.menu-toggle { display: none; }

.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.user-chip:hover { border-color: var(--border-strong); }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; display: none;
}
.dropdown.open { display: block; animation: pop .16s var(--ease); }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 9px; background: none; border: 0; text-align: left; color: var(--text-2);
}
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); color: var(--text); }
.dropdown svg { width: 17px; height: 17px; }
.dropdown hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ─────────────── Layout ─────────────── */
main { max-width: var(--max); margin: 0 auto; padding: 28px 20px 80px; overflow-x: clip; min-height: calc(100vh - var(--nav-h) - 90px); }
.view { animation: fadeIn .28s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.footer { border-top: 1px solid var(--border); color: var(--text-3); font-size: 13px; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 24px 20px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

.page-head { margin: 4px 0 26px; }
.page-head h1 { font: 750 clamp(26px, 4vw, 36px)/1.15 var(--font-display); letter-spacing: -0.025em; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--text-2); }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; font: 700 21px/1.2 var(--font-display); letter-spacing: -0.015em; margin: 0; }
.section-head h2 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px var(--violet); }
.section-head a { color: var(--text-2); font-size: 14px; font-weight: 550; }
.section-head a:hover { color: var(--cyan); }

/* ─────────────── Boutons & formulaires ─────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 650; white-space: nowrap;
  transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--grad); border-color: transparent; color: #0a0a14; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 0 0 1px rgba(34,211,238,.5), 0 10px 36px -8px rgba(34,211,238,.6); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-danger { border-color: rgba(248, 113, 113, .4); color: var(--red); background: rgba(248, 113, 113, .08); }
.btn-danger:hover { background: rgba(248, 113, 113, .16); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn.on { color: var(--pink); border-color: rgba(244, 114, 182, .45); background: rgba(244, 114, 182, .1); }

.field { display: grid; gap: 6px; margin-bottom: 14px; align-content: start; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small { color: var(--text-3); font-size: 12.5px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, .15); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.check input { accent-color: var(--violet); width: 16px; height: 16px; }
.form-error { color: var(--red); background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.3); padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--c, var(--violet)) 16%, transparent);
  color: color-mix(in srgb, var(--c, var(--violet)) 70%, white);
  border: 1px solid color-mix(in srgb, var(--c, var(--violet)) 35%, transparent);
}
.chip svg { width: 13px; height: 13px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--text-2); }
.badge.ok { background: rgba(52, 211, 153, .14); color: var(--green); }
.badge.off { background: rgba(248, 113, 113, .12); color: var(--red); }
.badge.star { background: rgba(251, 191, 36, .14); color: var(--amber); }

/* ─────────────── Héros ─────────────── */
.hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 21/8; min-height: 300px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); pointer-events: none; }
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 7s linear; }
.hero-slide.active img { transform: scale(1); }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,7,15,.92) 0%, rgba(7,7,15,.6) 45%, rgba(7,7,15,0) 75%), linear-gradient(0deg, rgba(7,7,15,.7), transparent 40%); }
.hero-body { position: absolute; z-index: 1; left: clamp(20px, 5vw, 56px); bottom: clamp(22px, 5vw, 52px); max-width: min(520px, 80%); }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
.hero-kicker::before { content: ''; width: 18px; height: 2px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero h2 { font: 800 clamp(30px, 5.2vw, 58px)/1.02 var(--font-display); letter-spacing: -0.035em; margin: 0 0 12px; }
.hero p { color: var(--text-2); font-size: clamp(14px, 1.6vw, 17px); margin: 0 0 22px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-dots { position: absolute; z-index: 2; right: 22px; bottom: 22px; display: flex; gap: 6px; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255,255,255,.3); transition: width .3s var(--ease), background .3s; }
.hero-dots button.active { width: 26px; background: var(--grad); }

/* ─────────────── Cartes de jeux ─────────────── */
.row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.row > * { scroll-snap-align: start; }
@media (min-width: 1100px) { .row { grid-auto-columns: calc((100% - 3 * 16px) / 4); } }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  isolation: isolate;
}
.card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, .45); box-shadow: 0 18px 40px -18px rgba(139, 92, 246, .55); }
.card-media { position: relative; aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(7, 7, 15, .35); opacity: 0; transition: opacity .2s;
}
.card-play span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #0a0a14; box-shadow: var(--glow); transform: scale(.85); transition: transform .25s var(--ease); }
.card-play svg { width: 22px; height: 22px; margin-left: 3px; }
.card:hover .card-play { opacity: 1; }
.card:hover .card-play span { transform: scale(1); }
.card-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.card-title { font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; }
.card-desc { color: var(--text-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-3); font-size: 12.5px; }
.card-meta .plays { display: inline-flex; align-items: center; gap: 4px; }
.card-meta svg { width: 13px; height: 13px; }
.fav-btn {
  position: absolute; z-index: 2; top: 10px; right: 10px; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(7,7,15,.55); backdrop-filter: blur(8px); color: #fff; opacity: 0; transition: opacity .2s, transform .15s, color .15s;
}
.fav-btn svg { width: 17px; height: 17px; }
.card:hover .fav-btn, .fav-btn.on, .fav-btn:focus-visible { opacity: 1; }
.fav-btn.on { color: var(--pink); }
.fav-btn:active { transform: scale(.88); }
.new-tag { position: absolute; z-index: 2; top: 10px; left: 10px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--cyan); color: #04232a; }
@media (hover: none) { .fav-btn { opacity: 1; } }

.card-wide { flex-direction: row; }
.card-wide .card-media { aspect-ratio: auto; width: 46%; flex-shrink: 0; }
.card-wide .card-body { align-content: center; padding: 18px; }

/* Catégories */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.cat {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s, transform .2s var(--ease), background .2s;
}
.cat::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120px 80px at 0% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent); opacity: .6; transition: opacity .2s; z-index: 0; }
.cat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.cat:hover::before { opacity: 1; }
.cat > * { position: relative; }
.cat-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, transparent); color: color-mix(in srgb, var(--c) 75%, white); flex-shrink: 0; }
.cat-icon svg { width: 20px; height: 20px; }
.cat b { display: block; font-size: 14.5px; }
.cat small { color: var(--text-3); }

/* ─────────────── Explorer ─────────────── */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .input { max-width: 320px; }
.toolbar .select { width: auto; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13.5px; transition: all .15s; }
.filter-chip:hover { color: var(--text); border-color: var(--text-3); }
.filter-chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter-chip .n { opacity: .55; margin-left: 4px; }

.empty { text-align: center; padding: 60px 20px; color: var(--text-2); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty svg { width: 40px; height: 40px; color: var(--text-3); margin-bottom: 10px; }
.empty h3 { margin: 0 0 6px; color: var(--text); }

/* ─────────────── Page de jeu ─────────────── */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 13.5px; margin-bottom: 14px; }
.crumbs a:hover { color: var(--text); }
.player {
  position: relative; background: #000; border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.player-stage { position: relative; width: 100%; max-height: 74vh; min-height: 280px; display: flex; align-items: center; justify-content: center; background: #05050b; }
.player-stage iframe { display: block; width: 100%; height: 100%; border: 0; background: #05050b; }
.player-cover { position: absolute; inset: 0; display: grid; place-items: center; }
.player-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1); }
.player-cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(7,7,15,.35), rgba(7,7,15,.85)); }
.player-cover .play-big { position: relative; z-index: 1; display: grid; justify-items: center; gap: 14px; text-align: center; }
.play-circle { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #0a0a14; border: 0; box-shadow: 0 0 0 10px rgba(139,92,246,.18), 0 0 60px rgba(34,211,238,.45); transition: transform .2s var(--ease), box-shadow .3s; animation: pulse 2.4s infinite; }
.play-circle svg { width: 34px; height: 34px; margin-left: 5px; }
.play-circle:hover { transform: scale(1.07); }
@keyframes pulse { 50% { box-shadow: 0 0 0 18px rgba(139,92,246,.06), 0 0 80px rgba(34,211,238,.55); } }
.player-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--border); }
.player-bar .title { font-weight: 700; margin-right: auto; padding-left: 6px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.player-bar .title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #05050b; transition: opacity .3s; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--cyan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.player:fullscreen { border-radius: 0; border: 0; display: flex; flex-direction: column; background: #000; }
.player:fullscreen .player-stage { flex: 1; aspect-ratio: auto !important; }
.player:fullscreen .player-stage iframe { height: 100%; width: 100%; }

.game-info { margin-top: 22px; display: grid; gap: 18px; }
.game-title { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.game-title h1 { font: 800 clamp(26px, 4vw, 38px)/1.1 var(--font-display); letter-spacing: -0.03em; margin: 0 0 8px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--text-3); font-size: 13.5px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.panel h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15.5px; }
.panel h3 svg { width: 18px; height: 18px; color: var(--cyan); }
.panel p { margin: 0; color: var(--text-2); white-space: pre-line; }
.controls { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.controls li { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 14px; color: var(--text-2); }
kbd { font: 600 12.5px var(--mono); padding: 3px 8px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border-strong); border-bottom-width: 2px; color: var(--text); white-space: nowrap; }

.side { display: grid; gap: 18px; position: sticky; top: calc(var(--nav-h) + 20px); }
.best { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.best div { background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 10px; text-align: center; }
.best b { display: block; font: 750 19px/1.2 var(--font-display); }
.best small { color: var(--text-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }

/* Classements */
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lb li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 10px; }
.lb li:hover { background: var(--surface-2); }
.lb li.me { background: rgba(139, 92, 246, .12); outline: 1px solid rgba(139, 92, 246, .35); }
.lb .rank { font: 750 14px var(--font-display); color: var(--text-3); text-align: center; }
.lb li:nth-child(1) .rank { color: #fcd34d; }
.lb li:nth-child(2) .rank { color: #cbd5e1; }
.lb li:nth-child(3) .rank { color: #f0a56b; }
.lb .who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.lb .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lb .score { font: 700 14px var(--mono); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-3); font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.num { font-family: var(--mono); text-align: right; }
th.num { text-align: right; }
.podium-1 td:first-child { color: #fcd34d; font-weight: 800; }
.podium-2 td:first-child { color: #cbd5e1; font-weight: 800; }
.podium-3 td:first-child { color: #f0a56b; font-weight: 800; }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 750 12.5px var(--font-display); color: #fff; flex-shrink: 0; background: var(--c, var(--violet)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); text-transform: uppercase; }
.avatar.lg { width: 84px; height: 84px; font-size: 30px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px color-mix(in srgb, var(--c) 60%, transparent), 0 0 40px color-mix(in srgb, var(--c) 50%, transparent); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: none; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--cyan); }
.tab .n { color: var(--text-3); margin-left: 4px; font-weight: 500; }

.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 26px; margin-bottom: 26px; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 18%, var(--surface)), var(--surface) 60%); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.profile-head h1 { margin: 0; font: 800 28px/1.1 var(--font-display); letter-spacing: -0.02em; }
.profile-head p { margin: 4px 0 0; color: var(--text-2); }
.profile-stats { display: flex; gap: 26px; margin-left: auto; }
.profile-stats b { display: block; font: 800 24px/1 var(--font-display); }
.profile-stats small { color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; background: var(--c); }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 50%, transparent); }

.history-item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 12px; }
.history-item:hover { background: var(--surface); }
.history-item img { width: 76px; aspect-ratio: 4/3; object-fit: cover; border-radius: 9px; }
.history-item small { color: var(--text-3); display: block; }
.history-item .grow { flex: 1; min-width: 0; }

.cmp-better { color: var(--green); font-weight: 700; }
.cmp-worse { color: var(--text-3); }

/* Authentification */
.auth-wrap { max-width: 430px; margin: 30px auto; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { font: 800 26px/1.15 var(--font-display); margin: 0 0 6px; letter-spacing: -0.02em; }
.auth-card > p { color: var(--text-2); margin: 0 0 22px; }
.auth-switch { text-align: center; margin-top: 16px; color: var(--text-2); font-size: 14px; }
.auth-switch a { color: var(--cyan); font-weight: 600; }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font: 800 28px/1.1 var(--font-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat small { color: var(--text-3); font-size: 12.5px; }
.admin-thumb { width: 54px; aspect-ratio: 4/3; object-fit: cover; border-radius: 7px; background: var(--surface-2); }
.admin-actions { display: flex; gap: 6px; justify-content: flex-end; }
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(3,3,8,.72); backdrop-filter: blur(6px); display: grid; place-items: start center; overflow-y: auto; padding: 40px 16px; animation: fadeIn .2s; }
.modal { width: min(760px, 100%); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }
.preview-imgs { display: flex; gap: 10px; margin-bottom: 14px; }
.preview-imgs img { height: 76px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }

/* Toasts */
.toasts { position: fixed; z-index: 200; bottom: 20px; right: 20px; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: center; padding: 13px 16px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 13px; box-shadow: var(--shadow); animation: toastIn .35s var(--ease); font-size: 14px; }
.toast svg { width: 20px; height: 20px; flex-shrink: 0; }
.toast.success svg { color: var(--green); }
.toast.record { border-color: rgba(251, 191, 36, .5); background: linear-gradient(120deg, rgba(251,191,36,.16), var(--surface-2)); }
.toast.record svg { color: var(--amber); }
.toast.error svg { color: var(--red); }
.toast.info svg { color: var(--cyan); }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* Squelettes de chargement */
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

.notfound { text-align: center; padding: 80px 20px; }
.notfound h1 { font: 900 96px/1 var(--font-display); margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ─────────────── Responsive ─────────────── */
@media (max-width: 1040px) {
  .game-layout { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; padding: 10px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .menu-toggle { display: grid; }
  .user-chip .name { display: none; }
  .hero { aspect-ratio: auto; min-height: 380px; }
  .hero-slide::after { background: linear-gradient(0deg, rgba(7,7,15,.95) 10%, rgba(7,7,15,.4) 70%, rgba(7,7,15,.2)); }
  .grid-2 { grid-template-columns: 1fr; }
  .profile-stats { margin-left: 0; }
}
@media (max-width: 600px) {
  .nav-inner { gap: 10px; padding: 0 12px; }
  .nav-actions .btn-primary { display: none; }
  .nav-actions .btn-ghost { padding: 0 10px; }
  .player-bar .btn span { display: none; }
  .player-bar .btn { padding: 0 10px; }
  .hero-actions .btn-lg { height: 46px; padding: 0 18px; font-size: 15px; }
  .brand-name { display: none; }
  main { padding: 20px 14px 60px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
  .row { grid-auto-columns: 72%; }
  .card-desc { display: none; }
  .card-wide { flex-direction: column; }
  .card-wide .card-media { width: 100%; aspect-ratio: 16/9; }
  .best b { font-size: 16px; }
}

/* ─────────────── Pages de contenu, pied de page, publicité ─────────────── */
.prose { max-width: 760px; margin: 0 auto; color: var(--text-2); font-size: 16px; line-height: 1.7; }
.prose h1 { font: 800 clamp(28px, 4vw, 38px)/1.15 var(--font-display); letter-spacing: -0.025em; color: var(--text); margin: 6px 0 18px; }
.prose h2 { font: 700 20px/1.3 var(--font-display); color: var(--text); margin: 30px 0 10px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose .lead { font-size: 18px; color: var(--text); }
.prose .meta { font-size: 13.5px; color: var(--text-3); }
.prose .contact-mail { font: 700 22px var(--font-display); }
mark.todo { background: rgba(251, 191, 36, .18); color: var(--amber); border: 1px dashed var(--amber); border-radius: 6px; padding: 0 6px; }
.cat-desc { margin-top: 10px !important; max-width: 760px; color: var(--text-2); }
.ssr-list { columns: 2 280px; padding-left: 20px; color: var(--text-2); }
.ssr-list li { margin-bottom: 6px; break-inside: avoid; }
.ssr-list a, .ssr h2 a { color: var(--cyan); }
.ssr .section h2 { font: 700 21px var(--font-display); }

.footer-inner { align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-links a, .linklike { color: var(--text-2); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.footer-links a:hover, .linklike:hover { color: var(--cyan); }

.ad { margin: 36px auto 0; max-width: 970px; min-height: 120px; padding: 10px; border-radius: var(--radius); background: rgba(255,255,255,.02); border: 1px dashed var(--border); }
.ad-label { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.game-info .ad { margin-top: 8px; }

.danger-zone { border-color: rgba(248, 113, 113, .35); }
.danger-zone h3 svg { color: var(--red); }
