/* =====================================================================================
   hn-animations v2 · dynamisation des pages à visuels (Cerveau, Pionniers)
   Adapté de la proposition « Cerveau hypersensible · Dynamisation » du 15/10/2026.
   Rien n'est modifié dans les images : seuls leur entrée en scène et leur réaction au
   survol sont animées. État final = image d'origine, opacité 1, sans flou ni découpe.
   Désactivé entièrement si prefers-reduced-motion, sans JavaScript, ou si IntersectionObserver manque.
   ===================================================================================== */
:root{--hn-ease:cubic-bezier(.16,1,.3,1);--hn-soft:cubic-bezier(.22,.61,.36,1);--hn-dur:1050ms;--hn-rise:56px}
@media (max-width:799px){:root{--hn-rise:40px}}
.sio{overflow-x:clip}

/* 1. Dévoilement des visuels : balayage vertical + montée + flou → net, arrivée alternée gauche / droite */
html.hn-js [data-hn-reveal]{
  opacity:0;transform:translate3d(var(--hn-x,0px),var(--hn-rise),0) scale(.965);
  filter:blur(7px) saturate(.85);clip-path:inset(0 0 22% 0);
  transition:opacity .85s var(--hn-soft) var(--hn-delay,0ms),transform var(--hn-dur) var(--hn-ease) var(--hn-delay,0ms),
    filter .95s var(--hn-soft) var(--hn-delay,0ms),clip-path 1.15s var(--hn-ease) var(--hn-delay,0ms);
  will-change:transform,opacity,filter,clip-path}
html.hn-js [data-hn-reveal][data-hn-in]{opacity:1;transform:none;filter:none;clip-path:inset(0 0 0 0)}
html.hn-js [data-hn-reveal][data-hn-done]{clip-path:none;will-change:auto;transition:transform .7s var(--hn-ease)}

/* 2. Entrée « cinéma » du premier visuel (opacité intacte : rien ne retarde l'affichage) */
@keyframes hn-hero{from{transform:scale(1.07);filter:saturate(.8) brightness(1.06)}to{transform:none;filter:none}}
html.hn-js.hn-play .sio [data-hn-hero]{transform-origin:50% 30%;animation:hn-hero 1.8s var(--hn-ease) backwards}
.sio .visual{overflow:hidden}

/* 3. Profondeur au survol (souris uniquement) : légère inclinaison 3D pilotée par le JS */
html.hn-js .sio .visual img{transition:transform .7s var(--hn-ease)}

/* 4. Boutons et bloc formulaire : montée à l'entrée, élévation au survol, onde au clic, reflet */
html.hn-js [data-hn-btn]{opacity:0;transform:translate3d(0,34px,0) scale(.94);
  transition:opacity .7s var(--hn-soft) var(--hn-delay,0ms),transform .9s var(--hn-ease) var(--hn-delay,0ms)}
html.hn-js [data-hn-btn][data-hn-in]{opacity:1;transform:none}
html.hn-js .sio-actions .btn,html.hn-js .ebook-form .btn{position:relative;overflow:hidden;isolation:isolate}
@media (hover:hover) and (pointer:fine){
  html.hn-js .sio-actions .btn:hover{transform:translate3d(0,-5px,0);box-shadow:0 22px 34px -16px rgba(74,20,184,.5),0 0 0 5px rgba(106,43,217,.1)}
}
html.hn-js .sio-actions .btn:active{transform:translate3d(0,-1px,0) scale(.96)}
html.hn-js [data-hn-shine]::before{content:"";position:absolute;inset:-2px auto -2px 0;width:38%;z-index:1;pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.38),transparent);transform:translateX(-140%) skewX(-18deg);
  animation:hn-shine 4.2s var(--hn-soft) .5s 3}
@keyframes hn-shine{0%{transform:translateX(-140%) skewX(-18deg)}28%,100%{transform:translateX(330%) skewX(-18deg)}}
.hn-ripple{position:absolute;z-index:1;border-radius:50%;pointer-events:none;width:24px;height:24px;margin:-12px 0 0 -12px;
  background:rgba(255,255,255,.45);animation:hn-ripple .65s var(--hn-soft) forwards}
.btn.ghost .hn-ripple,.btn.cream .hn-ripple{background:rgba(106,43,217,.22)}
@keyframes hn-ripple{from{transform:scale(0);opacity:1}to{transform:scale(22);opacity:0}}
/* Flèche « ← » du bouton de retour : glisse vers la gauche au survol */
html.hn-js .sio-actions .btn svg{transition:transform .45s var(--hn-ease)}
@media (hover:hover) and (pointer:fine){html.hn-js .sio-actions .btn:hover svg:first-child{transform:translateX(-5px)}}

/* 5. Barre de progression de lecture, sous le bandeau du haut */
.hn-progress{position:absolute;left:0;right:0;bottom:-1px;height:3px;transform-origin:0 50%;transform:scaleX(var(--hn-p,0));
  background:linear-gradient(90deg,#5b249e,#3b6ff5 60%,#c9973a);opacity:0;transition:opacity .3s;pointer-events:none}
html.hn-js .hn-progress{opacity:1}

@media (prefers-reduced-motion:reduce){
  html.hn-js [data-hn-reveal],html.hn-js [data-hn-btn]{opacity:1!important;transform:none!important;filter:none!important;clip-path:none!important;transition:none!important}
  html.hn-js.hn-play .sio [data-hn-hero]{animation:none}
  html.hn-js [data-hn-shine]::before{animation:none}
  html.hn-js .sio-actions .btn:hover,html.hn-js .sio-actions .btn:active{transform:none}
  .hn-ripple{display:none}
  .hn-progress{display:none}
}
