/* ============================================================
   MAGNA BUREAU — BASE v1.0
   Reset, typography, French rules, utilities. Mobile-first (360px).
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-snug);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* Tabular numerals for every score and figure */
.tnum, [data-tnum], .score, .stat, time, .rating-chip {
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Headlines: editorial serif ---------- */
h1, h2, h3, .serif {
  font-family: var(--font-serif);
  font-weight: 560;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--text-3xl); }          /* 32 mobile → 40–56 desktop */
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
}
@media (min-width: 1024px) {
  h1.article-h1, h1.lead-h1 { font-size: var(--text-5xl); }
}

/* ---------- Links ---------- */
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: var(--sp-4); top: -100px;
  background: var(--gold); color: var(--gold-ink);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-sm);
  font-weight: 600; z-index: 200; transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

/* ---------- Layout utilities ---------- */
.wrap { width: 100%; max-width: var(--measure-wide); margin-inline: auto; padding-inline: var(--sp-4); }
@media (min-width: 768px) { .wrap { padding-inline: var(--sp-6); } }
.measure { max-width: var(--measure-article); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

img { max-width: 100%; height: auto; display: block; }
img[width][height] { aspect-ratio: attr(width) / attr(height); }

/* ---------- French typography ----------
   FR rule: non-breaking space before : ; ! ? and inside « ».
   Author in FR with &nbsp; / &#8239; (narrow nbsp). This class opts
   French blocks into tuned spacing; quotes use « … ». */
:lang(fr) .headline-fr { letter-spacing: 0; }
:lang(fr) q { quotes: "«\202F" "\202F»"; }

/* ---------- Eyebrow / kicker ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Dividers ---------- */
.rule { border: 0; border-top: 1px solid var(--border); margin: var(--sp-8) 0; }
.rule-gold { border: 0; border-top: 2px solid var(--gold); width: 64px; margin: var(--sp-4) 0; }

/* ---------- Reduced-motion guard for the Critical pulse ---------- */
@media (prefers-reduced-motion: reduce) {
  .pulse-critical { animation: none !important; }
}
