body { font-family: Arial, sans-serif;}#button-container { position: relative; display: flex; flex-direction: row; flex-wrap: wrap; gap: 15px; margin-top: 20px; justify-content: flex-start;}.scroll-button { background-color: #1f8399; color: white; border: none; border-radius: 100px; padding: 10px 15px; cursor: pointer; text-align: center; white-space: nowrap; display: inline-flex; justify-content: center; width: auto;}.scroll-button:hover { background-color: #1a6a7d;}@media (max-width: 980px) { #button-container { flex-direction: column; align-items: center; }}@media (max-width: 1200px) { #button-container { align-items: center; }}@media (max-width: 768px) { #button-container { align-items: center; }}function adjustButtonWidths() { const buttonContainer = document.getElementById('button-container'); const buttons = document.querySelectorAll('.scroll-button'); // Vérifier si les boutons sont en mode colonne const isColumnMode = window.getComputedStyle(buttonContainer).flexDirection === 'column'; if (isColumnMode) { let maxWidth = 0; buttons.forEach(button => { button.style.width = 'auto'; const width = button.offsetWidth; if (width > maxWidth) { maxWidth = width; } }); buttons.forEach(button => { button.style.width = `${maxWidth}px`; }); } else { buttons.forEach(button => { button.style.width = 'auto'; }); }}document.addEventListener("DOMContentLoaded", function() { const titreElements = document.querySelectorAll('#titre'); const buttonContainer = document.getElementById('button-container'); titreElements.forEach((element, index) => { const button = document.createElement('button'); button.className = 'scroll-button'; button.textContent = element.querySelector('p').textContent; button.addEventListener('click', () => { element.scrollIntoView({ behavior: 'smooth' }); }); buttonContainer.appendChild(button); }); const infoElement = document.getElementById('infos-utiles'); if (infoElement) { const infoButton = document.createElement('button'); infoButton.className = 'scroll-button'; infoButton.textContent = 'Infos utiles'; infoButton.addEventListener('click', () => { […]