/* Replex : thème sombre, accents par jeu (--accent). */
:root {
  --bg: #12141a;
  --surface: #1b1e27;
  --surface-2: #242835;
  --border: #2f3442;
  --text: #e8eaf0;
  --muted: #9aa1b2;
  --primary: #f08a2c;       /* orange des Mérites */
  --secondary: #3fd0e0;     /* cyan des Honneurs */
  --gold: #f5c542;
  --silver: #c9d1dc;
  --bronze: #d08a52;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; }
h2 { margin-top: 2.5rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.lead { font-size: 1.1rem; color: var(--muted); }
.notice { background: var(--surface-2); border-left: 3px solid var(--primary); padding: 8px 12px; border-radius: 6px; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 6px; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav .lang { border: 1px solid var(--border); font-size: .85rem; }

.hero { text-align: center; padding: 64px 0 48px; background: radial-gradient(ellipse at top, #2a2030 0%, var(--bg) 70%); }
.hero h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); margin: 0; letter-spacing: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { font-size: 1.2rem; }
.ip { display: inline-flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 8px 8px 16px; margin-top: 12px; max-width: 100%; flex-wrap: wrap; justify-content: center; }
.ip .mono { font-size: 1.15rem; }

.btn { display: inline-block; background: var(--primary); color: #1a1208; border: 0; border-radius: 8px;
  padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { display: block; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent, var(--primary));
  border-radius: var(--radius); padding: 20px; color: var(--text); }
a.card:hover { text-decoration: none; background: var(--surface-2); }
.card h3 { margin: 8px 0 0; }
.mode { color: var(--accent, var(--muted)); font-weight: 600; font-size: .9rem; margin: 2px 0 8px; }
.more { color: var(--accent); font-weight: 600; }

.game h1 { margin-bottom: 0; }
.board-block { border-top: 3px solid var(--accent); margin-top: 32px; }
.board-block h2 { margin-top: 16px; }
.board-block h2 a { color: var(--accent); }

.board { width: 100%; border-collapse: collapse; }
.board th, .board td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.board th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.board .num { text-align: right; font-variant-numeric: tabular-nums; }
.board .player { display: flex; align-items: center; gap: 8px; }
.board .player img { border-radius: 4px; image-rendering: pixelated; }
.board .player a { color: var(--text); }
.podium-1 td:first-child { color: var(--gold); font-weight: 800; }
.podium-2 td:first-child { color: var(--silver); font-weight: 800; }
.podium-3 td:first-child { color: var(--bronze); font-weight: 800; }

.discord { text-align: center; padding-bottom: 32px; }
.skin { image-rendering: pixelated; }

.footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--surface); padding: 24px 0; font-size: .9rem; }
.footer p { margin: 4px 0; }

@media (max-width: 600px) {
  .hide-sm { display: none; }
  .hero { padding: 40px 0 32px; }
}

/* Statistiques en tuiles (JumpFarm, profils) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.stat .value { display: block; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat.merites .value { color: var(--primary); }
.stat.honneurs .value { color: var(--secondary); }
.boards { margin-top: 16px; }
.badge { font-weight: 700; white-space: nowrap; }
.record { color: var(--gold); }
.profile-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.profile-head h1 { margin: 0; }
.profile-head > div { flex: 1; min-width: 240px; }
