/* =========================================================
   Pages de contenu du hub
   ========================================================= */
.page {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: calc(var(--nav-h) + var(--banners-h, 0px) + clamp(24px, 5vw, 64px)) var(--gutter) 0;
  display: flex; flex-direction: column; gap: clamp(20px, 3vw, 32px);
}
.page--wide { width: min(1320px, 100%); }
body[data-layout="page"] { background: var(--ink); }
body[data-layout="page"]::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 85% 0%, rgba(242, 116, 23, 0.07), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, 0.35) 60vh, transparent 100vh);
  mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, 0.35) 60vh, transparent 100vh);
}

/* ---------- en-tête de page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: clamp(8px, 2vw, 18px); }
.page-head-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 820px; }
.page-title { font-family: var(--f-display); font-weight: 650; font-size: clamp(2.5rem, 7vw, 5.6rem); line-height: .92; letter-spacing: -0.05em; outline: none; overflow-wrap: anywhere; }
.page-lead { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.3; letter-spacing: -0.015em; color: var(--paper-dim); max-width: 46ch; }
.page-head-aside { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); align-self: flex-start; transition: color .3s, gap .4s var(--ease); }
.back-link:hover { color: var(--paper); gap: 12px; }
.back-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- panneaux ---------- */
.panel { position: relative; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-2); display: flex; flex-direction: column; gap: 18px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.panel-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.4rem, 2.2vw, 1.85rem); letter-spacing: -0.03em; line-height: 1.05; }
.panel-lead { color: var(--muted); margin-top: 6px; font-size: 15px; }
.sub-title { font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.02em; }
.sub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-inline { display: flex; justify-content: flex-end; margin-top: -8px; }
.form-alt { color: var(--muted); font-size: 15px; text-align: center; }
.form-alt .link { font-size: inherit; }
button.link { font-size: 15px; }
.form-msg:empty { display: none; }
.loading-block { display: flex; flex-direction: column; gap: 4px; }
.field-hint svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ---------- authentification ---------- */
.page--auth { width: min(1200px, 100%); }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.auth-card { display: flex; flex-direction: column; gap: 22px; padding: clamp(22px, 3.4vw, 40px); border-radius: 20px; border: 1px solid var(--line-2); background: rgba(20, 17, 16, 0.92); box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9); }
.auth-card .page-title { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.page-head--auth { padding-bottom: 0; }
.auth-side {
  position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(90% 70% at 50% 65%, color-mix(in srgb, var(--game, var(--accent)) 18%, #0B1716), var(--sea-0) 75%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; min-height: 520px; height: calc(100svh - var(--nav-h) - var(--banners-h, 0px) - 64px); max-height: 760px; position: sticky; top: calc(var(--nav-h) + var(--banners-h, 0px) + 24px);
}
.auth-side::before { content: ''; position: absolute; inset: 0; background: repeating-radial-gradient(ellipse at 50% 70%, transparent 0 22px, rgba(169, 227, 211, 0.04) 22px 23px); pointer-events: none; }
.auth-side-art { position: absolute; left: 6%; right: 6%; top: 12%; aspect-ratio: 400 / 300; }
.auth-side-art svg { width: 100%; height: 100%; overflow: visible; }
.auth-side-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: 14px; background: rgba(12, 10, 9, 0.78); border: 1px solid var(--line-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.auth-side-card .mono { color: var(--game, var(--accent)); }
.auth-side-card b { font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1.05; }
.auth-side-card ul { list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--paper-dim); font-size: 14.5px; }
.auth-side-card li { display: flex; gap: 10px; align-items: center; }
.auth-side-card li svg { width: 16px; height: 16px; flex-shrink: 0; stroke: var(--game, var(--accent)); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
.auth-continue { display: flex; flex-direction: column; gap: 16px; }
.captcha-zone { min-height: 92px; }
.turnstile { min-height: 65px; }
.turnstile-loading { color: var(--muted); font-size: 11px; padding: 22px 0; }
.letter-art { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--accent-soft); border: 1px solid rgba(242, 116, 23, 0.4); }
.letter-art svg { width: 38px; height: 38px; stroke: var(--accent); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.verify-title { font-family: var(--f-display); font-weight: 600; font-size: 1.8rem; letter-spacing: -0.03em; margin-bottom: 12px; }
.verify-status { display: flex; flex-direction: column; gap: 16px; }
.verify-working { animation: blink-dot 1.4s ease-in-out infinite; }
.resend { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.resend-form { margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--line); }

/* compte suspendu */
.banned { display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: 14px; border: 1px solid rgba(255, 107, 94, 0.35); background: rgba(255, 107, 94, 0.06); }
.banned-fox { width: 104px; height: 104px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 0 24px rgba(242, 116, 23, 0.25)); }
.banned-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.banned-text h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.4rem; letter-spacing: -0.02em; color: var(--danger); }
.banned-reason { overflow-wrap: anywhere; }
@media (max-width: 480px) { .banned { flex-direction: column; text-align: center; } }

/* ---------- compte : carte de joueur ---------- */
.player-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: center;
  padding: clamp(22px, 3.4vw, 40px); border-radius: 20px; border: 1px solid var(--line-2);
  background: radial-gradient(70% 120% at 0% 50%, color-mix(in srgb, var(--user-accent) 14%, transparent), transparent 70%), var(--ink-2);
}
.player-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 260px; height: 260px; border-radius: 50%; border: 1px dashed var(--line-2); pointer-events: none; }
.player-card-av { position: relative; }
.level-badge { position: absolute; right: -6px; bottom: -6px; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 100px; display: grid; place-items: center; background: var(--user-accent); color: var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; box-shadow: 0 0 0 4px var(--ink-2); }
.player-card-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.player-name { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.6rem); line-height: .95; letter-spacing: -0.045em; overflow-wrap: anywhere; }
.player-mail { font-size: 15px; overflow-wrap: anywhere; }
.player-level { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-width: 520px; }
.player-level-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.player-level-row b { color: var(--paper); font-weight: 500; }
.player-next { font-size: 14px; }
.xp-bar { height: 8px; border-radius: 8px; background: color-mix(in srgb, var(--user-accent) 18%, var(--ink-3)); overflow: hidden; }
.xp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--user-accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform 1.2s var(--ease); }
@media (max-width: 560px) { .player-card { grid-template-columns: 1fr; justify-items: start; } }

/* passeport */
.passport { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.passport-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 12px; border-radius: 14px; border: 1px dashed var(--line-2); transition: border-color .3s, background-color .3s; }
.passport-item b { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.02em; }
.passport-item .mono { font-size: 10px; }
.passport-item.is-on { border-style: solid; border-color: color-mix(in srgb, var(--game) 40%, transparent); background: color-mix(in srgb, var(--game) 6%, transparent); }
.passport-item:hover { border-color: var(--line-3); }

/* sélecteur d'avatar et de couleur */
.avatar-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.avatar-option label { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: border-color .25s, background-color .25s; text-align: center; font-size: 12px; color: var(--muted); }
.avatar-option label .avatar { width: 58px; }
.avatar-option label:hover { border-color: var(--line-3); }
.avatar-option input:checked + label { border-color: var(--user-accent); background: color-mix(in srgb, var(--user-accent) 10%, transparent); color: var(--paper); }
.avatar-option input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 3px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { display: block; width: 38px; height: 38px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(12, 10, 9, 0.3); transition: transform .3s var(--ease); }
.swatch:hover { transform: scale(1.08); }
.swatch-option input:checked + .swatch { box-shadow: 0 0 0 3px var(--ink-2), 0 0 0 5px var(--c); }
.swatch-option input:focus-visible + .swatch { outline: 2px solid var(--paper); outline-offset: 6px; }
.swatch-custom { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 100px; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; }
.swatch-custom .mono { font-size: 10px; }
.color-input { width: 32px; height: 32px; border: 0; border-radius: 50%; padding: 0; background: none; cursor: pointer; }
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.color-input::-moz-color-swatch { border: 0; border-radius: 50%; }

/* listes (sessions, jeux connectés) */
.rows { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(236, 234, 227, 0.02); }
.row.is-current { border-color: rgba(61, 220, 132, 0.3); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main b { font-weight: 600; }
.row-main .mono { font-size: 10.5px; }
.row-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(236, 234, 227, 0.05); flex-shrink: 0; }
.row-icon svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.row-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--accent)); flex-shrink: 0; }
.empty svg { width: 32px; height: 32px; stroke: var(--muted); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.danger-zone { padding: 18px; border-radius: 14px; border: 1px solid rgba(255, 107, 94, 0.25); background: rgba(255, 107, 94, 0.03); }
@media (max-width: 560px) { .row { flex-wrap: wrap; } .row .btn, .row .chip { margin-left: 48px; } }

/* ---------- statistiques ---------- */
.stats-body { display: flex; flex-direction: column; gap: clamp(16px, 2.4vw, 24px); }
.stat-tiles { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 12px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.stat-tile { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-2); min-width: 0; }
.stat-label { font-size: 14px; color: var(--muted); }
.stat-value { font-family: var(--f-body); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: break-word; hyphens: auto; }
.stat-tile--hero { background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--user-accent) 16%, transparent), transparent 70%), var(--ink-2); border-color: var(--line-2); }
.stat-tile--hero .stat-value { font-size: clamp(2.8rem, 5vw, 3.6rem); }
.stat-extra { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.stat-extra .mono { font-size: 10.5px; }
.stats-note { font-size: 13.5px; margin-top: -6px; }
.stats-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(16px, 2.4vw, 24px); align-items: start; }
@media (max-width: 1080px) { .stat-tiles { grid-template-columns: repeat(2, 1fr); } .stat-tile--hero { grid-column: 1 / -1; } .stats-grid { grid-template-columns: 1fr; } }

.chart { display: flex; flex-direction: column; gap: 10px; }
.chart-plot { position: relative; width: 100%; outline: none; border-radius: 10px; touch-action: pan-y; }
.chart-plot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.chart-svg { display: block; overflow: visible; }
.chart-tick { fill: var(--muted); font-family: var(--f-mono); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.chart-label { fill: var(--paper); font-family: var(--f-body); font-weight: 600; font-size: 12.5px; paint-order: stroke; stroke: var(--ink-2); stroke-width: 4px; stroke-linejoin: round; }
.chart-tip { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: var(--ink-3); border: 1px solid var(--line-2); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.9); display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.chart-tip b { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.chart-tip b::before { content: ''; width: 12px; height: 2px; border-radius: 2px; background: var(--accent); }
.chart-tip span { font-size: 12.5px; color: var(--muted); }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: 10.5px; padding: 4px 0; width: max-content; }
.chart-table summary:hover { color: var(--paper); }
.chart-table table, .table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chart-table table { margin-top: 10px; }
.chart-table th, .chart-table td, .table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.chart-table thead th, .table thead th { font-family: var(--f-mono); font-size: 10.5px; font-weight: 400; text-transform: uppercase; color: var(--muted); }
.chart-table tbody th, .table tbody th { font-weight: 500; }
.table td.num, .chart-table td { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.cell-game { display: inline-flex; align-items: center; gap: 10px; }

.bars { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.bar-row { position: relative; display: grid; grid-template-columns: minmax(90px, 0.9fr) minmax(0, 1.6fr) auto; gap: 14px; align-items: center; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; outline: none; }
.bar-row:hover, .bar-row:focus-visible { background: rgba(236, 234, 227, 0.04); }
.bar-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bar-label { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; min-width: 0; }
.bar-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--muted)); flex-shrink: 0; }
.bar-track { position: relative; height: 18px; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 0 4px 4px 0; background: var(--c); transition: filter .2s; }
.bar-row:hover .bar-fill, .bar-row:focus-visible .bar-fill { filter: brightness(1.15); }
.bar-value { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-tip { position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 2; padding: 6px 10px; border-radius: 8px; background: var(--ink-3); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--paper-dim); white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; pointer-events: none; }
.bar-row:hover .bar-tip, .bar-row:focus-visible .bar-tip { opacity: 1; visibility: visible; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }

.hl-game { display: flex; align-items: center; gap: 10px; }
.hl-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 8px; }
.hl { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(236, 234, 227, 0.02); }
.hl .mono { font-size: 10.5px; }
.hl b { font-weight: 600; font-size: 1.5rem; letter-spacing: -0.02em; }
.hl b small { font-size: 14px; font-weight: 500; color: var(--muted); }

/* ---------- support ---------- */
.tickets { display: flex; flex-direction: column; gap: 12px; }
.ticket-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ticket-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); transition: border-color .3s, transform .4s var(--ease); }
.ticket-row:hover { border-color: var(--line-3); transform: translateX(4px); }
.ticket-row.is-new { border-color: rgba(255, 182, 39, 0.5); }
.ticket-row.is-new .ticket-num::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--c-eg); vertical-align: 1px; }
.ticket-num { color: var(--accent); }
.ticket-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ticket-main b { font-weight: 600; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-main .mono { font-size: 10.5px; }
.ticket-arrow { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .ticket-row { grid-template-columns: minmax(0, 1fr) auto; } .ticket-num { grid-column: 1 / -1; } .ticket-arrow { display: none; } }

.ticket-head .page-title { font-size: clamp(1.9rem, 5vw, 3.6rem); }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 4px; }
.ticket-meta .mono { font-size: 10.5px; }
.thread { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 12px; align-items: flex-start; max-width: 760px; }
.msg--me { flex-direction: row-reverse; margin-left: auto; }
.msg-av .avatar { width: 40px; }
.team-av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink-3); border: 1px solid var(--line-2); padding: 8px; }
.team-av svg { width: 100%; height: 100%; }
.msg-body { min-width: 0; padding: 14px 16px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.msg--me .msg-body { background: color-mix(in srgb, var(--user-accent) 9%, var(--ink-2)); border-color: color-mix(in srgb, var(--user-accent) 30%, transparent); border-top-right-radius: 4px; }
.msg--team .msg-body { border-top-left-radius: 4px; }
.msg-meta { display: flex; gap: 12px; justify-content: space-between; color: var(--muted); font-size: 10.5px; margin-bottom: 6px; }
.msg-meta b { color: var(--paper); font-weight: 500; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-status { font-size: 14px; }
.reply { margin-top: 4px; }

/* ---------- pages légales ---------- */
.legal-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.legal-toc { position: sticky; top: calc(var(--nav-h) + 20px); }
.legal-toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line-2); }
.legal-toc li { counter-increment: toc; }
.legal-toc a { display: block; padding: 6px 12px; color: var(--muted); font-size: 14px; border-left: 2px solid transparent; margin-left: -1px; transition: color .3s, border-color .3s; }
.legal-toc a::before { content: counter(toc, decimal-leading-zero) ' '; font-family: var(--f-mono); font-size: 11px; color: var(--accent); }
.legal-toc a:hover { color: var(--paper); border-color: var(--accent); }
.legal { max-width: 74ch; display: flex; flex-direction: column; gap: 32px; }
.legal-sec { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: calc(var(--nav-h) + 20px); outline: none; }
.legal-sec h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.03em; display: flex; align-items: baseline; gap: 12px; }
.legal-sec h2 .mono { color: var(--accent); font-size: 12px; }
.legal-sec p, .legal-sec li { color: var(--paper-dim); }
.legal-sec ul { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; }
.legal-sec li::marker { color: var(--accent); }
.legal-contact { padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .legal-grid { grid-template-columns: 1fr; } .legal-toc { position: static; } }

/* ---------- page d'erreur (404 de l'application) ---------- */
.page--error { align-items: center; text-align: center; min-height: calc(100svh - 120px); justify-content: center; padding-bottom: 40px; overflow: hidden; }
.page--error .err-bg { position: absolute; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(50% 42% at 50% 36%, rgba(242, 116, 23, 0.16), transparent 70%), linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px; -webkit-mask-image: radial-gradient(80% 75% at 50% 42%, #000 20%, transparent 80%); mask-image: radial-gradient(80% 75% at 50% 42%, #000 20%, transparent 80%); }
.page--error .err-stage { position: relative; width: min(100%, 900px); display: grid; place-items: center; }
.page--error .err-code { font-family: var(--f-display); font-weight: 800; font-size: clamp(8rem, 30vw, 22rem); line-height: .8; letter-spacing: -0.05em; color: transparent; background: linear-gradient(180deg, rgba(236, 234, 227, 0.2), rgba(236, 234, 227, 0.015) 92%); -webkit-background-clip: text; background-clip: text; user-select: none; }
.page--error .err-fox { position: absolute; left: 50%; top: 50%; width: clamp(170px, 34vw, 380px); translate: -50% -52%; filter: drop-shadow(0 0 60px rgba(242, 116, 23, 0.28)); }
.page--error .err-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.04em; outline: none; }
.page--error .err-text { color: var(--muted); max-width: 46ch; }
.page--error .err-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- jeu embarqué Foxy ---------- */
.page--play { width: min(1240px, 100%); padding-bottom: 260px; }
.play-hud { position: sticky; top: calc(var(--nav-h) + 10px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; padding: 12px 14px 12px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(20, 17, 16, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.play-hud .btn { margin-left: auto; }
.play-counter { display: flex; align-items: baseline; gap: 10px; }
.play-counter .mono { color: var(--muted); font-size: 10.5px; }
.play-counter b { font-family: var(--f-display); font-weight: 700; font-size: 1.8rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; min-width: 2ch; }
.play-score-v { color: var(--accent); display: inline-block; }
.play-score-v.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.35); } }
.play-notice:empty { display: none; }
.play-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1000px) { .play-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .play-cards { grid-template-columns: 1fr; } }
.card {
  position: relative; min-height: 280px; padding: 26px; border-radius: var(--radius);
  background: var(--ink-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; overflow: hidden; transition: border-color .4s;
}
.card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at 50% 0%, rgba(242, 116, 23, 0.12), transparent 50%); opacity: 0; transition: opacity .4s; }
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; color: var(--muted); margin-bottom: auto; }
.card-icon { width: 48px; height: 48px; stroke: var(--paper); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s; }
.card:hover .card-icon { stroke: var(--accent); }
.card h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; letter-spacing: -0.02em; margin-top: 40px; }
.card p { color: var(--muted); font-size: 15px; }
.play-pts { color: var(--c-eg); font-size: 10.5px; }
.card-play { align-self: flex-start; margin-top: 8px; padding: 9px 14px; border-radius: 100px; border: 1px solid var(--line-2); color: var(--paper); transition: background-color .3s, color .3s, border-color .3s; }
.card-play:hover, .card-play:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.fox-tips { color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 22px; }
.fox-tips b { color: var(--paper); font-weight: 500; }
.play-stage-floor { position: fixed; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; z-index: -1; background: linear-gradient(to top, rgba(61, 220, 132, 0.08), transparent), repeating-linear-gradient(90deg, rgba(236, 234, 227, 0.05) 0 1px, transparent 1px 40px); -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent); }

/* ---------- divers ---------- */
.noscript { position: fixed; z-index: 400; left: 50%; top: 50%; translate: -50% -50%; padding: 20px 24px; border-radius: 14px; background: var(--ink-3); color: var(--paper); border: 1px solid var(--line-2); }
@media (max-width: 640px) {
  .play-hud { position: static; gap: 10px 18px; padding: 12px; }
  .play-hud .btn { margin-left: 0; width: 100%; }
  .play-counter b { font-size: 1.5rem; }
}
