diff --git a/public/strategie-script.js b/public/strategie-script.js index 0e4dd05..bb8b959 100644 --- a/public/strategie-script.js +++ b/public/strategie-script.js @@ -922,8 +922,15 @@ Interface de pilotage pour les responsables sécurité des PME. teamLink.style.cssText = 'color: #2ecc71; text-decoration: none; font-weight: bold; cursor: pointer; font-size: 14px; padding: 5px 8px; border-radius: 4px; transition: background 0.2s;'; teamLink.addEventListener('mouseenter', () => teamLink.style.background = 'rgba(46, 204, 113, 0.1)'); teamLink.addEventListener('mouseleave', () => teamLink.style.background = 'transparent'); - // Insérer au début du conteneur - container.insertBefore(teamLink, container.firstChild); + // Insérer au début du conteneur (ou à la fin si firstChild est null) + if (container.firstChild) { + container.insertBefore(teamLink, container.firstChild); + } else { + container.appendChild(teamLink); + } + console.log('✅ Lien Équipe ajouté au header'); + } else { + console.log('ℹ️ Lien Équipe existe déjà'); } // Ajouter les liens des pages de stratégie