/* ==========================================================================
   Base : reset, fond papier, typographie, utilitaires
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;  /* les ancres ne passent pas sous la nav */
}

body {
  margin: 0;
  background: var(--paper) var(--texture) repeat;
  background-size: var(--texture-size);
  color: var(--ink);
  font-family: var(--font-text);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Conteneur de page */
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Rôles typographiques --------------------------------------------- */

/* Titres de sections : Journal, Papeterie, Laboratoire */
.t-display {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-display);
  line-height: 0.9;
  letter-spacing: -0.005em;
}

/* Titre d'article ou de courrier */
.t-h2 {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Surtitres, libellés, navigation : Syne en capitales */
.t-label {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: var(--fs-label);
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  line-height: 1.4;
}
.t-label--wide { letter-spacing: var(--tracking-wide); }
.t-label--sm   { font-size: var(--fs-label-sm); }

/* Lien texte en capitales, souligné (« Tout le journal ») */
.link-label {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.link-label:hover { text-decoration-thickness: 2px; }

/* --- Utilitaires ------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  padding: 12px 16px;
  background: var(--ink); color: var(--paper);
}
.skip-link:focus { top: 12px; }

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