export function handleSmoothScrollToTitle(): void { const sommaireTitles: NodeListOf = document.querySelectorAll('.sommaire-index li a'); for (const title of sommaireTitles) { title.addEventListener('click', (e) => { e.preventDefault(); const target = title.getAttribute('href'); if (!target) return; const targetElement = document.querySelector(target); if (!targetElement) return; targetElement.scrollIntoView({ behavior: 'smooth' }); }); } }