/* ============================================================
   Base — @font-face, reset, typo, container, btn, sections, utils
   ============================================================ */

/* --- Police Aller (self-hosted) --- */
@font-face {
  font-family: "Aller";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/Aller_Std_Lt.ttf") format("truetype");
}
@font-face {
  font-family: "Aller";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/Aller_Std_LtIt.ttf") format("truetype");
}
@font-face {
  font-family: "Aller";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Aller_Std_Rg.ttf") format("truetype");
}
@font-face {
  font-family: "Aller";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Aller_Std_It.ttf") format("truetype");
}
@font-face {
  font-family: "Aller";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Aller_Std_Bd.ttf") format("truetype");
}
@font-face {
  font-family: "Aller";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Aller_Std_BdIt.ttf") format("truetype");
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--marine); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--duck); }

/* Typo */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--marine);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.25rem, 4.4vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); margin-top: 0; }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; color: var(--ink); }
em { font-style: italic; }
small { font-size: 0.875rem; }
hr { border: 0; border-top: 1px solid var(--hairline); margin: var(--gap-l) 0; }

/* Liens dans la prose : underline animé au hover */
:where(p, li, .page-head__chapeau, .section__lead) a:not(.btn) {
  color: var(--marine);
  font-weight: 600;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  text-decoration: none;
  padding-bottom: 2px;
  transition: background-size 0.25s ease, color 0.2s ease;
}
:where(p, li, .page-head__chapeau, .section__lead) a:not(.btn):hover {
  background-size: 100% 1.5px;
  color: var(--marine-deep);
}

/* Skip link a11y */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--marine);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Container */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 2rem);
}
.container--narrow { max-width: var(--maxw-narrow); }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  background: var(--marine);
  color: #fff;
  border: 1px solid var(--marine);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { background: var(--marine-deep); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--marine); border: 1px solid var(--hairline-strong); }
.btn--ghost:hover { background: var(--marine); color: #fff; border-color: var(--marine); }
.btn--white { background: #fff; color: var(--marine); border-color: #fff; }
.btn--white:hover { background: var(--marine); color: #fff; }
.btn--small { padding: 0.6em 1em; font-size: 0.85rem; }
.btn--full { width: 100%; justify-content: center; }

/* Sections */
.section { padding: var(--pad-section-y) 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section--marine { background: var(--marine); color: #fff; }
.section--further { background: var(--duck-tint); }
.section--marine h1,
.section--marine h2,
.section--marine h3 { color: #fff; }
.section--marine a { color: #9bd0e8; }
.section--marine a:hover { color: #fff; }

.section__head { max-width: 760px; margin-bottom: var(--gap-l); }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--duck);
  font-weight: 700;
  margin-bottom: 1rem;
  display: inline-block;
}
.section__lead {
  font-size: 1.18rem;
  color: var(--ink-2);
  max-width: 680px;
  line-height: 1.55;
}

/* Utilities */

/* Grilles à N colonnes — empilées en colonne unique sous 920px. */
.cols-2,
.cols-3 {
  display: grid;
  gap: var(--gap-l);
}
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 920px) {
  .cols-2,
  .cols-3 { grid-template-columns: 1fr; gap: var(--gap-m); }
}

.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--duck);
  font-weight: 700;
}
.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.6;
  vertical-align: middle;
}

/* Reveal-on-scroll (statique : visible par défaut, peut être activé via JS plus tard) */
.reveal { opacity: 1; transform: none; }

/* Animation d'entrée de page — équivalent du `pageIn` du prototype.
   Se déclenche à chaque chargement (navigation hard) sur le contenu principal.
   Désactivée si l'utilisateur a `prefers-reduced-motion`. */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
main { animation: pageIn 0.35s ease both; }
@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}

/* Body : verrou scroll quand drawer ouvert */
body.no-scroll { overflow: hidden; }

/* Responsive global */
@media (max-width: 640px) {
  body { font-size: 16px; }
}
