/* ════════════════════════════════════════════════════════════════════════
   HOME-2026b — évolution de la page d'accueil (2026-11-20)
   Chargé APRÈS fx-2026.css. Règle de sûreté : l'état de base de chaque
   élément est son état FINAL visible ; les animations partent d'un
   « from » et ne s'appliquent que sous html.fx (mouvement autorisé).
   Sans JS, en mouvement réduit ou en mode perf-degraded : tout est visible.
   ════════════════════════════════════════════════════════════════════════ */

/* ── 1. Circuit du hero : mêmes traces, plus étirées, 6 électrons à traînée ── */
.fxc-wrap { position: absolute; left: 0; right: 0; top: 0; height: 620px; }
.fxc { position: absolute; top: 0; height: 620px; width: auto; max-width: 30vw; overflow: visible; }
.fxc.l { left: 0; }
.fxc.r { right: 0; }
.fxc .tr { fill: none; stroke: rgba(127, 138, 152, 0.30); stroke-width: 1.2; }
[data-theme="light"] .fxc .tr { stroke: rgba(20, 18, 12, 0.20); }
.fxc .nd { fill: rgba(127, 138, 152, 0.40); }
[data-theme="light"] .fxc .nd { fill: rgba(20, 18, 12, 0.28); }
.fxc .nd-hot { fill: var(--accent, #DC2626); opacity: 0.55; transform-origin: center; transform-box: fill-box; }
.fxc .cu { fill: none; stroke: #EF4444; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 0.02 0.98; opacity: 0; }
[data-theme="light"] .fxc .cu { stroke: #DC2626; }
.fxc .cu.trail { stroke-width: 1.4; stroke-dasharray: 0.11 0.89; stroke-opacity: 0.32; }
.fxc .tr {
  stroke-dasharray: 1;
  animation: ecTrace 2.4s cubic-bezier(0.4, 0, 0.2, 1) calc(0.3s + var(--k, 0) * 0.25s) both;
}
@keyframes ecTrace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.fxc .nd-hot { animation: ecNode 3.2s ease-in-out infinite; }
@keyframes ecNode {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.45); }
}
.fxc .cu { animation: ecCur var(--du, 8s) linear var(--de, 3s) infinite both; }
.fxc .cu.trail { animation-name: ecCurTrail; }
@keyframes ecCur {
  0%   { stroke-dashoffset: 1; opacity: 0; }
  3%   { opacity: 1; }
  96%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes ecCurTrail {
  0%   { stroke-dashoffset: 1.09; opacity: 0; }
  3%   { opacity: 1; }
  96%  { opacity: 1; }
  100% { stroke-dashoffset: 0.09; opacity: 0; }
}
/* Téléphone : circuit réduit dans les coins hauts du hero, plus discret */
@media (max-width: 767px) {
  .fxc { top: 64px; height: auto; width: 36vw; max-width: none; opacity: 0.75; }
}

/* ── 2. Éclair du logo : animations d'origine conservées + ajouts ────── */
.bolt-current.c2 { animation-duration: 2.7s; animation-delay: -1.1s; filter: none; opacity: 0.9; }
.bolt-strike { opacity: 0; }
.bolt-strike { animation: ecStrike 4.8s linear infinite; }
@keyframes ecStrike {
  0%, 9.5%  { opacity: 0; }
  10.5%     { opacity: 0.85; }
  12.5%     { opacity: 0; }
  13.2%     { opacity: 0.5; }
  15%, 100% { opacity: 0; }
}
.bolt-spark.fly { transform-box: fill-box; transform-origin: center; animation: ecSpark var(--sd, 2.6s) ease-out var(--sl, 0.4s) infinite; }
@keyframes ecSpark {
  0%, 76% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  81%     { opacity: 1; transform: translate(0, 0) scale(1.6); }
  100%    { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.5); }
}
html.fx .land-hero .hero-logo-bolt-wrap { animation: ecBoltIn 0.75s cubic-bezier(0.2, 1.5, 0.4, 1) 0.45s both; }
@keyframes ecBoltIn {
  0%   { opacity: 0; transform: translateY(-55%) scale(0.5); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

/* ── 3. Titre bénéfice du hero ───────────────────────────────────────── */
.hero-benefit {
  font-family: 'Archivo', 'Archivo Fallback', 'Inter', sans-serif;
  font-stretch: 108%;
  font-weight: 760;
  font-size: clamp(1.5rem, 3.1vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--text);
  max-width: 20ch;
  margin: 0 auto 14px;
  text-align: center;
  text-wrap: balance;
}
.hero-benefit em { font-style: normal; font-weight: 880; font-stretch: 118%; color: var(--accent); }
html.fx:not(.fx-ready) .land-hero .hero-benefit { opacity: 0; transform: translateY(28px); }
html.fx .land-hero .hero-benefit {
  transition: opacity 0.8s cubic-bezier(0.22, 0.65, 0.25, 1), transform 0.9s cubic-bezier(0.22, 0.65, 0.25, 1);
  transition-delay: 0.24s;
}
.land-hero { padding-bottom: clamp(48px, 7vw, 96px); }

/* ── 4. Preuves : 4 chiffres, chacun avec sa mini-animation ──────────── */
.ecp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1180px;
  margin: 0 auto;
  text-align: left;
  border-top: 1px solid var(--border-strong, rgba(127, 138, 152, 0.5));
  border-bottom: 1px solid var(--rule);
}
.ecp-i { padding: 28px 24px 26px; border-left: 1px solid var(--rule); }
.ecp-i:first-child { border-left: 0; padding-left: 0; }
.ecp svg { display: block; width: 100%; height: 76px; margin-bottom: 22px; overflow: visible; color: rgba(127, 138, 152, 0.55); }
[data-theme="light"] .ecp svg { color: rgba(20, 18, 12, 0.34); }
.ecp svg text { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.04em; fill: var(--text2); }
.ecp .fa { fill: var(--accent, #DC2626); }
.ecp .fl { fill: currentColor; }
.ecp .fp { fill: var(--bg, transparent); stroke: currentColor; stroke-width: 1.2; }
.ecp .ln { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ecp .ln.hot { stroke: var(--accent, #DC2626); stroke-width: 2.4; }
.ecp .dim { opacity: 0.16; }
.ecp-i:first-child .metric-val { color: var(--accent); }
.ecp .metric-lab {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--text2) !important;
  margin-top: 10px;
}
@media (max-width: 900px) {
  .ecp { grid-template-columns: 1fr 1fr; }
  .ecp-i { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .ecp-i:nth-child(-n+2) { border-top: 0; }
}
.ecp.fx-in .bar { transform-origin: 0 50%; transform-box: fill-box; }
.ecp.fx-in .bar.slow { animation: ecGrow 2.6s linear 0.5s both; }
.ecp.fx-in .bar.fast { animation: ecGrow 0.52s cubic-bezier(0.22, 0.65, 0.25, 1) 0.5s both; }
@keyframes ecGrow { from { transform: scaleX(0); } to { transform: none; } }
.ecp.fx-in .pp {
  transform-box: fill-box; transform-origin: center;
  animation: ecPop 0.5s cubic-bezier(0.22, 0.65, 0.25, 1) calc(0.4s + var(--i, 0) * 85ms) both;
}
@keyframes ecPop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
.ecp.fx-in .tt { animation: ecFade 0.5s ease calc(0.4s + var(--i, 0) * 85ms) both; }
@keyframes ecFade { from { opacity: 0; } to { opacity: 1; } }
.ecp.fx-in .dd {
  stroke-dasharray: 1;
  animation: ecDraw 0.7s cubic-bezier(0.22, 0.65, 0.25, 1) calc(0.4s + var(--i, 0) * 85ms) both;
}
@keyframes ecDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.ecp.fx-in .dim { animation: ecDim 0.6s ease calc(1.6s + var(--i, 0) * 85ms) both; }
@keyframes ecDim { from { opacity: 1; } to { opacity: 0.16; } }

/* ── 5. Modules : vraie capture en tête + liste repliable ────────────── */
.mod-shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin: 0 0 22px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg2);
}
.mod-shot picture { display: block; width: 100%; height: 100%; }
.mod-shot img {
  display: block; width: 100%; height: 100%; max-width: none;
  object-fit: cover;
  border: 0; border-radius: 0; box-shadow: none;
  transform: scale(var(--z, 1));
}
html.fx .mod-shot img { transition: transform 1.6s cubic-bezier(0.22, 0.65, 0.25, 1) 0.15s; }
html.fx .mod-grid:not(.fx-in) .mod-shot img { transform: scale(calc(var(--z, 1) * 1.12)); }
.mod-more { display: none; }
.mod.has-more .mod-more {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin: 14px 0 18px; padding: 0 0 2px;
  background: none; border: 0; border-bottom: 1px solid currentColor; border-radius: 0;
  font: 600 0.9rem 'Inter', sans-serif; color: var(--text); cursor: pointer;
}
.mod.has-more .mod-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mod.has-more:not(.open) .mod-list li:nth-child(n+6) { display: none; }

/* ── 6. Étapes ───────────────────────────────────────────────────────── */
.ecs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 44px;
  text-align: left;
}
.ecs::before {
  content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 1px;
  background: var(--border-strong, rgba(127, 138, 152, 0.5));
}
.ecs::after {
  content: ""; position: absolute; top: 7px; left: 0; width: 34px; height: 3px; border-radius: 2px;
  background: var(--accent, #DC2626); opacity: 0;
}
.ecs.fx-in::after { animation: ecWire 5.5s linear 1.2s infinite both; }
@keyframes ecWire {
  0%   { left: 0; opacity: 0; }
  4%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { left: calc(100% - 34px); opacity: 0; }
}
.ecs-s { position: relative; }
.ecs-s::before {
  content: ""; position: absolute; top: -42px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent, #DC2626);
}
.ecs-k { font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; letter-spacing: 0.08em; color: var(--accent); }
.ecs-s h3 {
  font-family: 'Archivo', 'Archivo Fallback', 'Inter', sans-serif; font-stretch: 108%; font-weight: 800;
  font-size: 1.3rem; letter-spacing: -0.02em; color: var(--text); margin: 8px 0 8px;
}
.ecs-s p { margin: 0; max-width: 32ch; font-size: 0.95rem; line-height: 1.55; color: var(--text2); }
@media (max-width: 820px) {
  .ecs { grid-template-columns: 1fr; gap: 28px; padding-top: 0; }
  .ecs::before, .ecs::after, .ecs-s::before { display: none; }
}

/* ── 7. Mouvement réduit ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .bolt-current.c2, .bolt-strike { display: none; }
  .bolt-spark.fly { animation: none !important; }
  .fxc .tr, .fxc .cu, .fxc .nd-hot, .ecs::after { animation: none !important; }
}

/* Preuves : seul le premier chiffre porte l'accent */
.ecp .metric-val { color: var(--text) !important; }
.ecp .ecp-i:first-child .metric-val { color: var(--accent) !important; }

/* Téléphone : chiffres sur une seule ligne */
.ecp .metric-val { white-space: nowrap; }
@media (max-width: 520px) {
  .ecp .metric-val { font-size: 2.15rem !important; }
  .ecp-i { padding: 22px 12px 20px 0; }
}
