/* =====================================================================
   Base — reset, typographie, éléments fondamentaux
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@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 {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: var(--track-tight, -0.02em);
  color: var(--ink);
  font-optical-sizing: auto;
}

p { max-width: var(--measure); }

a { color: var(--neon); text-decoration: none; }
a:hover { color: var(--neon-2); }

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

::selection { background: var(--neon); color: #fff; }

/* Barre de défilement discrète */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--petrol) 55%, transparent);
  border-radius: 20px; border: 3px solid var(--paper);
}

/* ---- Éléments éditoriaux réutilisables ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--neon);
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 380;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Nombres-instrument (lecture type oscilloscope) */
.readout {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--petrol-d);
}

/* Marqueur de terme technique */
.term {
  border-bottom: 1.5px dotted color-mix(in srgb, var(--petrol) 60%, transparent);
  cursor: help;
}

/* Formule KaTeX : cadre discret */
.eq {
  margin: 1.4rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--petrol);
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.eq .eq-label {
  float: right;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  color: var(--faint);
}

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