/* ==========================================================
   Beaver Tech — Solutions numériques
   DA : noir profond + or, numérique / circuit imprimé
   ========================================================== */

:root {
  --bg: #07070a;
  --bg-2: #0d0d11;
  --bg-3: #14141a;
  --line: rgba(212, 175, 55, .16);
  --gold: #d4af37;
  --gold-hi: #f4dc8f;
  --gold-lo: #8c6d1f;
  --gold-grad: linear-gradient(135deg, #f7e3a1 0%, #d4af37 38%, #a8822a 62%, #f1d27a 100%);
  --text: #ece6d6;
  --muted: #9b9484;
  --radius: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --f-display: "Syne", "Segoe UI", system-ui, sans-serif;
  --f-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", Consolas, monospace;
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.9rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
strong { color: var(--gold-hi); font-weight: 600; }
::selection { background: var(--gold); color: #000; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }

.gold-text {
  background: var(--gold-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold);
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Effets de fond ---------- */
.fx-board, .fx-trail { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx-board { z-index: 0; opacity: .5; }
.fx-board--lit {
  opacity: 1;
  -webkit-mask-image: radial-gradient(circle 190px at var(--mx, -999px) var(--my, -999px), #000 0%, rgba(0,0,0,.3) 45%, transparent 100%);
          mask-image: radial-gradient(circle 190px at var(--mx, -999px) var(--my, -999px), #000 0%, rgba(0,0,0,.3) 45%, transparent 100%);
  filter: brightness(1.9);
}
.fx-trail { z-index: 60; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212,175,55,.08), transparent 70%),
              radial-gradient(ellipse 60% 50% at 100% 100%, rgba(212,175,55,.05), transparent 70%);
}
main, .footer, .nav { position: relative; z-index: 2; }

/* ---------- Boutons ---------- */
.btn {
  --pad: .95em 1.6em;
  display: inline-flex; align-items: center; gap: .6em;
  padding: var(--pad); border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; letter-spacing: .01em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s, border-color .3s;
  position: relative; overflow: hidden; white-space: nowrap;
  background: none;
}
.btn svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--gold { background: var(--gold-grad); background-size: 160% 100%; color: #0b0904; box-shadow: 0 6px 30px -8px rgba(212,175,55,.55); }
.btn--gold:hover { background-position: 100% 0; box-shadow: 0 10px 40px -6px rgba(212,175,55,.75); }
.btn--gold::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease);
}
.btn--gold:hover::after { left: 130%; }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn--line { border-color: rgba(212,175,55,.4); color: var(--gold-hi); margin-top: .6rem; }
.btn--line:hover { background: rgba(212,175,55,.1); border-color: var(--gold); }
.btn--sm { --pad: .6em 1.2em; font-size: .9rem; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  transition: background .4s, border-color .4s, height .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7,7,10,.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border-color: var(--line);
  --nav-h: 64px;
}
.nav__brand { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.nav__brand img { width: 62px; filter: drop-shadow(0 0 8px rgba(212,175,55,.35)); }
.nav__brand span { font-family: var(--f-display); font-weight: 700; letter-spacing: .14em; font-size: 1rem; }
.nav__brand b { color: var(--gold); font-weight: 700; }
.nav__links { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 2rem); }
.nav__links a:not(.btn) { color: var(--muted); font-size: .95rem; font-weight: 500; position: relative; transition: color .3s; }
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); position: relative; }
.nav__burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--gold); transition: transform .35s var(--ease), top .35s var(--ease); }
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Éléments communs ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--f-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .18em; color: var(--gold);
  margin-bottom: 1.2rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(212,175,55,.15), 0 0 12px var(--gold); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(212,175,55,.05), 0 0 18px var(--gold); } }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 3.5rem; padding: 0 16px; }
.section-head p:last-child { color: var(--muted); }
.kicker { display: flex; align-items: center; gap: .6rem; font-family: var(--f-mono); font-size: .82rem; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.kicker svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.note { font-size: .8rem; color: var(--muted); font-family: var(--f-mono); }

section { padding: clamp(80px, 12vw, 150px) clamp(16px, 5vw, 64px); }

/* Révélation au défilement */
/* masqué seulement si le JavaScript fonctionne (classe .js posée dans le <head>) */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 64px);
  padding-top: calc(var(--nav-h) + 40px);
  max-width: 1320px; margin: 0 auto; position: relative; overflow-x: hidden; overflow-x: clip;
}
.hero__title { font-size: clamp(2rem, 4.4vw, 4.1rem); font-weight: 700; margin-bottom: .45em; letter-spacing: -.02em; }
/* chaque ligne prend la largeur de son texte : le dégradé doré couvre tout le mot, même s'il dépasse la colonne */
.hero__title .line { display: block; white-space: nowrap; width: max-content; }
.hero__lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: #c9c2b1; max-width: 540px; margin-bottom: 2.2rem; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .eyebrow { letter-spacing: .12em; font-size: .76rem; }
.hero__text > * { opacity: 0; transform: translateY(26px); animation: rise 1s var(--ease) forwards; }
.hero__text > :nth-child(2) { animation-delay: .15s; }
.hero__text > :nth-child(3) { animation-delay: .45s; }
.hero__text > :nth-child(4) { animation-delay: .6s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.hero__visual { position: relative; aspect-ratio: 1; display: grid; place-items: center; order: 2; }
.hero__rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring { fill: none; stroke: var(--gold); stroke-linecap: round; transform-origin: 300px 300px; }
.ring--a { stroke-width: 1; stroke-dasharray: 2 10; opacity: .5; animation: spin 60s linear infinite; }
.ring--b { stroke-width: 1.5; stroke-dasharray: 160 40 20 40 300 120; opacity: .35; animation: spin 38s linear infinite reverse; }
.ring--c { stroke-width: 1; stroke-dasharray: 4 6; opacity: .25; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__logo { position: relative; width: 76%; }
/* Apparition « poussière d'or » : le logo reste formé de points dorés (canvas) jusqu'à la transition vers le hub.
   L'image nette, invisible, ne sert qu'à donner sa taille au bloc ; aucun lissage ni reflet par-dessus. */
.hero__logo > img:first-child {
  width: 100%;
  filter: drop-shadow(0 0 30px rgba(212,175,55,.25));
}
.js .hero__logo > img:first-child { opacity: 0; transition: opacity .8s ease; }
.js .hero__logo.is-plain > img:first-child { opacity: 1; }   /* pixels illisibles (site ouvert depuis le disque) : logo net à la place de la poussière */
.hero__dust {
  position: absolute; left: -35%; top: -35%; width: 170%; height: 170%; pointer-events: none; transition: opacity .8s ease;
  /* bords fondus : le nuage ne s'arrête jamais net sur un bord droit */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}

.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 1px solid rgba(212,175,55,.5); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 3px; background: var(--gold); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- HUB : logo en pointillés → nuage de poussière → la poussière forme le hub (moteur : hub.js) ---------- */
.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; }


/* calques de poussière (seul le calque de devant sert au nuage) */
.gx-back, .gx-front { position: absolute; left: -15%; top: -15%; width: 130%; height: 130%; pointer-events: none; }
.gx-back { z-index: 1; }
.gx-front { z-index: 6; }
/* le logo net s'efface quand sa poussière prend le relais */
.hero__logo { z-index: 7; transition: opacity 1.1s cubic-bezier(.4,0,.2,1); }
.hub.gx-running .hero__logo { opacity: 0; pointer-events: none; }

/* --- centre : pluie de lettres libre (sans sphère), déchiffrement du castor --- */
.planet {
  position: absolute; left: 50%; top: 50%; width: 32%; aspect-ratio: 1; border-radius: 50%; z-index: 3; overflow: hidden; pointer-events: none;
  transform: translate(-50%, -50%); opacity: 0; transition: opacity 1.6s ease;
}
.planet.on { opacity: 1; }
.planet__code {     /* pluie façon Matrix : fondu sphérique + effacée par la ligne de balayage (--swp) */
  position: absolute; inset: 0; overflow: hidden; z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent calc(var(--swp, -0.3) * 100% - 1%), #000 calc(var(--swp, -0.3) * 100% + 5%)), radial-gradient(circle, #000 38%, rgba(0,0,0,.5) 58%, transparent 74%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent calc(var(--swp, -0.3) * 100% - 1%), #000 calc(var(--swp, -0.3) * 100% + 5%)), radial-gradient(circle, #000 38%, rgba(0,0,0,.5) 58%, transparent 74%);
          mask-composite: intersect;
}
.planet__code canvas { display: block; width: 100%; height: 100%; opacity: .5; transition: opacity 1.2s ease; }
.planet.decoding .planet__code canvas { opacity: .28; }
.planet__decode { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; filter: drop-shadow(0 0 3px rgba(212,175,55,.35)); }
.hub__atmo { display: none; }

/* --- éclatement du logo : lueur douce + une onde --- */
.hub__flash { position: absolute; left: 50%; top: 50%; width: 40%; aspect-ratio: 1; border-radius: 50%; z-index: 5; pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%) scale(.4); background: radial-gradient(circle, rgba(255,248,225,.4) 0%, rgba(244,220,143,.18) 30%, rgba(212,175,55,.05) 55%, transparent 70%); }
.hub__flash.on { animation: gxFlash .9s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes gxFlash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } }
.hub__shock { position: absolute; left: 50%; top: 50%; width: 32%; aspect-ratio: 1; border-radius: 50%; z-index: 5; pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%) scale(.9); border: 1.5px solid rgba(255,240,200,.3); box-shadow: 0 0 18px 2px rgba(244,220,143,.12), inset 0 0 18px 2px rgba(244,220,143,.08); }
.hub__shock.on { animation: gxShock 1.6s cubic-bezier(.16,1,.3,1) forwards; }
.hub__shock--2 { display: none; }
@keyframes gxShock { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.9); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.7); } }

/* --- pistes, orbite et courant --- */
.hub__wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 2; pointer-events: none; }
.hub__wires .orbit { fill: none; stroke: rgba(212,175,55,.16); stroke-dasharray: 3 8; opacity: 0; transition: opacity 1.2s; }
.hub.is-ready .orbit { opacity: 1; }
.hub__wires .wire { fill: none; stroke: rgba(212,175,55,.3); stroke-width: 1.4; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .9s var(--ease), stroke .4s, stroke-width .4s; }
.hub__wires g.on .wire { stroke-dashoffset: 0; }
.hub__wires .pulse { fill: none; stroke: var(--gold-hi); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 8 100; opacity: 0; transition: opacity .8s; filter: drop-shadow(0 0 4px var(--gold)); animation: flow 3.2s linear infinite; animation-delay: calc(var(--i, 0) * -.37s); }
.hub.is-ready .pulse { opacity: .6; }
.hub__wires .is-hot .wire { stroke: var(--gold); stroke-width: 2.2; }
.hub__wires .is-hot .pulse { opacity: 1; animation-duration: 1.1s; stroke-dasharray: 12 24; }
@keyframes flow { from { stroke-dashoffset: 108; } to { stroke-dashoffset: 0; } }

/* --- médaillon central : le castor net est révélé par le balayage (--sw), puis le médaillon se forme --- */
.hub__core { position: absolute; left: 50%; top: 50%; width: 32%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; z-index: 4;
  transform: translate(-50%, -50%); transition: box-shadow .5s var(--ease); }
.hub__core::after { content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: -1; opacity: 0;
  background: radial-gradient(circle at 50% 35%, #1b1810, #0a0a0c 70%); border: 1px solid rgba(212,175,55,.5);
  box-shadow: 0 0 0 10px rgba(212,175,55,.04), 0 0 60px -10px rgba(212,175,55,.5), inset 0 0 40px rgba(212,175,55,.08);
  transform: scale(.94); transition: opacity 2.2s cubic-bezier(.4,0,.2,1), transform 2.4s cubic-bezier(.22,1,.36,1); }
.hub__core.solid::after { opacity: 1; transform: none; }
.hub__core img { width: 76%; filter: drop-shadow(0 0 10px rgba(212,175,55,.45)); }
/* masque du balayage seulement pendant la révélation (sans JavaScript ou une fois révélé : aucun masque,
   sinon masque + halo dessinent un rectangle sombre autour du castor) */
.js .hub__core img:not(.is-clear) { --sw: -0.2;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--sw, -0.2) * 100% - 3%), transparent calc(var(--sw, -0.2) * 100% + 3%));
          mask-image: linear-gradient(90deg, #000 calc(var(--sw, -0.2) * 100% - 3%), transparent calc(var(--sw, -0.2) * 100% + 3%)); }
.hub__core::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; opacity: 0; transition: opacity 2s 1s ease;
  background: conic-gradient(from 0deg, transparent 0 70%, var(--gold) 85%, transparent 100%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin 4s linear infinite; }
.hub__core.solid::before { opacity: 1; }
.hub.is-ready .hub__core:hover { box-shadow: 0 0 90px -5px rgba(212,175,55,.6); }

/* --- pôles : apparaissent quand la poussière les a dessinés --- */
.hub__node {
  --s: 13.5%;
  position: absolute; width: var(--s); aspect-ratio: 1; z-index: 4;
  transform: translate(-50%, -50%) scale(.92); opacity: 0; pointer-events: none;
  border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, #1a1710, #09090b 75%);
  border: 1px solid rgba(212,175,55,.45); color: var(--gold);
  box-shadow: 0 0 24px -8px rgba(212,175,55,.5);
  transition: opacity .8s cubic-bezier(.4,0,.2,1), transform 1.2s var(--ease), box-shadow .4s, border-color .4s, color .4s, background .4s;
}
.hub__node.on { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
/* tant qu'un pôle n'est pas formé, il est aussi hors d'atteinte au clavier */
.js .hub__node:not(.on) { visibility: hidden; }

/* sans JavaScript : pas d'animation, le hub s'affiche directement dans son état final */
html:not(.js) .hero__logo { display: none; }
html:not(.js) .hub__core::after, html:not(.js) .hub__core::before { opacity: 1; transform: none; }
html:not(.js) .hub__node { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
html:not(.js) .gauge .gauge__bar { stroke-dashoffset: 8; }
.hub__node svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* l'icône nette arrive juste après le disque, quand la poussière qui la dessinait s'efface */
.js .hub__node svg { opacity: 0; transition: opacity 1s .3s ease; }
.js .hub__node.on svg { opacity: 1; }
.hub__node span {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, -6px);
  white-space: nowrap; font-size: .82rem; font-weight: 600; color: var(--text);
  background: rgba(10,10,12,.92); border: 1px solid var(--line); padding: .3em .8em; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.hub__node.on:hover, .hub__node.on:focus-visible, .hub__node.on.is-selected {
  transform: translate(-50%, -50%) scale(1.14);
  color: #0b0904; background: var(--gold-grad); border-color: var(--gold-hi);
  box-shadow: 0 0 0 6px rgba(212,175,55,.12), 0 0 40px rgba(212,175,55,.7);
}
.hub__node:hover span, .hub__node:focus-visible span { opacity: 1; transform: translate(-50%, 0); }

/* Légende sous le hub (écrans tactiles) */
.hub__caption { display: none; }

/* ---------- FEATURES ---------- */
.feature {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: clamp(32px, 6vw, 96px);
}
.feature--rev .feature__media { order: 2; }
.feature__body p { color: #c3bcab; }
.feature__media { display: grid; place-items: center; perspective: 1000px; }

.frame {
  position: relative; width: min(100%, 400px); aspect-ratio: 1; border-radius: 28px;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #17150f, #08080a 72%);
  isolation: isolate;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
}
.frame--wide { aspect-ratio: 4 / 3; }
/* bordure dorée animée */
.frame::before {
  content: ""; position: absolute; inset: -60%; z-index: -2;
  background: conic-gradient(from 0deg, transparent 0 60%, rgba(212,175,55,.9) 75%, transparent 90%);
  animation: spin 6s linear infinite;
}
/* fond intérieur du cadre : la couleur du fond de l'image (--frame-bg), pour que l'image s'y fonde sans raccord */
.frame::after { content: ""; position: absolute; inset: 1.5px; border-radius: 27px; z-index: -1; background: var(--frame-bg, radial-gradient(circle at 50% 45%, #15130e, #08080a 72%)); }
/* l'image est affichée en entière ; seuls ses bords se fondent dans le cadre */
.frame img {
  width: 84%; border-radius: 14px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
          mask-composite: intersect;
  transform: translateZ(40px);
}
.frame--wide img { width: 94%; }
.frame__glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,236,170,.18), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.tilt:hover .frame__glare, .tilt:hover > .frame__glare { opacity: 1; }

.ticks { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .7rem; }
.ticks li { display: flex; gap: .8rem; align-items: flex-start; }
.ticks svg { flex: none; width: 22px; height: 22px; padding: 4px; margin-top: 2px; border-radius: 50%; background: rgba(212,175,55,.12); fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.gauges { display: flex; gap: clamp(12px, 3vw, 32px); margin: 1.6rem 0 .6rem; flex-wrap: wrap; }
.gauge { position: relative; width: 108px; text-align: center; }
.gauge svg { width: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke: rgba(212,175,55,.12); stroke-width: 7; }
.gauge .gauge__bar { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; filter: drop-shadow(0 0 5px rgba(212,175,55,.6)); transition: stroke-dashoffset 2s var(--ease); }
.gauge b { position: absolute; top: 0; left: 0; right: 0; height: 108px; display: grid; place-items: center; font-family: var(--f-display); font-size: 1.7rem; color: var(--gold-hi); }
.gauge span { font-size: .78rem; color: var(--muted); font-family: var(--f-mono); }

/* ---------- AUDIT (terminal) ---------- */
.audit { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.audit__term { border: 1px solid var(--line); border-radius: 16px; background: rgba(10,10,13,.9); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 60px -30px rgba(212,175,55,.4); }
.term__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.term__bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a2720; }
.term__bar i:first-child { background: var(--gold); }
.term__bar span { margin-left: auto; font-family: var(--f-mono); font-size: .75rem; color: var(--muted); }
.term__body { margin: 0; padding: 20px 22px; min-height: 290px; font-family: var(--f-mono); font-size: .86rem; line-height: 1.8; color: #cfc7b3; white-space: pre-wrap; }
.term__body .ok { color: var(--gold-hi); }
.term__body .warn { color: #e0a85a; }
.term__body .dim { color: #857e6e; }
.term__body .cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -2px; background: var(--gold); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- CARTES ---------- */
.cards {
  max-width: 1200px; margin: -40px auto 0; padding: 0 clamp(16px, 5vw, 64px) clamp(60px, 8vw, 100px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; z-index: 2;
}
.card {
  position: relative; padding: 30px 26px 26px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(25,22,15,.9), rgba(10,10,12,.9));
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: border-color .4s, box-shadow .4s, transform .5s var(--ease), opacity 1s var(--ease);
  transform-style: preserve-3d;
}
.card:hover { border-color: rgba(212,175,55,.55); box-shadow: 0 20px 60px -25px rgba(212,175,55,.45); }
.card p { color: #bab3a2; font-size: .95rem; flex: 1; }
.card__icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.2rem; background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.3); color: var(--gold); transform: translateZ(30px); }
.card__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card__link { display: inline-flex; align-items: center; gap: .5em; background: none; border: 0; padding: 0; color: var(--gold); font-weight: 600; font-size: .92rem; text-align: left; }
.card__link svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .3s var(--ease); }
.card__link:hover svg { transform: translateX(4px); }

/* ---------- MÉTHODE ---------- */
.steps-wrap { position: relative; max-width: 760px; margin: 0 auto; }
.steps__line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.steps__track { fill: none; stroke: rgba(212,175,55,.15); stroke-width: 2; }
.steps__fill { fill: none; stroke: var(--gold); stroke-width: 2.5; filter: drop-shadow(0 0 6px var(--gold)); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 3.2rem; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 1.6rem; align-items: start; transition: opacity .6s var(--ease); }
.js .step { opacity: .35; }
.js .step.is-lit { opacity: 1; }
.step__n {
  position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  font-family: var(--f-mono); font-weight: 500; color: var(--gold); background: var(--bg-2); border: 1px solid var(--line);
  transition: background .5s, color .5s, box-shadow .5s, border-color .5s;
}
.step.is-lit .step__n { background: var(--gold-grad); color: #0b0904; border-color: var(--gold-hi); box-shadow: 0 0 30px -4px rgba(212,175,55,.6); }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; margin-top: .6rem; }
.cta-row .btn--line { margin-top: 0; }
.method__intro { color: var(--muted); max-width: 560px; margin: 1rem auto 0; }
.step__get { margin-top: .6rem !important; color: var(--text); }
.step__get strong { color: var(--gold-hi); font-weight: 600; }
.method__note { max-width: 640px; margin: 3rem auto 0; text-align: center; color: var(--muted); font-size: .95rem; }
.step h3 { margin: .2em 0 .3em; }
.step p { color: var(--muted); margin: 0; }

/* ---------- STATS ---------- */
.stats { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: 40px 24px; text-align: center; }
.stat b, .stat i { font-family: var(--f-display); font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 800; font-style: normal; line-height: 1; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold); }
.stat span { display: block; margin-top: .8rem; color: var(--muted); font-size: .92rem; }

/* ---------- DEVIS ---------- */
.qform {
  max-width: 860px; margin: 0 auto; padding: clamp(24px, 4vw, 48px);
  border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(22,20,14,.92), rgba(9,9,11,.95));
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.9), 0 0 80px -40px rgba(212,175,55,.35);
  position: relative; overflow: hidden;
}
.qform__progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgba(212,175,55,.1); }
.qform__progress span { display: block; height: 100%; width: 33.33%; background: var(--gold-grad); box-shadow: 0 0 12px var(--gold); transition: width .6s var(--ease); }
.qform__steps { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; gap: 1.5rem; font-family: var(--f-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: #8a8476; counter-reset: s; }
.qform__steps li { counter-increment: s; transition: color .4s; }
.qform__steps li::before { content: "0" counter(s) " "; }
.qform__steps li.is-on { color: var(--gold); }
.qstep { border: 0; padding: 0; margin: 0; min-width: 0; display: none; }
.qstep.is-active { display: block; animation: stepIn .6s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(30px); } }
.qstep legend { font-family: var(--f-display); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; padding: 0; margin-bottom: .3rem; }
.qhint { color: var(--muted); font-size: .9rem; margin-bottom: 1.4rem; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 1rem; }
.chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; padding: 20px 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.015); cursor: pointer; transition: border-color .3s, background .3s, transform .3s var(--ease), box-shadow .3s; font-size: .9rem; font-weight: 600; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip svg { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.chip:hover { border-color: rgba(212,175,55,.5); transform: translateY(-2px); }
.chip:has(input:checked), .chip.is-checked { border-color: var(--gold); background: rgba(212,175,55,.12); box-shadow: 0 0 0 1px var(--gold) inset, 0 10px 30px -14px rgba(212,175,55,.6); }
.chip::after { content: ""; position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(212,175,55,.4); transition: background .3s; }
.chip:has(input:checked)::after, .chip.is-checked::after { background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat; }
.chip:focus-within { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; margin-top: 1.4rem; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field--full { grid-column: 1 / -1; }
.field__label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: .9em 1em; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0,0,0,.35); color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color .3s, box-shadow .3s; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #8a8476; opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,175,55,.12); }
.field input.is-bad { border-color: #d9734e; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-block; padding: .55em 1em; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; cursor: pointer; transition: all .3s; }
.seg input:checked + span { background: var(--gold); color: #0b0904; border-color: var(--gold); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.qnav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.qerror { color: #e59a6f; font-size: .9rem; min-height: 1.4em; margin: .8rem 0 0; }
.recap { margin-top: 1.6rem; padding: 18px 20px; border-radius: 14px; border: 1px dashed rgba(212,175,55,.35); background: rgba(212,175,55,.04); font-size: .92rem; }
.recap h4 { margin: 0 0 .6rem; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.recap ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.recap li { padding: .25em .75em; border-radius: 999px; background: rgba(212,175,55,.14); color: var(--gold-hi); font-size: .85rem; }
.recap p { margin: .7rem 0 0; color: var(--muted); }
.qdone { text-align: center; padding: 30px 0 10px; animation: stepIn .6s var(--ease); }
.qdone__check { width: 90px; margin: 0 auto 1rem; }
.qdone__check circle { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 227; stroke-dashoffset: 227; animation: draw 1s var(--ease) forwards; }
.qdone__check path { fill: none; stroke: var(--gold-hi); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .6s .7s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.qdone p { color: var(--muted); }

/* ---------- CONTACT ---------- */
.contact__card {
  max-width: 1100px; margin: 0 auto; padding: clamp(28px, 5vw, 64px);
  border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 0% 0%, rgba(212,175,55,.14), transparent 55%), var(--bg-2);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.contact__card p { color: var(--muted); }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.3); transition: border-color .3s, transform .3s var(--ease); }
.contact__list li:hover { border-color: rgba(212,175,55,.5); transform: translateX(6px); }
.contact__list svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.contact__list a { color: var(--text); }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 60px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer img { width: 170px; margin: 0 auto 1.2rem; opacity: .9; }
.footer__small { font-size: .8rem; color: #8a8476; }
.footer__small a { color: inherit; text-decoration: underline; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .chips { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav__burger { display: block; }
  .nav__links {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 85vw); height: 100vh; height: 100dvh;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.6rem; padding: 40px 32px;
    background: rgba(9,9,12,.97); border-left: 1px solid var(--line);
    transform: translateX(100%); visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s;
  }
  .nav__links.is-open { transform: none; visibility: visible; transition: transform .5s var(--ease); }
  .nav__links a:not(.btn) { font-size: 1.3rem; color: var(--text); font-family: var(--f-display); }
  .nav__burger { position: relative; z-index: 2; }

  .hero { grid-template-columns: 1fr; text-align: center; padding-top: calc(var(--nav-h) + 10px); min-height: auto; padding-bottom: 110px; }
  .hero__visual { order: 0; width: min(78vw, 420px); margin: 0 auto; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__cta { justify-content: center; }
  .hero .eyebrow { justify-content: center; }
  .hero__title .line { margin-left: auto; margin-right: auto; }

  .feature, .feature--rev, .audit { grid-template-columns: 1fr; }
  .feature--rev .feature__media { order: 0; }
  .frame { width: min(100%, 340px); }
  .audit__term { order: 2; }
  .cards { margin-top: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact__card { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero__title { font-size: 8.4vw; }
  .hero__title .line { white-space: normal; width: auto; }

  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 28px 14px; }
  .chips { grid-template-columns: 1fr 1fr; }
  .qgrid { grid-template-columns: 1fr; }
  .qform__steps { gap: .8rem; font-size: .68rem; }
  .qnav .btn { --pad: .85em 1.2em; }
  .gauge { width: 88px; }
  .gauge b { height: 88px; font-size: 1.35rem; }
  .term__body { font-size: .75rem; padding: 16px; min-height: 250px; }
  .nav__brand span { font-size: .9rem; }
  .nav__brand img { width: 50px; }
}

/* Écrans tactiles : pas de lumière qui suit la souris */
@media (hover: none) {
  .fx-board--lit { display: none; }
}

/* Accessibilité : animations réduites */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .fx-trail, .fx-board--lit { display: none; }
}

/* Hub sur écrans étroits : cercle conservé, pôles plus grands */
@media (max-width: 900px) {
  .hero__visual { width: min(90vw, 420px); margin-bottom: 44px; }
  .hub__node { --s: 16%; }
  .hub__node svg { width: 50%; height: 50%; }
}

/* Écrans tactiles : le nom du pôle s'affiche sous le hub */
@media (hover: none) {
  .hub__node span { display: none; }
  .hub__caption {
    display: block; position: absolute; left: 50%; bottom: -40px; transform: translateX(-50%); width: 100%;
    margin: 0; text-align: center; font-family: var(--f-mono); font-size: .8rem; letter-spacing: .06em; color: var(--muted);
    opacity: 0; transition: opacity .6s;
  }
  .hub.is-ready .hub__caption { opacity: 1; }
  .hub__caption a { color: var(--gold-hi); font-weight: 500; border-bottom: 1px solid rgba(212,175,55,.4); padding-bottom: 2px; }
}

/* ---------- Pages légales et page 404 ---------- */
.page-legal { min-height: 100vh; display: flex; flex-direction: column; }
.page-legal .nav { position: sticky; }
.legal { flex: 1; width: min(100% - 32px, 780px); margin: 0 auto; padding: calc(var(--nav-h) + 40px) 0 80px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--gold); }
.legal h2 { font-size: 1.25rem; margin: 2.4rem 0 .7rem; color: var(--text); }
.legal p { color: var(--muted); line-height: 1.75; margin: 0 0 1rem; }
.legal strong { color: var(--text); }
.legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.legal__date { font-size: .85rem; }
/* informations à compléter avant la mise en ligne : bien visibles pour ne pas les oublier */
mark.todo { background: rgba(229,154,111,.14); color: #f0b48f; border: 1px dashed rgba(229,154,111,.6); border-radius: 6px; padding: 0 .35em; }
.notfound { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 16px; gap: .4rem; }
.notfound img { width: 150px; filter: drop-shadow(0 0 14px rgba(212,175,55,.4)); margin-bottom: 1rem; }
.notfound .notfound__code { font-family: var(--f-display); font-size: clamp(4rem, 14vw, 7rem); font-weight: 800; line-height: 1; margin: 0; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound p { color: var(--muted); margin: 0 0 1.4rem; }
.footer__small a + a { margin-left: 0; }

/* case de consentement du formulaire */
.consent { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1.2rem; font-size: .88rem; color: var(--muted); line-height: 1.5; cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin-top: .15em; accent-color: var(--gold); cursor: pointer; }
.consent a { color: var(--gold); text-decoration: underline; }
.consent.is-bad { color: #e59a6f; }
