/* ==========================================================================
   Base : remise à zéro, polices, éléments HTML nus.
   Aucun composant ici — ils vivent dans components.css.
   ========================================================================== */

/* --- Polices auto-hébergées ------------------------------------------------
   Sous-ensemble latin uniquement (le français y tient entièrement, accents,
   ligatures œ et guillemets « » compris) : 67 Ko + 48 Ko au lieu de ~400 Ko
   pour les jeux complets. Aucune requête vers Google : pas de bandeau cookies
   (cadrage, section 9). Licences dans www/assets/fonts/.
   --------------------------------------------------------------------------- */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-var.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Remise à zéro --------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* filet de sécurité : aucun défilement horizontal */
}

/* La barre d'action mobile est fixée en bas : on réserve sa hauteur. */
@media (max-width: 899px) {
  body {
    padding-bottom: var(--mobile-bar-h);
  }
}

/* --- Titres ---------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
  /* Fraunces est une police variable : SOFT arrondit les angles, WONK active
     les formes fantaisistes. On adoucit sans partir dans la fantaisie, pour
     rester « chaleureux » sans devenir « luxueux » (cadrage, section 7). */
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 32;
}

h1 { font-size: var(--t-h1); font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 96; }
h2 { font-size: var(--t-h2); font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 60; }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

p {
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
}

p:last-child { margin-bottom: 0; }

/* --- Liens ----------------------------------------------------------------- */

a {
  color: var(--c-accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--d-fast) var(--e-out);
}

a:hover { color: var(--c-ink); }

/* --- Médias ---------------------------------------------------------------- */

img, svg, video {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
  background: var(--c-sand);  /* évite le flash blanc pendant le chargement */
}

/* --- Listes ---------------------------------------------------------------- */

ul, ol {
  margin: 0 0 var(--s-4);
  padding-left: 1.3em;
}

li { margin-bottom: var(--s-2); }
li:last-child { margin-bottom: 0; }

/* --- Formulaires ----------------------------------------------------------- */

input, textarea, select, button {
  font: inherit;
  color: inherit;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

legend { padding: 0; }

table {
  border-collapse: collapse;
  width: 100%;
}

hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: var(--s-6) 0;
}

blockquote { margin: 0; }

strong, b { font-weight: 600; }

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

::selection {
  background: var(--c-action-soft);
  color: var(--c-ink);
}

/* --- Icônes ---------------------------------------------------------------- */

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  vertical-align: -0.24em;
}

.icon--lg { width: 1.75em; height: 1.75em; }
.icon--xl { width: 2.25em; height: 2.25em; }
.icon--sm { width: 1em; height: 1em; }

/* --- Utilitaires ----------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -4rem;
  z-index: 200;
  background: var(--c-surface);
  color: var(--c-ink);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-md);
  text-decoration: none;
  font-weight: 600;
  transition: top var(--d-base) var(--e-out);
}

.skip-link:focus-visible { top: var(--s-4); }

/* --- Focus clavier ---------------------------------------------------------
   Visible sur tous les fonds : la couleur bascule avec .band--dark.
   --------------------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- Mouvement réduit ------------------------------------------------------
   Coupe tout : Ken Burns du hero, apparitions au défilement, défilement doux.
   --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Impression ------------------------------------------------------------ */

@media print {
  .site-header, .mobile-bar, .to-top, .gallery__controls { display: none !important; }
  body { padding-bottom: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
