/* ============================================================
   THESTACKPICKS.COM — BASE / RESET / TYPOGRAPHIE
   Mobile-first. Charge tokens.css AVANT ce fichier.
   ------------------------------------------------------------
   Polices self-hébergées en woff2 variable, subsets latin +
   latin-ext, font-display:swap (cf. DESIGN_README §checklist).
   ============================================================ */

/* ---------- @font-face — Inter (var 400→600) ---------- */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var-latin-ext.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ---------- @font-face — Space Grotesk (var 500→700) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-var-latin.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-var-latin-ext.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ---------- @font-face — JetBrains Mono (var 400→600) ---------- */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-var-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-var-latin-ext.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ls-body);
  background: var(--ls-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- TITRES ---------- */
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--ls-ink); text-wrap: balance; }

h1 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
}
h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: -0.015em;
}
h3 {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: -0.01em;
}
h4 {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
}

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--ls-link); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: 600; color: var(--ls-ink); }

ul, ol { margin: 0; padding: 0; }

img { max-width: 100%; display: block; }

/* ---------- ACCESSIBILITÉ : focus visible ---------- */
:where(a, button, input, select, textarea, [tabindex], summary):focus-visible {
  outline: 2px solid var(--ls-brand);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- HELPERS ---------- */
.ls-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 1024px) { .ls-container { padding-inline: var(--sp-6); } }

.ls-reading { max-width: var(--reading); }

.eyebrow {
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--ls-muted);
}

.mono { font-family: var(--ff-mono); }
.muted { color: var(--ls-muted); }
.section-alt { background: var(--ls-surface-alt); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Espace insécable visuel pour les prix FR : on utilise &nbsp; dans le HTML.
   .price aligne la typo des prix sur le display. */
.price { font-family: var(--ff-display); font-weight: 700; color: var(--ls-ink); }

/* Section vertical rhythm */
.ls-section { padding-block: var(--sp-8); }
@media (max-width: 768px) { .ls-section { padding-block: var(--sp-7); } }

/* Le pied de page ne doit pas remonter sur une page au contenu court —
   constaté sur /offres/ tant qu'aucun code promo n'est publié. Hauteur
   minimale plutôt qu'un passage du body en flex : aucun risque de
   régression sur les gabarits existants. */
#main { min-height: max(58vh, 420px); }

/* Reduced motion : neutralise toute animation décorative */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
