/* ==========================================================================
   Refonte 2026 — règles de base des éléments
   --------------------------------------------------------------------------
   Chargé par toutes les pages : ces règles visent body, h1…h4, a, img.
   Dépend de tokens.css.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}
h1, h2 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-display); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); }
h3 { font-family: var(--font-sans); font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; }
h4 { font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 600; line-height: 1.4; }

p, ul, ol, figure, blockquote { margin: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

::selection { background: rgba(227, 5, 19, 0.16); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Lien d'évitement : invisible jusqu'au premier Tab. */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }
