:root {
  /* ═══ Système fonctionnel (internal/design-system/, v1.0) ═══
     Les valeurs viennent des jetons --ds-… (static/css/ds/jetons.css, copie exacte du système).
     Les anciennes variables de Tripotay pointent dessus le temps de la migration (guide 10, étape 1) :
     aucune couleur, ombre ou rayon n'est plus défini ici. */

  /* Fonds et surfaces : un fond blanc identique partout, la bordure détache */
  --color-bg: var(--ds-bg);
  --color-surface: var(--ds-surface);
  --color-surface-soft: var(--ds-bg-subtle);

  /* Textes */
  --color-text: var(--ds-text);
  --color-text-muted: var(--ds-text-2);
  --color-text-subtle: var(--ds-text-3);

  /* Bordures */
  --color-border: var(--ds-border);
  --color-border-strong: var(--ds-border-strong);
  --color-border-subtle: var(--ds-border-subtle);
  --color-border-field: var(--ds-border-field);

  /* L'accent est l'encre : bouton principal, état actif, sélection. Pas de couleur de marque. */
  --color-accent: var(--ds-accent);
  --color-accent-hover: var(--ds-accent-hover);
  --color-accent-soft: var(--ds-fill);
  --color-accent-border: var(--ds-border);
  --color-accent-soft-strong: var(--ds-fill-strong); /* choix de l'utilisateur dans un sondage */
  --color-on-accent: var(--ds-on-color);             /* texte / icône sur couleur pleine */
  --color-icon-lead: var(--ds-text-2);               /* icône de tête des listes (R7) */

  /* Bannière hors ligne (« bandeau de connexion ») : la bande sombre du système, comme le toast.
     Teintes d'icône : celles, fixes, de .ds-toast (static/css/ds/composants.css). */
  --color-snack-bg: var(--ds-band);
  --color-snack-text: var(--ds-band-text);
  --color-snack-success: #67dc84;
  --color-snack-warning: #f4c753;
  /* Bord de la page poussée pendant la transition R8 : elle glisse AU-DESSUS de la précédente (flottant) */
  --shadow-push-edge: -10px 0 28px rgba(0, 0, 0, 0.14);
  --ease-push: var(--ds-motion-ease);

  /* Quatre couleurs, quatre sens (toujours avec un mot ou une icône) */
  --color-success: var(--ds-success);
  --color-success-soft: var(--ds-success-soft);
  --color-warning: var(--ds-warning);
  --color-warning-soft: var(--ds-warning-soft);
  --color-danger: var(--ds-danger);
  --color-danger-soft: var(--ds-danger-soft);
  --color-info: var(--ds-info);
  --color-info-soft: var(--ds-info-soft);

  /* Typography */
  --font-sans: var(--ds-font-sans);
  /* Tailles, graisses, interlignes : directement les jetons --ds-font-*, --ds-line-height-*,
     --ds-letter-spacing-* (design system, guide 03). Pòs et repons en 16 px, interface en 14 px. */

  --space-post-paragraph: var(--space-3);

  /* Spacing */
  --space-1: var(--ds-space-1);
  --space-2: var(--ds-space-2);
  --space-3: var(--ds-space-3);
  --space-4: var(--ds-space-4);
  --space-5: var(--ds-space-5);
  --space-6: var(--ds-space-6);
  --space-8: var(--ds-space-8);
  --space-10: var(--ds-space-10);
  --space-12: var(--ds-space-12);

  /* Quatre rayons et la pilule (guide 04). Les anciens noms pointent sur l'échelle du système :
     lg (14 → 12) et xl (18 → 16) rejoignent l'échelle. */
  --radius-sm: var(--ds-radius-sm);
  --radius-md: var(--ds-radius-md);
  --radius-lg: var(--ds-radius-lg);
  --radius-xl: var(--ds-radius-xl);
  --radius-full: var(--ds-radius-pill);

  /* Une seule ombre, pour ce qui flotte (menu, feuille, fenêtre, toast). Les cartes n'en ont pas. */
  --shadow-none: none;
  --shadow-sm: none;
  --shadow-soft: none;

  /* Layout */
  --layout-feed-max: 680px;
  --layout-reading-max: 720px;
  --layout-wide-max: 1040px;

  /* Legacy aliases for the existing stylesheet during the V2 migration. */
  --t-bg: var(--color-surface);
  --t-bg2: var(--color-bg);
  --t-surface: var(--color-surface);
  --t-border: var(--color-border);
  --t-orange: var(--color-accent);
  --t-orange-light: var(--color-accent-soft);
  --t-text: var(--color-text);
  --t-muted: var(--color-text-muted);
  --t-hover: var(--color-surface-soft);
  --t-danger: var(--color-danger);
  --t-radius: var(--radius-md);
  --t-shadow: var(--shadow-soft);
}

@media (max-width: 680px) {
  :root {
    --space-post-paragraph: var(--space-2);
  }
}
