/* ============================================================
   BASE — reset léger + typo + grain + utilitaires
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--dur) var(--ease-soft), color var(--dur) var(--ease-soft);
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 2px; }
/* Sur fond clair, le ciel pâle ne contraste pas assez : focus encre. */
[data-theme="light"] :focus-visible, body:not([data-theme]) :focus-visible { outline-color: var(--ink); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; font-optical-sizing: auto; line-height: var(--lh-tight); letter-spacing: -.015em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
p { max-width: 56ch; }

.display { font-family: var(--font-display); font-weight: 600; font-optical-sizing: auto; font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: -.03em; }
.serif-italic { font-family: var(--font-display); font-weight: 400; font-style: italic; }
/* la cursive couture ne doit jamais être resserrée */
.serif-italic.display, .display.serif-italic { letter-spacing: 0; }
.label {
  font-family: var(--font-ui); font-size: var(--fs-small);
  text-transform: uppercase; letter-spacing: var(--tracking-label); font-weight: 600;
}

/* Layout */
.container { width: var(--container); margin-inline: auto; }
.container--narrow { width: var(--container-narrow); margin-inline: auto; }
.section { padding-block: clamp(64px, 12vh, 160px); padding-inline: var(--edge); background: var(--bg); color: var(--fg); }
.section--flush { padding: 0; }

/* Accessibilité */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: var(--s-4); z-index: 1100;
  background: var(--ink); color: var(--white); padding: var(--s-3) var(--s-4);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--s-4); }

/* Grain global très subtil */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
@media (prefers-reduced-motion: reduce) { .grain { display: none; } }

/* .reveal et .cursor-dot/.cursor-ring/.cursor-label sont définis dans motion.css
   (couche premium, chargée après base.css). Ne pas dupliquer ici : les versions
   d'origine entraient en conflit (translateY 18 vs 24, transform translate vs margin). */
