diff --git a/frontend/js/admin.js b/frontend/js/admin.js index 192d0bc..7b8a52a 100644 --- a/frontend/js/admin.js +++ b/frontend/js/admin.js @@ -306,14 +306,15 @@ function testerAnimation() { } else { chiffre.textContent = count; } - chiffre.className = 'anim-chiffre anim-' + animationChoisie; - // Force reflow pour relancer l'animation - chiffre.style.animation = 'none'; - chiffre.offsetHeight; - chiffre.className = 'anim-chiffre anim-' + animationChoisie; + // Reset : retirer toute classe d'animation + chiffre.className = 'anim-chiffre'; + // Force reflow pour que le navigateur enregistre le retrait + void chiffre.offsetWidth; + // Appliquer la nouvelle animation + chiffre.classList.add('anim-' + animationChoisie); count--; - if (count > 0) setTimeout(afficher, 800); + if (count > 0) setTimeout(afficher, 1000); } afficher();