/* ============================================
   base.css — Reset, typographie de base, utilitaires
   ============================================ */

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

html, body { height: 100%; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { list-style: none; padding: 0; }

/* ---------- Scroll ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* offset header sticky */
  -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 ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-ink);
  background: var(--color-bg);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
  color: var(--color-ink);
}

h1 { font-size: var(--fs-hero); font-weight: 400; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); font-weight: 400; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h3); }

/* ---------- Texte ---------- */
p { color: var(--color-ink-soft); }
strong { color: var(--color-ink); font-weight: 600; }
em { font-style: italic; }

/* ---------- Liens ---------- */
a {
  color: var(--color-ink);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--color-accent); }

/* ---------- Focus visible (accessibilité AA) ---------- */
:focus { outline: 0; }
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Sélection ---------- */
::selection {
  background: var(--color-accent);
  color: #fff;
}

/* ---------- Conteneurs ---------- */
.container        { width: var(--container);        margin-inline: auto; }
.container-narrow { width: var(--container-narrow); margin-inline: auto; }

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3rem, 8vw, var(--space-xl));
}
.section--alt { background: var(--color-bg-alt); }
.section--ink { background: var(--color-ink); color: #fff; }
.section--ink h1,
.section--ink h2,
.section--ink h3 { color: #fff; }
.section--ink p  { color: rgba(255,255,255,0.78); }

/* ---------- Eyebrow / suptitle ---------- */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ---------- Lede (intro paragraph) ---------- */
.lede {
  font-size: clamp(1.0625rem, 1.4vw + 0.5rem, 1.25rem);
  line-height: 1.6;
  color: var(--color-ink-soft);
  max-width: 60ch;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-sm);
  z-index: 9999;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-ink);
  color: #fff;
  border-radius: var(--radius);
  font-size: var(--fs-small);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus {
  top: var(--space-sm);
  color: #fff;
}

/* ---------- Visuellement masqué (lecteurs d'écran) ---------- */
.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;
}

/* ---------- Verrouillage du scroll (drawer ouvert) ---------- */
body[data-drawer-open] {
  overflow: hidden;
}
