/* Altear — feuille de style du site vitrine (refonte).
   Organisation : polices · jetons · base · fond · boutons · navigation · accueil · iPhone animé ·
   technologies · sections · fonctionnalités · fonctionnement · sécurité · chiffres · questions ·
   appel final · pied de page · utilitaires · animations de repli · « réduire les animations » ·
   pages secondaires.
   Règle : aucun état caché ici (sans JavaScript, tout est visible). Les états initiaux des
   animations vivent dans motion.css. */

/* ---------- Polices (hébergées sur le site, licence SIL OFL) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}


/* ---------- Jetons de design ---------- */
:root {
  color-scheme: dark;
  /* couleurs */
  --bg: #05060a;
  --bg-2: #090b13;
  --text: #eceef6;
  --muted: #a1a8bb;
  --dim: #7c839e;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .035);
  --glass-hi: rgba(255, 255, 255, .06);
  --violet: #a78bfa;
  --indigo: #818cf8;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #f87171;
  --accent-soft: #c4b5fd;
  --grad: linear-gradient(120deg, #c4b5fd 0%, #818cf8 45%, #22d3ee 100%);
  --grad-btn: linear-gradient(135deg, #8b5cf6 0%, #6366f1 55%, #0ea5e9 130%);
  --edge: linear-gradient(90deg, transparent, rgba(196, 181, 253, .65), rgba(34, 211, 238, .5), transparent);
  /* forme */
  --radius: 20px;
  --radius-lg: 28px;
  --radius-sm: 12px;
  /* mouvement */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  /* mise en page */
  --nav-h: 64px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 112px);
  /* typographie */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --fs-h1: clamp(3rem, 12.4vw, 7.5rem);
  --fs-h2: clamp(2.1rem, 6.2vw, 4.2rem);
  --fs-lead: clamp(1.05rem, 2.2vw, 1.3rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html.menu-open body { overflow: hidden; }
main, .footer { overflow-x: clip; } /* les décors en rotation ne doivent pas élargir la page */
img, svg, canvas { display: block; }
a { color: inherit; }
a, button, summary, label, input, textarea { -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: rgba(129, 140, 248, .35); }
:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.narrow { max-width: 820px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i {
  width: 1.1em; height: 1.1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 14px; border-radius: 8px; background: #fff; color: #000; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 16px; }

/* Mot clé en dégradé de marque. Les pièces créées par SplitText (enfants) reçoivent le même dégradé. */
.grad, .grad > * {
  background-image: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font: 500 .74rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase;
  color: #b4bdfc;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px 2px rgba(34, 211, 238, .6); }
.eyebrow.center { justify-content: center; text-align: center; color: var(--dim); }
.eyebrow.center::before { display: none; }

/* ---------- Fond : repli CSS du WebGL, grille et grain ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.backdrop::after { /* grain très léger (fichier SVG, pas de SVG en ligne) */
  content: ""; position: absolute; inset: 0;
  background-image: url("../img/grain.svg"); background-size: 220px 220px;
  opacity: .08;
}
.aurora { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; will-change: transform; transition: opacity 1.2s; }
.a1 { top: -32vmax; left: -22vmax; background: radial-gradient(circle, rgba(124, 58, 237, .42), transparent 62%); animation: drift1 26s ease-in-out infinite alternate; }
.a2 { top: -30vmax; right: -28vmax; background: radial-gradient(circle, rgba(14, 165, 233, .26), transparent 62%); animation: drift2 32s ease-in-out infinite alternate; }
.a3 { top: 35vh; left: 10vw; opacity: .5; background: radial-gradient(circle, rgba(79, 70, 229, .22), transparent 62%); animation: drift3 40s ease-in-out infinite alternate; }
.gl-on .aurora { opacity: .25; } /* le WebGL prend le relais en haut de l'accueil */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 75% 50% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 50% at 50% 0%, #000 20%, transparent 75%);
}

/* ---------- Boutons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  font: 600 .95rem/1 var(--font); letter-spacing: -.01em; white-space: nowrap; text-decoration: none;
  border: 1px solid transparent;
  transition: transform .3s var(--ease), background-color .25s, border-color .25s, box-shadow .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn .i { transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:hover .i { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: .875rem; }
.btn-lg { height: 56px; padding: 0 28px; border-radius: 16px; font-size: 1.02rem; }
.btn::after { /* reflet qui balaye au survol */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .32) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn-primary {
  color: #fff;
  background: var(--grad-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 14px 36px -14px rgba(99, 102, 241, .95);
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 18px 44px -12px rgba(99, 102, 241, 1); }
.btn-ghost { color: var(--text); background: var(--glass); border-color: var(--border-strong); }
.btn-ghost::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .1) 50%, transparent 70%); }
.btn-ghost:hover { background: var(--glass-hi); border-color: rgba(255, 255, 255, .24); }
/* Bouton magnétique : le mouvement est géré par le JavaScript, pas de décalage CSS concurrent */
.btn[data-magnetic] { transition: background-color .25s, border-color .25s, box-shadow .3s; will-change: transform; }
.btn[data-magnetic]:hover, .btn[data-magnetic]:active { transform: none; }
.btn[data-magnetic]:active { filter: brightness(.88); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s, height .35s var(--ease), transform .45s var(--ease);
}
.nav.scrolled, .nav.open {
  background: rgba(5, 6, 10, .7);
  -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px);
  border-bottom-color: var(--border);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.scrolled, .nav.open { background: rgba(5, 6, 10, .95); }
}
.nav.is-compact { height: 56px; }
.nav.nav-hidden, .nav.is-hidden { transform: translateY(-110%); }
.nav.open { transform: none; }
.nav-progress { /* progression de lecture : le JS pilote --p (0 → 1) ou le transform */
  position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  pointer-events: none;
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; filter: drop-shadow(0 4px 14px rgba(129, 140, 248, .45)); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 12px; }
.nav-links a:not(.btn) {
  padding: 8px 12px; border-radius: 8px;
  font-size: .925rem; color: var(--muted); text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav-links a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-mobile-only { display: none; }
.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  place-content: center; gap: 6px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--glass); color: var(--text); cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 859px) {
  .nav-toggle { display: grid; }
  .nav-desktop-only { display: none; }
  .nav-actions .btn-sm { height: 44px; }
  /* Menu ouvert : l'en-tête perd son flou (sinon il piégerait la feuille) ; la feuille porte son propre verre */
  .nav.open { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent; }
  .nav-links {
    position: absolute; z-index: -1; inset: 0 0 auto 0; height: 100vh; height: 100dvh; margin: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: calc(var(--nav-h) + env(safe-area-inset-top) + 20px) max(var(--gutter), env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    overflow-y: auto; overscroll-behavior: contain;
    background:
      radial-gradient(90% 45% at 0% 0%, rgba(124, 58, 237, .32), transparent 70%),
      radial-gradient(80% 40% at 100% 100%, rgba(14, 165, 233, .2), transparent 70%),
      rgba(5, 6, 10, .97);
    -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s; }
  .nav-links a:not(.btn) {
    display: flex; align-items: center; min-height: 60px; padding: 10px 2px; border-radius: 0;
    font-size: clamp(1.8rem, 8vw, 2.4rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.1;
    color: var(--text); border-bottom: 1px solid var(--border);
  }
  .nav-links a:not(.btn):hover { background: none; }
  .nav-links a:not(.btn):active { color: #c4b5fd; }
  .nav-links a[aria-current="page"] { background: none; color: #c4b5fd; }
  .nav-mobile-only { display: inline-flex; margin-top: 28px; height: 54px; border-radius: 16px; }
}
/* Apparition en cascade des liens de la feuille (seulement si le mouvement est permis) */
@media (max-width: 859px) and (prefers-reduced-motion: no-preference) {
  .nav.open .nav-links > * { animation: sheetIn .65s var(--ease) both; animation-delay: calc(90ms + var(--i, 0) * 65ms); }
  .nav-links > :nth-child(1) { --i: 0; }
  .nav-links > :nth-child(2) { --i: 1; }
  .nav-links > :nth-child(3) { --i: 2; }
  .nav-links > :nth-child(4) { --i: 3; }
  .nav-links > :nth-child(5) { --i: 4; }
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(22px); } }
@media (max-width: 420px) { .nav-actions .btn-sm { padding: 0 12px; } .nav-inner { gap: 12px; } }

/* ---------- Accueil ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: calc(var(--nav-h) + clamp(40px, 9vh, 100px)) 0 clamp(120px, 13vw, 200px);
  text-align: center;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 160px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 160px), transparent);
}
.hero-gl { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
.deco-orb {
  position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  filter: blur(50px); will-change: transform;
}
.deco-orb.o1 { top: 18%; right: -12vmax; width: 38vmax; height: 38vmax; background: radial-gradient(circle, rgba(34, 211, 238, .2), transparent 65%); }
.deco-orb.o2 { top: 55%; left: -14vmax; width: 34vmax; height: 34vmax; background: radial-gradient(circle, rgba(139, 92, 246, .24), transparent 65%); }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 36px; margin-bottom: clamp(22px, 4vw, 34px); padding: 7px 14px 7px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: .875rem; text-decoration: none; color: var(--text);
  transition: border-color .3s, background-color .3s;
}
.pill:hover { border-color: rgba(167, 139, 250, .5); background: rgba(167, 139, 250, .08); }
.pill .i { color: var(--muted); width: 14px; height: 14px; }
.pill-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }
.pill-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2s var(--ease) infinite; }
.pill[data-state="online"] .pill-dot { background: var(--green); }
.pill[data-state="offline"] .pill-dot { background: var(--red); }
.pill[data-state="offline"] .pill-dot::after { animation: none; }

.hero-title {
  margin: 0 0 clamp(20px, 3vw, 30px);
  font-size: var(--fs-h1); font-weight: 780; line-height: 1.02; letter-spacing: -.045em;
}
.hero-title .hero-line { display: block; padding-bottom: .06em; }
.hero-title .grad { animation: sheen 9s ease-in-out infinite; }
.hero-title .grad > * { animation: sheen 9s ease-in-out infinite; }
.lead { margin: 0; color: var(--muted); line-height: 1.6; }
.hero-lead { max-width: 640px; font-size: var(--fs-lead); }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.hero-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
  margin: 30px 0 0; padding: 0; list-style: none;
  font-size: .9rem; color: var(--dim);
}
.hero-trust li { display: flex; align-items: center; gap: 8px; }
.hero-trust .i { color: #a5b4fc; }

/* Scène 3D : le parent porte la perspective, l'enveloppe [data-hero-3d] est tournée par le JavaScript */
.tilt-scene { perspective: 1500px; perspective-origin: 50% 30%; }
.hero-visual {
  position: relative; width: 100%; max-width: 1000px;
  margin-top: clamp(48px, 8vw, 96px);
  container-type: inline-size; /* l'appareil se dimensionne en cqw */
}
.hero-3d { position: relative; transform-origin: 50% 40%; transform-style: preserve-3d; will-change: transform; }
.device { position: relative; aspect-ratio: 2.164; transform-style: preserve-3d; }
.device-frame::before, .device-frame::after { /* boutons latéraux */
  content: ""; position: absolute; top: -.55cqw; height: .6cqw; border-radius: .4cqw .4cqw 0 0;
  background: linear-gradient(180deg, #5a5d68, #2a2c33);
}
.device-frame::before { left: 14cqw; width: 6cqw; }
.device-frame::after { left: 22cqw; width: 6cqw; }
.screen::after { /* reflet de verre */
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 28%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .04) 100%);
}

/* ---------- iPhone animé (toutes les tailles internes en cqw = % de la largeur de l'appareil) ---------- */
.device-frame {
  position: absolute; inset: 0; border-radius: 6.4cqw;
  background: linear-gradient(145deg, #4a4d57, #17181d 30%, #0d0e12 60%, #34363e);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .12),
    inset 0 0 0 .55cqw #050506,
    0 4cqw 10cqw -3cqw rgba(99, 102, 241, .45),
    0 3cqw 6cqw -3cqw rgba(0, 0, 0, .9);
}
.device-island { position: absolute; z-index: 3; left: 2.35cqw; top: 50%; width: 1.75cqw; height: 13cqw; transform: translateY(-50%); border-radius: 1cqw; background: #000; }
.screen { position: absolute; inset: 1.25cqw; overflow: hidden; border-radius: 5.3cqw; background: #07080c; text-align: left; }
.device-glow {
  position: absolute; z-index: -1; left: 10%; right: 10%; bottom: -6%; height: 40%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, .5), transparent);
  filter: blur(30px);
}
.scene { position: absolute; inset: 0; transition: opacity .7s var(--ease), transform .9s var(--ease); }

/* Scène 1 : connexion Face ID */
.scene-login { display: grid; place-items: center; background: radial-gradient(120% 120% at 50% 0%, #1c1b45 0%, #0a0b16 55%, #06070b 100%); }
[data-scene="desktop"] .scene-login { opacity: 0; transform: scale(1.08); pointer-events: none; }
.login-card { display: flex; flex-direction: column; align-items: center; gap: 1.2cqw; }
.login-logo { width: 4.6cqw; height: 4.6cqw; filter: drop-shadow(0 .6cqw 1.6cqw rgba(129, 140, 248, .5)); }
.login-title { margin: 0; font-size: 2.4cqw; font-weight: 650; letter-spacing: -.03em; }
.faceid { position: relative; width: 8.4cqw; height: 8.4cqw; margin: .6cqw 0; color: #c4b5fd; transition: color .3s; }
.faceid svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.fid-corners { transform-origin: center; transform-box: fill-box; }
.fid-face { transition: opacity .25s; }
.fid-check { stroke: var(--green); stroke-dasharray: 40; stroke-dashoffset: 40; opacity: 0; }
.scanline {
  position: absolute; left: 14%; right: 14%; top: 18%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 1.2cqw var(--cyan); opacity: 0;
}
[data-scene="lock"] .fid-corners { animation: breathe 2.2s ease-in-out infinite; }
[data-scene="scan"] .fid-corners { animation: squeeze .55s ease-in-out infinite alternate; }
[data-scene="scan"] .scanline { opacity: 1; animation: scan 1s ease-in-out infinite alternate; }
[data-scene="ok"] .faceid, [data-scene="desktop"] .faceid { color: var(--green); }
[data-scene="ok"] .fid-face, [data-scene="desktop"] .fid-face { opacity: 0; }
[data-scene="ok"] .fid-check, [data-scene="desktop"] .fid-check { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .55s var(--ease) .1s, opacity .1s; }
.login-hint { display: grid; margin: 0; font-size: 1.4cqw; color: var(--muted); }
.login-hint span { grid-area: 1 / 1; opacity: 0; transition: opacity .3s; }
[data-scene="lock"] .t-idle, [data-scene="scan"] .t-scan, [data-scene="ok"] .t-ok, [data-scene="desktop"] .t-ok { opacity: 1; }
[data-scene="ok"] .t-ok { color: var(--green); }
.login-progress { width: 16cqw; height: .45cqw; overflow: hidden; border-radius: 1cqw; background: rgba(255, 255, 255, .08); }
.login-progress span { display: block; width: 0; height: 100%; background: var(--grad); }
[data-scene="ok"] .login-progress span, [data-scene="desktop"] .login-progress span { width: 100%; transition: width 1s var(--ease); }

/* Scène 2 : bureau KDE stylisé */
.scene-desktop { opacity: 0; transform: scale(.96); }
[data-scene="desktop"] .scene-desktop { opacity: 1; transform: none; }
.wallpaper {
  position: absolute; inset: 0;
  background:
    radial-gradient(55% 80% at 18% 25%, rgba(109, 76, 230, .85) 0%, transparent 60%),
    radial-gradient(50% 75% at 88% 75%, rgba(14, 116, 160, .9) 0%, transparent 60%),
    radial-gradient(70% 90% at 50% 110%, rgba(49, 36, 130, .9), transparent 70%),
    linear-gradient(160deg, #17163a, #0b1c33);
}
.wallpaper::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 .2cqw, transparent .2cqw 4cqw);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
}
.win {
  position: absolute; overflow: hidden; border-radius: 1.1cqw;
  background: rgba(30, 33, 39, .94);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 2.4cqw 4.5cqw -1.5cqw rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(1.6cqw) scale(.97);
}
.win-term { left: 6cqw; top: 4.5cqw; width: 47cqw; height: 27cqw; }
.win-files { left: 43cqw; top: 10.5cqw; width: 47cqw; height: 25.5cqw; }
.play .win-term { animation: winIn .7s var(--ease) .2s forwards; }
.play .win-files { animation: winIn .7s var(--ease) .45s forwards; }
.win-bar {
  display: flex; align-items: center; gap: .8cqw;
  height: 2.7cqw; padding: 0 1.1cqw;
  background: rgba(47, 51, 58, .96); border-bottom: 1px solid rgba(0, 0, 0, .3);
  font-size: 1.15cqw; color: #cfd3da;
}
.win-bar .i { width: 1.45cqw; height: 1.45cqw; color: #93c5fd; }
.win-bar span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.win-bar i { width: 1.05cqw; height: 1.05cqw; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.win-bar i:last-child { background: rgba(248, 113, 113, .75); }
.term {
  margin: 0; padding: 1.2cqw 1.5cqw; height: calc(100% - 2.7cqw);
  font: 1.32cqw/1.6 var(--mono); color: #d6dae3; white-space: pre-wrap; word-break: break-word;
  background: rgba(19, 21, 26, .9);
}
.term .pr { color: #34d399; }
.term .out { color: #9ca3af; }
.term .ok { color: #86efac; }
.term::after { content: "▋"; color: var(--violet); animation: blink 1s steps(1) infinite; }
.files { display: grid; grid-template-columns: 11.5cqw 1fr; height: calc(100% - 2.7cqw); }
.files-side {
  display: flex; flex-direction: column; gap: .5cqw;
  margin: 0; padding: 1.1cqw .9cqw; list-style: none;
  background: rgba(0, 0, 0, .2); font-size: 1.15cqw; color: #aab0bc;
}
.files-side li { padding: .25cqw .6cqw; border-radius: .5cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files-side .on { color: #fff; background: rgba(129, 140, 248, .3); }
.files-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); align-content: start; gap: 1.4cqw .8cqw;
  margin: 0; padding: 1.6cqw 1.2cqw; list-style: none;
  font-size: 1.1cqw; color: #d6dae3; text-align: center;
}
.files-grid li { display: flex; flex-direction: column; align-items: center; gap: .4cqw; min-width: 0; }
.files-grid .i { width: 4.3cqw; height: 4.3cqw; stroke-width: 1.4; color: #60a5fa; fill: rgba(96, 165, 250, .2); }
.files-grid .new-file { opacity: 0; transform: scale(.5); }
.files-grid .new-file .i { color: #fb7185; fill: rgba(251, 113, 133, .15); }
.play .new-file { animation: popIn .6s var(--ease) 3.9s forwards; }
.toast {
  position: absolute; right: 3cqw; bottom: 7.4cqw;
  display: flex; align-items: center; gap: .8cqw;
  padding: 1cqw 1.5cqw; border-radius: 1.1cqw;
  background: rgba(28, 31, 38, .95); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 1.5cqw 3cqw -1cqw rgba(0, 0, 0, .6);
  font-size: 1.25cqw; color: #e5e7eb;
  opacity: 0; transform: translateY(1.2cqw);
}
.toast .i { width: 1.6cqw; height: 1.6cqw; color: var(--green); }
.play .toast { animation: toastIn 4.2s var(--ease) 3.5s forwards; }
.cursor {
  position: absolute; left: 0; top: 0; z-index: 4;
  width: 2.3cqw; height: 2.3cqw;
  fill: #fff; stroke: #111; stroke-width: 1.2; stroke-linejoin: round;
  filter: drop-shadow(0 .3cqw .5cqw rgba(0, 0, 0, .5));
  opacity: 0; transform: translate(70cqw, 36cqw);
}
.play .cursor { animation: cursorMove 7s var(--ease) .7s forwards; }
.panel {
  position: absolute; left: 50%; bottom: 1.4cqw; z-index: 2;
  display: flex; align-items: center; gap: .9cqw;
  width: 72cqw; padding: .6cqw 1cqw; border-radius: 1.5cqw;
  transform: translateX(-50%);
  background: rgba(17, 19, 25, .8); border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 1cqw 3cqw -1cqw rgba(0, 0, 0, .7);
}
.panel-app { position: relative; display: grid; place-items: center; width: 3.1cqw; height: 3.1cqw; border-radius: .9cqw; color: #d1d5db; }
.panel-app .i { width: 1.85cqw; height: 1.85cqw; }
.panel-app.launcher { color: var(--violet); }
.panel-app.on { background: rgba(255, 255, 255, .07); }
.panel-app.on::after { content: ""; position: absolute; bottom: -.35cqw; width: 1.2cqw; height: .26cqw; border-radius: 1cqw; background: var(--indigo); }
.panel-tray { margin-left: auto; display: flex; align-items: center; gap: .9cqw; padding-right: .4cqw; font-size: 1.3cqw; color: #d1d5db; }
.panel-tray .i { width: 1.6cqw; height: 1.6cqw; }
.panel-tray b { font-weight: 550; font-variant-numeric: tabular-nums; }


/* ---------- Technologies (bandeau défilant) ---------- */
.marquee-section { padding: clamp(24px, 5vw, 56px) 0 0; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: 56px; width: max-content; padding: 14px 0; will-change: transform; }
.marquee-track span { display: inline-flex; align-items: center; gap: 56px; font-size: clamp(1.25rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -.03em; white-space: nowrap; color: rgba(236, 238, 246, .62); transition: color .3s; } /* ≥ 3:1 (grand texte gras) */
.marquee-track span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); opacity: .7; }
.marquee-track span:hover { color: var(--text); }
/* Repli CSS : seulement si le JavaScript d'animation n'a pas pris le relais */
html:not(.motion-ready) .marquee-track { animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- Sections ---------- */
.section { position: relative; padding: var(--section-y) 0; scroll-margin-top: var(--nav-h); }
.section-head { max-width: 860px; margin: 0 auto clamp(44px, 7vw, 76px); text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head.left h2 { margin-inline: 0; }
.section-head.left .eyebrow { justify-content: flex-start; }
.section-head h2, .cta-card h2 { text-wrap: balance; max-width: 20ch; margin-inline: auto; margin: 0 0 18px; font-size: var(--fs-h2); font-weight: 780; line-height: 1.03; letter-spacing: -.045em; }
.section-lead { margin: 0; font-size: clamp(1rem, 1.8vw, 1.18rem); line-height: 1.6; color: var(--muted); }

/* ---------- Fonctionnalités (grille « bento », cartes 3D) ---------- */
.bento { display: grid; grid-template-columns: 1fr; gap: 16px; perspective: 1400px; }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card-xl, .card-wide { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card-xl { grid-column: span 2; }
  .card-wide { grid-column: span 3; }
}
.card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 280px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--glass-hi), rgba(255, 255, 255, .012));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  will-change: transform;
}
.card::before { /* halo de lumière qui suit le pointeur (--mx / --my en %) */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 0%), rgba(129, 140, 248, .16), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.card::after { /* liseré de lumière : plus fort en haut, suit le pointeur */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background:
    radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(196, 181, 253, .85), transparent 65%),
    linear-gradient(180deg, rgba(196, 181, 253, .3), rgba(255, 255, 255, .05) 35%, rgba(255, 255, 255, .03));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover::before { opacity: 1; }
.card-icon {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; margin-bottom: 22px; border-radius: 14px;
  background: rgba(129, 140, 248, .12); border: 1px solid rgba(129, 140, 248, .28); color: var(--accent-soft);
}
.card-icon .i { width: 22px; height: 22px; }
.card h3 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -.025em; }
.card p { margin: 0; font-size: .975rem; line-height: 1.6; color: var(--muted); }
.card-xl h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.card-xl > p { max-width: 460px; }

.mini-browser { position: relative; margin-top: auto; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: rgba(0, 0, 0, .35); }
.mb-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.mb-bar > i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.mb-url { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; margin-left: 10px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); font: .8rem var(--mono); color: #c7d2fe; }
.mb-url .i { width: 12px; height: 12px; color: var(--green); }
.mb-type { display: inline-block; overflow: hidden; white-space: nowrap; width: 0; border-right: 2px solid var(--violet); animation: typeUrl 7s steps(18) infinite; }
.mb-body { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: 140px; padding: 12px; }
.mb-body span { border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); background-size: 200% 100%; animation: shimmer 2s linear infinite; }
.mb-body span:first-child { grid-row: span 2; }
.mb-body span:last-child { display: none; }
.mb-body::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(17, 19, 25, .85), rgba(17, 19, 25, .85)) 50% calc(100% - 8px) / 60% 16px no-repeat,
    radial-gradient(55% 80% at 18% 25%, rgba(109, 76, 230, .85) 0%, transparent 60%),
    radial-gradient(50% 75% at 88% 75%, rgba(14, 116, 160, .9) 0%, transparent 60%),
    linear-gradient(160deg, #17163a, #0b1c33);
  opacity: 0; animation: showDesk 7s var(--ease) infinite;
}

.mini-face { align-self: center; width: 92px; height: 92px; margin-top: auto; color: var(--violet); }
.mini-face svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.mini-face .fid-corners { animation: breathe 2.4s ease-in-out infinite; }

.mini-ticket {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  margin-top: auto; padding: 14px 16px; border-radius: 14px;
  border: 1px dashed rgba(167, 139, 250, .45); background: rgba(139, 92, 246, .08);
}
.card > p { margin-bottom: 24px; }
.mini-ticket span { font: 1.05rem var(--mono); letter-spacing: .06em; color: #e9d5ff; }
.mini-ticket small { font-size: .8rem; color: var(--dim); }
.mini-ticket::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .12) 50%, transparent 65%); transform: translateX(-100%); animation: sweep 3.6s var(--ease) infinite; }

.mini-transfer { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-bottom: 6px; color: #c7d2fe; }
.mini-transfer > .i { width: 30px; height: 30px; }
.mt-track { position: relative; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(129, 140, 248, .25), rgba(34, 211, 238, .5)); }
.mt-file { position: absolute; top: 50%; left: 0; width: 22px; height: 22px; color: #f0abfc; transform: translate(-50%, -50%); animation: transfer 3.4s var(--ease) infinite; }

.mini-keys { display: flex; gap: 8px; margin-top: auto; }
.mini-keys kbd {
  display: grid; place-items: center; flex: 1; max-width: 48px; aspect-ratio: 1;
  border-radius: 10px; font: 600 .95rem var(--font); color: #e5e7eb;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  border: 1px solid var(--border-strong); box-shadow: 0 3px 0 rgba(0, 0, 0, .55);
  animation: keypress 3.6s infinite;
}
.mini-keys kbd:nth-child(2) { animation-delay: .3s; }
.mini-keys kbd:nth-child(3) { animation-delay: .6s; }
.mini-keys kbd:nth-child(4) { animation-delay: .9s; }
.mini-keys kbd:nth-child(5) { animation-delay: 1.2s; }
.mini-keys kbd:nth-child(6) { animation-delay: 1.5s; }

.card-wide { min-height: 0; }

.heartbeat { width: 100%; height: 80px; margin-top: 24px; overflow: visible; }
.heartbeat path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.heartbeat .hb-base { stroke: rgba(52, 211, 153, .18); }
.heartbeat .hb-pulse { stroke: var(--green); stroke-dasharray: .22 .78; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px rgba(52, 211, 153, .7)); animation: beat 2.8s linear infinite; }
@media (min-width: 1024px) {
  .card-wide { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 0 24px; }
  .card-wide .card-icon { margin-bottom: 0; }
  .heartbeat { grid-column: auto; margin-top: 0; }
}


/* ---------- Fonctionnement (section épinglée sur grand écran) ---------- */
.story { overflow: hidden; padding-bottom: clamp(48px, 6vw, 80px); }
.story .section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.story-visual {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 980px; margin: 0 auto clamp(28px, 4vw, 48px);
}
.story-wire { position: absolute; left: 4%; right: 4%; top: 50%; width: 92%; height: 2px; margin-top: -1px; overflow: visible; z-index: 0; }
.story-wire path { fill: none; stroke: rgba(167, 139, 250, .6); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.node {
  position: relative; z-index: 1; flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: clamp(92px, 24vw, 220px); padding: clamp(12px, 2.4vw, 22px) clamp(6px, 1.6vw, 16px); border-radius: 18px; text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)), var(--bg-2);
  border: 1px solid var(--border);
  transition: border-color .4s, box-shadow .4s;
}
.node-icon { display: grid; place-items: center; width: clamp(40px, 7vw, 56px); height: clamp(40px, 7vw, 56px); margin-bottom: 6px; border-radius: 16px; background: rgba(129, 140, 248, .12); border: 1px solid rgba(129, 140, 248, .3); color: var(--accent-soft); }
.node-icon .i { width: 55%; height: 55%; }
.node strong { font-size: clamp(.78rem, 1.8vw, 1.05rem); line-height: 1.2; }
.node small { font-size: .85rem; color: var(--dim); }
@media (max-width: 599px) { .node small { display: none; } }
.node-accent { border-color: rgba(34, 211, 238, .35); box-shadow: 0 0 60px -20px rgba(34, 211, 238, .5); }
.node-accent .node-icon { color: #67e8f9; background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .35); }
.node.is-active { border-color: rgba(167, 139, 250, .7); box-shadow: 0 0 70px -18px rgba(129, 140, 248, .9); }
.link { position: relative; flex: 1; height: 2px; min-width: 16px; }
.track { position: absolute; inset: 0; border-radius: 2px; background: linear-gradient(90deg, rgba(129, 140, 248, .2), rgba(34, 211, 238, .45)); }
.link-label { position: absolute; left: 0; right: 0; top: 14px; text-align: center; white-space: normal; line-height: 1.35; font: .75rem/1.35 var(--mono); color: var(--dim); }
@media (max-width: 599px) { .link-label { display: none; } }
.story-packet { /* créé par le JavaScript : voyage de gauche à droite du visuel */
  z-index: 2; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px 3px rgba(167, 139, 250, .9), 0 0 36px 10px rgba(34, 211, 238, .45);
}

.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.steps li {
  position: relative; padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--border); background: linear-gradient(180deg, var(--glass-hi), rgba(255, 255, 255, .01));
  transition: border-color .4s, background-color .4s, box-shadow .4s;
}
.steps li.is-done { border-color: rgba(129, 140, 248, .28); }
.steps li.is-active { border-color: rgba(167, 139, 250, .55); background: rgba(129, 140, 248, .08); box-shadow: 0 0 60px -24px rgba(129, 140, 248, .9); }
.step-n { display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(129, 140, 248, .12); font: .85rem var(--mono); color: #a5b4fc; }
.steps li.is-active .step-n { background: var(--grad-btn); color: #fff; }
.steps h3 { margin: 0 0 6px; font-size: 1.2rem; letter-spacing: -.02em; }
.steps p { margin: 0; color: var(--muted); line-height: 1.6; }

/* ---------- Sécurité ---------- */
.security { display: grid; gap: clamp(24px, 6vw, 88px); align-items: center; }
@media (min-width: 960px) { .security { grid-template-columns: .85fr 1.15fr; } }
.security-visual { position: relative; display: grid; place-items: center; width: min(100%, 480px); aspect-ratio: 1.35; margin: 0 auto; }
@media (max-width: 959px) { .security-visual { margin-top: clamp(48px, 14vw, 96px); } } /* place pour le bouclier qui « flotte » au-dessus de la pile */
@media (min-width: 960px) { .security-visual { aspect-ratio: 1.1; } }
.security-halo { position: absolute; inset: -18%; z-index: -1; border-radius: 50%; pointer-events: none; will-change: transform; background: radial-gradient(circle, rgba(124, 58, 237, .28), rgba(34, 211, 238, .08) 45%, transparent 68%); filter: blur(30px); }
.shield-outline { position: absolute; inset: 22%; width: 56%; height: 56%; overflow: visible; }
.shield-outline path { fill: none; stroke: url(#g-brand); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .8; }
.rings span { position: absolute; border-radius: 50%; animation: spin 40s linear infinite; }
.rings span:nth-child(1) { inset: 0; border: 1px dashed rgba(167, 139, 250, .35); }
.rings span:nth-child(2) { inset: 12%; border: 1px solid rgba(129, 140, 248, .2); animation-duration: 30s; animation-direction: reverse; }
.rings span:nth-child(3) { inset: 24%; border: 1px dashed rgba(34, 211, 238, .3); animation-duration: 50s; }
.rings span:nth-child(4) { inset: 36%; border: 1px solid rgba(167, 139, 250, .25); background: radial-gradient(circle, rgba(129, 140, 248, .14), transparent 70%); animation: none; }
.orbit { position: absolute; inset: 6%; border-radius: 50%; animation: spin 14s linear infinite; }
.orbit i { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.orbit.o2 { inset: 18%; animation-duration: 9s; animation-direction: reverse; }
.orbit.o2 i { background: var(--violet); box-shadow: 0 0 16px var(--violet); }
.shield {
  position: relative; display: grid; place-items: center; width: 34%; aspect-ratio: 1; border-radius: 30%;
  background: radial-gradient(circle at 30% 20%, rgba(167, 139, 250, .4), rgba(79, 70, 229, .15) 60%, transparent);
  border: 1px solid rgba(167, 139, 250, .45);
  box-shadow: 0 0 80px -10px rgba(129, 140, 248, .65), inset 0 1px 0 rgba(255, 255, 255, .2);
  color: #ede9fe;
  animation: float 6s ease-in-out infinite;
}
.shield .i { width: 48%; height: 48%; stroke-width: 1.5; }
.layers { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .layers { grid-template-columns: 1fr 1fr; } }
.layers li { position: relative; display: flex; gap: 14px; padding: 20px; border-radius: 18px; border: 1px solid var(--border); background: linear-gradient(180deg, var(--glass-hi), rgba(255, 255, 255, .01)); transition: border-color .3s, background-color .3s, transform .4s var(--ease); }
.layers li:hover { border-color: rgba(167, 139, 250, .4); background: rgba(129, 140, 248, .06); }
.layer-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: rgba(129, 140, 248, .12); color: var(--accent-soft); }
.layer-icon .i { width: 20px; height: 20px; }
.layers h3 { margin: 2px 0 4px; font-size: 1rem; letter-spacing: -.01em; }
.layers p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--muted); }

/* ---------- Chiffres ---------- */
.stats { position: relative; isolation: isolate; padding: clamp(56px, 9vw, 104px) 0; }
.stats::before { content: ""; position: absolute; inset: -120px 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(129, 140, 248, .07) 35%, rgba(34, 211, 238, .05) 65%, transparent); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 16px; }
@media (min-width: 860px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; }
.stat strong {
  display: block; line-height: 1.02;
  font-size: clamp(2.6rem, 8vw, 5rem); font-weight: 780; letter-spacing: -.055em; font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat > span { display: block; margin: 10px auto 0; max-width: 220px; font-size: .925rem; color: var(--muted); }

/* ---------- Questions ---------- */
.faq { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: 18px; background: rgba(255, 255, 255, .02); transition: border-color .3s, background-color .3s; }
.faq-item.open { border-color: rgba(167, 139, 250, .38); background: rgba(129, 140, 248, .05); }
.faq-item h3 { margin: 0; font-size: inherit; }
.faq-item button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 56px; padding: 18px 22px; border: 0; border-radius: 18px; background: none;
  font: 600 1.05rem/1.4 var(--font); color: var(--text); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.faq-item button .i { width: 20px; height: 20px; color: #a5b4fc; transition: transform .45s var(--ease); }
.faq-item button[aria-expanded="true"] .i { transform: rotate(135deg); }
.faq-panel { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .45s var(--ease), visibility 0s .45s; }
.faq-item.open .faq-panel { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .45s var(--ease), visibility 0s; }
.faq-panel > div { overflow: hidden; }
.faq-panel p { margin: 0; padding: 0 22px 20px; line-height: 1.65; color: var(--muted); }

/* ---------- Appel final ---------- */
.cta-final { position: relative; padding: var(--section-y) 0; }
.cta-final .deco-orb.o1 { top: 10%; right: -10vmax; }
.cta-card {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(52px, 9vw, 112px) clamp(20px, 5vw, 64px); border-radius: 36px; text-align: center;
  border: 1px solid rgba(167, 139, 250, .3);
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(124, 58, 237, .38), transparent 60%),
    radial-gradient(60% 100% at 100% 100%, rgba(14, 165, 233, .22), transparent 60%),
    rgba(255, 255, 255, .02);
}
.cta-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%);
}
.cta-card h2 { font-size: clamp(2.3rem, 7.4vw, 5.2rem); }
.cta-card p { max-width: 520px; margin: 0 auto; font-size: 1.1rem; line-height: 1.6; color: var(--muted); }

/* ---------- Pied de page ---------- */
.footer { padding: 56px 0 max(32px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand .brand { color: var(--text); }
.footer-brand p { max-width: 340px; margin: 12px 0 0; font-size: .925rem; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 24px; }
.footer-links a { text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .825rem; color: var(--dim); }
.footer-bottom a { text-underline-offset: 3px; }

/* ---------- Utilitaires ---------- */
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }

/* ---------- iPhone : épaisseur du châssis (tranche en plans empilés vers l'arrière) ---------- */
.device-edge { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.device-edge i {
  position: absolute; inset: 0; border-radius: 6.4cqw;
  background: linear-gradient(145deg, #6b6e79, #2b2d34 40%, #15161b 60%, #4a4d57);
  box-shadow: inset 0 0 0 .3cqw rgba(255, 255, 255, .1);
}
.device-edge i:nth-child(odd) { filter: brightness(.78); }
.device-edge i:nth-child(1) { translate: 0 0 -.3cqw; }
.device-edge i:nth-child(2) { translate: 0 0 -.6cqw; }
.device-edge i:nth-child(3) { translate: 0 0 -.9cqw; }
.device-edge i:nth-child(4) { translate: 0 0 -1.2cqw; }
.device-edge i:nth-child(5) { translate: 0 0 -1.5cqw; }
.device-edge i:nth-child(6) { translate: 0 0 -1.8cqw; }
.device-edge i:nth-child(7) { translate: 0 0 -2.1cqw; }
.device-edge i:nth-child(8) { translate: 0 0 -2.4cqw; background: #08090c; box-shadow: 0 3cqw 6cqw -1cqw rgba(0, 0, 0, .8); }
.device-frame { translate: 0 0 .2cqw; }
.device-sheen { /* reflet lumineux sur le verre, déplaçable via --mx / --my */
  position: absolute; inset: 1.25cqw; z-index: 6; border-radius: 5.3cqw; pointer-events: none; translate: 0 0 .3cqw;
  background: radial-gradient(40cqw circle at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, .12), transparent 60%);
}

/* ---------- Sécurité : visuel 3D en couches ---------- */
.stack-wrap { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.stack3d {
  --sep: clamp(24px, 6vw, 46px); /* écart entre plans, réduit sur petit écran */
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-32deg);
}
.plane {
  position: absolute; inset: 18%; padding: 12px 14px; border-radius: 22px;
  border: 1px solid rgba(167, 139, 250, .35);
  background: linear-gradient(135deg, rgba(139, 92, 246, .18), rgba(34, 211, 238, .06)), rgba(10, 11, 20, .72);
  box-shadow: 0 0 40px -12px rgba(129, 140, 248, .55), inset 0 1px 0 rgba(255, 255, 255, .15);
  translate: 0 0 calc(var(--i, 0) * var(--sep));
  transform-style: preserve-3d;
}
.plane:nth-child(1) { --i: 0; opacity: .85; }
.plane:nth-child(2) { --i: 1; }
.plane:nth-child(3) { --i: 2; }
.plane:nth-child(4) { --i: 3; }
.plane:nth-child(5) { --i: 4; border-color: rgba(34, 211, 238, .5); }
.plane-label { position: absolute; left: 14px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; font: 600 .8rem var(--mono); letter-spacing: .06em; color: #fff; text-shadow: 0 1px 8px rgba(5, 6, 10, .9); }
.plane-label .i { width: 16px; height: 16px; color: var(--cyan); }
.stack3d .shield {
  position: absolute; left: 66%; top: 6%; width: 24%; margin: 0;
  translate: 0 0 calc(5.4 * var(--sep));
  animation: none;
}

/* ---------- Touches de finition ---------- */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spinAng { to { --ang: 360deg; } }
.cta-card::after { /* liseré lumineux tournant */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, rgba(167, 139, 250, .95) 72%, rgba(34, 211, 238, .95) 86%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinAng 7s linear infinite;
}
.hero-visual::before { /* projecteur derrière l'iPhone */
  content: ""; position: absolute; z-index: -1; left: 50%; top: -35%; width: 130%; height: 150%; transform: translateX(-50%); pointer-events: none;
  background:
    conic-gradient(from 180deg at 50% 0%, transparent 156deg, rgba(167, 139, 250, .2) 172deg, rgba(34, 211, 238, .14) 180deg, rgba(167, 139, 250, .2) 188deg, transparent 204deg),
    radial-gradient(50% 55% at 50% 40%, rgba(99, 102, 241, .22), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 65%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 65%, transparent);
}
.section::before { /* filet de séparation en dégradé */
  content: ""; position: absolute; top: 0; left: 50%; width: min(var(--container), 88%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .35), rgba(34, 211, 238, .25), transparent);
}
@media (prefers-reduced-motion: reduce) { .cta-card::after { animation: none; } }

/* ---------- Animations de repli (CSS seul) ---------- */
@keyframes sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes drift1 { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vmax, 14vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(18vmax, -8vmax) scale(1.2); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes squeeze { to { transform: scale(.9); } }
@keyframes scan { from { top: 18%; } to { top: 78%; } }
@keyframes winIn { to { opacity: 1; transform: none; } }
@keyframes popIn { to { opacity: 1; transform: none; } }
@keyframes toastIn { 0% { opacity: 0; transform: translateY(1.2cqw); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-.6cqw); } }
@keyframes cursorMove {
  0% { opacity: 0; transform: translate(70cqw, 36cqw); }
  8% { opacity: 1; }
  32% { transform: translate(30cqw, 19cqw); }
  37% { transform: translate(30cqw, 19cqw) scale(.82); }
  42% { transform: translate(30cqw, 19cqw) scale(1); }
  66% { transform: translate(72cqw, 22cqw); }
  71% { transform: translate(72cqw, 22cqw) scale(.82); }
  76% { transform: translate(72cqw, 22cqw) scale(1); }
  100% { opacity: 1; transform: translate(80cqw, 27cqw); }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes typeUrl { 0%, 6% { width: 0; } 38%, 100% { width: 18ch; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes showDesk { 0%, 44% { opacity: 0; } 54%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sweep { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
@keyframes transfer { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 62% { left: 100%; opacity: 1; } 72%, 100% { left: 100%; opacity: 0; } }
@keyframes keypress {
  0%, 9%, 100% { transform: none; box-shadow: 0 3px 0 rgba(0, 0, 0, .55); }
  4% { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .55); background: rgba(129, 140, 248, .3); border-color: rgba(167, 139, 250, .7); }
}
@keyframes beat { to { stroke-dashoffset: 0; } }
@keyframes packetDown { 0% { top: 0; opacity: 0; } 12%, 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes packetUp { 0% { top: 100%; opacity: 0; } 12%, 88% { opacity: 1; } 100% { top: 0; opacity: 0; } }
@keyframes packetRight { 0% { left: 0; opacity: 0; } 12%, 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes packetLeft { 0% { left: 100%; opacity: 0; } 12%, 88% { opacity: 1; } 100% { left: 0; opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes marquee { to { transform: translateX(calc(-50% - 28px)); } }

/* ---------- « Réduire les animations » (réglage iOS / système) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .aurora, .marquee-track, .rings span, .orbit, .shield, .grad, .grad > * { animation: none !important; }
  .mb-body::after { animation: none !important; opacity: 1; } /* maquette du navigateur : état final visible */
  .nav { transform: none !important; }
  .hero-3d, .card, .btn[data-magnetic], .deco-orb, .security-halo { transform: none !important; }
  .cursor, .toast { display: none; }
}

/* ======================================================================
   Pages secondaires : portfolio, contact, pages légales
   ====================================================================== */
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .06); }
.page { position: relative; padding: calc(var(--nav-h) + clamp(48px, 9vw, 96px)) 0 clamp(72px, 10vw, 120px); }
.page-head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 64px); }
.page-head h1 { margin: 0 0 16px; font-size: clamp(2.4rem, 7vw, 4.4rem); font-weight: 750; line-height: 1; letter-spacing: -.045em; }
.page-head .lead { font-size: clamp(1.05rem, 2vw, 1.2rem); max-width: 640px; }
.updated { display: inline-block; margin-top: 18px; font-size: .85rem; color: var(--dim); }

/* Texte long (pages légales) */
.prose { max-width: 780px; }
.prose h2 { margin: 48px 0 12px; font-size: 1.35rem; letter-spacing: -.02em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 24px 0 8px; font-size: 1.05rem; }
.prose p, .prose li { color: var(--muted); line-height: 1.75; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; }
.prose a { color: #c4b5fd; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .box { margin: 20px 0; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--border); background: rgba(255, 255, 255, .025); }
.prose .box p { margin: 0; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); color: var(--muted); }
.prose th { color: var(--text); font-weight: 600; background: rgba(255, 255, 255, .03); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.legal-nav a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: .875rem; color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s; }
.legal-nav a:hover, .legal-nav a[aria-current="page"] { color: var(--text); border-color: rgba(167, 139, 250, .5); }

/* Portfolio */
.profile { display: grid; gap: 28px; align-items: center; margin-bottom: clamp(48px, 8vw, 88px); }
@media (min-width: 860px) { .profile { grid-template-columns: 1.4fr 1fr; } }
.profile .page-head { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .03); font-size: .85rem; color: var(--muted); }
.skills-card { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); }
.skills-card h2 { margin: 0 0 14px; font-size: 1rem; letter-spacing: -.01em; }
.skills-card h2 + .chips { margin-bottom: 20px; }
.skills-card .chips:last-child { margin-bottom: 0; }
.projects { display: grid; gap: 16px; }
@media (min-width: 760px) { .projects { grid-template-columns: repeat(2, 1fr); } .project.featured { grid-column: span 2; } }
.project { min-height: 0; }
.project .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; font-size: .8rem; color: var(--dim); }
.project .meta .tag { padding: 3px 10px; border-radius: 999px; background: rgba(129, 140, 248, .12); color: #c7d2fe; font: .75rem var(--mono); }
.project h3 { font-size: 1.3rem; }
.project ul { margin: 0 0 20px; padding-left: 1.1em; color: var(--muted); line-height: 1.65; font-size: .95rem; }
.project .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.bench { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
.bench li { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(0, 0, 0, .25); }
.bench strong { display: block; font-size: 1.6rem; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bench span { font-size: .8rem; color: var(--dim); }
.note { font-size: .85rem; color: var(--dim); }

/* Contact */
.contact-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.5fr 1fr; } }
.form-card, .info-card { padding: clamp(22px, 4vw, 32px); border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); }
.notice { display: flex; gap: 12px; margin-bottom: 24px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); color: #fde68a; font-size: .9rem; line-height: 1.55; }
.notice .i { margin-top: 2px; }
.notice a { color: inherit; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: rgba(0, 0, 0, .35);
  font: 1rem/1.4 var(--font); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(167, 139, 250, .7); box-shadow: 0 0 0 4px rgba(129, 140, 248, .18); }
.field small { color: var(--dim); font-size: .8rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 22px; font-size: .875rem; line-height: 1.55; color: var(--muted); }
.consent input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: #8b5cf6; }
.consent a { color: #c4b5fd; }
.form-status { min-height: 1.5em; margin: 14px 0 0; font-size: .9rem; color: var(--muted); }
.form-status[data-kind="ok"] { color: var(--green); }
.form-status[data-kind="error"] { color: var(--red); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.info-card h2 { margin: 0 0 8px; font-size: 1.1rem; }
.info-card p { margin: 0 0 20px; color: var(--muted); line-height: 1.6; font-size: .95rem; }
.info-card a.mail { display: inline-flex; align-items: center; gap: 8px; font: 1rem var(--mono); color: #c4b5fd; text-decoration: none; word-break: break-all; }
.info-card hr { margin: 22px 0; border: 0; border-top: 1px solid var(--border); }

/* Page introuvable */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: var(--nav-h) var(--gutter) 48px; }
.notfound .code { font-size: clamp(6rem, 30vw, 12rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound p { color: var(--muted); margin: 8px 0 28px; }

/* Pied de page en colonnes */
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 28px 40px; flex: 1 1 320px; min-width: 0; max-width: 620px; }
@media (max-width: 520px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; } }
.footer-cols nav { display: flex; flex-direction: column; gap: 10px; }
.footer-cols h2 { margin: 0 0 4px; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.footer-cols a { color: var(--muted); text-decoration: none; font-size: .925rem; transition: color .2s; }
.footer-cols a:hover { color: var(--text); }
.hero-ctas.start { justify-content: flex-start; }
.page .notfound { min-height: 55vh; padding: 0; }
.notfound h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.03em; }
p.consent { display: block; }
@media (max-width: 699px) {
  .table-wrap { border: 0; overflow: visible; }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose thead { display: none; }
  .prose tr { margin-bottom: 12px; padding: 6px 0; border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, .025); }
  .prose td { padding: 8px 16px; border: 0; }
  .prose td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #a5b4fc; }
}

/* ======================================================================
   Phase 2 : expérience iPhone (mobile d'abord)
   Carrousels, points, barre d'action, halos, rythme resserré, détails iOS.
   Le bureau (≥ 760 px) garde la grille d'origine.
   ====================================================================== */

/* Points de carrousel et barre d'action : cachés hors mobile (le JS crée les <button> des points) */
.dots, .dock { display: none; }
.dots[hidden] { display: none !important; }

/* Retour au toucher (pas sur [data-magnetic], déjà géré) et survol collant des écrans tactiles */
.pill:active, .nav-toggle:active { transform: scale(.96); }
.faq-item button:active { background: rgba(255, 255, 255, .04); }
.legal-nav a:active, .toc a:active, .footer-cols a:active, .info-card a.mail:active { color: var(--text); }
@media (hover: none) {
  .btn:hover { transform: none; }
  .btn:hover .i { transform: none; }
  .btn:hover::after { transform: translateX(-120%); }
  .btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 14px 36px -14px rgba(99, 102, 241, .95); }
  .btn-ghost:hover { background: var(--glass); border-color: var(--border-strong); }
  .card:hover::before { opacity: 0; }
  .pill:hover { border-color: var(--border-strong); background: var(--glass); }
}

@media (max-width: 759px) {
  :root {
    --nav-h: 60px;
    --section-y: 48px;
    --fs-h1: clamp(2.9rem, 14.6vw, 4.4rem);
    --fs-h2: clamp(2rem, 8.6vw, 2.7rem);
  }
  html { scroll-padding-top: calc(var(--nav-h) + 8px); }
  .nav { height: calc(var(--nav-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .nav.is-compact { height: calc(54px + env(safe-area-inset-top)); }

  /* --- Halo ambiant : chaque section a sa lumière, aucun « trou noir » --- */
  .section, .stats, .cta-final, .marquee-section { isolation: isolate; }
  .section::after, .stats::after, .cta-final::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
      radial-gradient(75% 34% at 0% 14%, rgba(124, 58, 237, .22), transparent 72%),
      radial-gradient(70% 28% at 100% 88%, rgba(14, 165, 233, .13), transparent 72%);
  }
  #fonctionnement::after, #faq::after {
    background:
      radial-gradient(75% 34% at 100% 14%, rgba(14, 165, 233, .16), transparent 72%),
      radial-gradient(70% 28% at 0% 88%, rgba(124, 58, 237, .18), transparent 72%);
  }
  .stats::after, .cta-final::after {
    background: radial-gradient(90% 60% at 50% 50%, rgba(99, 102, 241, .16), transparent 72%);
  }

  /* --- Hero --- */
  .hero {
    min-height: 100vh; min-height: 100svh;
    padding: calc(var(--nav-h) + env(safe-area-inset-top) + 18px) 0 48px;
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(180deg, #000 calc(100% - 56px), transparent);
  }
  .pill { margin-bottom: 18px; }
  .hero-title { margin-bottom: 14px; line-height: 1; letter-spacing: -.05em; }
  .hero-lead { font-size: 1.06rem; line-height: 1.55; }
  .hero-ctas { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; margin-top: 22px; }
  .hero-ctas .btn { width: 100%; }
  .btn-lg { height: 54px; padding: 0 22px; border-radius: 16px; }
  .hero-trust {
    flex-wrap: nowrap; justify-content: flex-start; align-self: center;
    gap: 8px; width: calc(100% + 2 * var(--gutter)); margin: 18px 0 0; padding: 4px var(--gutter);
    overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain;
    font-size: .86rem; color: var(--muted);
  }
  .hero-trust::-webkit-scrollbar { display: none; }
  .hero-trust li {
    flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; white-space: nowrap; scroll-snap-align: start;
    border: 1px solid var(--border-strong); background: var(--glass);
  }
  .hero-visual { margin-top: 26px; width: calc(100% + 2 * var(--gutter) - 12px); max-width: none; }
  .hero-visual::before { top: -20%; height: 130%; }
  .device { aspect-ratio: 1.78; }
  .device-glow { bottom: -4%; height: 34%; }

  /* --- Bandeau technologies --- */
  .marquee-section { padding: 8px 0 0; }
  .marquee-section .eyebrow { margin-bottom: 6px; font-size: .68rem; }
  .marquee-track { gap: 36px; padding: 10px 0; }
  .marquee-track span { gap: 36px; font-size: 1.2rem; }

  /* --- Sections --- */
  .section-head { margin-bottom: 26px; }
  .section-head .eyebrow { margin-bottom: 12px; }
  .section-head h2, .cta-card h2 { margin-bottom: 12px; line-height: 1.04; }
  .section-lead { font-size: 1rem; line-height: 1.55; }

  /* --- Carrousels horizontaux : défilent DANS leur conteneur, jamais la page --- */
  [data-carousel] {
    --c-w: min(82vw, 400px);
    display: flex; align-items: stretch; gap: 12px;
    margin: 0 calc(-1 * var(--gutter)); padding: 8px calc((100vw - var(--c-w)) / 2) 12px;
    scroll-padding-inline: calc((100vw - var(--c-w)) / 2);
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; perspective: none;
  }
  [data-carousel]::-webkit-scrollbar { display: none; }
  [data-carousel]:focus-visible { outline-offset: -4px; border-radius: 24px; }
  [data-carousel] > * { flex: 0 0 var(--c-w); min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; }
  .steps[data-carousel], .layers[data-carousel] { margin-block: 0; padding-inline: calc((100vw - var(--c-w)) / 2); }

  /* Points : boutons accessibles (aria-label posé par le JS), zone tactile 44 px de haut */
  .dots { display: flex; align-items: center; justify-content: center; margin: 2px 0 0; }
  .dots button {
    position: relative; width: 28px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  }
  .dots button::before {
    content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 999px;
    background: rgba(255, 255, 255, .28);
    transition: width .35s var(--ease), margin .35s var(--ease), background .35s;
  }
  .dots button[aria-current="true"]::before { width: 22px; margin-left: -11px; background: var(--grad); }
  .dots button:active::before { background: rgba(255, 255, 255, .6); }
  .dots button:focus-visible { outline-offset: -4px; }

  /* Cartes plus compactes */
  .card { min-height: 0; padding: 20px; border-radius: 24px; }
  .card-icon { width: 44px; height: 44px; margin-bottom: 14px; border-radius: 13px; }
  .card h3 { font-size: 1.18rem; }
  .card p { font-size: .94rem; line-height: 1.55; }
  .card > p { margin-bottom: 16px; }
  .card-xl h3 { font-size: 1.3rem; }
  .mb-body { height: 84px; padding: 10px; }
  .mini-face { width: 64px; height: 64px; }
  .heartbeat { height: 52px; margin-top: 14px; }
  .is-current { border-color: rgba(167, 139, 250, .38); }
  .is-current.card, .layers .is-current, .steps .is-current { box-shadow: 0 20px 50px -26px rgba(129, 140, 248, .8); }

  /* Fonctionnement */
  .story { padding-bottom: 40px; }
  .story .section-head { margin-bottom: 20px; }
  .story-visual { margin-bottom: 16px; }
  .node { width: clamp(88px, 26vw, 120px); padding: 10px 6px; }
  .steps { gap: 12px; }
  .steps li { padding: 20px; border-radius: 22px; }
  .step-n { margin-bottom: 8px; }
  .steps h3 { font-size: 1.15rem; }

  /* Sécurité : pile 3D plus compacte */
  .security { gap: 8px; }
  .security > *, .security-copy { min-width: 0; }
  .security-visual { width: min(100%, 300px); aspect-ratio: 1.55; margin: 36px auto 4px; }
  .stack3d { --sep: 18px; }
  .plane-label { left: 10px; bottom: 7px; font-size: .62rem; }
  .plane-label .i { width: 13px; height: 13px; }
  .security-halo { inset: -14%; }
  .layers { gap: 12px; }
  .layers li { gap: 14px; align-items: flex-start; padding: 18px; border-radius: 22px; }
  .layers h3 { font-size: 1.02rem; }

  /* Chiffres */
  .stats { padding: 32px 0 40px; }
  .stats-grid { gap: 26px 12px; }
  .stat strong { font-size: 2.5rem; }
  .stat > span { margin-top: 6px; font-size: .88rem; line-height: 1.4; }

  /* Questions */
  .faq { gap: 8px; }
  .faq-item { border-radius: 18px; }
  .faq-item button { min-height: 56px; padding: 14px 18px; font-size: 1rem; }
  .faq-panel p { padding: 0 18px 18px; }

  /* Appel final */
  .cta-final { padding: 8px 0 var(--section-y); }
  .cta-card { padding: 40px 20px; border-radius: 30px; }
  .cta-card h2 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .cta-card p { font-size: 1.02rem; }
  .cta-card .hero-ctas { margin-top: 22px; }

  /* Pied de page : marge pour que la barre d'action ne masque rien */
  .footer { padding: 40px 0 calc(max(24px, env(safe-area-inset-bottom)) + 64px); }
  .footer-inner { gap: 24px; }
  .footer-cols a { display: flex; align-items: center; min-height: 44px; }
  .footer-cols nav { gap: 0; }
  .footer-cols h2 { margin-bottom: 6px; }
  .footer-bottom { margin-top: 20px; padding-top: 16px; }

  /* --- Barre d'action flottante : pilule en verre au-dessus de la barre d'accueil iOS --- */
  .dock {
    position: fixed; z-index: 45; display: flex; gap: 8px;
    left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: 420px; margin-inline: auto; padding: 8px; border-radius: 26px;
    background: rgba(14, 16, 26, .66);
    -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid var(--border-strong);
    box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .1);
    opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(28px);
    transition: transform .5s var(--ease), opacity .35s var(--ease), visibility 0s .5s;
  }
  .dock.is-shown { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: transform .5s var(--ease), opacity .35s var(--ease), visibility 0s; }
  .dock .btn { flex: 1 1 0; height: 48px; padding: 0 14px; border-radius: 18px; }
  .dock .btn-primary { flex: 1.45 1 0; }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .dock { background: rgba(14, 16, 26, .96); } }
}
@media (max-width: 759px) and (prefers-reduced-motion: reduce) {
  .dock, .dock.is-shown { transition: none; }
}
@media print { .dock { display: none !important; } }
