/* ==========================================================================
   Tizipedia — Design tokens
   Source : project-docs/03_DESIGN/DESIGN_SYSTEM.md
   Couleurs identitaires relevées sur le logo officiel : #015B99 / #0AB62E.
   Règle : le vert est un accent graphique ; jamais de texte blanc sur vert.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-var.woff2") format("woff2-variations"),
       url("../fonts/manrope-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-var.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* --- Couleurs identitaires ------------------------------------------- */
  --color-blue: #015b99;          /* Bleu Tizipedia — 7,1:1 sur blanc */
  --color-blue-strong: #014a7d;   /* Survol / état actif du bleu */
  --color-green: #0ab62e;         /* Vert Tizipedia — accent graphique uniquement */
  --color-green-soft: #8fdca0;    /* Accent vert atténué (décor) */
  --color-green-strong: #078321;  /* Vert de marque assombri : fond du bouton vert, texte blanc 4,9:1 */
  --color-green-stronger: #066b1b; /* Survol du bouton vert */

  /* --- Couleurs de système --------------------------------------------- */
  --color-navy: #123b59;          /* Bleu nuit : titres, bandeaux sombres */
  --color-navy-deep: #0d2c44;
  --color-text: #425466;          /* Texte courant — 7,5:1 sur blanc */
  --color-text-soft: #5a6b7b;     /* Métadonnées — 5,6:1 sur blanc */
  --color-mist-blue: #f0f8fb;
  --color-mist-green: #eff8f0;
  --color-surface: #ffffff;
  --color-border: #dce6ec;
  --color-border-strong: #c3d3dd;
  --color-on-dark: #ffffff;
  --color-on-dark-soft: #c9dbe8;  /* Texte secondaire sur bleu nuit — 9:1 */

  --color-focus: #015b99;
  --color-focus-on-dark: #ffffff;

  /* --- Typographie ----------------------------------------------------- */
  --font-heading: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --fs-display: clamp(2.25rem, 1.55rem + 2.9vw, 3.5rem);   /* 36 → 56 px */
  --fs-h1: clamp(2rem, 1.55rem + 1.9vw, 3rem);              /* 32 → 48 px */
  --fs-h2: clamp(1.625rem, 1.3rem + 1.35vw, 2.25rem);       /* 26 → 36 px */
  --fs-h3: clamp(1.25rem, 1.12rem + 0.55vw, 1.5rem);        /* 20 → 24 px */
  --fs-h4: 1.125rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);       /* 17 → 20 px */
  --fs-body: 1rem;
  --fs-body-lg: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.8125rem;

  --lh-tight: 1.12;
  --lh-heading: 1.2;
  --lh-body: 1.65;
  --lh-meta: 1.45;

  --tracking-tight: -0.02em;
  --tracking-eyebrow: 0.14em;

  /* --- Espacements (échelle 4/8) -------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 5rem;
  --space-10: 6.5rem;

  --section-space: clamp(3.5rem, 2.4rem + 4.4vw, 6.5rem);   /* 56 → 104 px */
  --gutter: clamp(1rem, 0.55rem + 2.2vw, 2.5rem);           /* 16 → 40 px */
  --container: 75rem;                                        /* 1200 px */
  --container-narrow: 48rem;
  --measure: 38rem;                                          /* largeur de lecture */

  /* --- Formes ---------------------------------------------------------- */
  --radius-sm: 8px;
  --radius-btn: 10px;
  --radius-card: 16px;
  --radius-panel: 28px;
  --radius-pill: 999px;

  --shadow-soft: 0 1px 2px rgb(18 59 89 / 0.06), 0 8px 24px -12px rgb(18 59 89 / 0.18);
  --shadow-lift: 0 2px 4px rgb(18 59 89 / 0.06), 0 24px 48px -24px rgb(18 59 89 / 0.32);

  /* --- Mouvement ------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 160ms;
  --duration-base: 260ms;
  --duration-reveal: 700ms;

  /* --- En-tête (logo horizontal officiel, ratio ≈ 6,66) --------------- */
  --header-height: 4.5rem;        /* 72 px mobile */
  /* Mobile : le logo occupe la largeur laissée par le bouton Menu (≈ 31 px à 360, 34 px à 390). */
  --logo-height: min(2.125rem, calc((100vw - 9.5rem) / 6.8));
}

@media (min-width: 40em) {
  :root {
    --logo-height: 2.125rem;      /* 34 px → 227 px */
  }
}

@media (min-width: 60em) {
  :root {
    --header-height: 5.5rem;      /* 88 px desktop */
    --logo-height: 2.5rem;        /* 40 px → 267 px */
  }
}

@media (min-width: 75em) {
  :root {
    --logo-height: 3rem;          /* 48 px → 320 px */
  }
}
