/* ════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM — piste A « Le Geste » (docs/design/SYSTEM.md)
   Chargé APRÈS style.css sur les pages cœur. Tout ce qui a un effet
   visible est limité à body.ds : une page sans la classe `ds` (dont
   les ~800 pages SEO) ne change pas. Les tokens de :root ne sont lus
   par aucune règle de style.css.
   ════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url(fonts/bricolage-grotesque-latin.woff2) format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Couleurs (contrastes WCAG dans SYSTEM.md) */
  --pierre: #D6CEC2;   /* fond de page, famille des murs photographiés */
  --lin:    #EEE9E1;   /* panneaux, champs, tiroirs */
  --noir:   #000000;   /* texte, bouton principal */
  --gris:   #5B544B;   /* texte secondaire, jamais sous 14px */
  --rouge:  #A3111A;   /* prix, sélection, badge panier, erreur (+ icône) */
  --tige:   #2E5136;   /* disponibilité, livraison du jour */

  /* Typographie */
  --ds-font: 'Bricolage Grotesque', system-ui, sans-serif;
  --ds-fs-display: clamp(42px, 11.5vw, 112px);
  --ds-fs-h2: clamp(30px, 7vw, 56px);
  --ds-fs-h3: 17px;
  --ds-fs-body: 16px;
  --ds-fs-lead: 17px;
  --ds-fs-small: 14px;
  --ds-fs-min: 13px;   /* plancher : jamais sous 12,5px */

  /* Espacements */
  --ds-s1: 4px;  --ds-s2: 8px;  --ds-s3: 12px; --ds-s4: 16px;
  --ds-s5: 24px; --ds-s6: 32px; --ds-s7: 44px; --ds-s8: 64px;
  --ds-gutter: clamp(16px, 4vw, 48px);
  --ds-max: 1440px;
  --ds-section: 44px;

  /* Rayons — seulement 14 / 22 / pilule */
  --ds-r-card: 14px;
  --ds-r-panel: 22px;
  --ds-r-pill: 999px;

  /* Boutons */
  --ds-btn-h: 54px;
  --ds-btn-h-card: 46px;
}
@media (min-width: 768px) {
  :root { --ds-section: 64px; }
}

/* ── Pont avec style.css ──────────────────────────────────────────────
   Les composants existants lisent les variables de style.css : on les
   rebranche sur les tokens, sous body.ds seulement. */
body.ds {
  --cream: var(--pierre);
  --cream-dark: var(--lin);
  --ivory: var(--lin);
  --charcoal: var(--noir);
  --charcoal-mid: #000;
  --warm-gray: var(--gris);
  --rose-gold: var(--rouge);
  --rose-deep: var(--rouge);
  --green-sage: var(--tige);
  --border: rgba(0, 0, 0, .14);
  --font-display: var(--ds-font);
  --font-body: var(--ds-font);
  --radius-sm: var(--ds-r-card);
  --radius-md: var(--ds-r-card);
  --radius-lg: var(--ds-r-panel);
  --shadow-card: none;
  --shadow-hover: none;

  background: var(--pierre);
  color: var(--noir);
  font-family: var(--ds-font);
  font-size: var(--ds-fs-body);
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-text-size-adjust: 100%;
}

/* ── Typographie ────────────────────────────────────────────────────── */
body.ds h1, body.ds h2, body.ds h3, body.ds .section-title {
  font-family: var(--ds-font);
  font-weight: 800;
  color: var(--noir);
  text-transform: none;
}
body.ds h1, body.ds .ds-display {
  font-size: var(--ds-fs-display);
  line-height: .88;
  letter-spacing: -.055em;
}
body.ds h2, body.ds .section-title {
  font-size: var(--ds-fs-h2);
  line-height: .95;
  letter-spacing: -.045em;
}
body.ds h3 {
  font-size: var(--ds-fs-h3);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
}
/* Pas de mot du titre en couleur ou en italique */
body.ds .section-title em, body.ds h1 em, body.ds h2 em {
  font-style: normal;
  color: inherit;
}
body.ds p { max-width: 72ch; }
body.ds .ds-lead { font-size: var(--ds-fs-lead); color: var(--gris); }
body.ds .ds-small, body.ds .section-desc { font-size: var(--ds-fs-small); color: var(--gris); }
body.ds .ds-price { color: var(--rouge); font-weight: 700; }
body.ds .ds-dispo { color: var(--tige); font-weight: 700; }
body.ds a { color: inherit; }

/* ── Mise en page ───────────────────────────────────────────────────── */
body.ds .ds-wrap {
  padding-inline: var(--ds-gutter);
  max-width: var(--ds-max);
  margin-inline: auto;
}
body.ds .ds-section { padding-block: var(--ds-section); }
body.ds .ds-panel {
  background: var(--lin);
  border-radius: var(--ds-r-panel);
  padding: var(--ds-s5);
}

/* ── Boutons ────────────────────────────────────────────────────────── */
body.ds .btn, body.ds .ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-s2);
  min-height: var(--ds-btn-h);
  padding: 0 26px;
  border-radius: var(--ds-r-pill);
  border: 2px solid var(--noir);
  font-family: var(--ds-font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  transition: background-color .15s, color .15s;
}
body.ds .btn-primary, body.ds .ds-btn--primary {
  background: var(--noir);
  color: #fff;
  border-color: var(--noir);
}
body.ds .btn-outline, body.ds .ds-btn--outline {
  background: transparent;
  color: var(--noir);
  border-color: var(--noir);
}
body.ds .btn-primary:hover, body.ds .ds-btn--primary:hover { background: #2a2622; border-color: #2a2622; transform: none; box-shadow: none; }
body.ds .btn-outline:hover, body.ds .ds-btn--outline:hover { background: var(--noir); color: #fff; transform: none; }
body.ds .ds-btn--card { min-height: var(--ds-btn-h-card); padding: 0 20px; font-size: 15px; }
body.ds .btn-lg { min-height: var(--ds-btn-h); font-size: 16px; }

/* ── Focus ──────────────────────────────────────────────────────────── */
body.ds :focus-visible {
  outline: 3px solid var(--noir);
  outline-offset: 3px;
}

/* ── Mouvement ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.ds *, body.ds *::before, body.ds *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
