/* ──────────────────────────────────────────────────────────────────────────
   Gabriel Brabant Conseil — Tokens
   Système graphique verrouillé, mai 2026.
   À importer en premier dans le projet site.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  /* ─ Couleurs ──────────────────────────────────────────────────────────── */
  --color-bg:        #FAF8F4;   /* Crème — fond principal (≥ 70 % surface)   */
  --color-bg-warm:   #F2EEE5;   /* Crème chaude — fond cards / sections clés */
  --color-ink:       #1A1A1A;   /* Anthracite — texte principal              */
  --color-slate:     #5A5A5A;   /* Ardoise — texte secondaire, captions      */
  --color-rule:      #E4DFD4;   /* Filet — séparateurs, bordures discrètes   */
  --color-accent:    #1F3D2F;   /* Vert sapin — accent ponctuel              */
  --color-rare:      #6B2B2B;   /* Bordeaux feutré — accent "Ce n'est pas pour vous" */

  /* ─ Typographie ───────────────────────────────────────────────────────── */
  --font-sans:  'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  /* Échelle (desktop ≥ 900 px) */
  --fs-h1:      clamp(40px, 5.2vw, 64px);
  --fs-h2:      clamp(28px, 3.4vw, 40px);
  --fs-h3:      22px;
  --fs-body:    18px;
  --fs-lead:    22px;
  --fs-caption: 13px;
  --fs-button:  15px;

  /* Line-heights */
  --lh-tight:   1.08;
  --lh-snug:    1.3;
  --lh-body:    1.6;
  --lh-lead:    1.5;

  /* ─ Espacements (système 8) ───────────────────────────────────────────── */
  --space-1: 8px;     /* élément à élément        */
  --space-2: 16px;    /* au sein d'un groupe      */
  --space-3: 24px;    /* entre groupes proches    */
  --space-4: 40px;    /* paragraphes éditoriaux   */
  --space-5: 80px;    /* respiration de section   */
  --space-6: 120px;   /* changement de chapitre   */

  /* ─ Layout ────────────────────────────────────────────────────────────── */
  --container-max: 1200px;
  --text-measure:  68ch;
  --gutter:        clamp(20px, 4vw, 64px);

  /* ─ Divers ────────────────────────────────────────────────────────────── */
  --radius-none: 0;
  --transition:  120ms ease-out;
}

@media (max-width: 900px) {
  :root {
    --fs-h1:      clamp(32px, 8vw, 40px);
    --fs-h2:      clamp(24px, 5.5vw, 28px);
    --fs-h3:      20px;
    --fs-body:    17px;
    --fs-lead:    19px;
    --space-5:    56px;
    --space-6:    80px;
  }
}

/* ─ Reset minimal ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
}

img, svg, video { max-width: 100%; height: auto; display: block; }

::selection { background: var(--color-accent); color: var(--color-bg); }

/* ─ Liens ──────────────────────────────────────────────────────────────── */
a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color var(--transition);
}
a:hover { color: var(--color-ink); }
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

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