/* ==========================================================================
   LumenLabs — système de design

   Palette conservée : papier chaud, encre brun-noir, encre violette de tampon
   administratif, rouge de tampon pour les alertes, bleu de calque pour les plans.
   Mise en page reprise de l'ancien site : barre flottante qui se contracte au
   défilement (Dynamic Island), grandes respirations, peu de texte, gros corps.
   Polices auto-hébergées : la CSP `font-src 'self'` interdit Google Fonts.
   ========================================================================== */

@font-face { font-family:'Figtree'; font-style:normal; font-weight:300 900; font-display:swap; src:url('/fonts/figtree.woff2') format('woff2'); }
@font-face { font-family:'IBM Plex Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/plex-mono-400.woff2') format('woff2'); }
@font-face { font-family:'IBM Plex Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/plex-mono-500.woff2') format('woff2'); }

:root {
  --paper:    #F7F4ED;
  --paper-2:  #F0ECE1;
  --paper-3:  #E7E2D3;

  --ink:      #1C1814;
  --ink-2:    #4A443B;
  --ink-3:    #7A7368;
  --ink-4:    #A9A296;

  --rule:     #CBC4B4;
  --rule-2:   #E0DACC;

  --encre:       #4A2E7F;
  --encre-clair: #7B5BC4;
  --encre-vif:   #6B4BA8;
  --encre-tint:  #EBE6F4;

  --tampon:      #9E3320;
  --tampon-tint: #F4E3DE;
  --calque:      #35637F;
  --vert:        #3D6B4A;
  --vert-tint:   #E6EDE5;

  --sans: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --max:    1160px;
  --gut:    clamp(22px, 5vw, 56px);
  --sec-y:  clamp(112px, 14vw, 184px);  /* écart entre deux sections : réglage principal */
  --radius: 20px;
  --radius-s: 14px;

  --ease:   cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.4, .48, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.72;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--encre); color: var(--paper); }
:focus-visible { outline: 2px solid var(--encre); outline-offset: 4px; }

.wrap {
  max-width: var(--max); margin: 0 auto;
  /* `viewport-fit=cover` fait passer la page sous l'encoche : on reprend la marge. */
  padding-left: max(var(--gut), env(safe-area-inset-left));
  padding-right: max(var(--gut), env(safe-area-inset-right));
}
.narrow { max-width: 860px; margin: 0 auto; }

/* ── Échelle typographique : tout est monté d'un cran ───── */
.t1 { font-size: clamp(38px, 8.6vw, 92px); line-height: 1.04; letter-spacing: -0.04em; }
.t2 { font-size: clamp(31px, 6.4vw, 64px); line-height: 1.08; letter-spacing: -0.035em; }
.t3 { font-size: clamp(23px, 4.4vw, 34px); line-height: 1.16; letter-spacing: -0.025em; }
.t4 { font-size: clamp(20px, 3.4vw, 24px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
h1, h2 { text-wrap: balance; }
em { font-style: normal; color: var(--encre); }

.lead  { font-size: clamp(18px, 4vw, 25px); line-height: 1.55; color: var(--ink-2); letter-spacing: -0.015em; text-wrap: pretty; }
.small { font-size: 16px; line-height: 1.6; color: var(--ink-3); }
.muted { color: var(--ink-3); }

.mono {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--encre); font-variant-numeric: tabular-nums;
}
.mono-2 { color: var(--ink-3); }

/* Étiquette de section */
.tag-sec {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--encre);
  padding: 8px 16px; border-radius: 999px;
  background: var(--encre-tint);
}
.tag-sec::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Boutons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 30px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1;
  transition: transform .35s var(--spring), background-color .3s var(--ease),
              color .3s var(--ease), border-color .3s var(--ease), box-shadow .35s var(--ease);
  will-change: transform;
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform .35s var(--spring); }
.btn:hover { transform: translateY(-3px); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(-1px); }
@media (max-width: 460px) {
  .btn { width: 100%; min-height: 56px; font-size: 16.5px; padding: 0 22px; }
  .nav-cta, .nav-sheet .btn { width: auto; }
  .nav-sheet .btn { width: 100%; }
}

.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 0 8px 24px -12px rgba(28,24,20,.7); }
.btn-primary:hover { background: var(--encre); box-shadow: 0 18px 40px -14px rgba(74,46,127,.65); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-secondary:hover { border-color: var(--ink); background: var(--paper-2); }
.btn-pale { background: var(--paper); color: var(--ink); }
.btn-pale:hover { background: #fff; box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); }
.lien { color: var(--encre); border-bottom: 1.5px solid color-mix(in oklab, var(--encre) 30%, transparent); transition: border-color .25s; }
.lien:hover { border-bottom-color: var(--encre); }

/* ══════════════════════════════════════════════════════════
   Barre flottante « Dynamic Island »
   Large et transparente en haut de page, elle se contracte en
   pilule sombre au défilement et affiche la section courante.
   ══════════════════════════════════════════════════════════ */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 90; padding: 18px 0; pointer-events: none; transition: padding .6s var(--ease); }
.nav .wrap { max-width: var(--max); }
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 12px 12px 12px 22px;
  border: 1px solid transparent; border-radius: 999px;
  transition: max-width .7s var(--ease), padding .6s var(--ease), background-color .5s var(--ease),
              border-color .5s var(--ease), box-shadow .6s var(--ease), backdrop-filter .5s var(--ease);
  max-width: 100%; margin: 0 auto; position: relative;
}
.nav.scrolled { padding: 12px 0; }
.nav.scrolled .nav-pill {
  max-width: 660px;
  padding: 10px 10px 10px 20px;
  background: color-mix(in oklab, var(--ink) 88%, transparent);
  border-color: color-mix(in oklab, #fff 12%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 1px 0 0 rgba(255,255,255,.10) inset, 0 20px 50px -18px rgba(28,24,20,.55);
  color: var(--paper);
}

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-mark { width: 27px; height: 27px; color: var(--encre); transition: transform .6s var(--spring), color .5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.12); }
.nav.scrolled .brand-mark { color: var(--encre-clair); }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.brand-name span { opacity: .45; font-weight: 500; }

/* Liens : visibles en haut, escamotés une fois la pilule contractée */
.nav-links { display: flex; align-items: center; gap: 28px; overflow: hidden; transition: max-width .7s var(--ease), opacity .35s var(--ease); max-width: 620px; opacity: 1; }
.nav-links a { font-size: 16px; font-weight: 500; color: var(--ink-2); white-space: nowrap; position: relative; transition: color .25s; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -5px; height: 1.5px; background: currentColor; transition: right .35s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav.scrolled .nav-links { max-width: 0; opacity: 0; }

/* Indicateur de section : prend la place des liens, comme une activité en cours */
.nav-now {
  display: flex; align-items: center; gap: 10px; overflow: hidden;
  max-width: 0; opacity: 0; transition: max-width .7s var(--ease) .1s, opacity .4s var(--ease) .15s;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: color-mix(in oklab, var(--paper) 72%, transparent); white-space: nowrap;
}
.nav.scrolled .nav-now { max-width: 280px; opacity: 1; }
.nav-now i { width: 6px; height: 6px; border-radius: 50%; background: var(--encre-clair); flex: none; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.nav-now b { font-weight: 500; color: var(--paper); transition: opacity .25s; }
.nav-now.swap b { opacity: 0; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .35s var(--spring);
}
.nav-cta:hover { transform: translateY(-2px); background: var(--encre); }
.nav.scrolled .nav-cta { background: var(--paper); color: var(--ink); }
.nav.scrolled .nav-cta:hover { background: #fff; }

/* Bouton « Menu » : un vrai bouton, plein, avec un chevron qui indique
   que le panneau descend. Il pivote à l'ouverture. */
.nav-menu-btn {
  display: none; align-items: center; gap: 6px; flex: none;
  height: 42px; padding: 0 12px 0 16px; border-radius: 999px;
  background: color-mix(in oklab, var(--ink) 8%, transparent);
  border: 1px solid var(--rule);
  color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  transition: background-color .3s var(--ease), border-color .3s var(--ease),
              color .3s var(--ease), transform .35s var(--spring);
}
.nav-menu-btn:active { transform: scale(.95); }
.nav-menu-chev { width: 17px; height: 17px; flex: none; transition: transform .5s var(--spring); }
.nav.scrolled .nav-menu-btn {
  background: color-mix(in oklab, #fff 13%, transparent);
  border-color: color-mix(in oklab, #fff 24%, transparent); color: var(--paper);
}
body.nav-open .nav-menu-btn { background: var(--ink); border-color: var(--ink); color: var(--paper); }
body.nav-open .nav-menu-chev { transform: rotate(180deg); }

/* Panneau déroulant, accroché sous la pilule : il descend, il ne recouvre pas. */
.nav .wrap { position: relative; }
.nav-sheet {
  position: absolute; top: calc(100% + 10px); z-index: 2;
  left: max(var(--gut), env(safe-area-inset-left)); right: max(var(--gut), env(safe-area-inset-right));
  display: grid; gap: 2px; padding: 10px;
  background: color-mix(in oklab, var(--paper) 93%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(26px);
  backdrop-filter: saturate(180%) blur(26px);
  border: 1px solid var(--rule-2); border-radius: 28px;
  box-shadow: 0 28px 64px -26px rgba(28,24,20,.55);
  transform-origin: 50% 0; transform: translateY(-10px) scale(.97);
  opacity: 0; visibility: hidden; pointer-events: none;
  max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  transition: opacity .3s var(--ease), transform .55s var(--spring), visibility .3s;
}
body.nav-open .nav-sheet { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.nav-sheet a:not(.btn) {
  font-size: 19px; font-weight: 600; letter-spacing: -0.025em; color: var(--ink);
  padding: 15px 18px; border-radius: 20px; border-bottom: 0;
  transition: background-color .25s var(--ease);
}
.nav-sheet a:not(.btn):active { background: var(--paper-3); }
.nav-sheet .btn { margin-top: 8px; width: 100%; min-height: 54px; justify-content: center; font-size: 16.5px; }
/* Les entrées arrivent l'une après l'autre, dans le sens de la descente. */
body.nav-open .nav-sheet > * { animation: entreeMenu .45s var(--ease) both; }
@keyframes entreeMenu { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.nav-sheet > *:nth-child(1) { animation-delay: .04s; }
.nav-sheet > *:nth-child(2) { animation-delay: .08s; }
.nav-sheet > *:nth-child(3) { animation-delay: .12s; }
.nav-sheet > *:nth-child(4) { animation-delay: .16s; }
.nav-sheet > *:nth-child(5) { animation-delay: .20s; }
.nav-sheet > *:nth-child(6) { animation-delay: .24s; }
.nav-sheet > *:nth-child(7) { animation-delay: .28s; }

/* Voile : ferme au toucher et détache le panneau du contenu. */
.nav-scrim {
  position: fixed; inset: 0; z-index: 79;
  background: color-mix(in oklab, var(--ink) 34%, transparent);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; touch-action: none; overscroll-behavior: contain;
  transition: opacity .35s var(--ease), visibility .35s;
}
body.nav-open .nav-scrim { opacity: 1; visibility: visible; }
@media (min-width: 981px) { .nav-sheet, .nav-scrim { display: none; } }
/* Écrans courts : le panneau doit tenir sans défiler. */
@media (max-height: 700px) {
  .nav-sheet a:not(.btn) { padding: 11px 18px; font-size: 17.5px; }
  .nav-sheet .btn { min-height: 48px; margin-top: 6px; }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 980px) {
  .nav-links, .nav-now { display: none; }
  .nav-menu-btn { display: inline-flex; }
  /* La pilule garde son mouvement : elle se resserre et s'assombrit. */
  .nav { padding: 12px 0; padding-top: max(12px, env(safe-area-inset-top)); }
  .nav.scrolled { padding: 8px 0; padding-top: max(8px, env(safe-area-inset-top)); }
  .nav.scrolled .nav-pill { max-width: 100%; padding: 8px 8px 8px 16px; }
  .nav-pill { padding: 8px 8px 8px 14px; gap: 10px; }
  .nav-cta { height: 42px; padding: 0 18px; font-size: 15px; }
  .nav.scrolled .brand-name { color: var(--paper); }
}
@media (max-width: 420px) {
  .brand { gap: 8px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-name { font-size: 17px; }
  .brand-name span { display: none; }   /* « .fr » sacrifié pour laisser la place aux deux boutons */
  .nav-pill, .nav.scrolled .nav-pill { padding: 6px 6px 6px 12px; gap: 7px; }
  .nav-cta { height: 40px; padding: 0 13px; font-size: 14px; }
  .nav-menu-btn { height: 40px; padding: 0 9px 0 12px; font-size: 14px; gap: 3px; }
  .nav-menu-chev { width: 15px; height: 15px; }
}

/* Très petits écrans (iPhone SE et assimilés) : le libellé cède,
   le bouton garde son fond et son chevron, il reste lisible comme bouton. */
@media (max-width: 345px) {
  .nav-menu-txt { display: none; }
  .nav-menu-btn { width: 40px; padding: 0; justify-content: center; }
  .nav-menu-chev { width: 18px; height: 18px; }
}

/* ── Sections ───────────────────────────────────────────── */
.sec { padding: calc(var(--sec-y) / 2) 0; position: relative; }
.sec-head { display: grid; gap: 26px; margin-bottom: clamp(56px, 7vw, 92px); max-width: 900px; }
.sec-head .lead { max-width: 46ch; }

/* ── Révélation au défilement ───────────────────────────── */
html.js .rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
html.js .rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; }
.rv-d3 { transition-delay: .24s; } .rv-d4 { transition-delay: .32s; }

/* ── Cartes ─────────────────────────────────────────────── */
.card {
  background: var(--paper-2); border: 1px solid var(--rule-2); border-radius: var(--radius);
  padding: clamp(28px, 3.2vw, 42px);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s var(--ease);
}
.card-lift:hover { transform: translateY(-6px); border-color: var(--rule); box-shadow: 0 26px 56px -30px rgba(28,24,20,.4); }

/* ── Pied de page ───────────────────────────────────────── */
.foot { background: var(--ink); color: var(--paper); padding: clamp(56px, 8vw, 104px) 0 calc(40px + env(safe-area-inset-bottom)); border-radius: clamp(24px, 5vw, 40px) clamp(24px, 5vw, 40px) 0 0; margin-top: 20px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 44px; }
.foot .brand-mark { color: var(--encre-clair); }
.foot-brand p { margin-top: 20px; font-size: 17px; line-height: 1.6; color: color-mix(in oklab, var(--paper) 60%, transparent); max-width: 32ch; }
.foot-col h4 { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--encre-clair); margin-bottom: 20px; }
.foot-col ul { list-style: none; display: grid; gap: 13px; }
.foot-col a { font-size: 17px; color: color-mix(in oklab, var(--paper) 74%, transparent); transition: color .25s; }
.foot-col a { transition: color .3s var(--ease), transform .4s var(--ease); display: inline-block; }
.foot-col a:hover { color: var(--paper); transform: translateX(5px); }
.foot-note { margin-top: clamp(44px, 5vw, 68px); padding-top: 28px; border-top: 1px solid color-mix(in oklab, var(--paper) 14%, transparent); font-size: 14.5px; line-height: 1.65; color: color-mix(in oklab, var(--paper) 46%, transparent); max-width: 86ch; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; margin-top: 26px; font-size: 14.5px; color: color-mix(in oklab, var(--paper) 46%, transparent); }
.foot-bottom a:hover { color: var(--paper); }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-top { grid-template-columns: 1fr; gap: 32px; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Accessibilité : tout se fige si l'utilisateur le demande ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html.js .rv { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════════════════════
   Bandeau de consentement
   Discret, ancré en bas à gauche, il ne recouvre pas le site.
   Refuser est aussi accessible qu'accepter : même taille, même
   place, aucun bouton mis en avant au détriment de l'autre.
   ══════════════════════════════════════════════════════════ */
.cookies {
  position: fixed; z-index: 95;
  left: max(var(--gut), env(safe-area-inset-left));
  right: auto; bottom: calc(20px + env(safe-area-inset-bottom));
  width: min(430px, calc(100vw - 2 * var(--gut)));
  display: grid; gap: 14px; padding: 24px 26px;
  background: color-mix(in oklab, var(--paper) 96%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  box-shadow: 0 30px 70px -30px rgba(28,24,20,.55);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.98);
  transition: opacity .4s var(--ease), transform .55s var(--spring), visibility .4s;
}
.cookies.ouvert { opacity: 1; visibility: visible; transform: none; }
.cookies-t { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.cookies-x { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.cookies-b { display: flex; gap: 10px; margin-top: 2px; }
.cookies-b .btn { flex: 1; height: 48px; font-size: 15.5px; padding: 0 16px; min-height: 0; }
/* Le bouton « Accepter » se distingue par la couleur, jamais par le poids :
   refuser doit rester aussi immédiat qu'accepter. */
.btn-accent { border-color: var(--encre); color: var(--encre); }
.btn-accent:hover { background: var(--encre-tint); border-color: var(--encre); }
.cookies-lien { white-space: nowrap; }
@media (max-width: 560px) {
  .cookies {
    left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right));
    width: auto; bottom: calc(14px + env(safe-area-inset-bottom)); padding: 20px 20px;
  }
  .cookies-b .btn { width: auto; min-height: 48px; }
}

/* Bouton présenté comme un lien, dans le pied de page. */
.pied-bouton {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; text-align: left; display: inline-block;
  transition: color .3s var(--ease), transform .4s var(--ease);
}
.foot-col .pied-bouton { font-size: 17px; color: color-mix(in oklab, var(--paper) 74%, transparent); }
.foot-col .pied-bouton:hover { color: var(--paper); transform: translateX(5px); }
