Contactez-moi

Discutons ensemble de vos besoins et projets.

    Appelez moi :

    +41 79 347 66 59

    E-mail :

    info@vertige.ch

    Liens :

    document.addEventListener("DOMContentLoaded", function() { const scrollTopBtn = document.querySelector('.scroll-to-top'); if(scrollTopBtn){ scrollTopBtn.addEventListener("click", function(e){ e.preventDefault(); smoothScrollToTop(1200); // durée en ms }); } function smoothScrollToTop(duration) { const start = window.pageYOffset; const startTime = performance.now(); function scrollStep(currentTime) { const elapsed = currentTime - startTime; const progress = Math.min(elapsed / duration, 1); const ease = 1 - Math.pow(1 - progress, 3); // easing cubic out window.scrollTo(0, start * (1 - ease)); if (progress < 1) { requestAnimationFrame(scrollStep); } } requestAnimationFrame(scrollStep); } });