// Nav.jsx — sticky top nav with backdrop blur. const navStyles = { outer: { position: 'sticky', top: 0, zIndex: 100, background: 'rgba(246, 244, 238, 0.85)', backdropFilter: 'blur(12px)', WebkitBackdropFilter: 'blur(12px)', borderBottom: '1px solid rgba(42, 26, 7,.08)', }, inner: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '14px 0', }, logo: { display: 'block', height: 50, width: 'auto' }, links: { display: 'flex', gap: 28, fontSize: 14, fontWeight: 500, alignItems: 'center', }, right: { display: 'flex', alignItems: 'center', gap: 16 }, dropdownWrap: { position: 'relative' }, dropdownTrigger: { display: 'inline-flex', alignItems: 'center', gap: 4, backgroundColor: 'transparent', border: 'none', cursor: 'pointer', font: 'inherit', color: 'inherit', paddingTop: 0, paddingLeft: 0, paddingRight: 0, paddingBottom: 2, }, dropdownChevron: { transition: 'transform 160ms var(--ease)' }, dropdownPanel: { position: 'absolute', top: 'calc(100% + 14px)', left: 0, minWidth: 250, background: '#fff', border: '1px solid var(--ink-900)', boxShadow: '4px 4px 0 0 var(--amber-500)', padding: 8, display: 'flex', flexDirection: 'column', gap: 2, zIndex: 110, }, dropdownAll: { padding: '10px 12px', fontSize: 12.5, color: 'var(--blue-700)', textDecoration: 'none', borderTop: '1px solid rgba(42,26,7,.10)', marginTop: 4, paddingTop: 12, display: 'flex', alignItems: 'center', gap: 6, fontFamily: "'JetBrains Mono', monospace", letterSpacing: '0.04em', textTransform: 'uppercase', }, mobileRow: { paddingBottom: 14 }, mobileMenuBtn: { display: 'inline-flex', alignItems: 'center', gap: 8, background: 'transparent', border: '1px solid rgba(42,26,7,.25)', padding: '9px 16px', minHeight: 44, cursor: 'pointer', fontFamily: "'JetBrains Mono', monospace", fontSize: 12, letterSpacing: '0.08em', textTransform: 'uppercase', color: 'var(--ink-900)', }, mobilePanel: { display: 'flex', flexDirection: 'column', marginTop: 10, border: '1px solid rgba(42,26,7,.15)', background: '#fff', boxShadow: '4px 4px 0 0 var(--amber-500)', }, mobileLink: { padding: '14px 16px', fontSize: 15, color: 'var(--ink-900)', textDecoration: 'none', borderTop: '1px solid rgba(42,26,7,.08)', }, mobileSubToggle: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%', background: 'transparent', border: 'none', cursor: 'pointer', padding: '14px 16px', fontSize: 15, fontFamily: 'inherit', color: 'var(--ink-900)', textAlign: 'left', }, mobileSubPanel: { display: 'flex', flexDirection: 'column', background: 'var(--paper-200)', borderTop: '1px solid rgba(42,26,7,.08)', }, mobileSubLink: { padding: '12px 16px 12px 28px', fontSize: 14, color: 'var(--ink-900)', textDecoration: 'none', }, }; const HOME_LINK = { id: 'top', label: 'Accueil' }; const NAV_LINKS = [ { id: 'preuves', label: 'Résultats' }, { id: 'methode', label: 'Méthode' }, { id: 'studio-digital', label: 'Studio Digital' }, { id: 'faq', label: 'FAQ' }, ]; const OFFER_SUBLINKS = [ { id: 'generateur', label: 'Générateur de propositions' }, { id: 'support', label: 'Agent support 24/7' }, { id: 'automatisation', label: 'Automatisation back-office' }, ]; // Sous-menu « Offres » : s'ouvre au survol (desktop) ET au clic (clavier/ // tactile) ; un léger délai à la fermeture laisse le temps de traverser // l'espace entre le bouton et le panneau en diagonale. Ferme sur Échap ou // clic à l'extérieur. const OffresDropdown = ({ root, activeSection }) => { const [open, setOpen] = React.useState(false); const wrapRef = React.useRef(null); const closeTimer = React.useRef(null); const cancelClose = () => { if (closeTimer.current) { clearTimeout(closeTimer.current); closeTimer.current = null; } }; const openNow = () => { cancelClose(); setOpen(true); }; const scheduleClose = () => { cancelClose(); closeTimer.current = setTimeout(() => setOpen(false), 200); }; React.useEffect(() => { if (!open) return; const onDocClick = (e) => { if (wrapRef.current && !wrapRef.current.contains(e.target)) setOpen(false); }; const onKey = (e) => { if (e.key === 'Escape') setOpen(false); }; document.addEventListener('mousedown', onDocClick); document.addEventListener('keydown', onKey); return () => { document.removeEventListener('mousedown', onDocClick); document.removeEventListener('keydown', onKey); }; }, [open]); React.useEffect(() => () => cancelClose(), []); return (