/* ─────────────────────────────────────────────────────────────
   lyonmc.fr v2 — sobre et moderne, avec l'esprit du jeu :
   ciel qui suit l'heure de Lyon, herbe, skins, menus du jeu
   ───────────────────────────────────────────────────────────── */
/* Polices hébergées sur le site (aucun appel à Google Fonts) — licence SIL OFL, voir /assets/fonts */
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/geologica-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/geologica-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/geologica-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/geologica-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Tiny5"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/tiny5-latin-400-normal.woff2) format("woff2"); }

:root {
  --bg: #0f131b;
  --bg-2: #141924;
  --panel: #171d29;
  --panel-2: #1d2433;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --ink: #e8ecf3;
  --ink-2: #9ea8ba;
  --ink-3: #6c7689;

  --green: #5ee07a;
  --green-deep: #2f9e4a;
  --yellow: #f3d46b;
  --purple: #b98cff;
  --red: #ff7a7a;
  --gold: #e8c45a;
  --iron: #d5d9de;
  --copper: #d99a6c;

  /* menus du jeu (wiki) */
  --gui: #c6c6c6;
  --gui-text: #3f3f3f;
  --slot: #8b8b8b;

  /* ciel, réglé par le script selon l'heure à Lyon */
  --sky-top: #0a0e1a;
  --sky-bottom: #1b2440;
  --hill-far: #141c30;
  --hill: #0f1a15;
  --light: .55;
  --stars: 1;
  --hero-ink: #e8ecf3;

  --pixel: "Tiny5", ui-monospace, monospace;
  --sans: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(.82rem, .8rem + .1vw, .88rem);
  --step-0: clamp(.97rem, .95rem + .12vw, 1.04rem);
  --step-1: clamp(1.12rem, 1.06rem + .3vw, 1.28rem);
  --step-2: clamp(1.45rem, 1.25rem + .8vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 2.7rem);

  --gutter: clamp(16px, 4vw, 40px);
  --width: 1160px;
  --radius: 12px;
  --block: 40px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; font-synthesis: none;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px;
}
.wrap { width: min(100% - 2 * var(--gutter), var(--width)); margin-inline: auto; }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────────── Éléments communs ───────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.ico img { width: 26px; height: 26px; image-rendering: pixelated; }
.ico.sm { width: 36px; height: 36px; border-radius: 8px; }
.ico.sm img { width: 22px; height: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  background: var(--green); color: #07240f; border: 0; border-radius: 8px; cursor: pointer; text-decoration: none;
  font: 600 var(--step-0)/1 var(--sans); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22);
}
.btn:hover { background: #79ea90; }
.btn.ghost { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: #242c3d; }
.dot { width: 8px; height: 8px; border-radius: 2px; background: var(--ink-3); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(94, 224, 122, .18); }
.tag { font: 600 .74rem/1 var(--sans); letter-spacing: .02em; margin-left: 8px; padding: 3px 6px; border: 1px solid currentColor; border-radius: 4px; vertical-align: 2px; }
code.cmd { font: 500 .9em/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--panel-2); color: var(--ink); padding: 3px 7px; border-radius: 5px; border: 1px solid var(--line); white-space: nowrap; }
.empty { color: var(--ink-2); padding: 28px 16px; margin: 0; }
.notice { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink-2); }

/* Info-bulle (inspirée de celles du jeu) */
.tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 300px;
  background: rgba(17, 9, 26, .97); color: var(--ink); border: 1px solid #4b2a8f; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); padding: 9px 12px 10px; font: 400 .9rem/1.45 var(--sans);
}
.tip b { display: block; font-weight: 600; color: #fff; }
.tip .l { display: block; color: #b5b0c2; }
.tip .a { display: block; color: var(--yellow); margin-top: 6px; font-weight: 500; }
.tip[hidden] { display: none; }

/* ───────────── Barre du haut ───────────── */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(13, 17, 25, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 22px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 1.5rem/1 var(--pixel); letter-spacing: .02em; }
.brand .logo { width: 28px; height: 28px; border-radius: 4px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 7px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { color: var(--ink); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--panel-2); }
.online { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: var(--step--1); white-space: nowrap; }

/* ───────────── La scène (accueil) ───────────── */
.scene {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 85%);
  color: var(--hero-ink);
}
.stars { position: absolute; inset: 0 0 35% 0; opacity: var(--stars); z-index: -3; }
.stars i { position: absolute; width: 2px; height: 2px; background: #fff; }
.celestial { position: absolute; width: clamp(80px, 8vw, 120px); z-index: -3; mix-blend-mode: screen; image-rendering: pixelated; transform: translate(-50%, -50%); opacity: .9; }
.cloud { position: absolute; height: 18px; background: rgba(255, 255, 255, var(--cloud, .5)); z-index: -2; }
.cloud::before { content: ""; position: absolute; top: -18px; left: 22%; width: 48%; height: 18px; background: inherit; }
.hills { position: absolute; left: 0; right: 0; bottom: calc(var(--block) - 1px); width: 100%; height: 190px; z-index: -2; shape-rendering: crispEdges; }
.hills .far { fill: var(--hill-far); }
.hills .near { fill: var(--hill); }
.ground { position: absolute; left: 0; right: 0; bottom: 0; height: var(--block); z-index: -1; background: url(/img/grass_side.png) 0 0 / var(--block) var(--block); image-rendering: pixelated; filter: brightness(var(--light)); }

.scene .wrap {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: end;
  min-height: clamp(540px, 74vh, 700px); padding-bottom: calc(var(--block) - 1px);
}
.hero-copy { align-self: center; padding-block: 48px 72px; }
.wordmark { margin: 0 0 14px; font: 400 clamp(3.4rem, 2rem + 5.5vw, 6.4rem)/.85 var(--pixel); color: #fff; letter-spacing: .01em; text-shadow: .06em .06em 0 rgba(0, 0, 0, .35); }
.hero-lead { margin: 0 0 26px; max-width: 40ch; font-size: var(--step-1); line-height: 1.5; font-weight: 500; }
.join {
  max-width: 440px; padding: 14px; border-radius: 14px;
  background: rgba(10, 14, 22, .55); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(10px); color: var(--ink);
}
.join .label { font-size: var(--step--1); color: var(--ink-2); margin: 0 0 8px 2px; }
.join .row { display: flex; gap: 8px; align-items: center; }
.srv-icon { width: 42px; height: 42px; flex: none; border-radius: 6px; image-rendering: pixelated; }
.join .field { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 14px; min-height: 42px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; font: 400 1.3rem/1 var(--pixel); letter-spacing: .03em; color: #fff; }
.join .meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: var(--step--1); color: var(--ink-2); flex-wrap: wrap; }
.faces { display: flex; }
.faces img { width: 22px; height: 22px; margin-left: -4px; border-radius: 4px; box-shadow: 0 0 0 2px #121722; image-rendering: pixelated; }
.faces img:first-child { margin-left: 0; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; max-width: 400px; width: 100%; justify-self: end; }
.step { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #fff; }
.nametag { margin-bottom: 10px; padding: 3px 8px 4px; background: rgba(0, 0, 0, .35); border-radius: 3px; font: 400 1rem/1.05 var(--pixel); text-align: center; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.nametag .val { display: block; color: var(--yellow); font-size: .85rem; }
.step .skin { width: 72%; aspect-ratio: 1 / 2; object-fit: contain; object-position: bottom; image-rendering: pixelated; filter: brightness(calc(var(--light) + .3)); }
.step .skin.empty { opacity: .25; filter: grayscale(1); }
.step .block { width: 100%; display: grid; place-items: start center; padding-top: 6px; background-size: var(--block) var(--block); image-rendering: pixelated; filter: brightness(calc(var(--light) + .25)); }
.step.first .block { height: calc(var(--block) * 3); background-image: url(/img/gold_block.png); }
.step.second .block { height: calc(var(--block) * 2); background-image: url(/img/iron_block.png); }
.step.third .block { height: var(--block); background-image: url(/img/copper_block.png); }
.step .place { font: 400 1.6rem/1 var(--pixel); color: rgba(0, 0, 0, .5); }
.step:hover .skin { transform: translateY(-3px); transition: transform .15s; }

/* Chiffres du serveur */
.stats-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding-top: 22px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 14px; }
.stat b { display: block; font: 400 1.55rem/1 var(--pixel); color: var(--ink); }
.stat span { display: block; font-size: var(--step--1); color: var(--ink-2); line-height: 1.3; margin-top: 4px; }

/* ───────────── Sections ───────────── */
.section { padding-block: clamp(44px, 6vw, 80px); }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { font: 700 var(--step-2)/1.15 var(--sans); margin: 0 0 6px; letter-spacing: -.015em; }
.section .intro { color: var(--ink-2); margin: 0 0 28px; max-width: 62ch; }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.panel-h h3 { margin: 0; font: 600 var(--step-1)/1.2 var(--sans); }
.panel-h .muted { font-size: var(--step--1); text-decoration: none; }
.panel-h a.muted:hover { color: var(--ink); }

.live { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }

/* Fil des exploits */
.feed { list-style: none; margin: 0; padding: 6px; }
.feed li { display: grid; grid-template-columns: 42px 24px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; }
.feed li:hover { background: var(--panel-2); }
.feed time { color: var(--ink-3); font-size: .8rem; font-variant-numeric: tabular-nums; }
.feed img { width: 24px; height: 24px; border-radius: 4px; image-rendering: pixelated; }
.feed p { margin: 0; line-height: 1.4; min-width: 0; }
.feed .who { font-weight: 600; text-decoration: none; }
.feed .who:hover { text-decoration: underline; }
.feed .verb { color: var(--ink-2); }
.feed .fadv { color: var(--green); font-weight: 500; cursor: help; }
.feed .fadv.challenge { color: var(--purple); }

/* Rendez-vous */
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.agenda li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 12px 14px 12px 12px; }
.agenda strong { display: block; font-weight: 600; line-height: 1.3; }
.agenda small { display: block; color: var(--ink-2); font-size: var(--step--1); }
.agenda .in { color: var(--green); font-weight: 600; font-size: var(--step--1); text-align: right; white-space: nowrap; }
.agenda .in.now { color: var(--red); }
.agenda .bar { grid-column: 2 / -1; height: 5px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.agenda .bar i { display: block; height: 100%; background: var(--green); }

.mini-board { margin-top: 26px; }
.mini-board ol { list-style: none; margin: 0; padding: 0; }
.mini-board li { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.mini-board .r { font: 400 1.15rem/1 var(--pixel); width: 1.4em; color: var(--ink-3); }
.mini-board li:nth-child(1) .r { color: var(--gold); }
.mini-board li:nth-child(2) .r { color: var(--iron); }
.mini-board li:nth-child(3) .r { color: var(--copper); }
.mini-board img { width: 24px; height: 24px; border-radius: 4px; image-rendering: pixelated; }
.mini-board a { text-decoration: none; font-weight: 500; }
.mini-board a:hover { text-decoration: underline; }
.mini-board .pts { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 36px; }
.feature { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.feature h3 { margin: 2px 0 4px; font: 600 var(--step-1)/1.25 var(--sans); }
.feature p { margin: 0; color: var(--ink-2); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; padding: 20px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 8px; background: var(--green); color: #07240f; font: 400 1.3rem/1 var(--pixel); }
.steps strong { display: block; font-weight: 600; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-2); }

/* ───────────── Pages ───────────── */
.page-head { position: relative; padding-block: clamp(36px, 6vw, 60px) 30px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #151b27, var(--bg)); }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: url(/img/grass_top.png) 0 0 / 8px 8px; image-rendering: pixelated; opacity: .55; }
.page-head h1 { margin: 0 0 8px; font: 700 var(--step-3)/1.05 var(--sans); letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--ink-2); max-width: 64ch; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 26px 0 16px; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 14px 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 500 var(--step-0)/1 var(--sans); }
.tabs button img { width: 20px; height: 20px; image-rendering: pixelated; }
.tabs button:hover { color: var(--ink); background: var(--panel); }
.tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); border-color: var(--line-2); }
.search { display: flex; gap: 8px; margin: 0 0 14px; }
.search input, .search select { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); font: inherit; }
.search select { flex: 0 0 auto; }

.rows { overflow: hidden; }
.rowp { display: grid; grid-template-columns: 48px 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 16px 10px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.rowp:last-child { border-bottom: 0; }
.rowp:hover { background: var(--panel-2); }
.pos { font: 400 1.4rem/1 var(--pixel); color: var(--ink-3); text-align: center; }
.pos.b { width: 32px; height: 32px; margin: 0 auto; display: grid; place-items: center; border-radius: 6px; color: rgba(0, 0, 0, .55); background-size: 32px 32px; image-rendering: pixelated; }
.pos.b1 { background-image: url(/img/gold_block.png); }
.pos.b2 { background-image: url(/img/iron_block.png); }
.pos.b3 { background-image: url(/img/copper_block.png); }
.rowp .face { width: 36px; height: 36px; border-radius: 6px; image-rendering: pixelated; }
.rowp .who { min-width: 0; }
.rowp .who strong { font-weight: 600; }
.rowp .who .t { display: block; font-size: var(--step--1); font-weight: 500; }
.rowp .val { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rowp .val small { color: var(--ink-3); font-weight: 400; }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.rowp .meter { width: 130px; margin: 6px 0 0 auto; }
.past { margin-top: 36px; }

/* Annuaire des joueurs */
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pcard { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; text-decoration: none; }
.pcard:hover { background: var(--panel-2); }
.pcard img { width: 44px; height: 44px; border-radius: 6px; image-rendering: pixelated; }
.pcard strong { display: flex; align-items: center; gap: 6px; font-weight: 600; overflow: hidden; white-space: nowrap; }
.pcard span { display: block; font-size: var(--step--1); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Profil */
.profile { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 5vw, 48px); padding-block: 36px 72px; }
.profile-side { align-self: start; position: sticky; top: 84px; overflow: hidden; text-align: center; }
.profile-side .sky { position: relative; height: 300px; background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom)); display: flex; align-items: flex-end; justify-content: center; }
.profile-side .sky .body { width: 120px; aspect-ratio: 1 / 2; object-fit: contain; object-position: bottom; image-rendering: pixelated; margin-bottom: 40px; position: relative; z-index: 1; }
.profile-side .sky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: url(/img/grass_side.png) 0 0 / 40px 40px; image-rendering: pixelated; }
.profile-side .sky.gold::after { background-image: url(/img/gold_block.png); }
.profile-side .info { padding: 18px 18px 20px; }
.profile-side h1 { margin: 0 0 4px; font: 400 2rem/1.05 var(--pixel); word-break: break-word; }
.profile-side .title { margin: 0 0 8px; font-weight: 600; }
.profile-side .seen { margin: 10px 0 0; display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--ink-2); font-size: var(--step--1); }
.count-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.count-line .big { font: 400 clamp(3rem, 2.2rem + 4vw, 5rem)/.85 var(--pixel); }
.count-line .of { color: var(--ink-2); font-size: var(--step-1); }
.progress { height: 10px; border-radius: 5px; background: var(--panel-2); overflow: hidden; margin: 16px 0 6px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-deep), var(--green)); border-radius: 5px; }
.statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 26px 0; overflow: hidden; }
.statgrid div { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.statgrid div:nth-child(4n) { border-right: 0; }
.statgrid div:nth-last-child(-n + 4) { border-bottom: 0; }
.statgrid dt { color: var(--ink-2); font-size: var(--step--1); }
.statgrid dd { margin: 2px 0 0; font-weight: 600; font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.cats { display: grid; gap: 12px; margin: 0 0 30px; }
.cat-row { display: grid; grid-template-columns: 24px 120px minmax(0, 1fr) 64px; gap: 12px; align-items: center; }
.cat-row img { width: 22px; height: 22px; image-rendering: pixelated; }
.cat-row .n { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Cadres de succès, à la forme du jeu */
.frame { --size: 42px; width: var(--size); height: var(--size); flex: none; display: grid; place-items: center; background: var(--panel-2); border: 2px solid var(--line-2); position: relative; }
.frame img { width: 60%; height: 60%; image-rendering: pixelated; }
.frame.task { border-radius: 4px; }
.frame.goal { border-radius: 40%; }
.frame.challenge { border: 0; background: var(--line-2); clip-path: polygon(30% 0, 70% 0, 82% 12%, 100% 18%, 92% 50%, 100% 82%, 82% 88%, 70% 100%, 30% 100%, 18% 88%, 0 82%, 8% 50%, 0 18%, 18% 12%); }
.frame.challenge::before { content: ""; position: absolute; inset: 3px; background: var(--panel-2); clip-path: inherit; }
.frame.challenge img { position: relative; }
.frame.done { border-color: var(--green-deep); background: #1b2b22; }
.frame.challenge.done { background: #7a55c9; }
.frame.challenge.done::before { background: #261c38; }
.frame.locked img { filter: grayscale(1) brightness(.6); }
.adv-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.adv { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; min-width: 0; }
.adv[hidden] { display: none; }
.adv .txt { min-width: 0; }
.adv strong { display: block; font-weight: 600; line-height: 1.3; }
.adv .desc { display: block; color: var(--ink-2); font-size: var(--step--1); line-height: 1.4; }
.adv .when { display: block; color: var(--ink-3); font-size: .78rem; margin-top: 3px; }
.adv.challenge strong { color: var(--purple); }
.adv.missing strong { color: var(--ink-2); }
.more { display: flex; width: 100%; margin: 12px 0 0; }

/* Guide */
.guide { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); padding-block: 32px 80px; }
.toc { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; }
.toc a { text-decoration: none; color: var(--ink-2); padding: 6px 10px; border-radius: 6px; font-size: var(--step--1); }
.toc a:hover { color: var(--ink); background: var(--panel); }
.toc a.active { color: var(--ink); background: var(--panel-2); box-shadow: inset 2px 0 0 var(--green); }
.guide section { padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.guide section:last-child { border-bottom: 0; }
.guide h2 { font: 700 var(--step-2)/1.15 var(--sans); margin: 0 0 12px; letter-spacing: -.015em; }
.guide h3 { font: 600 var(--step-1)/1.3 var(--sans); margin: 28px 0 10px; }
.guide p { color: var(--ink-2); max-width: 70ch; }
.guide p strong { color: var(--ink); }
.cmds { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cmds td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmds td:first-child { width: 38%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); padding: 5px 10px 5px 6px; border-radius: 8px; font-size: var(--step--1); }
.chips img { width: 20px; height: 20px; image-rendering: pixelated; }
.reward-line { color: var(--ink-2); font-size: var(--step--1); }
.guide p .reward-line { font-size: inherit; }
.reward-line > .r + .r::before { content: ", "; color: var(--ink-3); }
.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.tiers > div { padding: 14px 16px; }
.tiers h4 { margin: 0 0 6px; font-weight: 600; }
.days { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.days li { padding: 12px; }
.days li:last-child { border-color: rgba(243, 212, 107, .45); background: #221f17; }
.days strong { display: block; margin-bottom: 4px; font-weight: 600; }
.days .reward-line > .r { display: block; }
.days .reward-line > .r + .r::before { content: none; }
.path { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.path li { display: grid; grid-template-columns: 30px 44px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 14px; }
.path .n { font: 400 1.2rem/1 var(--pixel); color: var(--ink-3); text-align: center; }
.path strong { display: block; }
.titles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.titles-grid div { padding: 10px 14px; }
.titles-grid b { display: block; }
.titles-grid small { color: var(--ink-2); }
.cat-block { margin-top: 30px; }
.cat-block h3 { display: flex; align-items: center; gap: 10px; }
.cat-block h3 img { width: 24px; height: 24px; image-rendering: pixelated; }

/* Wiki des menus : réplique fidèle des menus du jeu */
.wiki-menu { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: start; }
.chest { --s: 38px; background: var(--gui); border: 2px solid #000; border-radius: 4px; box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 #555; padding: 10px 12px 12px; }
.chest .gui-title { margin: 0 0 8px 2px; font: 400 1rem/1 var(--pixel); color: var(--gui-text); }
.chest .grid { display: grid; grid-template-columns: repeat(9, var(--s)); }
.slot { width: var(--s); height: var(--s); display: grid; place-items: center; position: relative; background: var(--slot); box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; cursor: help; }
.slot img { width: 66%; height: 66%; image-rendering: pixelated; }
.slot.filler { background: #5c5c5c; cursor: default; }
.slot:not(.filler):hover::after { content: ""; position: absolute; inset: 2px; background: rgba(255, 255, 255, .45); }
.slot.glint img { filter: drop-shadow(0 0 3px rgba(190, 130, 255, .95)); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.legend li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.legend img { width: 24px; height: 24px; image-rendering: pixelated; margin-top: 2px; }
.legend strong { display: block; font-weight: 600; }
.legend span { color: var(--ink-2); font-size: var(--step--1); }

/* Carte */
body.is-map { height: 100vh; height: 100dvh; min-height: 0; }
body.is-map .footer { display: none; }
body.is-map main { display: flex; flex-direction: column; min-height: 0; }
.map-bar { border-bottom: 1px solid var(--line); }
.map-bar .wrap { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; padding-block: 12px; }
.map-bar h1 { font: 600 var(--step-1)/1.2 var(--sans); margin: 0; }
.map-full { margin-left: auto; font-size: var(--step--1); color: var(--ink-2); }
.map-full:hover { color: var(--ink); }
.map-frame { flex: 1; display: block; width: 100%; min-height: 0; border: 0; background: #0b0e14; }

/* Pied de page */
.footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--ink-3); font-size: var(--step--1); }
.footer .wrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--ink-2); }
.footer .legal { margin-left: auto; }

/* ───────────── Mobile ───────────── */
@media (max-width: 980px) {
  .scene .wrap { grid-template-columns: 1fr; gap: 0; min-height: 0; }
  .hero-copy { padding-block: 40px 28px; }
  .podium { justify-self: center; max-width: 330px; }
  .celestial { display: none; }
  .stats-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .live, .profile, .guide, .wiki-menu { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-side { position: static; }
  .toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statgrid div:nth-child(4n) { border-right: 1px solid var(--line); }
  .statgrid div:nth-child(2n) { border-right: 0; }
  .statgrid div:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .statgrid div:nth-last-child(-n + 2) { border-bottom: 0; }
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiers, .titles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .topbar .wrap { flex-wrap: wrap; gap: 6px 14px; padding-block: 8px; }
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .online { margin-left: auto; }
  .nav a { padding: 6px 8px; font-size: .92rem; }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-strip .stat:last-child { grid-column: span 2; }
  .features, .steps, .legend, .adv-list, .tiers, .titles-grid { grid-template-columns: 1fr; }
  .days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chest { --s: calc((100vw - 2 * var(--gutter) - 28px) / 9); }
  .rowp { grid-template-columns: 34px 30px minmax(0, 1fr) auto; gap: 10px; padding-inline: 8px; }
  .rowp .face { width: 30px; height: 30px; }
  .rowp .meter { width: 80px; }
  .cat-row { grid-template-columns: 22px 1fr 56px; }
  .cat-row .meter { grid-column: 1 / -1; order: 4; }
  .footer .legal { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Grades automatiques */
.grade { font-weight: 600; }
.profile-side .grade-line { margin: 0 0 4px; font-size: var(--step-1, 1.1rem); }
ol.grades { list-style: none; padding: 0; margin: 14px 0 26px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
ol.grades li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
ol.grades small { color: var(--ink-2); }

/* Monde ressources : avantages */
ul.perks { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
ul.perks li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }

/* Page Voter */
.vote-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; padding-block: 26px 40px; }
.vote-page .card { padding: 18px 20px; }
.vote-page .vote-main { grid-column: 1 / -1; }
.vote-sites { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 10px; }
.toplist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.toplist li { display: flex; align-items: center; gap: 10px; }
.toplist li img { width: 24px; height: 24px; image-rendering: pixelated; border-radius: 4px; }
.toplist li .pos { width: 1.6em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toplist li .muted { margin-left: auto; }
.badge-live { color: var(--yellow); font-weight: 600; font-size: var(--step--1); }

@media (max-width: 460px) {
  .nav a { padding: 6px 6px; font-size: .86rem; }
}

/* ───────────── Métiers ───────────── */
.jobs-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 30px; }
.job { padding: 14px 14px 12px; display: grid; gap: 6px; }
.job .head { display: flex; align-items: center; gap: 10px; }
.job .head img { width: 24px; height: 24px; image-rendering: pixelated; }
.job .name { font-weight: 600; }
.job .lvl { font: 400 1.9rem/1 var(--pixel); }
.job .lvl small { font: 400 var(--step--1) var(--sans); color: var(--ink-3); margin-left: 4px; }
.job .meter i { background: var(--job, var(--green)); }
.job .xp { color: var(--ink-3); font-size: .78rem; font-variant-numeric: tabular-nums; }
.job-src { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.job-src li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: var(--step--1); }
.job-src img { width: 20px; height: 20px; image-rendering: pixelated; }
.job-src .x { font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; }
.job-src .note { display: block; color: var(--ink-3); font-size: .74rem; }
.job-block { margin-top: 28px; }
.job-block h3 { display: flex; align-items: center; gap: 10px; }
.job-block h3 img { width: 24px; height: 24px; image-rendering: pixelated; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.subtabs button { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 7px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font: 500 var(--step--1)/1 var(--sans); }
.subtabs button img { width: 16px; height: 16px; image-rendering: pixelated; }
.subtabs button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); border-color: var(--line-2); }

/* ───────────── Rejoindre ───────────── */
.join-page { padding-block: 30px 72px; display: grid; gap: 40px; }
.mc-list { max-width: 640px; background: #121212; border: 2px solid #000; box-shadow: inset 0 0 0 2px #3c3c3c; padding: 10px; }
.mc-entry { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 12px; padding: 4px; outline: 2px solid #fff; outline-offset: -2px; background: rgba(0, 0, 0, .55); }
.mc-entry img.ic { width: 64px; height: 64px; image-rendering: pixelated; grid-row: span 3; }
.mc-entry .n { font: 400 1.15rem/1.1 var(--pixel); color: #fff; }
.mc-entry .motd { font: 400 1rem/1.15 var(--pixel); color: #aaa; grid-column: 2 / 4; }
.mc-entry .motd .g { color: #ffd86b; }
.mc-entry .motd .a { color: #5ee07a; }
.mc-entry .count { font: 400 1rem/1.1 var(--pixel); color: #aaa; text-align: right; white-space: nowrap; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.ping { display: inline-flex; align-items: flex-end; gap: 1px; height: 12px; }
.ping i { width: 2px; background: #5ee07a; }
.ping i:nth-child(1) { height: 4px; } .ping i:nth-child(2) { height: 6px; } .ping i:nth-child(3) { height: 8px; } .ping i:nth-child(4) { height: 10px; } .ping i:nth-child(5) { height: 12px; }
.mc-caption { color: var(--ink-3); font-size: var(--step--1); margin: 8px 0 0; }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.platform { padding: 22px 22px 18px; }
.platform h2 { margin: 0 0 4px; font: 700 var(--step-2)/1.15 var(--sans); }
.platform > p { color: var(--ink-2); margin: 0 0 16px; }
.platform ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.platform ol li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.platform ol li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line-2); font: 400 1.1rem/1 var(--pixel); }
.platform ol strong { display: block; font-weight: 600; }
.platform ol p { margin: 2px 0 0; color: var(--ink-2); font-size: var(--step--1); }
.platform.off { opacity: .7; }
.address { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-mini { cursor: pointer; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); font: 500 .8rem/1 var(--sans); }
.first-minutes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.first-minutes .card { padding: 16px; }
.first-minutes strong { display: block; margin: 10px 0 4px; }
.first-minutes p { margin: 0; color: var(--ink-2); font-size: var(--step--1); }

/* ───────────── Règlement, FAQ, actualités, pages légales ───────────── */
.prose-page { padding-block: 30px 72px; max-width: 820px; }
.prose-page h2 { font: 700 var(--step-2)/1.15 var(--sans); margin: 36px 0 10px; }
.prose-page p, .prose-page li { color: var(--ink-2); }
.prose-page strong { color: var(--ink); }
.rules { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: r; display: grid; gap: 10px; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 16px 18px; }
.rules li::before { content: counter(r); font: 400 1.6rem/1 var(--pixel); color: var(--gold); }
.rules h3 { margin: 0 0 4px; font: 600 var(--step-1)/1.25 var(--sans); color: var(--ink); }
.rules p { margin: 0; }
.callout { margin-top: 22px; padding: 16px 18px; border-left: 3px solid var(--gold); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; }
.callout p { margin: 0; }
.faq { display: grid; gap: 8px; margin-top: 18px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 18px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 400 1.4rem/1 var(--pixel); color: var(--ink-3); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }
.news { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.news li { padding: 18px 20px; }
.news .meta { display: flex; gap: 10px; align-items: center; color: var(--ink-3); font-size: var(--step--1); margin-bottom: 6px; }
.news .label { color: var(--gold); border: 1px solid rgba(232, 196, 90, .4); border-radius: 4px; padding: 2px 6px; font-weight: 600; font-size: .74rem; }
.news h3 { margin: 0 0 6px; font: 600 var(--step-1)/1.3 var(--sans); }
.news p { margin: 0; color: var(--ink-2); }
.news-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.news-mini li { padding: 16px 18px; }
.news-mini .meta { color: var(--ink-3); font-size: var(--step--1); margin-bottom: 4px; }
.news-mini h3 { margin: 0 0 6px; font: 600 var(--step-0)/1.35 var(--sans); }
.news-mini p { margin: 0; color: var(--ink-2); font-size: var(--step--1); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.todo { background: rgba(255, 122, 122, .12); color: #ffb3b3; border-radius: 4px; padding: 0 4px; font-weight: 600; }

/* Pied de page */
.footer .links { display: flex; gap: 6px 18px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .jobs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .platforms { grid-template-columns: 1fr; }
  .first-minutes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-mini { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .jobs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .first-minutes { grid-template-columns: 1fr; }
  .mc-entry { grid-template-columns: 48px minmax(0, 1fr); }
  .mc-entry img.ic { width: 48px; height: 48px; }
  .mc-entry .count { grid-column: 2; justify-content: flex-start; }
  .rules li { grid-template-columns: 32px minmax(0, 1fr); padding: 14px; }
}

/* Barre du haut : 8 liens, on passe à la ligne plus tôt */
@media (max-width: 1100px) {
  .nav a { padding: 7px 9px; }
}
@media (max-width: 920px) {
  .topbar .wrap { flex-wrap: wrap; gap: 6px 14px; padding-block: 8px; }
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .online { margin-left: auto; }
}
