/* ===========================================================
   Base — polices, reset et typographie.
   Reset et règles de base repris du shop (_reset.css, base.css).
   =========================================================== */

/* ---- Polices hébergées sur le serveur (pas de Google Fonts : nLPD) ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght.woff2") format("woff2-variations"),
    url("../fonts/inter-latin-wght.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/jost-latin-wght.woff2") format("woff2-variations"),
    url("../fonts/jost-latin-wght.woff2") format("woff2");
}

/* ---- Reset (identique au shop) ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 72px; /* ancres sous la barre de navigation sticky */
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
}
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}
h1,
h2,
h3,
h4 {
  line-height: var(--lh-tight);
  font-weight: 700;
}

/* ---- Base (shop) ---- */
body {
  font-family: var(--font-base);
  font-size: var(--fs-16);
  color: var(--color-fg);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
.main {
  flex: 1 0 auto;
  outline: none;
}
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: max(var(--space-4), env(safe-area-inset-left));
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-32);
}
h2 {
  font-size: var(--fs-24);
}
h3 {
  font-size: var(--fs-20);
}
a {
  color: var(--color-primary-dark);
}
p {
  max-width: 70ch;
  text-wrap: pretty;
}
strong {
  font-weight: 700;
}
code {
  font-size: 0.9em;
  background: var(--color-bg-alt);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* ---- Accessibilité (shop) ---- */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 300;
  background: var(--color-fg);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}
.skip-link:focus {
  top: var(--space-2);
}
/* Anneau de focus : bleu foncé de la marque (#1877b8, départ de --grad-strong), contraste ≥ 4.5:1 sur blanc et gris.
   Le --color-accent du shop (#1d9fe0) ne fait que 2.96:1 : insuffisant pour WCAG 1.4.11. */
:root {
  --color-focus: #1877b8;
}
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.muted {
  color: var(--color-muted);
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-5);
  }
}

@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;
  }
}
