/* NEKTAR v2 — App, Nav, FloatingResa, mount */ const { useState, useEffect, useRef } = React; const _D = window.NEKTAR_DATA; const _LC = window.LangContext; // Composants définis dans nektar-sections.jsx (autre scope Babel) const { HeroSection, HistoireSection, SelectionSection, LivraisonSection, LieuSection, SuivreSection, FooterSection, } = window; /* ============================================================ GLOBAL NAV — apparaît après le hero ============================================================ */ function GlobalNav({ pastHero, lang, setLang }) { const c = _D.COPY[lang] || _D.COPY.fr; const [drawerOpen, setDrawerOpen] = useState(false); const toggle = () => setDrawerOpen(o => !o); const close = () => setDrawerOpen(false); const scrollTo = (id, e) => { if (e) e.preventDefault(); close(); const el = document.getElementById(id); if (!el) return; // Mise à jour du hash sans saut brutal history.pushState(null, '', '#' + id); el.scrollIntoView({ behavior: 'smooth' }); }; return ( <> {/* Drawer mobile */}
scrollTo('histoire', e)}>{c.nav.histoire} scrollTo('carte', e)}>{c.nav.carte} scrollTo('livraison', e)}>{c.nav.domicile} scrollTo('galerie', e)}>{c.nav.galerie} {c.nav.reserver}