/* ==========================================================================
   base.css — Reset moderne + typographie globale + éléments racine
   Charge tokens.css avant ce fichier.
   ========================================================================== */


/* --- 1. @font-face — polices auto-hébergées (WOFF2 uniquement) ---------- */

/* Libre Caslon Text — Regular 400, Latin */
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/libre-caslon-text-400-latin.woff2") format("woff2");
  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;
}
/* Libre Caslon Text — Regular 400, Latin Extended */
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/libre-caslon-text-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Libre Caslon Text — Italic 400, Latin */
@font-face {
  font-family: "Libre Caslon Text";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/libre-caslon-text-400-italic-latin.woff2") format("woff2");
  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;
}
/* Libre Caslon Text — Italic 400, Latin Extended */
@font-face {
  font-family: "Libre Caslon Text";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/libre-caslon-text-400-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Libre Caslon Text — Bold 700, Latin */
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/libre-caslon-text-700-latin.woff2") format("woff2");
  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;
}
/* Libre Caslon Text — Bold 700, Latin Extended */
@font-face {
  font-family: "Libre Caslon Text";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/libre-caslon-text-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Figtree — Variable (couvre tous les poids 300..900), Latin */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/figtree-variable-latin.woff2") format("woff2");
  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;
}
/* Figtree — Variable, Latin Extended */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/figtree-variable-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* --- 2. Reset moderne minimal ------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;      /* Safari iOS : pas de zoom auto sur rotation */
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

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

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

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

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

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}


/* --- 3. Racine : typographie, couleurs, rendu -------------------------- */

html {
  font-size: 100%;                                  /* 16px baseline */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-ligatures: common-ligatures;
}

body {
  font-family: var(--police-corps);
  font-size: var(--taille-corps);
  font-weight: var(--graisse-regular);
  line-height: var(--ligne-corps);
  color: var(--couleur-texte);
  background-color: var(--couleur-creme);
  min-height: 100vh;
  min-height: 100dvh;                               /* support navigateurs modernes */
  overflow-x: hidden;
}


/* --- 4. Titres ---------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--police-titre);
  font-weight: var(--graisse-bold);
  line-height: var(--ligne-titre);
  letter-spacing: var(--tracking-titre);
  color: var(--couleur-marine-profonde);
  text-wrap: balance;                               /* équilibre des lignes — navigateurs modernes */
}

h1 { font-size: var(--taille-h1); font-weight: var(--graisse-regular); }
h2 { font-size: var(--taille-h2); font-weight: var(--graisse-regular); }
h3 { font-size: var(--taille-h3); line-height: var(--ligne-titre-h3); font-weight: var(--graisse-bold); }
h4 { font-size: var(--taille-h4); line-height: var(--ligne-titre-h3); font-weight: var(--graisse-bold); }

em, i {
  font-style: italic;
}


/* --- 5. Paragraphes, liens, emphases ------------------------------------ */

p {
  text-wrap: pretty;                                /* évite les orphelins */
}

p + p {
  margin-top: var(--espace-2);
}

a {
  color: var(--couleur-cuivre-texte);
  transition: color var(--duree-rapide) var(--courbe-premium);
}

a:hover {
  color: var(--couleur-marine-profonde);
}

strong, b {
  font-weight: var(--graisse-semibold);
  color: var(--couleur-marine-profonde);
}


/* --- 6. Focus visible accessible ---------------------------------------- */
/* On masque l'outline uniquement pour les clics souris, pas le clavier */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--couleur-cuivre);
  outline-offset: 3px;
  border-radius: var(--rayon-sm);
}


/* --- 7. Sélection de texte --------------------------------------------- */

::selection {
  background-color: var(--couleur-cuivre-clair);
  color: var(--couleur-marine-profonde);
}


/* --- 8. Scrollbar discrète --------------------------------------------- */

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--couleur-texte-subtil) transparent;
}

/* WebKit / Blink */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: var(--couleur-bordure);
  border-radius: var(--rayon-pill);
  border: 2px solid var(--couleur-creme);
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--couleur-texte-subtil);
}


/* --- 9. Utilitaires racine --------------------------------------------- */

/* Surtitre "eyebrow" — label en capitales au-dessus d'un H2 */
.eyebrow {
  display: inline-block;
  font-family: var(--police-corps);
  font-size: var(--taille-eyebrow);
  font-weight: var(--graisse-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--couleur-cuivre-texte);
}

/* Texte visible uniquement pour les lecteurs d'écran */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
