/*
 * Jetons de la charte « Veille » — dérivés du site https://ops-devices.eu
 * (encre, papier, aciers, typographie, bordures 2 px, ombres « tampon »),
 * avec une couleur principale MAUVE à la place de l'orange « signal ».
 * Contrastes vérifiés (WCAG AA) : voir la note « Charte graphique » du coffre.
 */
:root {
  color-scheme: light dark;

  /* — Palette de base ops-devices.eu — */
  --od-ink: #14151a;        /* encre : texte, bordures, ombres */
  --od-paper: #f1f0ec;      /* papier : en-tête, cartes (plates) */
  --od-paper-2: #fdfcf7;    /* papier clair : champs */
  --od-steel-200: #cdd0d5;  /* fond de page */
  --od-steel-300: #b6bac1;  /* fond de section alternée, texte du pied */
  --od-steel-500: #6b7079;
  --od-steel-600: #555a63;  /* texte secondaire (AA sur papier et acier) */
  --od-steel-700: #40444c;
  --od-space: #0b0c10;      /* pied de page, bandeaux sombres */
  --od-danger: #b3261e;

  /* — Mauve (remplace l'orange signal #f28c28) — */
  --mauve-700: #5e3582;     /* liens sur fond acier (5,9:1) */
  --mauve-600: #6a3f8f;     /* survol (6,8:1 sur papier) */
  --mauve-500: #7b4fa0;     /* principale (5,3:1 sur papier ; texte papier dessus 5,3:1) */
  --mauve-300: #b48ce0;     /* principale en mode sombre (6,7:1 sur encre) */
  --mauve-200: #c9a6ee;     /* survol en mode sombre */
  --mauve-100: #ece3f6;     /* fond doux */
  --mauve-900: #2a1d38;     /* fond doux en mode sombre */

  /* — Rôles (mode clair) — */
  --bg: var(--od-steel-200);
  --bg-alt: var(--od-steel-300);
  --surface: var(--od-paper);
  --field: var(--od-paper-2);
  --ink: var(--od-ink);
  --mute: var(--od-steel-600);
  --line: var(--od-ink);          /* bordures structurantes 2 px */
  --hair: #b6bac1;                /* filets fins */
  --accent: var(--mauve-500);
  --accent-hover: var(--mauve-600);
  --accent-ink: var(--od-paper);  /* texte sur bouton mauve */
  --accent-link: var(--mauve-700);
  --accent-soft: var(--mauve-100);
  --accent-soft-ink: var(--mauve-700);
  --focus: var(--mauve-500);
  --danger: var(--od-danger);
  --dark: var(--od-space);
  --dark-ink: var(--od-steel-300);

  /* — Typographie — */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --fs-kicker: 11px;     /* sur-titres mono capitales, interlettrage .1em */
  --fs-label: 10px;      /* étiquettes mono */
  --fs-btn: .75rem;      /* boutons : capitales, gras 600, interlettrage .05em */
  --fs-body: 1rem;
  --fs-h1: clamp(1.75rem, 3.2vw, 2.5rem);
  --fs-h2: 1.25rem;

  /* — Formes — */
  --border: 2px;
  --radius-btn: .375rem;  /* 6 px */
  --radius-plate: .5rem;  /* 8 px */
  --radius-pill: 9999px;
  --shadow-btn: 0 3px 0 var(--od-ink);
  --shadow-btn-hover: 0 2px 0 var(--od-ink);

  /* — Espacements — */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem;
  --wrap: 80rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111216;
    --bg-alt: #16181d;
    --surface: #1b1d24;
    --field: #14151a;
    --ink: #ece9e2;
    --mute: #a6aab2;
    --line: #6b7079;
    --hair: #2e3139;
    --accent: var(--mauve-300);
    --accent-hover: var(--mauve-200);
    --accent-ink: var(--od-ink);
    --accent-link: var(--mauve-300);
    --accent-soft: var(--mauve-900);
    --accent-soft-ink: var(--mauve-200);
    --focus: var(--mauve-300);
    --danger: #f2a09a;
    --shadow-btn: 0 3px 0 #000;
    --shadow-btn-hover: 0 2px 0 #000;
  }
}
