/* =====================================================================
   HYPRR — design system (base) : polices, jetons, reset, primitives.
   Partagé par le site (app.css) et Mission Control (admin.css).
   ===================================================================== */
@font-face { font-family: 'D-DIN'; src: url('../fonts/D-DIN.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'D-DIN'; src: url('../fonts/D-DIN-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'D-DIN'; src: url('../fonts/D-DIN-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'D-DIN Exp'; src: url('../fonts/D-DINExp-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'D-DIN Condensed'; src: url('../fonts/D-DINCondensed-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #000;
  --bg-1: #060607;
  --bg-2: #0c0c0f;
  --bg-3: #131317;
  --bg-4: #1b1b21;
  --line: rgba(240, 240, 250, .09);
  --line-2: rgba(240, 240, 250, .16);
  --line-3: rgba(240, 240, 250, .3);
  --text: #f0f0fa;
  --text-2: rgba(240, 240, 250, .74);
  --muted: rgba(240, 240, 250, .52);
  --dim: rgba(240, 240, 250, .32);
  --ok: #34d399;   --ok-bg: rgba(52, 211, 153, .12);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .12);
  --err: #ff5a5f;  --err-bg: rgba(255, 90, 95, .12);
  --info: #60a5fa; --info-bg: rgba(96, 165, 250, .12);
  --live: #ff3d3d;
  --online: #34d399; --away: #fbbf24; --ingame: #60a5fa; --offline: rgba(240, 240, 250, .26);
  --font: 'D-DIN', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-exp: 'D-DIN Exp', 'D-DIN', 'Helvetica Neue', Arial, sans-serif;
  --font-cond: 'D-DIN Condensed', 'D-DIN', 'Arial Narrow', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --nav-h: 72px;
  --radius: 2px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1480px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --z-nav: 50; --z-panel: 70; --z-player: 80; --z-overlay: 90; --z-modal: 100; --z-toast: 120;
  color-scheme: dark;
}

/* ---- Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; text-rendering: optimizeLegibility;
}
img, svg, video, canvas, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.1; }
p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
::selection { background: var(--text); color: #000; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
[hidden] { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: rgba(240, 240, 250, .18) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(240, 240, 250, .16); border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.ico { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.upper { text-transform: uppercase; letter-spacing: .14em; }
.label { font: 700 11px/1.2 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.stack { display: grid; gap: 16px; }
.grow { flex: 1; min-width: 0; }
.ok { color: var(--ok); } .err { color: var(--err); } .warn { color: var(--warn); } .info { color: var(--info); }

/* ---- Boutons (contour + remplissage qui monte au survol) ----------------------- */
.btn {
  --b: var(--text);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 26px; border: 2px solid var(--b); border-radius: var(--radius);
  color: var(--text); background: transparent;
  font: 700 13px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  transition: color .35s var(--ease), border-color .25s, opacity .2s, transform .15s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--b);
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform .38s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn:hover, .btn:focus-visible { color: #000; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--text); color: #000; }
.btn--primary::before { background: #000; }
.btn--primary:hover, .btn--primary:focus-visible { color: var(--text); }
.btn--ghost { border-color: transparent; color: var(--text-2); }
.btn--ghost::before { background: rgba(240, 240, 250, .08); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--text); }
.btn--danger { --b: var(--err); color: var(--err); }
.btn--danger:hover, .btn--danger:focus-visible { color: #fff; }
.btn--text { border-color: transparent; padding: 0 4px; height: auto; color: var(--text-2); }
.btn--text::before { display: none; }
.btn--text:hover { color: var(--text); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 11.5px; letter-spacing: .14em; border-width: 1px; gap: 8px; }
.btn--lg { height: 58px; padding: 0 36px; font-size: 14px; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .38; pointer-events: none; }
.btn.is-loading .btn__label { opacity: .6; }

.ibtn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  color: var(--text-2); border-radius: var(--radius); transition: color .2s, background .2s;
}
.ibtn:hover, .ibtn.is-active { color: var(--text); background: rgba(240, 240, 250, .08); }
.ibtn__badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--text); color: #000; font: 700 10px/17px var(--font); text-align: center; letter-spacing: 0;
}

/* ---- Formulaires ---------------------------------------------------------------- */
.field { display: grid; gap: 8px; min-width: 0; }
.field__label { display: flex; justify-content: space-between; gap: 8px; font: 700 11px/1.2 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.field__counter { font-style: normal; color: var(--dim); letter-spacing: .04em; }
.field__error { color: var(--err); font-size: 13.5px; line-height: 1.35; }
.field__hint { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.input {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: rgba(240, 240, 250, .03); color: var(--text); font-size: 16px; outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.input::placeholder { color: var(--dim); }
.input:hover { border-color: var(--line-3); }
.input:focus { border-color: var(--text); background: rgba(240, 240, 250, .05); }
.input:disabled { opacity: .5; }
.textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.field.has-error .input { border-color: var(--err); }
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.select select option { background: var(--bg-3); color: var(--text); }
.select > .ico { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.form-grid { display: grid; gap: 20px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid--2 { grid-template-columns: 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }

.toggle { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__text { display: grid; gap: 3px; min-width: 0; }
.toggle__text small { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.toggle__track { position: relative; flex: none; width: 46px; height: 26px; border: 1px solid var(--line-3); transition: background .25s, border-color .25s; }
.toggle__thumb { position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; background: var(--muted); transition: transform .3s var(--ease), background .25s; }
.toggle input:checked + .toggle__track { background: var(--text); border-color: var(--text); }
.toggle input:checked + .toggle__track .toggle__thumb { transform: translateX(20px); background: #000; }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--text); outline-offset: 3px; }
.toggle.is-disabled { opacity: .5; pointer-events: none; }

.check { display: inline-flex; align-items: flex-start; gap: 12px; cursor: pointer; line-height: 1.45; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border: 1px solid var(--line-3); color: transparent; transition: background .2s, border-color .2s, color .2s; }
.check input:checked + .check__box { background: var(--text); border-color: var(--text); color: #000; }
.check input:focus-visible + .check__box { outline: 2px solid var(--text); outline-offset: 2px; }
.check__label { color: var(--text-2); font-size: 14.5px; }
.check__label a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg__btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; font: 700 11px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: color .2s, background .2s; }
.seg__btn:hover { color: var(--text); }
.seg__btn.is-active { background: var(--text); color: #000; }

/* ---- Onglets ------------------------------------------------------------------ */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 16px 0 15px; font: 700 12px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: color .2s; }
.tabs__tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); transform: scaleX(0); transition: transform .35s var(--ease); }
.tabs__tab:hover { color: var(--text-2); }
.tabs__tab.is-active { color: var(--text); }
.tabs__tab.is-active::after { transform: scaleX(1); }
.tabs__count { font-style: normal; color: var(--dim); letter-spacing: .04em; }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 24px 0 8px; }
.pager__info { font-size: 13px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.pager__info b { color: var(--text); }

/* ---- Badges, niveaux, présence, avatars --------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
  border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text-2);
  font: 700 10px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}
.badge--live { color: var(--live); border-color: rgba(255, 61, 61, .5); }
.badge--live::before { content: ''; width: 6px; height: 6px; background: var(--live); animation: blink 1.4s steps(2, start) infinite; }
.badge--ok { color: var(--ok); border-color: rgba(52, 211, 153, .4); }
.badge--warn { color: var(--warn); border-color: rgba(251, 191, 36, .4); }
.badge--err { color: var(--err); border-color: rgba(255, 90, 95, .4); }
.badge--info { color: var(--info); border-color: rgba(96, 165, 250, .4); }
.badge--accent { background: var(--text); border-color: var(--text); color: #000; }
.badge--glass { background: rgba(0, 0, 0, .45); border-color: rgba(240, 240, 250, .25); color: var(--text); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.lvl { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid var(--line-3); color: var(--text); font: 700 12px/1 var(--font); font-variant-numeric: tabular-nums; flex: none; }
.lvl--2 { border-color: #60a5fa; color: #93c5fd; }
.lvl--3 { border-color: #a78bfa; color: #c4b5fd; }
.lvl--4 { border-color: #fbbf24; color: #fcd34d; }
.lvl--5 { border-color: #ff5a5f; color: #ff9a9d; box-shadow: 0 0 14px rgba(255, 90, 95, .35); }

.pdot { display: inline-block; width: 9px; height: 9px; flex: none; background: var(--offline); }
.pdot--online { background: var(--online); box-shadow: 0 0 8px rgba(52, 211, 153, .55); }
.pdot--away { background: var(--away); }
.pdot--ingame { background: var(--ingame); box-shadow: 0 0 8px rgba(96, 165, 250, .6); }

.avatar {
  --h: 220; position: relative; flex: none; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h) 38% 24%), hsl(calc(var(--h) + 40) 40% 14%));
  color: hsl(var(--h) 85% 86%); user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar__ini { font-weight: 700; letter-spacing: .04em; line-height: 1; }
.avatar__dot { position: absolute; right: -3px; bottom: -3px; box-shadow: 0 0 0 2px var(--bg); }
.avatar--ring { outline: 1px solid var(--line-3); outline-offset: 2px; }

/* ---- Télémétrie, titres de section, progression ------------------------------------ */
.stat { display: grid; gap: 8px; align-content: start; }
.stat__value { font: 700 clamp(28px, 3.6vw, 44px)/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.stat__label { font: 700 11px/1.25 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.stat__sub { font-size: 13px; color: var(--dim); }
.stat--big .stat__value { font-size: clamp(40px, 6vw, 76px); }

.shead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.shead__kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font: 700 11px/1 var(--font); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.shead__kicker b { color: var(--text); }
.shead__kicker b::after { content: ''; display: inline-block; width: 28px; height: 1px; margin-left: 12px; vertical-align: middle; background: var(--line-3); }
.shead__title { font: 700 clamp(26px, 3.4vw, 42px)/1 var(--font); text-transform: uppercase; letter-spacing: .02em; }
.shead__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.progress { position: relative; display: block; height: 3px; background: var(--line-2); overflow: hidden; }
.progress__fill { position: absolute; inset: 0; background: var(--text); transform-origin: 0 50%; transition: transform .6s var(--ease); }

/* ---- Chargement / vide ------------------------------------------------------------ */
.spin { display: inline-block; flex: none; border: 2px solid var(--line-2); border-top-color: var(--text); border-radius: 50%; animation: spin .75s linear infinite; }
.spin--sm { width: 16px; height: 16px; }
.spin--md { width: 22px; height: 22px; }
.spin--lg { width: 34px; height: 34px; }
.loader { display: grid; justify-items: center; gap: 14px; padding: 72px 16px; }
.loader__bar { position: relative; width: 140px; height: 2px; background: var(--line-2); overflow: hidden; }
.loader__bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--text); animation: scan 1.1s var(--ease-io) infinite; }
.loader__label { font: 700 10px/1 var(--font); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.skel { display: block; background: linear-gradient(90deg, rgba(240, 240, 250, .05) 25%, rgba(240, 240, 250, .1) 37%, rgba(240, 240, 250, .05) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 64px 20px; color: var(--text-2); }
.empty--compact { padding: 32px 16px; }
.empty__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.empty--compact .empty__icon { width: 48px; height: 48px; }
.empty__title { font: 700 15px/1.3 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.empty__text { max-width: 420px; font-size: 15px; color: var(--muted); }
.empty__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* ---- Menu déroulant ----------------------------------------------------------- */
.menu { position: relative; }
.menu__pop {
  position: absolute; top: calc(100% + 10px); z-index: 30; min-width: 230px; padding: 8px;
  background: rgba(12, 12, 15, .96); border: 1px solid var(--line-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6); animation: pop .18s var(--ease);
}
.menu__pop--right { right: 0; }
.menu__pop--left { left: 0; }
.menu__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; font-size: 14.5px; color: var(--text-2); transition: background .15s, color .15s; }
.menu__item:hover, .menu__item:focus-visible { background: rgba(240, 240, 250, .07); color: var(--text); }
.menu__item.is-danger { color: var(--err); }
.menu__sep { margin: 6px 0; }

/* ---- Modale ------------------------------------------------------------------ */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease; }
.modal__panel {
  position: relative; width: 100%; max-height: calc(100dvh - 40px); overflow: auto;
  background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 40px 120px rgba(0, 0, 0, .8); animation: rise .28s var(--ease);
}
.modal--sm .modal__panel { max-width: 460px; }
.modal--md .modal__panel { max-width: 640px; }
.modal--lg .modal__panel { max-width: 960px; }
.modal--xl .modal__panel { max-width: 1240px; }
.modal__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.modal__title { font: 700 15px/1.2 var(--font); letter-spacing: .16em; text-transform: uppercase; }
.modal__body { padding: 24px; }
.modal__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; padding: 18px 24px; border-top: 1px solid var(--line); }
.modal__text { color: var(--text-2); line-height: 1.6; }

/* ---- Toasts ------------------------------------------------------------------- */
.toasts { position: fixed; right: 20px; bottom: calc(20px + var(--safe-b)); z-index: var(--z-toast); display: grid; gap: 10px; width: min(380px, calc(100vw - 40px)); pointer-events: none; }
.toast {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 40px 14px 16px; pointer-events: auto;
  background: rgba(14, 14, 18, .97); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
  animation: toastIn .38s var(--ease); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.toast::before { content: ''; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; background: var(--text); }
.toast--ok::before { background: var(--ok); }
.toast--err::before { background: var(--err); }
.toast--warn::before { background: var(--warn); }
.toast--info::before { background: var(--info); }
.toast__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid var(--line-2); color: var(--text-2); }
.toast__img { flex: none; width: 40px; height: 40px; object-fit: cover; }
.toast__title { font: 700 12px/1.3 var(--font); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 3px; }
.toast__text { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.toast__close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); }
.toast__close:hover { color: var(--text); }
a.toast:hover { border-color: var(--line-3); }

/* ---- Tables (listes de données) ------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { position: sticky; top: 0; padding: 12px 14px; text-align: left; font: 700 10.5px/1.2 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(240, 240, 250, .03); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Texte riche (markdown) ------------------------------------------------------- */
.prose { color: var(--text-2); font-size: 17px; line-height: 1.75; }
.prose > * + * { margin-top: 1.05em; }
.prose h2, .prose h3, .prose h4 { color: var(--text); text-transform: uppercase; letter-spacing: .06em; margin-top: 2em; }
.prose h2 { font-size: 22px; }
.prose h3 { font-size: 18px; }
.prose h4 { font-size: 15px; letter-spacing: .12em; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }
.prose a:hover { text-decoration-color: var(--text); }
.prose ul, .prose ol { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; }
.prose li + li { margin-top: .45em; }
.prose ul li::before { content: ''; position: absolute; left: 4px; top: .72em; width: 8px; height: 1px; background: var(--text); }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; color: var(--muted); font-size: .8em; font-weight: 700; top: .2em; }
.prose blockquote { padding: 16px 20px; border-left: 2px solid var(--text); background: rgba(240, 240, 250, .04); color: var(--text-2); }
.prose code { font-family: var(--mono); font-size: .86em; padding: 2px 6px; background: rgba(240, 240, 250, .08); }
.prose img { width: 100%; margin: 1.6em 0; border: 1px solid var(--line); }
.prose hr { margin: 2em 0; }

/* ---- Apparitions ------------------------------------------------------------------ */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes blink { to { visibility: hidden; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
