/* Commun à toutes les pages : polices, tokens, base, bouton, logo et menu */
/* ========== Polices (hébergées sur le site, sous-ensemble latin) ========== */
@font-face { font-family: "Lato"; font-weight: 300; font-display: swap; src: url(../assets/fonts/lato-300.woff2?v=716309aa) format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url(../assets/fonts/lato-400.woff2?v=e1b3b590) format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url(../assets/fonts/lato-700.woff2?v=de69cf9e) format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 600 700; font-display: swap; src: url(../assets/fonts/unbounded.woff2?v=8616dc35) format("woff2"); }

/* ========== Tokens ========== */
:root {
  /* couleurs */
  --c-text: #070a13;
  --c-inverse: #f0f6ff;
  --c-brand: #f66904;
  --c-on-media: var(--c-inverse);
  --c-brand-2: #bd3d1d;
  --c-muted: #4d5b6f;
  --c-line: #ff8a00;
  --c-fill: #ffc179;
  --c-fill-press: #ffe1bd;        /* bouton secondary enfoncé */
  --c-note: #e4e7ec;              /* post-it de repère, gris */
  --c-border: #92a0b4;
  --c-border-strong: #273549;
  --c-border-cell: #a6b4c8;
  --c-bg: #fff;
  --c-bg-2: #fafafa;
  --c-bg-brand: #fff6eb;
  --c-bg-dark: #191919;
  --c-scrim: color-mix(in srgb, var(--c-bg-dark) 60%, transparent);  /* voile du menu */

  /* typo */
  --f-head: "Unbounded", system-ui, sans-serif;
  --f-body: "Lato", system-ui, sans-serif;
  --t-xs: 12px/18px var(--f-body);
  --t-sm: 14px/20px var(--f-body);
  --t-md: 16px/24px var(--f-body);
  --t-lg: 18px/27px var(--f-body);
  --t-xl: 20px/30px var(--f-body);
  --t-thin: 300 20px/24px var(--f-body);    /* libellés en capitales espacées */
  --h-3xs: 600 13px/1.15 var(--f-head);     /* post-it de repère, infobulles */
  --h-xxs: 600 20px/24px var(--f-head);
  --h-xs: 600 24px/29px var(--f-head);
  --h-sm: 600 28px/34px var(--f-head);
  --h-md: 700 34px/41px var(--f-head);
  --h-lg: 700 clamp(30px, 4.2vw, 44px)/1.2 var(--f-head);
  --h-xl: 700 clamp(44px, 7vw, 90px)/1 var(--f-head);

  /* espacements */
  --s-xs: 4px; --s-sm: 8px; --s-md: 12px; --s-lg: 16px; --s-xl: 24px;
  --s-2xl: 32px; --s-3xl: 40px; --s-4xl: 48px; --s-5xl: 64px; --s-6xl: 88px; --s-7xl: 92px; --s-8xl: 104px; --s-9xl: 132px;

  /* rayons & ombres */
  --r-btn: 2px; --r-card: 8px; --r-table: 12px; --r-pill: 9999px;
  /* ombres douces en couches, façon relief */
  --shadow: 0 1px 2px rgba(7,10,19,.04), 0 4px 10px rgba(7,10,19,.05), 0 12px 28px -10px rgba(7,10,19,.10), inset 0 1px 0 rgba(255,255,255,.7);
  --shadow-sm: 0 1px 2px rgba(7,10,19,.05), 0 4px 10px -2px rgba(7,10,19,.08);
  --shadow-lift: 0 2px 4px rgba(7,10,19,.04), 0 10px 20px rgba(7,10,19,.06), 0 24px 44px -12px rgba(7,10,19,.16), inset 0 1px 0 rgba(255,255,255,.7);
  --ease: cubic-bezier(.2,.7,.3,1);
  --glow: 0 0 14px rgba(255,138,0,.14);
  /* lumière du rail : trait lumineux + diffusion vers la droite, adoucie sur les fonds clairs */
  --light-inset: var(--s-5xl);   /* hauteur des biseaux de diffusion au-delà du trait */
  --light-spread: 360px;         /* portée de la diffusion : passe sous le texte et les images */
  --light-bar: rgba(255,138,0,.5);
  --light-bloom: rgba(255,138,0,.18);
  --light-spill: rgba(255,138,0,.09);
  --light-base: var(--c-border);
  --glass-bg: rgba(255,255,255,.62);
  --glass-border: rgba(255,255,255,.7);
  --glass-blur: blur(16px) saturate(160%);

  /* layout */
  --max: 1280px;     /* largeur max du contenu, les fonds restent pleine largeur */
  --rail: 104px;
  --nav-h: 58px;
  --nav-h-stuck: 35px;
  --chrome: 56px;                 /* taille du logo et du burger */
  --chrome-inset: var(--s-lg);    /* distance au bord de l'écran */
  --hero-media: 453px;
}

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font: var(--t-md); -webkit-font-smoothing: antialiased; overflow-x: clip; }
p, h1, h2, h3, h4, figure { margin: 0; }
/* Images : ni clic droit « enregistrer », ni glisser, ni appui long sur mobile (dissuasif : une capture d'écran reste possible) */
img { display: block; max-width: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3, h4 { overflow-wrap: break-word; }
:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; }

/* ========== Composants communs ========== */
.icon { width: 24px; height: 24px; flex: none; fill: currentColor; }

/* Bouton texte + icône */
.btn { display: inline-flex; align-items: center; gap: var(--s-sm); padding: var(--s-sm) var(--s-md);
  background: var(--c-bg); border: 0; border-radius: var(--r-btn); color: var(--c-text); font: var(--t-md); cursor: pointer; text-decoration: none; }
/* Soulignement animé : la ligne monte en barre puis redescend en trait */
.btn span { position: relative; }
.btn span::before { content: ""; position: absolute; left: 0; top: 100%; width: 100%; height: 10px;
  background: currentColor; opacity: 0; transform: scale3d(1, .045, 1); transform-origin: 50% 0%; pointer-events: none; }
.btn:hover span::before, .btn:focus-visible span::before { opacity: 1; animation: line-up .3s ease forwards; }
@keyframes line-up {
  /* le trait de départ (10px sous le texte) reste masqué : seule la barre qui monte est visible */
  0%   { transform-origin: 50% 100%; transform: scale3d(1, .045, 1); opacity: 0; }
  20%  { opacity: 1; }
  50%  { transform-origin: 50% 100%; transform: scale3d(1, 1, 1); }
  51%  { transform-origin: 50% 0%;   transform: scale3d(1, 1, 1); }
  100% { transform-origin: 50% 0%;   transform: scale3d(1, .045, 1); }
}
@media (prefers-reduced-motion: reduce) { .btn:hover span::before { animation: none; } }

/* Page de message (introuvable, accès protégé, mentions légales, sans JavaScript) : contenu centré */
.notice { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: var(--s-xl); padding: var(--s-xl); text-align: center; }
.notice img { width: 72px; height: 72px; }
.notice h1 { font: var(--h-md); }
.notice h2 { font: var(--h-xxs); }
.notice p { max-width: 460px; }

/* ========== Menu burger ========== */
/* Logo : contour + fill. Deux faces superposées ; la face inversée (tokens) est découpée en JS sur la zone sombre
   qui passe derrière, donc la couleur change en direct au passage de la limite — même logique que le titre du hero */
.site-logo { position: fixed; z-index: 15; top: var(--chrome-inset); left: var(--chrome-inset); width: var(--chrome); height: var(--chrome); }
.site-logo__face { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--s-sm);
  border: 1px solid var(--c-border-strong); border-radius: var(--r-btn); background: var(--c-bg); color: var(--c-text); }
.site-logo__face--dark { background: var(--c-bg-dark); border-color: var(--c-on-media); color: var(--c-on-media); clip-path: inset(0 0 100% 0); }
.site-logo svg { width: 100%; height: 100%; fill: currentColor; }
/* Burger : toujours visible, au-dessus du panneau ; l'icône 24px est agrandie à 36px */
.burger { position: fixed; z-index: 50; top: var(--chrome-inset); right: var(--chrome-inset);
  display: grid; place-items: center; width: var(--chrome); height: var(--chrome); padding: 0; border: 0; border-radius: var(--r-btn);
  background: var(--c-bg); color: var(--c-text); box-shadow: var(--shadow-sm); cursor: pointer; --t-open: .7395s; --t-close: 1.0612s;
  transition: transform .3s var(--ease), background-color .3s var(--ease); }
.burger:hover, .burger:focus-visible { transform: scale(1.15); background: var(--c-fill); }
.burger__bars { position: relative; width: 24px; height: 24px; transform: scale(1.5); }
.bar { position: absolute; left: 5px; width: 14px; height: 2px; background: currentColor; transform-origin: 50% 50%; }
.bar--top { top: 5px; } .bar--mid { top: 11px; } .bar--bot { top: 17px; }

/* Transitions Figma « menu → close » (0.739s) et « close → menu » (1.061s), jouées une fois à chaque changement d'état */
.burger.has-played[aria-expanded="true"] .burger__bars { animation: mx-branches var(--t-open) linear both; }
.burger.has-played[aria-expanded="true"] .bar--top { animation: mx-top-y var(--t-open) linear both, mx-top-rot var(--t-open) linear both, mx-squash var(--t-open) linear both; }
.burger.has-played[aria-expanded="true"] .bar--bot { animation: mx-bot-y var(--t-open) linear both, mx-bot-rot var(--t-open) linear both, mx-squash var(--t-open) linear both; }
.burger.has-played[aria-expanded="true"] .bar--mid { animation: mx-mid-fade var(--t-open) linear both, mx-mid-rot var(--t-open) linear both, mx-mid-y var(--t-open) linear both; }
.burger.has-played[aria-expanded="false"] .burger__bars { animation: xm-bounce-y var(--t-close) linear both, xm-bounce-scale var(--t-close) linear both; }
.burger.has-played[aria-expanded="false"] .bar--top { animation: xm-top-fade var(--t-close) linear both, xm-top-y var(--t-close) linear both, xm-top-scale var(--t-close) linear both; }
.burger.has-played[aria-expanded="false"] .bar--mid { animation: xm-mid-rot var(--t-close) linear both, xm-mid-y var(--t-close) linear both; }
.burger.has-played[aria-expanded="false"] .bar--bot { animation: xm-bot-rot var(--t-close) linear both, xm-bot-y var(--t-close) linear both; }

/* menu → close : les branches s'écrasent, se croisent et rebondissent, la barre centrale disparaît */
@keyframes mx-branches { 0%, 15.724% { translate: 0 0; animation-timing-function: ease-out; } 23.308% { translate: 0 2px; animation-timing-function: ease-in-out; }
  36.144% { translate: 0 -.35px; animation-timing-function: ease-in-out; } 51.036%, 100% { translate: 0 0; } }
@keyframes mx-top-y { 0% { translate: 0 0; } 9.701% { translate: 0 -2px; animation-timing-function: cubic-bezier(.4, 0, .2, 1); } 25.542%, 100% { translate: 0 6px; } }
@keyframes mx-bot-y { 0% { translate: 0 0; } 9.701% { translate: 0 2px; animation-timing-function: cubic-bezier(.4, 0, .2, 1); } 25.542%, 100% { translate: 0 -6px; } }
@keyframes mx-top-rot { 0%, 17.025% { rotate: 0rad; animation-timing-function: ease-out; } 43.578% { rotate: .838rad; animation-timing-function: cubic-bezier(.5, 0, .5, 1); }
  54.842% { rotate: .733rad; animation-timing-function: ease-in-out; } 66.466%, 100% { rotate: .785rad; } }
@keyframes mx-bot-rot { 0%, 17.025% { rotate: 0rad; animation-timing-function: ease-out; } 43.578% { rotate: -.838rad; animation-timing-function: cubic-bezier(.5, 0, .5, 1); }
  54.842% { rotate: -.733rad; animation-timing-function: ease-in-out; } 66.466%, 100% { rotate: -.785rad; } }
@keyframes mx-squash { 0% { scale: 1 1; } 9.701% { scale: 1 1; animation-timing-function: cubic-bezier(.5, 0, .5, 1); } 17.039% { scale: 1 2.3; animation-timing-function: ease-in; }
  23.308% { scale: 1.25 .7; animation-timing-function: ease-out; } 36.144% { scale: .99 1.06; animation-timing-function: ease-in-out; } 51.036%, 100% { scale: 1 1; } }
@keyframes mx-mid-fade { 0% { opacity: 1; } 19.776% { opacity: 1; animation-timing-function: cubic-bezier(.4, 0, .2, 1); } 20.182%, 100% { opacity: 0; } }
@keyframes mx-mid-rot { 0%, 17.025% { rotate: 0rad; animation-timing-function: cubic-bezier(.5, 0, .5, 1); } 19.608%, 100% { rotate: .131rad; } }
@keyframes mx-mid-y { 0%, 17.025% { translate: 0 0; } 18.661% { translate: 0 1px; } 19.608%, 100% { translate: .101px .877px; } }

/* close → menu : la croix se déplie, la barre haute se trace puis percute, rebond commun
   (translations des barres haute et basse recalées sur leurs positions finales 5px / 17px) */
@keyframes xm-bounce-y { 0%, 34.076% { translate: 0 0; animation-timing-function: ease-out; } 39.66% { translate: 0 3.801px; animation-timing-function: ease-in-out; }
  48.187% { translate: 0 -.5px; animation-timing-function: ease-in-out; } 58.529%, 100% { translate: 0 0; } }
@keyframes xm-bounce-scale { 0%, 34.076% { scale: 1 1; animation-timing-function: cubic-bezier(.5, 0, .5, 1); } 39.818% { scale: 1.3 .886; animation-timing-function: ease-in-out; }
  48.187% { scale: .99 1.06; animation-timing-function: ease-in-out; } 58.529%, 100% { scale: 1 1; } }
@keyframes xm-mid-rot { 0% { rotate: .785rad; animation-timing-function: ease-out; } 16.962%, 100% { rotate: 0rad; } }
@keyframes xm-mid-y { 0%, 39.556% { translate: 0 0; animation-timing-function: ease-out; } 48.187% { translate: 0 .4px; animation-timing-function: cubic-bezier(.5, 0, .5, 1); }
  56.036% { translate: 0 -.4px; animation-timing-function: ease-in-out; } 64.136%, 100% { translate: 0 0; } }
@keyframes xm-bot-rot { 0% { rotate: -.785rad; animation-timing-function: ease-out; } 16.962%, 100% { rotate: 0rad; } }
@keyframes xm-bot-y { 0%, 34.076% { translate: 0 -6px; animation-timing-function: ease-out; } 48.187% { translate: 0 .4px; animation-timing-function: cubic-bezier(.5, 0, .5, 1); }
  56.036% { translate: 0 -.4px; animation-timing-function: ease-in-out; } 64.136%, 100% { translate: 0 0; } }
@keyframes xm-top-fade { 0%, 2.354% { opacity: 0; animation-timing-function: cubic-bezier(.5, 0, .5, 1); } 2.45%, 100% { opacity: 1; } }
@keyframes xm-top-y { 0%, 24.65% { translate: 0 -2px; } 28.27% { translate: 0 -.999px; } 34.076% { translate: 0 3px; } 37.693% { translate: 0 3.95px; } 39.556% { translate: 0 4.439px; }
  47.117% { translate: 0 -.276px; } 48.187% { translate: 0 -.4px; } 56.036% { translate: 0 .4px; } 56.54% { translate: 0 .397px; } 64.136%, 100% { translate: 0 0; } }
@keyframes xm-top-scale { 0%, 2.45% { scale: .001 1; animation-timing-function: cubic-bezier(.5, 0, .5, 1); } 8.858% { scale: 1.3 1; animation-timing-function: cubic-bezier(.5, 0, .5, 1); }
  18.001% { scale: 1 1; } 24.65% { scale: 1 1; animation-timing-function: ease-in-out; } 29.975% { scale: 1 2; } 34.076% { scale: 1 2; animation-timing-function: ease-in-out; } 39.556%, 100% { scale: 1 1; } }

/* Panneau à droite + voile */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--c-scrim); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; display: flex; flex-direction: column; gap: var(--s-5xl);
  width: min(420px, 100%); padding: calc(var(--chrome-inset) + var(--chrome) + var(--s-3xl)) var(--s-3xl) var(--s-3xl); overflow-y: auto;
  background: var(--c-bg); box-shadow: var(--shadow-lift); transform: translateX(100%); visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s .5s; }
.drawer__nav { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-xl); }
/* Sections du menu : l'interlettrage s'ouvre au survol, le texte reste ferré à gauche */
.drawer__link { padding-block: var(--s-sm); font: var(--h-xs); color: var(--c-text); text-decoration: none;
  letter-spacing: 0; white-space: nowrap; transition: letter-spacing .4s var(--ease), color .3s; }
.drawer__link:hover, .drawer__link:focus-visible { letter-spacing: .18em; }
.drawer__link.is-active { color: var(--c-brand); }
.drawer__extra { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-sm); padding-top: var(--s-2xl); border-top: 1px solid var(--c-border); }
.drawer__extra .btn { padding-inline: 0; }
.drawer__legal { margin-top: var(--s-md); font: var(--t-xs); color: var(--c-muted); }
html.menu-open { overflow: hidden; }
html.menu-open .scrim { opacity: 1; pointer-events: auto; }
html.menu-open .drawer { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }

/* Petit écran : logo et burger plus compacts */
@media (max-width: 760px) {
  :root { --chrome: 48px; --chrome-inset: var(--s-md); }
  .drawer__link { font-size: 22px; line-height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .burger .burger__bars, .burger .bar { animation: none !important; }
  .burger[aria-expanded="true"] .bar--top { translate: 0 6px; rotate: 45deg; }
  .burger[aria-expanded="true"] .bar--bot { translate: 0 -6px; rotate: -45deg; }
  .burger[aria-expanded="true"] .bar--mid { opacity: 0; }
  .drawer, .scrim, .burger { transition: none; }
  .burger:hover { transform: none; }
}
