/* ==========================================================================
   Socle : remise à zéro, typographie, accessibilité
   ========================================================================== */

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

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

/* Un ancrage ne doit pas glisser sous la barre fixe. */
:target {
  scroll-margin-top: calc(var(--nav-h) + var(--sp-4));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--t-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul {
  margin: 0;
}

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

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

img {
  height: auto;
}

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

a:hover {
  color: var(--text-bright);
}

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

/* ---- Titres d'affichage -------------------------------------------------- */

.d-hero,
.d-xxl,
.d-xl,
.d-lg,
.d-md,
.d-sm {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: var(--ls-display);
  /* Le display condensé déborde vite sur les mots longs des titres français. */
  overflow-wrap: break-word;
}

.d-hero { font-size: var(--d-hero); line-height: var(--lh-hero); }
.d-xxl  { font-size: var(--d-xxl);  line-height: 0.8; }
.d-xl   { font-size: var(--d-xl);   line-height: var(--lh-tight); }
.d-lg   { font-size: var(--d-lg);   line-height: var(--lh-snug); }
.d-md   { font-size: var(--d-md);   line-height: var(--lh-snug); }
.d-sm   { font-size: var(--d-sm);   line-height: 0.95; font-weight: 800; }

/* ---- Surtitres et étiquettes -------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--t-2xs);
  font-weight: 700;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2.5rem;
  height: 2px;
  background: var(--acc);
  flex: none;
}

.eyebrow--plain::before {
  display: none;
}

.label {
  font-size: var(--t-2xs);
  font-weight: 700;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
}

.label--acc { color: var(--acc); }

.accent { color: var(--acc); }
.muted  { color: var(--muted); }
.muted-2 { color: var(--muted-2); }

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

/* Masqué visuellement, lu par les lecteurs d'écran. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Lien d'évitement : absent des templates, ajouté ici. */
.skip {
  position: absolute;
  top: 0;
  left: var(--gutter-sm);
  z-index: calc(var(--z-menu) + 10);
  padding: var(--sp-3) var(--sp-5);
  background: var(--acc);
  color: var(--ink);
  font-size: var(--t-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  transform: translateY(-120%);
  transition: transform 0.15s var(--ease);
}

.skip:focus-visible {
  transform: translateY(0);
  color: var(--ink);
}

::selection {
  background: var(--acc);
  color: var(--ink);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
