/* Pages de connexion du HUB Marketing : diaporama + réseau animé (hero de pacific-consulting.nc/v2) + carte.
   Charte Pacific Consulting : un seul bleu #234470, accent orange #FF7A00 (#FF9A3D sur fond marine). */
.hub-login{
  --navy:#234470; --navy-700:#1b3760; --or:#ff7a00; --or-clair:#ff9a3d;
  position:relative; min-height:100vh; min-height:100dvh; overflow:hidden; isolation:isolate;
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,420px); align-items:center; gap:clamp(32px,5vw,96px);
  place-items:initial; padding:clamp(28px,6vh,72px) clamp(20px,6vw,112px) 72px;
  background:var(--navy); color:#fff; font-family:'Inter',system-ui,sans-serif;
}

/* ---- diaporama ---- */
.hl-diapo{position:absolute; inset:0; z-index:-4; background:var(--navy)}
/* travelling avant lent et régulier vers le personnage (moitié droite des visuels), sur toute la durée de la photo */
.hl-diapo img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transform:scale(1.02);
  transform-origin:70% 45%; will-change:transform, opacity; transition:opacity 1.6s ease}
.hl-diapo img.on{opacity:1}
.hl-diapo img.on, .hl-diapo img.sort{animation:hl-travelling 10s linear forwards}   /* .sort : la sortante finit sa course pendant le fondu */
@keyframes hl-travelling{from{transform:scale(1.02)} to{transform:scale(1.16)}}
.hl-voile{position:absolute; inset:0; z-index:-3; pointer-events:none;
  background:
    radial-gradient(900px 520px at 78% 50%, rgba(35,68,112,.15), transparent 70%),
    linear-gradient(90deg, rgba(27,55,96,.94) 0%, rgba(35,68,112,.80) 34%, rgba(35,68,112,.42) 62%, rgba(35,68,112,.62) 100%),
    linear-gradient(180deg, rgba(35,68,112,0) 55%, rgba(27,55,96,.8) 100%)}

/* ---- réseau animé (repris du hero v2, mêmes animations) ---- */
.hub-login .net{position:absolute; z-index:-2; top:50%; left:30%; height:min(84vh,760px); width:auto; aspect-ratio:1920/600;
  max-width:none; transform:translate(-49.5%,-50%); pointer-events:none; opacity:1;
  -webkit-mask-image:linear-gradient(90deg, #000 47%, rgba(0,0,0,.14) 63%); mask-image:linear-gradient(90deg, #000 47%, rgba(0,0,0,.14) 63%)}
.net .l-all{transform:translate(calc(var(--px,0) * -34px), calc(var(--py,0) * -20px))}
.net .l-map{transform:none}
.net .edges line{stroke:#fff; stroke-opacity:.72; stroke-width:1; stroke-linecap:round; stroke-dasharray:1; stroke-dashoffset:1;
  animation:hn-draw 1.6s cubic-bezier(.4,0,.2,1) forwards; animation-delay:calc(var(--d) * 2.2s + .2s)}
.net .nodes circle{fill:#fff; opacity:0; transform-box:fill-box; transform-origin:center; animation:hn-pop .6s ease-out forwards;
  animation-delay:calc(var(--d) * 2.2s + .9s)}
.net .nodes circle.tw{animation:hn-pop .6s ease-out forwards, hn-twinkle 3.6s ease-in-out infinite;
  animation-delay:calc(var(--d) * 2.2s + .9s), calc(var(--t) * 1s + 3s)}
.net .nodes circle.big{animation:hn-pop .6s ease-out forwards, hn-big 4.8s ease-in-out infinite;
  animation-delay:calc(var(--d) * 2.2s + .9s), calc(var(--t) * 1s + 3s)}
.net .globe{fill:#fff; opacity:0; transform-box:fill-box; transform-origin:center; animation:hn-globe 1.8s cubic-bezier(.2,.7,.2,1) .1s forwards}
.net .halo{opacity:0; transform-box:fill-box; transform-origin:center; animation:hn-halo 7s ease-in-out 1.5s infinite}
.net .nc{fill:var(--or); opacity:0; animation:hn-fade .6s 1.6s forwards; filter:drop-shadow(0 0 2px rgba(255,122,0,.8))}
.net .walks .trail{fill:none; stroke:var(--or); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.net .walks .lit{fill:var(--or-clair)}
.net .beacon .ring{fill:none; stroke:var(--or-clair); stroke-width:1.4; opacity:0; transform-box:fill-box; transform-origin:center;
  animation:hn-ring 3s ease-out 2.2s infinite}
.net .beacon .r2{animation-delay:3.2s} .net .beacon .r3{animation-delay:4.2s}
@keyframes hn-draw{to{stroke-dashoffset:0}}
@keyframes hn-pop{0%{opacity:0; transform:scale(.2)} 70%{opacity:1; transform:scale(1.6)} 100%{opacity:.95; transform:scale(1)}}
@keyframes hn-twinkle{0%,100%{opacity:.95} 50%{opacity:.25}}
@keyframes hn-big{0%,100%{transform:scale(1)} 50%{transform:scale(1.5)}}
@keyframes hn-globe{from{opacity:0; transform:scale(.94) rotate(-3deg)} to{opacity:.8; transform:none}}
@keyframes hn-halo{0%,100%{opacity:.1; transform:scale(.96)} 50%{opacity:.22; transform:scale(1.04)}}
@keyframes hn-fade{to{opacity:1}}
@keyframes hn-ring{0%{opacity:.9; transform:scale(2.3)} 100%{opacity:0; transform:scale(8)}}

/* ---- titre ---- */
.hl-vitrine{max-width:680px; align-self:center; position:relative}
/* voile marine diffus derrière le texte : le globe reste visible, le titre reste lisible */
.hl-vitrine::before{content:""; position:absolute; z-index:-1; inset:-12% -18% -14% -30%; pointer-events:none;
  background:radial-gradient(closest-side, rgba(27,55,96,.62), rgba(27,55,96,.32) 60%, transparent)}
.hl-logo{width:84px; height:auto; display:block; margin:0 0 28px; filter:brightness(0) invert(1) drop-shadow(0 6px 18px rgba(0,0,0,.25));
  animation:hl-monte .9s cubic-bezier(.2,.7,.2,1) both}
.hl-kicker{margin:0 0 14px; font:700 13px/1 'Inter',sans-serif; letter-spacing:.18em; text-transform:uppercase; color:var(--or-clair);
  display:flex; align-items:center; gap:12px; animation:hl-monte .9s cubic-bezier(.2,.7,.2,1) .08s both}
.hl-kicker::before{content:""; width:34px; height:2px; background:var(--or); border-radius:2px}
.hl-titre{margin:0; font:800 clamp(46px,6.4vw,104px)/.95 'Montserrat','Inter',sans-serif; letter-spacing:-.025em; color:#fff;
  text-shadow:0 2px 6px rgba(10,25,50,.45), 0 10px 40px rgba(10,25,50,.55); animation:hl-monte 1s cubic-bezier(.2,.7,.2,1) .16s both}
.hl-titre span{color:var(--or)}
.hl-par{margin:18px 0 0; font:500 clamp(18px,1.6vw,24px)/1.3 'Inter',sans-serif; color:#c3d1e6; animation:hl-monte 1s cubic-bezier(.2,.7,.2,1) .26s both}
.hl-par strong{color:#fff; font-weight:700}

.hl-legendes{position:relative; margin-top:clamp(28px,6vh,64px); min-height:3.2em; max-width:460px; animation:hl-monte 1s cubic-bezier(.2,.7,.2,1) .4s both}
.hl-legendes p{position:absolute; inset:0 0 auto; margin:0; font:500 18px/1.45 'Inter',sans-serif; color:#e6edf7;
  opacity:0; transform:translateY(10px); transition:opacity .7s ease, transform .7s ease}
.hl-legendes p.on{opacity:1; transform:none; transition-delay:.35s}
.hl-pistes{display:flex; gap:8px; margin-top:18px; animation:hl-monte 1s cubic-bezier(.2,.7,.2,1) .48s both}
.hl-pistes button{width:42px; height:22px; padding:0; border:0; background:none; display:grid; align-items:center; cursor:pointer}
.hl-pistes i{display:block; height:3px; border-radius:3px; background:rgba(255,255,255,.28); overflow:hidden; position:relative}
.hl-pistes i::after{content:""; position:absolute; inset:0; background:var(--or); transform:scaleX(0); transform-origin:left}
.hl-pistes button.vu i::after{transform:scaleX(1); background:rgba(255,255,255,.75)}
.hl-pistes button.on i::after{animation:hl-piste var(--duree,7s) linear forwards}
.hub-login.pause .hl-pistes button.on i::after{animation-play-state:paused}
.hl-pistes button:hover i{background:rgba(255,255,255,.5)}
@keyframes hl-piste{to{transform:scaleX(1)}}

/* ---- petit coureur orange sur le réseau (dessiné par connexion.js) ---- */
.net .hl-coureur{transition:opacity .4s}
.net .hl-coureur line{stroke:var(--or); stroke-width:2.3; stroke-linecap:round}
.net .hl-coureur circle{fill:var(--or)}
.net .hl-coureur .hl-c-corps{filter:drop-shadow(0 0 2.5px rgba(255,154,61,.95))}

/* ---- battement d'un point du réseau au survol (dessiné par reseau-vivant.js) ---- */
.net .battements circle{transform-box:fill-box; transform-origin:center; pointer-events:none}
.net .bat-coeur{fill:#fff; animation:hl-bat-coeur 1.3s ease-out forwards}
.net .bat-halo{fill:none; stroke:var(--or-clair); stroke-width:1; animation:hl-bat-halo 1.3s ease-out forwards}
@keyframes hl-bat-coeur{0%{transform:scale(1); opacity:1} 12%{transform:scale(1.9)} 24%{transform:scale(1.2)} 36%{transform:scale(1.7)} 100%{transform:scale(1); opacity:0}}
@keyframes hl-bat-halo{0%{transform:scale(1.2); opacity:.85} 100%{transform:scale(5.5); opacity:0}}

/* ---- carte ---- */
.hl-carte{position:relative; width:100%; justify-self:end; animation:hl-carte 1s cubic-bezier(.2,.7,.2,1) .3s both}
/* étincelle « traînée de poudre » sur le contour de la carte (dessinée par connexion.js) */
.hl-etincelle{position:absolute; z-index:2; pointer-events:none; overflow:visible;
  filter:drop-shadow(0 0 3px rgba(255,170,90,.95)) drop-shadow(0 0 10px rgba(255,122,0,.55))}
.hub-login .auth-card{max-width:none; position:relative; overflow:hidden; color:var(--ink,#0e1620);
  background:rgba(255,255,255,.95); border:1px solid rgba(255,255,255,.7); border-radius:24px; padding:38px 36px 30px;
  box-shadow:0 50px 100px -30px rgba(5,18,40,.65), 0 0 0 1px rgba(255,255,255,.08);
  -webkit-backdrop-filter:blur(16px) saturate(1.2); backdrop-filter:blur(16px) saturate(1.2)}
.hl-h{margin:0; font:800 28px/1.15 'Montserrat','Inter',sans-serif; letter-spacing:-.01em; color:var(--navy)}
.hl-sous{margin:8px 0 26px; color:#5b6770; font-size:15px}
.hub-login .auth-card label{font-size:13px; color:#26324f}
.hub-login .auth-card input:not([type=checkbox]){height:48px; border:1.5px solid #dbe2ea; border-radius:12px; padding:0 14px; font-size:15px;
  background:#fff; margin-bottom:16px; transition:border-color .2s, box-shadow .2s}
.hub-login .auth-card input:not([type=checkbox]):focus{outline:none; border-color:var(--navy); box-shadow:0 0 0 4px rgba(255,122,0,.18)}
.hub-login .auth-card input[type=checkbox]{accent-color:var(--navy)}
.hub-login .btn-primary{height:52px; border-radius:999px; background:var(--navy); font:700 15.5px/1 'Inter',sans-serif;
  display:flex; align-items:center; justify-content:center; gap:10px; letter-spacing:.01em;
  box-shadow:0 14px 30px -12px rgba(35,68,112,.7); transition:transform .2s, background .2s, box-shadow .2s}
.hub-login .btn-primary::after{content:"→"; font-size:18px; transition:transform .2s}
.hub-login .btn-primary:hover{filter:none; background:var(--navy-700); transform:translateY(-2px); box-shadow:0 18px 36px -12px rgba(35,68,112,.8)}
.hub-login .btn-primary:hover::after{transform:translateX(4px)}
.hub-login .auth-card a{color:var(--navy); font-weight:600}
.hub-login .auth-card a:hover{color:#c25700}
.hub-login .hint{font-size:13px}
.hl-pied{margin:16px auto 0; width:fit-content; max-width:100%; padding:10px 18px; border-radius:999px; font-size:14px; color:#dbe5f2; text-align:center;
  background:rgba(27,55,96,.72); border:1px solid rgba(255,255,255,.14); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px)}
.hl-pied a{color:#fff; font-weight:700; text-decoration:underline; text-decoration-color:var(--or); text-underline-offset:4px; text-decoration-thickness:2px}
.hl-pied a:hover{color:var(--or-clair)}
.hl-copy{position:absolute; left:clamp(20px,6vw,112px); bottom:22px; margin:0; font-size:12.5px; color:rgba(230,237,247,.7)}

@keyframes hl-monte{from{opacity:0; transform:translateY(22px)} to{opacity:1; transform:none}}
@keyframes hl-carte{from{opacity:0; transform:translateY(30px) scale(.98)} to{opacity:1; transform:none}}

/* ---- tablette / mobile ---- */
@media (max-width: 980px){
  .hub-login{grid-template-columns:1fr; gap:28px; padding:28px 16px 64px; align-content:start}
  .hl-vitrine{max-width:none}
  .hl-logo{width:60px; margin-bottom:18px}
  .hl-legendes{margin-top:22px; min-height:3em}
  .hl-legendes p{font-size:16px}
  .hl-carte{justify-self:stretch; max-width:460px; width:100%; margin:0 auto}
  .hub-login .auth-card{padding:30px 22px 24px; border-radius:20px}
  .hub-login .net{top:auto; bottom:-4%; left:50%; height:46vh; transform:translateX(-49.5%); opacity:.5; -webkit-mask-image:none; mask-image:none}
  .hl-voile{background:linear-gradient(180deg, rgba(27,55,96,.9) 0%, rgba(35,68,112,.72) 50%, rgba(27,55,96,.88) 100%)}
  .hl-copy{left:16px; right:16px; text-align:center}
}
@media (max-width: 600px){
  .hl-legendes{display:none}           /* le formulaire remonte sous le titre */
  .hl-pistes{margin-top:20px}
}
@media (max-height: 640px) and (min-width: 981px){
  .hl-logo{display:none}
  .hl-legendes{margin-top:22px}
}

@media (prefers-reduced-motion: reduce){
  .hl-diapo img, .hl-diapo img.on, .hl-diapo img.sort{transform:none; animation:none; transition:opacity 1.2s ease}
  .hl-logo, .hl-kicker, .hl-titre, .hl-par, .hl-legendes, .hl-pistes, .hl-carte{animation:none}
  .hl-pistes button.on i::after{animation:none; transform:scaleX(1)}
  .net .edges line{stroke-dashoffset:0; animation:none}
  .net .nodes circle, .net .nc{opacity:.95; animation:none}
  .net .globe{opacity:.8; animation:none}
  .net .pkts, .net .walks, .net .beacon .ring{display:none}
}
