diff --git a/src/utils/stats.js b/src/utils/stats.js
index 1ced5bf503bc3e4db1bb694775e9176af4bc88b0..1f1912c79f09c46227f87b29fba08a1d27abae0b 100644
--- a/src/utils/stats.js
+++ b/src/utils/stats.js
@@ -87,6 +87,11 @@
         if (document.hidden) {
             // log("[Stats] Changement d'onglet détecté");
             resetAllTimers();
+        } else {
+            // Vérifie si les statistiques sont désactivées et retire la bordure si nécessaire
+            if (!window.hasRunStats) {
+                removeViewportBorder();
+            }
         }
     });
 
@@ -318,7 +323,7 @@
         rect.setAttribute("stroke-width", "0.5");
         rect.setAttribute("stroke-dasharray", "200 200");
         rect.setAttribute("stroke-dashoffset", "400");
-        rect.style.animation = "dashAnimation 6s ease-in-out infinite";
+        rect.style.animation = "dashAnimation 20s ease-in-out infinite";
     
         svg.appendChild(rect);
         document.body.appendChild(svg);
@@ -326,8 +331,10 @@
     
     // Fonction pour ajouter la bordure 
     function addViewportBorder() {
-        if (!document.getElementById("border-svg")) {
-        injectBorder();
+        if (window.hasRunStats) {
+            if (!document.getElementById("border-svg")) {
+                injectBorder();
+            }
         }
     }
     // Fonction pour retirer la bordure