/* =====================================================================
   ÉCRAN D'AMORÇAGE — page d'accueil uniquement
   Un quadrillage froid, le sigle >_ en tube néon qui peine à s'amorcer,
   puis l'allumage franc en orange avant d'effacer et de livrer le site.
   Le voile est posé par JavaScript : si le script ne tourne pas, il
   n'existe pas, et le site s'affiche normalement.
   ===================================================================== */
.boot{position:fixed;inset:0;z-index:200;display:grid;place-items:center;overflow:hidden;
  background:radial-gradient(120% 120% at 50% 50%,#0d0d10 0%,#070708 55%,#050506 100%);
  transition:opacity .55s var(--ease,cubic-bezier(.22,.68,.16,1))}
html.is-booting,html.is-booting body{overflow:hidden}

/* ---- quadrillage ---- */
.boot-grid{position:absolute;inset:-12%;opacity:0;transition:opacity .7s ease,filter .5s ease;
  background-image:
    linear-gradient(rgba(190,200,215,.075) 1px,transparent 1px),
    linear-gradient(90deg,rgba(190,200,215,.075) 1px,transparent 1px),
    linear-gradient(rgba(190,200,215,.032) 1px,transparent 1px),
    linear-gradient(90deg,rgba(190,200,215,.032) 1px,transparent 1px);
  background-size:72px 72px,72px 72px,18px 18px,18px 18px;
  -webkit-mask-image:radial-gradient(closest-side at 50% 50%,#000 12%,rgba(0,0,0,.55) 46%,transparent 76%);
  mask-image:radial-gradient(closest-side at 50% 50%,#000 12%,rgba(0,0,0,.55) 46%,transparent 76%);
  animation:bootDrift 30s linear infinite}
@keyframes bootDrift{to{transform:translate3d(72px,72px,0)}}
.boot.phase-grid .boot-grid{opacity:1}
/* À l'allumage le quadrillage bascule vraiment dans l'orange : un filtre
   sur des lignes quasi grises n'aurait produit qu'un gris tiède. */
.boot.phase-lit .boot-grid{
  background-image:
    linear-gradient(rgba(232,98,10,.52) 1px,transparent 1px),
    linear-gradient(90deg,rgba(232,98,10,.52) 1px,transparent 1px),
    linear-gradient(rgba(232,98,10,.2) 1px,transparent 1px),
    linear-gradient(90deg,rgba(232,98,10,.2) 1px,transparent 1px);
  animation:bootDrift 30s linear infinite,bootGrilleAllume .75s ease-out}
@keyframes bootGrilleAllume{
  0%{filter:brightness(2.4) drop-shadow(0 0 14px rgba(232,98,10,.9))}
  100%{filter:brightness(1) drop-shadow(0 0 5px rgba(232,98,10,.45))}}

/* trame de balayage, cohérente avec l'en-tête */
.boot-scan{position:absolute;inset:0;pointer-events:none;opacity:.5;
  background:repeating-linear-gradient(180deg,rgba(255,255,255,.02) 0 1px,transparent 1px 3px)}
/* vignettage : on garde le regard au centre */
.boot-vig{position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(closest-side at 50% 50%,transparent 40%,rgba(4,4,5,.75) 100%)}

/* ---- le tube néon ----
   Un néon de bar n'est pas un trait lumineux : c'est un cylindre de verre
   dont la colonne de gaz, plus étroite que le tube, brûle au centre. On
   empile donc des tracés de largeur décroissante — bord du verre, gaz,
   gaz dense, cœur, filament surexposé — et trois nappes de halo aux
   diffusions différentes, plus la lumière projetée sur le mur. */
.boot-stage{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;gap:30px;
  transform:scale(1);transition:transform .6s var(--ease,cubic-bezier(.22,.68,.16,1))}
.bl-svg{width:min(46vw,380px);height:auto;overflow:visible;display:block}
.bl-svg g{fill:none;stroke-linecap:round;stroke-linejoin:round}

/* le verre éteint : légèrement rosé, jamais totalement invisible */
.bl-glass{stroke:rgba(226,214,208,.11);stroke-width:36}
.bl-glass{filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))}

/* l'ensemble allumé : c'est lui qui claque pendant l'amorçage */
.bl-on{opacity:0;will-change:opacity}

/* les nappes de halo, du plus large au plus serré */
.bl-spill{stroke:#c2490a;stroke-width:44;filter:blur(38px);opacity:.85}
.bl-bloom3{stroke:#e8620a;stroke-width:40;filter:blur(20px);opacity:.75}
.bl-bloom2{stroke:#ff7a1c;stroke-width:38;filter:blur(9px);opacity:.7}
.bl-bloom1{stroke:#ff9440;stroke-width:36;filter:blur(3.5px);opacity:.8}

/* le tube proprement dit : cinq largeurs pour faire le cylindre */
.bl-t1{stroke:rgba(255,138,50,.55);stroke-width:38}
.bl-t2{stroke:#e8620a;stroke-width:31}
.bl-t3{stroke:#ff9a4d;stroke-width:22}
.bl-t4{stroke:#ffd9b4;stroke-width:12}
.bl-t5{stroke:#fffaf4;stroke-width:4.5}
/* le cœur ne s'allume qu'une fois le gaz amorcé */
.bl-hot{opacity:0;will-change:opacity}

/* l'amorçage : le tube claque, hésite, retombe */
.boot.phase-flicker .bl-on{animation:neonLutte 1.15s steps(1,end) forwards}
.boot.phase-flicker .bl-hot{animation:neonLutteCoeur 1.15s steps(1,end) forwards}
@keyframes neonLutte{
  0%{opacity:0}   6%{opacity:.5}  8%{opacity:.04}
  15%{opacity:.72} 17%{opacity:0}
  26%{opacity:.4}  28%{opacity:.05} 31%{opacity:.66} 33%{opacity:.02}
  45%{opacity:.85} 48%{opacity:.12}
  58%{opacity:.55} 60%{opacity:.06}
  72%{opacity:.9}  75%{opacity:.2}
  88%{opacity:.75} 90%{opacity:.35}
  100%{opacity:.5}}
@keyframes neonLutteCoeur{
  0%,14%{opacity:0}
  15%{opacity:.5} 17%{opacity:0}
  31%{opacity:.35} 33%{opacity:0}
  45%{opacity:.7} 48%{opacity:0}
  72%{opacity:.6} 75%{opacity:.08}
  88%{opacity:.5} 90%{opacity:.15}
  100%{opacity:.3}}

/* l'allumage franc — puis le tube ne se fige jamais tout à fait :
   un néon vivant vibre légèrement, c'est ce qui le distingue d'une image */
.boot.phase-lit .bl-on{animation:neonVeille 4.2s ease-in-out infinite;opacity:1}
.boot.phase-lit .bl-hot{animation:none;opacity:1;transition:opacity .16s ease}
.boot.phase-lit .bl-glass{stroke:rgba(255,180,120,.16);transition:stroke .45s ease}
@keyframes neonVeille{
  0%,100%{opacity:1}
  22%{opacity:.985}
  46%{opacity:1}
  47%{opacity:.93}
  48%{opacity:1}
  71%{opacity:.975}
  72%{opacity:1}
  88%{opacity:.995}}

/* la lumière tombe sur le mur : c'est ce halo qui éclaire le quadrillage
   autour du sigle, et non le sigle qui flotte devant un fond noir */
.boot-halo{position:absolute;left:50%;top:50%;width:min(96vw,900px);height:min(96vw,900px);
  transform:translate(-50%,-56%);pointer-events:none;opacity:0;
  mix-blend-mode:plus-lighter;transition:opacity .5s ease;
  background:radial-gradient(closest-side,rgba(232,98,10,.4),rgba(232,98,10,.16) 34%,rgba(180,70,10,.05) 58%,transparent 76%)}
.boot.phase-flicker .boot-halo{opacity:.35;transition:opacity .12s ease}
.boot.phase-lit .boot-halo{opacity:1}
/* le flash de l'amorçage */
.boot-flash{position:absolute;inset:0;pointer-events:none;opacity:0;
  background:radial-gradient(closest-side at 50% 45%,rgba(255,180,110,.5),rgba(232,98,10,.16) 42%,transparent 72%)}
.boot.phase-lit .boot-flash{animation:bootFlash .7s ease-out forwards}
@keyframes bootFlash{0%{opacity:0}12%{opacity:1}100%{opacity:0}}

/* ---- signature sous le sigle ---- */
.boot-word{font-family:var(--mono,monospace);font-size:clamp(9px,1.5vw,12px);letter-spacing:.42em;
  text-transform:uppercase;color:rgba(255,255,255,.28);white-space:nowrap;
  opacity:0;transform:translateY(6px);transition:opacity .5s ease .1s,transform .5s var(--ease,cubic-bezier(.22,.68,.16,1)) .1s;
  padding-left:.42em}
.boot-rule{width:0;height:1px;background:linear-gradient(90deg,transparent,#e8620a,transparent);
  transition:width .65s var(--ease,cubic-bezier(.22,.68,.16,1)) .12s;box-shadow:0 0 12px rgba(232,98,10,.7)}
.boot.phase-lit .boot-word{opacity:1;transform:none;color:rgba(255,226,200,.75)}
.boot.phase-lit .boot-rule{width:min(46vw,300px)}

/* ---- sortie : le voile s'écarte, le sigle avance vers nous ---- */
.boot.phase-out{opacity:0;pointer-events:none}
.boot.phase-out .boot-stage{transform:scale(1.14)}

/* ---- invite de saut, discrète ---- */
.boot-skip{position:absolute;bottom:26px;left:50%;transform:translateX(-50%);
  font-family:var(--mono,monospace);font-size:9.5px;letter-spacing:.24em;text-transform:uppercase;
  color:rgba(255,255,255,.22);opacity:0;transition:opacity .5s ease}
.boot.phase-flicker .boot-skip{opacity:1}
.boot.phase-lit .boot-skip{opacity:0}

/* le hero attend son tour : ses animations reprennent à la fin */
html.is-booting .hero *,html.is-booting .labmark,html.is-booting .labmark *{animation-play-state:paused!important}

@media(max-width:600px){
  .boot-grid{background-size:52px 52px,52px 52px,13px 13px,13px 13px}
  @keyframes bootDrift{to{transform:translate3d(52px,52px,0)}}
  .bl-svg{width:min(74vw,320px)}
  .boot-stage{gap:20px}
  .boot-word{letter-spacing:.3em}
}
/* Mouvement réduit : pas de séquence du tout, le script ne pose rien. */
