/* ==========================================================================
   Base : reset léger, typographie, mise en page
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-feature-settings: "kern", "liga", "tnum" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
.icon { display: inline-block; width: 1.25em; height: 1.25em; flex: none; fill: currentColor; vertical-align: -0.25em; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-display);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 750; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-h4); letter-spacing: -0.01em; }

p, ul, ol, dl, table, figure { margin: 0 0 var(--space-4); }
p { text-wrap: pretty; }
strong { font-weight: 650; }

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast);
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--color-accent); color: var(--color-on-accent); }

hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-7) 0; }

code, kbd, .mono { font-family: var(--font-mono); font-size: 0.9em; }

/* ---- Mise en page ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--content-width) + 2 * var(--container-pad));
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.prose { max-width: var(--prose-width); }
.prose > * + h2 { margin-top: var(--space-8); }
.prose > * + h3 { margin-top: var(--space-6); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--space-2); }
.prose li::marker { color: var(--color-mark); }

.section { padding-block: var(--section-pad); }
.section--subtle { background: var(--color-bg-subtle); }
.section--inverse {
  background: var(--color-inverse-bg);
  color: var(--color-inverse-text);
  --color-text: var(--color-inverse-text);
  --color-text-muted: var(--color-inverse-muted);
  --color-link: var(--color-inverse-tech);
  --color-tech: var(--color-inverse-tech);
  --color-border: rgb(255 255 255 / 0.14);
  --color-surface: rgb(255 255 255 / 0.04);
}

.lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--color-text-muted); max-width: 40rem; }
.muted { color: var(--color-text-muted); }
.small { font-size: var(--fs-sm); }

.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.stack > * + * { margin-top: var(--space-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--color-accent); color: var(--color-on-accent);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  font-weight: 650; text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

@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; animation-delay: 0s !important; transition-delay: 0s !important; }
}
