/* Khallot — système visuel 2 (voir deploy/SYSTEME-VISUEL.md).
   Le socle commun des pages qui déclarent data-systeme="2" : jetons,
   typographie, en-tête, boutons et pied de page. Aucune règle !important. */

@font-face {
  font-family: "Geist";
  src: url("polices/geist-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --nuit: #101d35;
  --nuit-2: #1b2b4f;
  --cobalt: #335cf5;
  --menthe: #1ab89c;
  --menthe-sombre: #0f7d69;
  --creme: #fbf7f1;
  --papier: #fffdf8;
  --encre: #12161f;
  --encre-2: #3b4150;
  --gris: #676e80;
  --filet: rgba(16, 29, 53, .10);
  --laiton: #cfa661;
  --rouge: #e84545;

  --police: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --t-display: clamp(52px, 8.6vw, 112px);
  --t-1: clamp(40px, 5.6vw, 72px);
  --t-2: clamp(32px, 4vw, 52px);
  --t-3: clamp(22px, 2.2vw, 28px);
  --t-4: 20px;
  --t-texte: clamp(16.5px, 1.25vw, 18px);
  --t-petit: 15px;
  --t-mini: 13px;

  --r-1: 12px;
  --r-2: 20px;
  --r-3: 32px;
  --ombre: 0 1px 2px rgba(16, 29, 53, .05), 0 18px 40px -22px rgba(16, 29, 53, .32);
  --sortie: cubic-bezier(.16, 1, .3, 1);
  --rapide: .45s;
  --large: 1200px;
  --gouttiere: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--creme); color: var(--encre);
  font-family: var(--police); font-size: var(--t-texte); line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--cobalt); text-underline-offset: .18em; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { margin: 0; color: var(--nuit); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(26, 184, 156, .28); }
.chiffre { font-variant-numeric: tabular-nums; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--nuit); color: #fff; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Lenis : le défilement adouci reprend la main sur le navigateur. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }

/* ── Boutons ─────────────────────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--nuit);
  background: var(--nuit); color: #fff; font: 600 15.5px/1 var(--police); letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--rapide) var(--sortie), background-color .2s, border-color .2s, color .2s, box-shadow .3s;
}
.button:hover { transform: translateY(-1px); background: var(--nuit-2); box-shadow: 0 14px 30px -16px rgba(16, 29, 53, .6); }
.button:active { transform: translateY(0) scale(.985); }
.button.ghost { background: transparent; color: var(--nuit); border-color: rgba(16, 29, 53, .18); }
.button.ghost:hover { background: rgba(16, 29, 53, .04); border-color: rgba(16, 29, 53, .4); box-shadow: none; }
.button.menthe { background: var(--menthe); border-color: var(--menthe); color: #04211a; }
.button.menthe:hover { background: #22c9ab; }

/* ── En-tête (écrit par deploy/navigation-site.py) ───────────────────── */
header.site {
  position: sticky; top: 10px; z-index: 50; margin: 10px auto 0; width: min(var(--large), calc(100% - 20px));
  display: flex; align-items: center; gap: 20px; padding: 8px 8px 8px 16px; border-radius: 999px;
  background: rgba(251, 247, 241, .78); border: 1px solid rgba(16, 29, 53, .08);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  transition: transform .5s var(--sortie), box-shadow .3s, background-color .3s;
}
header.site.compact { background: rgba(251, 247, 241, .9); box-shadow: 0 12px 34px -22px rgba(16, 29, 53, .45); }
header.site.masquee { transform: translateY(-140%); }
header.site .brand { display: inline-flex; align-items: center; gap: 9px; color: var(--nuit); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.03em; flex: none; }
header.site .brand img { width: 30px; height: 30px; border-radius: 8px; }
header.site nav { display: flex; gap: 2px; margin: 0 auto; }
header.site nav a { padding: 8px 12px; border-radius: 999px; color: var(--encre-2); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .2s, background-color .2s; }
header.site nav a:hover { color: var(--nuit); background: rgba(16, 29, 53, .05); }
header.site nav a[aria-current="page"] { color: var(--nuit); background: rgba(16, 29, 53, .07); }
header.site .header-actions { display: flex; gap: 6px; flex: none; }
header.site .header-actions .button { min-height: 40px; padding: 0 16px; font-size: 14px; }
header.site .adhesion-cta { color: var(--menthe-sombre); border-color: rgba(15, 125, 105, .25); }

@media (max-width: 1080px) {
  header.site .donation-cta { display: none; }
}
@media (max-width: 940px) {
  header.site { flex-wrap: wrap; border-radius: 22px; gap: 4px 12px; padding: 8px 8px 6px 14px; }
  header.site .header-actions { margin-left: auto; }
  header.site .adhesion-cta { display: none; }
  header.site nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  header.site nav::-webkit-scrollbar { display: none; }
  header.site nav a { flex: none; padding: 6px 10px; font-size: 14px; }
}

/* ── Pied de page (plan du site écrit par deploy/navigation-site.py) ── */
footer { margin-top: clamp(64px, 8vw, 120px); padding: clamp(48px, 6vw, 80px) var(--gouttiere) 40px; border-top: 1px solid var(--filet); color: var(--gris); font-size: 14px; }
footer > * { max-width: var(--large); margin-left: auto; margin-right: auto; }
footer .plan-du-site { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-bottom: 48px; }
footer .plan-du-site p { color: var(--nuit); font-weight: 650; font-size: 14px; margin-bottom: 14px; }
footer .plan-du-site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
footer .plan-du-site a { color: var(--gris); text-decoration: none; transition: color .2s; }
footer .plan-du-site a:hover { color: var(--nuit); }
footer > p { margin-top: 8px; line-height: 1.6; }
footer > p strong { color: var(--nuit); }
footer > p a { color: inherit; }
footer .fineprint { font-size: 13px; }
@media (max-width: 760px) { footer .plan-du-site { grid-template-columns: 1fr 1fr; gap: 28px 20px; } }

/* ── Petits outils communs ───────────────────────────────────────────── */
.fineprint { color: var(--gris); font-size: var(--t-mini); line-height: 1.5; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .button, header.site { transition: none; }
}
