/* === Ondes circulaires (groupes .ripple) : expansion + estompage, boucle propre === */
svg .ripple {
  transform-box: fill-box;
  transform-origin: center;
  animation-name: ripple-expand, ripple-fade;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
  will-change: transform, opacity;
}

/* Cadence (délais échelonnés pour un flux continu) */
svg .ripple--1 { animation-duration: 9s, 9s;   animation-delay: 0s,     0s; }
svg .ripple--2 { animation-duration: 10s,10s;  animation-delay: -3s,   -3s; }
svg .ripple--3 { animation-duration: 11s,11s;  animation-delay: -6s,   -6s; }
svg .ripple--4 { animation-duration: 12s,12s;  animation-delay: -9s,   -9s; }

@keyframes ripple-expand {
  0%   { transform: scale(0.88); }
  12%  { transform: scale(0.96); }
  60%  { transform: scale(1.28); }
  100% { transform: scale(1.52); } /* 100% = état final, prêt à boucler sans “saut” visuel */
}

@keyframes ripple-fade {
  0%   { opacity: 0;    }
  12%  { opacity: 0.95; }
  60%  { opacity: 0.30; }
  100% { opacity: 0;    }
}

/* === Points (.pt) : drift subtil qui revient à l’origine + scintillement doux === */
svg .pt {
  transform-box: fill-box;
  transform-origin: center;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-fill-mode: both;
  will-change: transform, opacity;
  /* 2 animations superposées */
  animation-name: drift, twinkle;
  animation-duration: 10s, 5s;  /* par défaut */
  animation-delay: 0s, 0s;
}

/* vitesses */
svg .drift-slow { animation-duration: 14s, 6s; }
svg .drift-med  { animation-duration: 10s, 5s; }
svg .drift-fast { animation-duration: 7s,  4s; }

/* directions (dx/dy/rot) + désynchro */
svg .dir1 { --dx:  8px;  --dy: -5px;  --rot:  0.6deg;  animation-delay: -1.2s, -0.4s; }
svg .dir2 { --dx: -6px;  --dy:  6px;  --rot: -0.7deg;  animation-delay: -2.1s, -0.8s; }
svg .dir3 { --dx: 10px;  --dy:  4px;  --rot:  0.8deg;  animation-delay: -3.0s, -1.0s; }
svg .dir4 { --dx: -9px;  --dy: -6px;  --rot: -0.6deg;  animation-delay: -0.9s, -0.6s; }
svg .dir5 { --dx:  6px;  --dy: -7px;  --rot:  0.5deg;  animation-delay: -1.8s, -1.1s; }
svg .dir6 { --dx: -7px;  --dy:  5px;  --rot: -0.5deg;  animation-delay: -2.7s, -0.3s; }

/* Drift bouclé (0% = 100%) pour éviter tout “saut” */
@keyframes drift {
  0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); }
  50%      { transform: translate(var(--dx,6px), var(--dy,-4px)) rotate(var(--rot,0.6deg)) scale(1.02); }
}

/* Scintillement très doux */
@keyframes twinkle {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1;    }
}


/***************************************************************\
                        LEFT FOCUS
\***************************************************************/
/* ===== Contrôles (par variables) : n'affecte que les bulles ===== */
svg {
  --bubbles-shift-x-ripples: 0px;   /* décalage anneaux */
  --bubbles-shift-x-points:  0px;   /* décalage points  */
  --bubbles-right-clear:     0%;    /* dégagement à droite (clip progressif) */
}

/* Active le recentrage à gauche UNIQUEMENT pour les bulles */
svg.bubbles-left {
  /* ajuste ces valeurs selon ton besoin */
  --bubbles-shift-x-ripples: -620px;
  --bubbles-shift-x-points:  -480px;  /* léger parallax */
  --bubbles-right-clear:      40%;    /* libère ~40% à droite, en douceur */
}

/* CIBLAGE : seulement les calques de bulles, pas le fond */
svg #ripples,
svg > g[filter="url(#glow)"] {
  /* état normal */
  transform: translateX(0);
  clip-path: inset(0 0 0 0);

  /* transitions douces à chaque changement de classe */
  transition:
    transform 1100ms cubic-bezier(.22,1,.36,1),
    clip-path 1100ms cubic-bezier(.22,1,.36,1);
  will-change: transform, clip-path;
}

/* état "bubbles-left" : repositionnement + dégagement progressif à droite */
svg.bubbles-left #ripples {
  transform: translateX(var(--bubbles-shift-x-ripples));
  clip-path: inset(0 var(--bubbles-right-clear) 0 0);
}
svg.bubbles-left > g[filter="url(#glow)"] {
  transform: translateX(var(--bubbles-shift-x-points));
  clip-path: inset(0 var(--bubbles-right-clear) 0 0);
}