:root {
  /* Colors */
  --color-bg: #f8f7f4;
  --color-surface: #ffffff;
  --color-surface-soft: #f1f0ec;

  --color-text: #171717;
  --color-text-muted: #66635d;
  --color-text-subtle: #918d84;

  --color-border: #e2ded6;
  --color-border-strong: #cfc8bc;

  --color-accent: #1f3a5f;
  --color-accent-hover: #182e4d;
  --color-accent-soft: #e8eef5;
  --color-accent-border: #cbd7e5;
  --color-accent-soft-strong: #dde7f3; /* choix de l'utilisateur dans un sondage */
  --color-on-accent: #ffffff;          /* texte / icône sur fond encre */
  --color-icon-lead: #46443f;          /* icône de tête des listes (R7), jamais noir pur */

  /* Snackbar et bannière hors ligne : surface sombre (composant, pas un thème — R10).
     La couleur sémantique vit dans l'icône, jamais en aplat. */
  --color-snack-bg: #211f1c;
  --color-snack-text: #f4f2ee;
  --color-snack-success: #4cc38a;
  --color-snack-info: #6db3f2;
  --color-snack-error: #f2858f;
  --color-snack-action: #9ec2f0;
  --color-snack-warning: #f2c14e;
  --shadow-snack: 0 12px 34px rgba(20, 22, 28, 0.26);
  --shadow-push-edge: -10px 0 28px rgba(20, 22, 28, 0.14); /* bord de la page poussée (R8) */
  --ease-push: cubic-bezier(0.32, 0.72, 0.35, 1);

  --color-success: #198754;
  --color-success-soft: #d1e7dd;

  --color-warning: #664d03;
  --color-warning-soft: #fff3cd;

  --color-danger: #dc3545;
  --color-danger-soft: #f8d7da;

  --color-info: #0d6efd;
  --color-info-soft: #cfe2ff;

  /* Typography */
  --font-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;

  --text-post-body: var(--text-base);
  --text-post-excerpt: var(--text-base);
  --text-comment-body: var(--text-sm);
  --leading-post-body: 1.65;
  --leading-post-excerpt: 1.55;
  --leading-comment-body: 1.6;
  --space-post-paragraph: var(--space-3);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-none: none;
  --shadow-sm: var(--shadow-soft);
  --shadow-soft: 0 1px 2px rgba(23, 23, 23, 0.04);
  --shadow-dialog: 0 16px 48px rgba(23, 23, 23, 0.16);

  /* 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 {
    --text-post-body: 0.9375rem;
    --text-post-excerpt: 0.9375rem;
    --leading-post-body: 1.52;
    --leading-post-excerpt: 1.45;
    --space-post-paragraph: var(--space-2);
  }
}
