/* ==========================================================================
   EPN — Base
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: var(--t-corps);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Verrou de défilement posé sur <html> ET <body> : iOS ignore le verrou
   quand il n'est posé que sur <body>. */
html.est-bloque, body.est-bloque { overflow: hidden; }

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

h1, h2, h3, h4 {
  font-family: var(--titre);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--e2);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.01em; }
h4 { font-family: var(--texte); font-size: var(--t-h4); font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 var(--e2); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

strong, b { font-weight: 600; }

ul, ol { margin: 0 0 var(--e2); padding-left: 1.15em; }
li { margin-bottom: .35em; }

hr {
  border: 0;
  border-top: 1px solid var(--papier-bord);
  margin: var(--e5) 0;
}

::selection { background: var(--safran-clair); color: var(--bleu-nuit); }

:focus-visible {
  outline: 3px solid var(--safran);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Structure ------------------------------------------------------------ */

.cadre {
  width: 100%;
  max-width: var(--cadre);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.cadre-etroit { max-width: var(--cadre-etroit); }

.section { padding-block: var(--e6); }
.section-creuse { background: var(--papier-creux); }
.section-nuit { background: var(--bleu-nuit); color: #E9EEF7; }
.section-nuit h2, .section-nuit h3 { color: var(--blanc); }
.section-nuit p { color: #B9C6DC; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.saut-contenu {
  position: absolute; left: var(--e2); top: -100px;
  z-index: 200; background: var(--bleu); color: #fff;
  padding: .7rem 1.1rem; border-radius: var(--r-petit);
  font-weight: 600; text-decoration: none;
  transition: top var(--transition);
}
.saut-contenu:focus { top: var(--e2); }

/* --- Titres de section ---------------------------------------------------- */

.entete-section {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--e3);
  margin-bottom: var(--e4);
}
.entete-section > div { max-width: 46rem; }
.entete-section h2 { margin-bottom: .5rem; }
.entete-section p { color: var(--encre-douce); margin: 0; }
.section-nuit .entete-section p { color: #A9B9D4; }

/* Filet safran sous les titres de section : marque le début d'un rayon. */
.titre-rayon { position: relative; padding-top: var(--e2); }
.titre-rayon::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 56px; height: 4px;
  background: var(--safran);
  border-radius: 2px;
}

/* --- Animation d'apparition (une seule, discrète) ------------------------- */

.apparait {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22, .61, .36, 1);
}
.apparait.est-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .apparait { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
