/* ============================================================
   ACCUEIL · premier écran « consultant et directeur artistique »
   (2026-11-26)
   ============================================================
   Scope : la première diapositive du diaporama (.ahero) et elle seule.
   Le loader, les six autres diapositives et leurs médias ne sont pas
   touchés. Mise en scène : un viseur de directeur artistique posé sur
   l'image (repères de cadrage), un sceau « depuis 2006 » qui tourne,
   une lumière qui suit le pointeur, l'image qui respire, et l'entrée
   ligne à ligne du H1 après l'écran de chargement.

   Garde-fous : rien n'est masqué sans JavaScript (l'entrée n'est armée
   que par html.ahero-anim, posé par js/accueil-hero.js) ; le bouton
   pause du diaporama fige aussi le sceau et la respiration ;
   prefers-reduced-motion coupe tout ; aucun débordement à 390 px.
   ============================================================ */

.ahero{--ah-gold:#cda85c;--ah-red:#ae0000;--ah-w:#f5f5f5;--ah-ease:cubic-bezier(.2,.7,.1,1)}

/* ---------- image : respiration lente et parallaxe au pointeur ---------- */
.ahero .ahero__img{transform:translate3d(var(--ah-px,0px),var(--ah-py,0px),0) scale(1.06);transition:transform 1.2s var(--ah-ease);animation:aheroBreath 18s ease-in-out infinite alternate}
@keyframes aheroBreath{from{filter:saturate(.95) brightness(.98)}to{filter:saturate(1.08) brightness(1.04)}}

/* ---------- lumière qui suit le pointeur ---------- */
.ahero .ahero__light{position:absolute;inset:0;z-index:2;pointer-events:none;opacity:var(--ah-lo,0);transition:opacity .6s;
  background:radial-gradient(420px circle at var(--ah-lx,50%) var(--ah-ly,40%),rgba(255,226,170,.12),transparent 65%);mix-blend-mode:screen}

/* ---------- viseur : quatre repères de cadrage ---------- */
.ahero .ahero__frame{position:absolute;inset:clamp(140px,17vh,160px) clamp(70px,6vw,96px) clamp(70px,10vh,110px);z-index:2;pointer-events:none}
.ahero .ahero__frame i{position:absolute;width:clamp(22px,3vw,40px);height:clamp(22px,3vw,40px);border:0 solid rgba(245,245,245,.55);transition:transform 1.1s var(--ah-ease),opacity .8s}
.ahero .ahero__frame i:nth-child(1){top:0;left:0;border-top-width:1px;border-left-width:1px}
.ahero .ahero__frame i:nth-child(2){top:0;right:0;border-top-width:1px;border-right-width:1px}
.ahero .ahero__frame i:nth-child(3){bottom:0;left:0;border-bottom-width:1px;border-left-width:1px}
.ahero .ahero__frame i:nth-child(4){bottom:0;right:0;border-bottom-width:1px;border-right-width:1px}

/* ---------- sceau ---------- */
.ahero .ahero__seal{position:absolute;right:clamp(28px,5vw,80px);bottom:clamp(90px,14vh,140px);z-index:3;width:clamp(96px,9vw,132px);aspect-ratio:1;color:var(--ah-gold);pointer-events:none}
.ahero .ahero__seal svg{width:100%;height:100%;fill:currentColor;font-family:'Oswald',sans-serif;font-weight:500;animation:aheroSpin 36s linear infinite}
.ahero .ahero__seal span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:'Benzin','Oswald',sans-serif;font-weight:700;font-size:clamp(.9rem,1.3vw,1.15rem);letter-spacing:.04em;color:var(--ah-w)}
.ahero .ahero__seal span::before{content:"";position:absolute;width:42%;height:42%;border-radius:50%;background:var(--ah-red);z-index:-1;box-shadow:0 0 30px rgba(174,0,0,.5)}
@keyframes aheroSpin{to{transform:rotate(360deg)}}

/* ---------- texte ---------- */
.ahero .ahero__name{margin-bottom:.9rem}
.ahero .ahero__role{display:inline-flex;align-items:center;gap:.9rem;margin:0 0 1.1rem;font-family:'Oswald',sans-serif;font-weight:500;font-size:clamp(.78rem,1.15vw,.98rem);letter-spacing:.32em;text-transform:uppercase;color:var(--ah-gold)}
.ahero .ahero__role::before,.ahero .ahero__role::after{content:"";width:clamp(18px,4vw,56px);height:1px;background:currentColor;transform-origin:center;transition:transform 1s var(--ah-ease) .2s}
.ahero .ahero__title{line-height:1.04}
.ahero .ahero__l{display:block;overflow:hidden;padding:.12em 0 .04em;margin:-.12em 0 -.04em}
.ahero .ahero__l>span{display:inline-block;text-wrap:balance}
.ahero .ahero__l--gold{color:var(--c-gold,#cda85c)}
.ahero .ahero__spec{max-width:46ch;margin-inline:auto}

/* accès marques : une ligne, pas un troisième bouton */
.ahero .ahero__brands{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:.35rem .6rem;margin-top:1.3rem;padding:.55rem .9rem;border-radius:999px;border:1px solid rgba(245,245,245,.16);background:rgba(10,10,10,.45);font-family:'Montserrat',sans-serif;font-size:.82rem;color:rgba(245,245,245,.78);text-decoration:none;transition:border-color .25s,background .25s,color .25s}
.ahero .ahero__brands-a{font-family:'Oswald',sans-serif;font-weight:600;letter-spacing:.12em;text-transform:uppercase;font-size:.74rem;color:var(--ah-w)}
.ahero .ahero__brands-i{color:var(--ah-gold);transition:transform .3s var(--ah-ease)}
.ahero .ahero__brands:hover{border-color:var(--ah-gold);background:rgba(205,168,92,.1);color:var(--ah-w)}
.ahero .ahero__brands:hover .ahero__brands-i{transform:translateX(5px)}
.ahero .ahero__brands:focus-visible{outline:2px solid var(--ah-gold);outline-offset:3px}

/* ---------- entrée chorégraphiée (armée par le script seulement) ---------- */
.ahero-anim .ahero .ahero__l>span{transform:translateY(108%) rotate(2deg)}
.ahero-anim .ahero .ahero__role::before,.ahero-anim .ahero .ahero__role::after{transform:scaleX(0)}
.ahero-anim .ahero .ahero__frame i{opacity:0}
.ahero-anim .ahero .ahero__frame i:nth-child(1){transform:translate(-24px,-24px)}
.ahero-anim .ahero .ahero__frame i:nth-child(2){transform:translate(24px,-24px)}
.ahero-anim .ahero .ahero__frame i:nth-child(3){transform:translate(-24px,24px)}
.ahero-anim .ahero .ahero__frame i:nth-child(4){transform:translate(24px,24px)}
.ahero-anim .ahero .ahero__seal{opacity:0;transform:scale(1.4) rotate(-30deg)}
.ahero-anim .ahero .ahero__brands{opacity:0;transform:translateY(12px)}
.ahero-go .ahero .ahero__l>span{transform:none;transition:transform 1.1s var(--ah-ease) .35s}
.ahero-go .ahero .ahero__l--gold>span{transition-delay:.5s}
.ahero-go .ahero .ahero__role::before,.ahero-go .ahero .ahero__role::after{transform:none}
.ahero-go .ahero .ahero__frame i:nth-child(n){opacity:1;transform:none}
.ahero-go .ahero .ahero__seal{opacity:1;transform:none;transition:opacity .4s 1s,transform .8s cubic-bezier(.3,1.5,.5,1) 1s}
.ahero-go .ahero .ahero__brands{opacity:1;transform:none;transition:opacity .7s var(--ah-ease) 1.35s,transform .7s var(--ah-ease) 1.35s,border-color .25s,background .25s}

/* ---------- pause du diaporama : fige aussi le sceau et la respiration ---------- */
.ahero-paused .ahero .ahero__seal svg,.ahero-paused .ahero .ahero__img{animation-play-state:paused}

/* ---------- téléphone ---------- */
@media (max-width:767px){
  .ahero .ahero__seal{display:none}
  .ahero .ahero__frame{inset:126px 10px 64px}
  .ahero .ahero__role{letter-spacing:.2em;gap:.6rem}
  .ahero .ahero__brands{margin-top:.8rem;font-size:.76rem;border:0;background:none;padding:.3rem 0;gap:.2rem .45rem}
  .ahero .ahero__brands-a{text-decoration:underline;text-underline-offset:.25em;text-decoration-color:rgba(205,168,92,.6)}
}
@media (max-width:600px) and (max-height:760px){
  .ahero .ahero__name{margin-bottom:.4rem}
  .ahero .ahero__role{margin-bottom:.6rem}
  .ahero .ahero__brands{margin-top:.6rem;padding:.4rem .7rem}
}

/* ---------- mouvement réduit ---------- */
@media (prefers-reduced-motion:reduce){
  .ahero .ahero__img,.ahero .ahero__seal svg{animation:none}
  .ahero .ahero__img{transform:none;transition:none}
  .ahero .ahero__light{display:none}
  .ahero *{transition:none!important}
}

/* ---------- le dégradé animé du titre, porté par la ligne blanche ----------
   main.bundle.js pose .text-gradient-animate sur chaque titre du diaporama :
   background-clip:text sur le H1 entier. Avec des lignes en inline-block, il
   avalait l'or de la seconde ligne (constat : elle sortait blanche, déjà sur
   l'ancien premier écran) et peignait le texte sr-only. Ici le H1 reprend une
   couleur pleine, et le même balayage blanc, rouge, blanc passe sur la
   première ligne seulement : l'effet reste, l'or revient. */
.ahero .ahero__title.text-gradient-animate{background:none;-webkit-background-clip:border-box;background-clip:border-box;-webkit-text-fill-color:currentColor;color:#f5f5f5;animation:none}
.ahero .ahero__title .sr-only{-webkit-text-fill-color:transparent}
.ahero .ahero__l:first-of-type>span{background:linear-gradient(90deg,#f5f5f5 0%,#f5f5f5 30%,#ae0000 50%,#f5f5f5 70%,#f5f5f5 100%);background-size:300% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:aheroFlow 8s ease-in-out infinite}
.ahero .ahero__l--gold>span{-webkit-text-fill-color:currentColor}
@keyframes aheroFlow{0%{background-position:100% 50%}50%{background-position:0% 50%}100%{background-position:100% 50%}}
.ahero-paused .ahero .ahero__l:first-of-type>span{animation-play-state:paused}
@media (prefers-reduced-motion:reduce){.ahero .ahero__l:first-of-type>span{animation:none;-webkit-text-fill-color:currentColor;background:none}}

/* Sept éléments dans le premier écran : le titre est plafonné un cran plus
   bas que celui des autres diapositives pour que tout tienne sous le menu
   à 1366 x 768 comme à 1440 x 900. */
@media (min-width:601px){.ahero .ahero__title{font-size:min(var(--fs-hero),5.8vh);max-width:min(1100px,92vw);margin-inline:auto}}

/* ---------- les deux couches de main.bundle.js qui visitent le premier écran ----------
   Correctif du 2026-11-26, après capture.
   1. Le message de l'heure (« L'ombre travaille la nuit. Et toi ? », initTimeAwareness)
      est ajouté dans .hero-slider__content en position absolue, bottom:12vh, couleur à
      6 % : il transparaissait derrière les boutons. Ici il rejoint le flux, sous l'accès
      marques, lisible et volontaire. Rien n'est retiré.
   2. Le succès « NOCTAMBULE » (.achieve-notify) était centré en haut, et le dock des
      widgets le posait sur la ligne du nom, un <p> qu'il ne protégeait pas. Il part dans
      le coin droit, et le bloc de texte est protégé par data-asd-garde (widgets-dock.js). */
.ahero .time-message{position:static!important;transform:none!important;left:auto!important;bottom:auto!important;display:block;margin:1.1rem auto 0;white-space:normal;max-width:40ch;color:rgba(245,245,245,.42)!important;letter-spacing:.3em!important;font-size:.62rem!important;line-height:1.7}
.home-consulting .achieve-notify{left:auto;right:clamp(12px,2.4vw,32px);transform:none}
@media (min-width:601px){.ahero .time-message{white-space:nowrap;max-width:none;width:max-content}}
@media (max-width:600px) and (max-height:760px){.ahero .time-message{margin-top:.5rem}}
/* Téléphone : le succès passe sur une seule ligne compacte, pour tenir dans la bande
   libre sous le premier écran plutôt que sur le texte. */
@media (max-width:600px){
  .home-consulting .achieve-notify{right:12px;padding:.45rem .8rem!important;gap:.5rem!important;max-width:calc(100vw - 24px)}
  .home-consulting .achieve-notify__icon{font-size:1rem!important}
  .home-consulting .achieve-notify__info{flex-direction:row!important;align-items:baseline;gap:.5rem!important;white-space:nowrap}
}
/* Téléphone : le message de l'heure tient entre les deux piles de widgets du bas. */
@media (max-width:600px){.ahero .time-message{max-width:17ch;letter-spacing:.18em!important;margin-top:.8rem}}
/* Téléphone (2026-11-27, reprise). Cause : main.bundle.js centre le contenu du slide (absolu, flex) sur toute
   sa hauteur, menu compris. Le contenu (jusqu'à 562 px à 390 x 844) est plus haut que la bande libre entre le
   menu (--as-nav-h, publiée par partials/nav.php, 114 px) et les commandes du bas (points du diaporama et barre
   « Consulting privé », ancrés au bas du slider, soit environ 138 px de zone), donc il débordait par les deux
   bouts. Ici la bande libre est posée par le padding du slide (haut = menu + marge, bas = zone des commandes),
   et la typo comme les marges suivent la hauteur d'écran (svh) : tout tient à 375 x 667, 390 x 844 et 414 x 896.
   Rien n'est retiré : nom, rôle, titre, sous-titre, deux boutons, lien marques, message de l'heure. */
@media (max-width:600px){
  .hero-slider .ahero{box-sizing:border-box;padding-top:calc(var(--as-nav-h,114px) + clamp(10px,1.9svh,18px));padding-bottom:9.4rem}
  .hero-slider .ahero .ahero__name{margin-bottom:clamp(.3rem,1svh,.7rem)}
  .hero-slider .ahero .ahero__role{margin-bottom:clamp(.4rem,1.2svh,.8rem)}
  .hero-slider .ahero .ahero__title{font-size:min(8.2vw,clamp(1.4rem,3.5svh,2.4rem))!important;line-height:1.06}
  .home-consulting .hero-slider .ahero .hero-slider__sub{margin:clamp(.4rem,1svh,.7rem) auto 0!important;font-size:clamp(.84rem,2svh,1.05rem)!important;line-height:1.45}
  .home-consulting .hero-slider .ahero .hero-slider__ctas{margin-top:clamp(.6rem,1.8svh,1.1rem)!important;gap:.5rem!important}
  .hero-slider .ahero .ahero__brands{margin-top:clamp(.4rem,1.3svh,.8rem)!important;padding:.2rem 0!important;line-height:1.35}
  /* la question sur sa ligne, le lien et sa flèche ensemble sur la suivante (jamais la flèche seule) */
  .hero-slider .ahero .ahero__brands-q{flex:0 0 100%;text-align:center}
  .hero-slider .ahero .time-message{margin-top:clamp(.35rem,1.1svh,.8rem)!important;line-height:1.55}
}
@media (max-width:600px) and (min-height:760px){
  .hero-slider .ahero .ahero__title{font-size:min(8.2vw,clamp(1.4rem,4.2svh,2.4rem))!important}
}
@media (max-width:400px){
  .hero-slider .ahero .ahero__name{letter-spacing:.16em!important}
}
@media (max-width:600px) and (max-height:700px){
  .home-consulting .hero-slider .ahero .chero__cta{padding:.7rem 1rem}
  .hero-slider .ahero .ahero__brands{font-size:.7rem!important;gap:.1rem .4rem}
  .hero-slider .ahero .ahero__brands-a{font-size:.68rem;letter-spacing:.1em}
  .hero-slider .ahero .time-message{font-size:.58rem!important;max-width:30ch!important}
}
