/**
 * invoRiva — Base Reset & Styles Globaux
 * ════════════════════════════════════════════════════════════
 * Dépend de tokens.css (chargé avant).
 * Pas de mise en page (→ layout.css).
 * Pas de composants (→ components/).
 * ════════════════════════════════════════════════════════════
 */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-weight-base, 400);
    line-height: var(--leading-normal);
    color: var(--ink);
    background-color: var(--bg-canvas);
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition:
        background-color var(--dur-base) var(--ease-inout),
        color            var(--dur-base) var(--ease-inout);
}

/* ── Typographie ────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: var(--leading-tight);
    color: var(--ink);
    margin-bottom: var(--spacing-4);
}
/* h1-h3 scale with --header-font-size (unitless multiplier, default 1.15) */
h1 { font-size: calc(var(--text-3xl) * var(--header-font-size, 1.15)); }
h2 { font-size: calc(var(--text-2xl) * var(--header-font-size, 1.15)); }
h3 { font-size: calc(var(--text-xl)  * var(--header-font-size, 1.15)); }
h4 { font-size: var(--text-lg);  }
h5 { font-size: var(--text-md);  font-family: var(--font-body); font-weight: 600; }
h6 { font-size: var(--text-sm);  font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: var(--spacing-4); }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; transition: color var(--dur-fast); }
strong, b { font-weight: 600; }
small { font-size: var(--text-sm); }
code, kbd, pre, samp { font-family: var(--font-mono-family, var(--font-mono)); font-size: 0.9em; }

/* ── Focus accessible ───────────────────────────────────────── */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar          { width: 5px; height: 5px; }
::-webkit-scrollbar-track    { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb    { background: var(--scrollbar-thumb); }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }

/* ── Sélection ──────────────────────────────────────────────── */
::selection { background: var(--accent-lt); color: var(--accent); }
[data-theme="dark"] ::selection { background: var(--accent); color: var(--ink-inv); }

/* ── Divers ─────────────────────────────────────────────────── */
img, svg { display: block; max-width: 100%; }
hr { border: none; border-top: 1px solid var(--border); margin: var(--spacing-6) 0; }
ul, ol { padding-left: var(--spacing-6); }
button { font-family: var(--font-body); cursor: pointer; background: none; border: none; }

/* ── Keyframes partagées ────────────────────────────────────── */
@keyframes fadeUp  { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn  { from{opacity:0} to{opacity:1} }
@keyframes dropIn  { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
@keyframes spin    { to{transform:rotate(360deg)} }
@keyframes pulse   { 0%,100%{opacity:1} 50%{opacity:.5} }
@keyframes shimmer { from{transform:translateX(-100%)} to{transform:translateX(100%)} }

@media (max-width: 768px) {
    :root { --text-3xl: 1.5rem; --text-2xl: 1.25rem; }
}


 .table-wrap {
    background: var(--bg-card);
    border: var(--border-width) solid var(--border);
    border-radius: var(--border-radius);
    overflow-x: auto;
    animation: fadeUp var(--dur-slow) var(--ease-out) both 0.1s both;
}
