/* ═══════════════════════════════════════════════════════════
   Fil directeur — composant réutilisable
   Motion générique du tracé SVG révélé au scroll + nœuds qui
   éclosent quand le "front de dessin" les franchit.
   Une page hôte (transmission, litiges, croissance…) pose le
   conteneur (.parcours-thread-wrap) et la couleur d'accent via
   `color:` sur le <svg>. Tout hérite ensuite de currentColor.
   ═══════════════════════════════════════════════════════════ */

.thread-section { position: relative; }

/* Tracé principal */
.thread-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
  vector-effect: non-scaling-stroke;
}

/* Pointe lumineuse (suit le tracé quand data-thread-tip="follow") */
.thread-tip {
  fill: currentColor;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: drop-shadow(0 0 6px currentColor);
}
.thread-tip.is-drawing { opacity: 1; }
.thread-tip-halo {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.thread-tip-halo.is-drawing { opacity: 0.55; }

/* Nœuds — base */
.node-group {
  opacity: 1;
  transform-box: fill-box;
  transform-origin: center;
}
.node-ring {
  fill: var(--bg-base);
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0;
  vector-effect: non-scaling-stroke;
  transform: scale(1);
  transform-box: fill-box;
  transform-origin: center;
}
.node-dot {
  fill: currentColor;
  opacity: 0;
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: center;
}
.node-halo {
  fill: currentColor;
  opacity: 0;
  transform: scale(0.8);
  transform-box: fill-box;
  transform-origin: center;
}

/* Séquence d'activation : ring visible immédiatement + flash,
   puis dot pop, puis halo pulse en fond */
.node-group.is-spawned .node-ring {
  opacity: 1;
  animation: thread-node-ring-flash 0.35s cubic-bezier(0.34, 1.55, 0.6, 1) forwards;
}
.node-group.is-spawned .node-dot {
  opacity: 1;
  animation: thread-node-dot-pop 0.3s cubic-bezier(0.34, 1.55, 0.6, 1) forwards;
  animation-delay: 0.05s;
}
.node-group.is-spawned .node-halo {
  animation: thread-node-halo-pulse 0.7s ease-out forwards;
  animation-delay: 0.05s;
}

@keyframes thread-node-ring-flash {
  0%   { transform: scale(0.45); }
  55%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes thread-node-dot-pop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}
@keyframes thread-node-halo-pulse {
  0%   { opacity: 0.55; transform: scale(0.8); }
  100% { opacity: 0;    transform: scale(2.8); }
}

/* Accessibilité — réduire le motion mais garder l'état final visible */
@media (prefers-reduced-motion: reduce) {
  .thread-line { transition: none; }
  .node-group.is-spawned .node-ring,
  .node-group.is-spawned .node-dot,
  .node-group.is-spawned .node-halo {
    animation: none;
  }
  .node-group.is-spawned .node-ring { transform: scale(1); }
  .node-group.is-spawned .node-dot  { transform: scale(1); }
  .node-group.is-spawned .node-halo { opacity: 0; transform: scale(2); }
}
