/* ==========================================================================
   Base : tokens de design + reset + typographie.
   Pour changer le thème, modifie UNIQUEMENT les variables de :root.
   ========================================================================== */
:root {
  color-scheme: dark;

  /* Violets (du plus sombre au plus clair) */
  --ink-950: #0b0616;
  --ink-900: #120a24;
  --ink-800: #1a1032;
  --ink-700: #241545;
  --ink-600: #2f1d58;
  --violet-500: #8b5cf6;
  --violet-400: #a78bfa;
  --violet-300: #c4b5fd;
  --orchid: #e879f9;            /* accent chaud : sélection, lecture en cours */
  --danger: #fb7185;
  --ok: #86efac;

  --text: #f5f0ff;
  --text-dim: #b3a5d6;
  --text-faint: #7d6ea3;
  --line: rgba(196, 181, 253, 0.14);
  --glass: rgba(26, 16, 50, 0.62);
  --glass-strong: rgba(18, 10, 36, 0.88);

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --topbar-h: 60px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--text);
  font: 400 15px/1.45 var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.75rem; font-weight: 750; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 650; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--violet-300); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Barres de défilement discrètes */
* { scrollbar-width: thin; scrollbar-color: rgba(167, 139, 250, 0.35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(167, 139, 250, 0.3); border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
