/* ==========================================================================
   Reset et styles de base.
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-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;
  }
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

svg { flex: none; }

input,
button,
select,
textarea { font: inherit; color: inherit; }

button { background: none; border: 0; }

a { color: var(--fg); text-decoration: none; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

/* Les chiffres s'alignent en colonne partout où ils se comparent. */
.num { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

/* --- Étiquette discrète, motif récurrent -------------------------------- */

.label {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  color: var(--fg-muted);
}

/* --- Accessibilité ------------------------------------------------------ */

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

.skip-link {
  position: fixed;
  left: var(--sp-4);
  top: -100px;
  z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.skip-link:focus { top: var(--sp-3); }
