/* Animation « écosystème » de l'accueil : schéma qui s'allume au fil des étapes (retour du client, visio du 30/10).
   Chargée par l'accueil seulement (gabarits/index.html). Tous les noms sont préfixés eco- : site.css a déjà .steps, .dot, etc.
   Charte : variables de site.css (--navy, --gold, --cream, --display). Mouvement réduit : état final statique. */
.eco{--eco-hdr:68px;--eco-gold-lt:#E4CB93;padding-block:clamp(64px,9vh,110px) clamp(40px,6vh,72px)}
.eco__wrap{max-width:1440px;margin:0 auto}

/* ---------- en-tête de section ---------- */
.eco__intro{padding-bottom:clamp(20px,3vh,36px);max-width:900px}
.eco__intro .eyebrow{margin-bottom:18px}
.eco__intro .h2{font-size:clamp(28px,3.4vw,50px);line-height:1.1}
.eco__lead{margin:16px 0 0;font-size:clamp(15px,1.2vw,18px);line-height:1.6;color:rgba(245,245,243,.7);max-width:620px;text-wrap:pretty}

/* ---------- scène collante + étapes ---------- */
.eco__grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr);gap:clamp(24px,4vw,72px);align-items:start}
.eco-stage{position:sticky;top:max(calc(var(--eco-hdr) + 16px),calc((100vh - 560px) / 2));align-self:start}
.eco-map{width:100%;height:auto;display:block;overflow:visible}
.eco-dots{display:flex;justify-content:center;gap:10px;margin:14px 0 0}
.eco-dot{appearance:none;border:1px solid rgba(245,245,243,.35);background:var(--navy);color:rgba(245,245,243,.7);width:30px;height:30px;border-radius:50%;
  font:500 12px/1 var(--display);cursor:pointer;padding:0;transition:background .5s,color .5s,border-color .5s,transform .5s var(--ease)}
.eco-dot:hover{border-color:var(--gold);color:var(--gold)}
.eco-dot.on{background:var(--gold);border-color:var(--gold);color:var(--ink);transform:scale(1.12)}
.eco-dot.past{border-color:rgba(198,161,91,.7);color:var(--gold)}
.eco-dot:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

.eco-steps{padding-bottom:clamp(12px,4vh,40px)}
.eco-step{min-height:72vh;display:flex;flex-direction:column;justify-content:center;gap:26px;padding-block:28px}
.eco-ph{margin:0;border-radius:2px;overflow:hidden;aspect-ratio:4/3;background:var(--navy-2);box-shadow:0 0 0 1px rgba(245,245,243,.08)}
.eco-ph img{width:100%;height:100%;object-fit:cover}
.eco-step__n{margin:0 0 14px;display:flex;align-items:baseline;gap:14px;font-size:11px;letter-spacing:.24em;text-transform:uppercase;color:rgba(245,245,243,.5)}
.eco-step__n b{font-family:var(--display);font-weight:700;font-size:clamp(34px,3vw,48px);line-height:1;color:var(--gold);letter-spacing:-.01em}
.eco-step h3{font-size:clamp(22px,1.9vw,30px);font-weight:400;line-height:1.15;margin-bottom:12px;text-wrap:balance}
.eco-step__lead{margin:0 0 10px;font-size:16px;font-weight:500;color:var(--eco-gold-lt);line-height:1.45}
.eco-step__p{margin:0;font-size:16px;line-height:1.65;color:rgba(245,245,243,.74);max-width:480px;text-wrap:pretty}

@media (prefers-reduced-motion:no-preference){
  .eco.js .eco-step .eco-ph{transition:opacity .9s var(--ease),transform .9s var(--ease),filter .9s var(--ease),box-shadow .9s}
  .eco.js .eco-step .eco-step__txt{transition:opacity .9s var(--ease)}
  .eco.js .eco-step:not(.on) .eco-ph{opacity:.4;transform:scale(.965);filter:saturate(.45)}
  .eco.js .eco-step:not(.on) .eco-step__txt{opacity:.45}
}
.eco-step.on .eco-ph{box-shadow:0 0 0 1px rgba(198,161,91,.6),0 30px 60px -34px rgba(0,0,0,.9)}

/* ---------- schéma SVG ---------- */
.eco-cmp{color:rgba(245,245,243,.5)}
.eco-cmp.done{color:rgba(198,161,91,.78)}
.eco-cmp.on{color:var(--gold);filter:drop-shadow(0 0 9px rgba(198,161,91,.5))}
.eco-lbl{font-family:var(--display);font-weight:500;font-size:16px;fill:rgba(245,245,243,.8);stroke:var(--navy);stroke-width:5px;paint-order:stroke;stroke-linejoin:round}
.eco-cmp.on .eco-lbl{fill:var(--eco-gold-lt);font-weight:600}
.eco-lbl.eco-s{font-size:14px;font-weight:400}
.eco-inl{font-family:var(--display);font-weight:600;font-size:13px;fill:currentColor}
.eco-bt{font-family:var(--display)}
.eco-bdg circle{transition:fill .5s,stroke .5s}
.eco-cmp.on .eco-bdg circle{fill:var(--gold)}
.eco-cmp.on .eco-bdg .eco-bt{fill:var(--ink)}
.eco-halo{fill:var(--gold);opacity:.07}
.eco-cmp.on .eco-halo{opacity:.18}
.eco-sunrays{transform-box:fill-box;transform-origin:center}
.eco-sun-disc{opacity:.78}
.eco-cmp.on .eco-sun-disc{opacity:1}
.eco-niv{transform-box:fill-box;transform-origin:50% 100%;transform:scaleY(var(--bat,.18))}
.eco-cniv{transform-box:fill-box;transform-origin:0% 50%;transform:scaleX(var(--car,.14))}
.eco-phase{font-family:var(--display);font-weight:600;font-size:13px;letter-spacing:.22em;text-transform:uppercase;fill:var(--eco-gold-lt);opacity:0}
.eco-cmp.on .eco-phase{opacity:1}

.eco-seg{--len:1200}
.eco-seg .eco-trk{fill:none;stroke:rgba(198,161,91,.32);stroke-width:2.5;stroke-dasharray:2 8;stroke-linecap:round}
.eco-seg .eco-fil{fill:none;stroke:var(--gold);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:.5;stroke-dasharray:var(--len) var(--len);stroke-dashoffset:var(--len)}
.eco-seg.lit .eco-fil{stroke-dashoffset:0}
.eco-seg.go .eco-fil{stroke-opacity:.95}
.eco-seg .eco-run{fill:none;stroke:#FFF1CF;stroke-width:3.6;stroke-linecap:round;stroke-dasharray:5 24;opacity:0}
.eco-seg.go .eco-run{opacity:1}
/* sans JavaScript : le schéma s'affiche complet, allumé */
.eco:not(.js) .eco-cmp{color:rgba(198,161,91,.78)}
.eco:not(.js) .eco-seg .eco-fil{stroke-dashoffset:0}
.eco:not(.js) .eco-niv{--bat:.9}
.eco:not(.js) .eco-cniv{--car:.74}

@media (prefers-reduced-motion:no-preference){
  .eco-cmp{transition:color .6s,filter .6s}
  .eco-halo{transition:opacity .8s}
  .eco-phase{transition:opacity .8s}
  .eco-seg .eco-fil{transition:stroke-dashoffset 1.2s var(--ease),stroke-opacity .6s}
  .eco-seg .eco-run{transition:opacity .5s}
  .eco-seg.go .eco-run{animation:eco-flow 1.1s linear infinite}
  .eco-seg.go.rev .eco-run{animation-direction:reverse}
  .eco-niv{transition:transform 2.8s var(--ease)}
  .eco-cniv{transition:transform 2.8s var(--ease)}
  .eco-sunrays{animation:eco-turn 40s linear infinite}
  .eco-cmp.on .eco-halo{animation:eco-pulse 3.2s ease-in-out infinite}
}
@keyframes eco-flow{to{stroke-dashoffset:-29}}
@keyframes eco-turn{to{transform:rotate(360deg)}}
@keyframes eco-pulse{50%{opacity:.3}}

/* ---------- conclusion ---------- */
.eco__end{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:24px;padding-top:clamp(32px,6vh,60px);border-top:1px solid rgba(245,245,243,.12)}
.eco__end p{margin:0;font-family:var(--display);font-weight:300;font-size:clamp(19px,1.8vw,28px);line-height:1.25;max-width:560px}

/* ---------- téléphone : schéma collé sous l'en-tête, étapes en dessous ---------- */
@media (max-width:860px){
  .eco{--eco-hdr:68px}
  .eco__grid{grid-template-columns:minmax(0,1fr);gap:0}
  .eco-stage{top:var(--eco-hdr);z-index:5;background:var(--navy);padding-block:10px 12px;border-bottom:1px solid rgba(245,245,243,.1);box-shadow:0 14px 24px -14px rgba(0,0,0,.9)}
  .eco-dots{margin-top:8px;gap:8px}
  .eco-dot{width:26px;height:26px;font-size:11px}
  .eco-lbl{display:none}
  .eco-cmp.on .eco-lbl{display:block;font-size:27px}
  .eco-cmp.on .eco-lbl.eco-s{font-size:21px}
  .eco-bdg circle{r:17px}
  .eco-bt{font-size:19px}
  .eco-phase{font-size:24px}
  .eco-step{min-height:58vh;gap:18px;padding-block:22px}
  .eco-step__lead,.eco-step__p{font-size:15px}
}

/* ---------- mouvement réduit : tout s'affiche, rien ne bouge ---------- */
@media (prefers-reduced-motion:reduce){
  .eco-cmp.on{filter:none}
  .eco-cmp.on .eco-halo{opacity:.18}
  .eco-seg .eco-run{display:none}
  .eco-phase{display:none}
}
