//* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ (function(){window.addEventListener('scroll',function(){var stickyMenu=document.querySelector('.header-umpv');if(window.scrollY>0)stickyMenu.classList.add('is-scrolling');else stickyMenu.classList.remove('is-scrolling');});})();; (function(){'use strict';function detectLangFromPath(){const htmlLang=(document.documentElement.lang||'').slice(0,2).toUpperCase();if(htmlLang==='FR'||htmlLang==='EN')return htmlLang;const firstSeg=(location.pathname.split('/')[1]||'').slice(0,2).toUpperCase();if(firstSeg==='EN'||firstSeg==='FR')return firstSeg;return 'FR';}function setSummaryText(code){const summary=document.getElementById('lang-summary');if(summary)summary.textContent=code;}document.addEventListener('DOMContentLoaded',function(){const fromPage=detectLangFromPath();const stored=localStorage.getItem('prefLang');const initial=fromPage||stored||'FR';setSummaryText(initial);if(initial!==stored)localStorage.setItem('prefLang',initial);document.querySelectorAll('a.lang-option').forEach(function(link){link.addEventListener('click',function(){const code=(link.dataset.lang||'').toUpperCase();if(code){localStorage.setItem('prefLang',code);setSummaryText(code);}const details=link.closest('details');if(details)details.removeAttribute('open');},{passive:true});});});})();; (function(Drupal,once){'use strict';Drupal.behaviors.externalLinkAccessibility={attach(context){once('external-link-accessibility','a[target="_blank"]',context).forEach((link)=>{const rel=(link.getAttribute('rel')||'').split(/\s+/).filter(Boolean);if(!rel.includes('noopener'))rel.push('noopener');link.setAttribute('rel',rel.join(' '));if(link.querySelector('.new-window-accessibility'))return;const srOnly=document.createElement('span');srOnly.className='sr-only new-window-accessibility';srOnly.textContent=' - Nouvel onglet';link.appendChild(srOnly);});}};})(Drupal,once);;