/* Energy Spirit Construct — accueil V3.
   Mécanique de l'intro et du hero reprise de Nemelec, avec un geste solaire propre au métier. */

:root{
  --esi-night:#071c2c;
  --esi-night-2:#0a2b42;
  --esi-orange:#eb6b09;
  --esi-orange-deep:#c75a07;
  --esi-orange-soft:#ffb36a;
  --esi-ease:cubic-bezier(.2,.8,.2,1);
}

/* Rideau de premier affichage. Le pseudo-élément ET l'overlay ont un garde-fou CSS à 2,6 s. */
@media (prefers-reduced-motion:no-preference){
  html.esi-pre::after{
    content:"";
    position:fixed;
    inset:0;
    z-index:99998;
    background:var(--esi-night);
    pointer-events:none;
    animation:esiFailsafe .01s linear 2.6s forwards;
  }
}
@media (scripting:none){
  html.esi-pre::after,
  #esi-intro{display:none!important}
}
@keyframes esiFailsafe{to{opacity:0;visibility:hidden;pointer-events:none}}

/* Intro : un soleil se lève, ses rayons activent les cellules, puis le rideau s'ouvre. */
#esi-intro{
  position:fixed;
  inset:0;
  z-index:99999;
  overflow:hidden;
  cursor:pointer;
  background:var(--esi-night);
  contain:strict;
  animation:esiFailsafe .01s linear 2.6s forwards;
}
#esi-intro.esi-open{background:transparent}
.esi-half{
  position:absolute;
  left:0;
  right:0;
  height:50%;
  overflow:hidden;
  background:var(--esi-night);
  will-change:transform;
  transition:transform .45s cubic-bezier(.7,0,.2,1);
}
.esi-half--top{top:0}
.esi-half--bottom{bottom:0}
.esi-open .esi-half--top{transform:translateY(-101%)}
.esi-open .esi-half--bottom{transform:translateY(101%)}
.esi-fast .esi-half{transition-duration:.28s}
.esi-scene{
  position:absolute;
  left:0;
  right:0;
  height:200%;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 50% 52%,rgba(235,107,9,.14),transparent 32%),
    radial-gradient(circle at 50% 50%,#123f5d 0,var(--esi-night-2) 45%,var(--esi-night) 78%);
}
.esi-half--top .esi-scene{top:0}
.esi-half--bottom .esi-scene{bottom:0}
.esi-half::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height:2px;
  opacity:0;
  background:var(--esi-orange-soft);
  box-shadow:0 0 18px rgba(235,107,9,.8);
  transition:opacity .14s ease;
}
.esi-half--top::after{bottom:0}
.esi-half--bottom::after{top:0}
.esi-open .esi-half::after{opacity:1}
.esi-solar{
  position:absolute;
  left:50%;
  top:50%;
  width:min(88vw,720px);
  transform:translate(-50%,-54%);
  overflow:visible;
}
.esi-sun{
  transform-box:fill-box;
  transform-origin:center;
  animation:esiSunRise .62s var(--esi-ease) .05s both;
}
.esi-sun-core{filter:drop-shadow(0 0 18px rgba(255,179,106,.58))}
.esi-ray{
  fill:none;
  stroke:var(--esi-orange-soft);
  stroke-width:3;
  stroke-linecap:round;
  stroke-dasharray:1;
  stroke-dashoffset:1;
  opacity:.86;
  animation:esiRay .34s ease-out calc(.2s + var(--i,0)*.035s) forwards;
}
.esi-panel-frame{fill:#0c3650;stroke:#7bb5ce;stroke-width:2}
.esi-panel-line{fill:none;stroke:rgba(165,215,237,.52);stroke-width:1.4}
.esi-cell{
  fill:#123c57;
  opacity:.52;
  animation:esiCell .16s ease-out calc(.31s + var(--i,0)*.035s) forwards;
}
.esi-ground{fill:none;stroke:rgba(255,255,255,.18);stroke-width:2}
.esi-logo-card{
  position:absolute;
  left:50%;
  top:50%;
  z-index:2;
  width:min(62vw,440px);
  padding:clamp(12px,2vw,20px) clamp(16px,2.7vw,28px);
  border-radius:20px;
  background:#fff;
  box-shadow:0 22px 64px rgba(0,0,0,.48),0 0 0 1px rgba(255,255,255,.55),0 0 42px rgba(235,107,9,.3);
  opacity:0;
  transform:translate(-50%,-36%) scale(.86);
}
.esi-logo-ready .esi-logo-card{animation:esiLogo .3s cubic-bezier(.2,.9,.3,1.2) .64s forwards}
.esi-logo-card img{display:block;width:100%;height:auto}

@keyframes esiSunRise{
  from{opacity:0;transform:translateY(78px) scale(.55)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes esiRay{to{stroke-dashoffset:0}}
@keyframes esiCell{
  0%{fill:#123c57;opacity:.52}
  55%{fill:#ffd2ad;opacity:1}
  100%{fill:#287396;opacity:1}
}
@keyframes esiLogo{to{opacity:1;transform:translate(-50%,-36%) scale(1)}}

/* Hero : diaporama, titre mot par mot, parallaxe et particules photovoltaïques discrètes. */
.esi-hero{isolation:isolate}
[data-esi-hero-slide]{
  position:absolute;
  inset:-2%;
  z-index:-3;
  opacity:0;
  background-size:cover;
  background-position:center;
  scale:1.04;
  transition:opacity 1.1s ease,scale 7s linear;
  will-change:translate,opacity;
}
[data-esi-hero-slide].esi-active{opacity:1;scale:1.1}
.esi-hero-shade{z-index:-2}
.esi-word{display:inline-block}
.esi-word>i{
  display:inline-block;
  font-style:normal;
  transition:opacity .68s var(--esi-ease),transform .82s var(--esi-ease),filter .68s ease;
  transition-delay:calc(var(--i,0)*72ms);
}
html.esi-hide-title .esi-word>i{
  opacity:0;
  transform:translateY(.55em);
  filter:blur(6px);
  animation:esiShow .01s linear 3.6s forwards;
}
@keyframes esiShow{to{opacity:1;transform:none;filter:none}}
.esi-hero h1 .accent{color:var(--esi-orange-soft)}
.esi-particles{position:absolute;inset:0;z-index:-1;width:100%;height:100%;pointer-events:none;display:block}

.esi-guarantees{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:6px 0 0;
  padding:0;
  list-style:none;
}
.esi-guarantees li{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:7px 17px 7px 8px;
  border:1px solid rgba(255,255,255,.32);
  border-radius:40px;
  background:linear-gradient(160deg,rgba(255,255,255,.2),rgba(255,255,255,.08));
  color:#fff;
  font-size:14px;
  font-weight:650;
  line-height:1.2;
  text-shadow:0 1px 2px rgba(0,0,0,.35);
  box-shadow:0 10px 24px -12px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.22);
  -webkit-backdrop-filter:blur(10px) saturate(1.15);
  backdrop-filter:blur(10px) saturate(1.15);
  transition:opacity .7s var(--esi-ease),transform .82s var(--esi-ease),filter .7s ease,border-color .25s,background .25s;
  transition-delay:calc(.72s + var(--i,0)*.13s),calc(.72s + var(--i,0)*.13s),calc(.72s + var(--i,0)*.13s),0s,0s;
}
.esi-guarantees li:hover{border-color:rgba(255,179,106,.78);background:linear-gradient(160deg,rgba(255,255,255,.27),rgba(255,255,255,.12))}
.esi-guarantee-icon{
  display:flex;
  flex:none;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  border:1px solid rgba(255,179,106,.65);
  border-radius:50%;
  background:rgba(235,107,9,.24);
  color:#ffd2ad;
}
.esi-guarantee-icon svg{display:block}
html.esi-hide-title .esi-guarantees li{
  opacity:0;
  transform:translateY(16px) scale(.96);
  filter:blur(5px);
  transition:none;
  animation:esiShow .01s linear 3.9s forwards;
}

@media (max-width:767px){
  [data-esi-hero-slide]{background-position:65% center!important}
  .esi-hero-shade--side{background:linear-gradient(90deg,rgba(var(--overlay-rgb),.95) 0%,rgba(var(--overlay-rgb),.82) 58%,rgba(var(--overlay-rgb),.72) 100%)!important}
  .esi-hero{min-height:670px!important}
}
@media (max-width:480px){
  .esi-hero>div:last-child{padding:94px 20px 42px!important}
  .esi-hero h1{font-size:clamp(40px,13vw,54px)!important}
  .esi-guarantees{gap:8px}
  .esi-guarantees li{font-size:12.5px;padding:6px 12px 6px 6px;gap:7px}
  .esi-guarantee-icon{width:26px;height:26px}
  .esi-guarantee-icon svg{width:15px;height:15px}
}

@media (prefers-reduced-motion:reduce){
  html.esi-pre::after,#esi-intro{display:none!important}
  [data-esi-hero-slide]{transition:none!important;scale:1!important;translate:none!important}
  .esi-word>i,.esi-guarantees li{transition:none!important}
  html.esi-hide-title .esi-word>i,html.esi-hide-title .esi-guarantees li{opacity:1!important;transform:none!important;filter:none!important;animation:none!important}
  .esi-particles{display:none!important}
}
