/* =====================================================================
   Base : jetons de design, reset, typographie. Mobile-first.
   ===================================================================== */
:root {
    --bg: #0a1020;
    --surface: #101a2d;
    --surface-2: #15213a;
    --surface-3: #1b2a47;
    --line: #22314f;
    --line-strong: #2e4066;
    --text: #e8eef8;
    --text-2: #b8c4d9;
    --muted: #7f8ca6;
    --accent: #2dd4bf;          /* turquoise */
    --accent-strong: #14b8a6;
    --accent-ink: #032621;
    --accent-soft: rgba(45, 212, 191, .12);
    --green: #34d399;
    --green-soft: rgba(52, 211, 153, .12);
    --amber: #fbbf24;
    --amber-soft: rgba(251, 191, 36, .12);
    --red: #f87171;
    --red-soft: rgba(248, 113, 113, .12);
    --blue: #60a5fa;

    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-num: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", monospace;
    --sidebar-w: 248px;
    --topbar-h: 60px;
    --bottom-nav-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-5) 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: var(--space-4); }
.stack-sm > * + * { margin-top: var(--space-2); }
.row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.grow { flex: 1; }
.text-right { text-align: right; }
.only-mobile { display: inline-flex; }
.only-desktop { display: none; }

@media (min-width: 1024px) {
    body { font-size: 15.5px; }
    h1 { font-size: 1.75rem; }
    .only-mobile { display: none; }
    .only-desktop { display: initial; }
}

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