/*
 * Design tokens — Vivre Végétal
 * Identité reprise de la charte print (flyer A) : fond crème, encre presque
 * noire, accent rouille, pastel abricot. Un vert feuille discret est ajouté
 * pour les états « vegan / ok », jamais comme couleur de marque.
 *
 * Toutes les paires texte/fond utilisées dans les composants sont vérifiées
 * AA (4.5:1 texte normal, 3:1 grand texte et UI) — voir docs/DESIGN.md.
 */

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/sourcesans3-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/sourcesans3-400i.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/sourcesans3-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/sourcesans3-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Couleurs — charte print */
  --vv-cream: #faf7f0;
  --vv-cream-dim: #f2ede2;
  --vv-ink: #1b1b1b;
  --vv-ink-soft: #4a453d;
  --vv-rust: #93441a;
  --vv-rust-dark: #722f10;
  --vv-rust-tint: #f7e7d6;
  --vv-leaf: #3f6b3a;
  --vv-leaf-dark: #2d4e29;
  --vv-leaf-tint: #e8f0e3;
  --vv-line: #ddd4c2;
  --vv-line-strong: #b9ac93;
  --vv-white: #ffffff;
  --vv-error: #a3271e;
  --vv-error-tint: #f8e6e3;

  /* Rôles sémantiques */
  --bg: var(--vv-cream);
  --bg-raised: var(--vv-white);
  --bg-subtle: var(--vv-cream-dim);
  --fg: var(--vv-ink);
  --fg-muted: var(--vv-ink-soft);
  --accent: var(--vv-rust);
  --accent-strong: var(--vv-rust-dark);
  --accent-tint: var(--vv-rust-tint);
  --ok: var(--vv-leaf);
  --ok-strong: var(--vv-leaf-dark);
  --ok-tint: var(--vv-leaf-tint);
  --danger: var(--vv-error);
  --danger-tint: var(--vv-error-tint);
  --border: var(--vv-line);
  --border-strong: var(--vv-line-strong);
  --focus-ring: #1560c4;

  /* Typographie */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-sm: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --fs-md: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
  --fs-lg: clamp(1.4rem, 1.25rem + 0.75vw, 1.85rem);
  --fs-xl: clamp(1.9rem, 1.6rem + 1.5vw, 2.75rem);
  --fs-xxl: clamp(2.4rem, 1.9rem + 2.5vw, 3.75rem);

  --lh-tight: 1.15;
  --lh-heading: 1.25;
  --lh-body: 1.6;

  /* Espacement — échelle 4/8pt */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* Rayons */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Ombres — douces, jamais de noir pur */
  --shadow-sm: 0 1px 2px rgba(27, 27, 27, 0.08);
  --shadow-md: 0 6px 20px -8px rgba(27, 27, 27, 0.22);
  --shadow-lg: 0 16px 40px -14px rgba(27, 27, 27, 0.28);

  /* Grille / mise en page */
  --content-max: 72rem;
  --content-narrow: 44rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);

  /* Mouvement */
  --dur-fast: 150ms;
  --dur-base: 220ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-contrast: more) {
  :root {
    --border: var(--border-strong);
    --fg-muted: var(--fg);
  }
}
