/* ===== shared components ===== */ const { useState, useEffect, useRef } = React; /* Reveal-on-scroll wrapper */ function Reveal({ children, delay = 0, as = "div", className = "", style = {} }) { const ref = useRef(null); useEffect(() => { const el = ref.current; if (!el) return; let done = false; const check = () => { if (done) return true; const r = el.getBoundingClientRect(); if (r.top < window.innerHeight * 0.92 && r.bottom > 0) { el.classList.add("in"); done = true; window.removeEventListener("scroll", check); window.removeEventListener("resize", check); return true; } return false; }; if (check()) return; window.addEventListener("scroll", check, { passive: true }); window.addEventListener("resize", check); const t = setTimeout(check, 250); return () => { window.removeEventListener("scroll", check); window.removeEventListener("resize", check); clearTimeout(t); }; }, []); const Tag = as; return ( {children} ); } /* Striped placeholder for real photos */ function Ph({ label, dark = false, style = {} }) { return (
{label}
); } /* Simple geometric line icons (no complex SVG) */ function Icon({ name, size = 26, color = "currentColor", stroke = 2 }) { const p = { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: stroke, strokeLinecap: "round", strokeLinejoin: "round" }; const paths = { home: , shield: , disk: , printer: , remote: , grad: , phone: , mail: , clock: , pin: , check: , bolt: , cpu: , gpu: , tablet: , laptop: , star: , heart: , chat: , hand: , }; return {paths[name] || null}; } /* Brand lockup */ function Brand({ light = false }) { return ( Au PC Bien Portant Au PC Bien PortantCaen & alentours ); } /* Sticky nav with mobile drawer */ function Nav({ onCall }) { const [open, setOpen] = useState(false); const links = [ ["#services", "Dépannage"], ["#avis", "Avis"], ["#formation", "Formation"], ["#abonnement", "Abonnement"], ["#gamer", "Zone Gamer"], ["#contact", "Contact"], ]; return (
06 58 66 54 93
{open && ( )}
); } Object.assign(window, { Reveal, Ph, Icon, Brand, Nav });