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

  * { margin: 0; }

  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Le header colle en haut : les ancres ne doivent pas passer dessous. */
    scroll-padding-top: calc(var(--header-h) + 1rem);

  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
  }

  body {
    min-height: 100svh;
    line-height: var(--lh-normal);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    /* Le tiroir de navigation est pousse hors ecran par translateX(100%).
       Sans decoupe il etend la largeur defilable du document et cree une
       bande de defilement horizontal parasite sur mobile (mesure : 698 px
       pour un viewport de 375).
       Deux precisions verifiees empiriquement :
       - la decoupe doit porter sur `body`, pas sur `html` : sur html elle
         n'a aucun effet sur un descendant en position: fixed ;
       - `clip` et non `hidden`, car `overflow-x: hidden` casserait le
         position: sticky du header. */
    overflow-x: clip;
  }

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

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

  p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
  h1, h2, h3, h4 { text-wrap: balance; }
  p { text-wrap: pretty; }

  ul[class], ol[class] { list-style: none; padding: 0; }

  a { color: var(--c-link); text-decoration-thickness: .08em; text-underline-offset: .18em; }
  a:hover { color: var(--c-link-hover); }

  button { background: none; border: none; cursor: pointer; }

  table { border-collapse: collapse; width: 100%; }

  address { font-style: normal; }

  /* Les media queries ne peuvent pas lire les custom properties ; on desactive
     donc les animations ici plutot que via un token. */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: .01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: .01ms !important;
      scroll-behavior: auto !important;
    }
  }
}
