/* ============================================================
   drink.withdavid : tokens de marque, source unique et LOCALE.
   Rapatrie le 2026-09-10 depuis brand-vy.pages.dev/dwd.css + core.css,
   qui etaient generes depuis charte-dwd.html du 29/08.

   Pourquoi en local : toute la palette du site et des 18 outils pendait
   au bout d'un Pages tiers. Il tombe, tout se depeint.

   Verite : board charte-dwd.html (couleurs + ton),
            brand-tokens/design-md/drink-withdavid/DESIGN.md v10 (typo).
   ============================================================ */

:root{
  /* ---- surfaces, mode clair : PAPIER CREME ---- */
  --paper:#F1ECE1;
  --card:#FDFCF8;
  --inset:#E2D9C6;
  --ink:#15130E;
  --muted:#6F6A5E;
  --line:rgba(21,19,14,.14);
  --line-strong:rgba(21,19,14,.24);

  /* ---- LE signal. Un seul mot par bloc, jamais deux. ---- */
  --amber:#B24A16;          /* assombri pour rester lisible sur creme */
  --amber-flat:#EE7A3C;     /* la teinte de marque, hors texte */
  --amber-soft:rgba(178,74,22,.12);

  /* ---- blueprint : cotes, annotations, mesures ---- */
  --blueprint:#4C86FF;
  --blueprint-dim:#5B8FB9;

  /* ---- etats ---- */
  --good:#7FC24F; --warn:#E8A23A; --bad:#E2706E;

  /* ---- typo. DESIGN.md v10 fait foi. JetBrains Mono est ECARTEE. ---- */
  --disp:"Druk Wide Bold",Impact,sans-serif;   /* titres */
  --body:"Manrope",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --num:"Archivo",ui-sans-serif,sans-serif;    /* chiffres, tabular-nums */
  --hand:"DO Sans","Dreaming Outloud",cursive; /* kickers, labels */

  /* ---- formes. ANGLES DROITS PARTOUT. ---- */
  --r-card:0; --r-pill:0;

  /* ---- espace ---- */
  --sp-1:4px;  --sp-2:8px;  --sp-3:12px; --sp-4:16px;
  --sp-5:24px; --sp-6:32px; --sp-7:48px; --sp-8:64px;
  --sp-9:96px; --sp-10:128px;
  --grid-fine:16px; --grid-major:96px;
  --maxw:1200px;
  --pad:clamp(20px,5vw,64px);

  /* ---- echelle typo ---- */
  --fs-xs:11px; --fs-sm:13px; --fs-md:15px; --fs-lg:19px;
  --fs-xl:26px; --fs-2xl:34px; --fs-3xl:46px;
  --lh-tight:1.12; --lh-normal:1.60;

  /* ---- mouvement ---- */
  --ease:cubic-bezier(.22,.61,.36,1);
  --dur:.18s; --dur-slow:.62s;


  /* ---- SUR PHOTO. Ces trois-la ne basculent PAS avec le mode :
     une photo reste sombre en clair comme en sombre, donc son texte reste creme. ---- */
  --on-photo:#F1ECE1;          /* le creme de marque, pas une nuance inventee */
  --on-photo-dim:#D8CFBB;      /* creme attenue : kickers, unites, legendes */
  --veil-rgb:8 6 3;            /* le voile pose sur les photos, alpha libre */

  /* ---- profondeur ---- */
  --shadow:0 14px 34px -16px rgba(0,0,0,.30);
  --shadow-glow:0 14px 30px -14px rgba(178,74,22,.30);
}

/* ---- mode sombre : CHARBON FROID en aplat ---- */
:root[data-theme="dark"]{
  --paper:#121419;
  --card:#1B1E24;
  --inset:#0E1014;
  --ink:#F1ECE1;
  --muted:#949AA3;
  --line:rgba(241,236,225,.13);
  --line-strong:rgba(241,236,225,.20);
  --amber:#EE7A3C;
  --amber-flat:#EE7A3C;
  --amber-soft:rgba(238,122,60,.16);
  --shadow:0 14px 34px -16px rgba(0,0,0,.66);
  --shadow-glow:0 14px 30px -14px rgba(238,122,60,.42);
}

/* Le reglage systeme, sauf si l'utilisateur a explicitement choisi clair. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --paper:#121419;
    --card:#1B1E24;
    --inset:#0E1014;
    --ink:#F1ECE1;
    --muted:#949AA3;
    --line:rgba(241,236,225,.13);
    --line-strong:rgba(241,236,225,.20);
    --amber:#EE7A3C;
    --amber-flat:#EE7A3C;
    --amber-soft:rgba(238,122,60,.16);
    --shadow:0 14px 34px -16px rgba(0,0,0,.66);
    --shadow-glow:0 14px 30px -14px rgba(238,122,60,.42);
  }
}
