/* global React */
const { useEffect, useRef, useState } = React;

// === Icons ===
const ArrowUpRight = ({ size = 16 }) =>
<svg className="arr" width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round">
    <path d="M7 17 17 7" /><path d="M8 7h9v9" />
  </svg>;

const Check = ({ size = 14 }) =>
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round">
    <path d="M4 12l5 5L20 6" />
  </svg>;

const Spark = ({ size = 16 }) =>
<svg width={size} height={size} viewBox="0 0 24 24" fill="currentColor">
    <path d="M12 2 13.5 9.5 21 12 13.5 14.5 12 22 10.5 14.5 3 12 10.5 9.5z" />
  </svg>;

const Bolt = ({ size = 18 }) =>
<svg width={size} height={size} viewBox="0 0 24 24" fill="currentColor">
    <path d="M13 2 3 14h8l-1 8 10-12h-8z" />
  </svg>;

const Brain = ({ size = 22 }) =>
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6">
    <path d="M9 4a3 3 0 0 0-3 3v.5A3.5 3.5 0 0 0 4 11a3 3 0 0 0 1.5 2.6A3 3 0 0 0 8 19a3 3 0 0 0 4-1V5a3 3 0 0 0-3-1z" />
    <path d="M15 4a3 3 0 0 1 3 3v.5A3.5 3.5 0 0 1 20 11a3 3 0 0 1-1.5 2.6A3 3 0 0 1 16 19a3 3 0 0 1-4-1" />
  </svg>;

const Workflow = ({ size = 22 }) =>
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6">
    <rect x="3" y="3" width="6" height="6" rx="1.5" />
    <rect x="15" y="3" width="6" height="6" rx="1.5" />
    <rect x="9" y="15" width="6" height="6" rx="1.5" />
    <path d="M6 9v3h12V9M12 12v3" />
  </svg>;

const Target = ({ size = 22 }) =>
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6">
    <circle cx="12" cy="12" r="9" />
    <circle cx="12" cy="12" r="5" />
    <circle cx="12" cy="12" r="1.6" fill="currentColor" />
  </svg>;


// === Logo ===
const Logo = () =>
<svg viewBox="0 0 412.33 95.79" xmlns="http://www.w3.org/2000/svg">
    <path d="M35.98,59.85c1.7,2.18,2.55,4.67,2.55,7.46,0,4.04-1.41,7.24-4.23,9.6-2.82,2.36-6.75,3.54-11.8,3.54H0v-48.3h21.74c4.91,0,8.75,1.12,11.53,3.37,2.77,2.25,4.16,5.3,4.16,9.15,0,2.85-.75,5.21-2.24,7.09s-3.47,3.19-5.95,3.92c2.8.6,5.05,1.99,6.74,4.16ZM11.77,51.69h7.71c1.93,0,3.41-.42,4.44-1.27,1.03-.85,1.55-2.1,1.55-3.75s-.52-2.91-1.55-3.78c-1.03-.87-2.51-1.31-4.44-1.31h-7.71v10.11ZM25.01,69.61c1.08-.89,1.62-2.19,1.62-3.89s-.56-3.03-1.69-3.99c-1.12-.96-2.67-1.45-4.64-1.45h-8.53v10.67h8.67c1.97,0,3.5-.45,4.58-1.34Z" />
    <path d="M55.7,77.77c-3.78-2.11-6.79-5.06-9.01-8.84-2.23-3.78-3.34-8.04-3.34-12.76s1.11-8.97,3.34-12.73c2.22-3.76,5.23-6.7,9.01-8.81,3.78-2.11,7.95-3.17,12.49-3.17s8.7,1.06,12.49,3.17c3.78,2.11,6.77,5.05,8.95,8.81,2.18,3.76,3.27,8,3.27,12.73s-1.1,8.98-3.3,12.76c-2.2,3.78-5.18,6.73-8.94,8.84-3.76,2.11-7.91,3.17-12.45,3.17s-8.7-1.06-12.49-3.17ZM77.44,66.35c2.32-2.57,3.47-5.96,3.47-10.18s-1.16-7.67-3.47-10.22c-2.32-2.55-5.4-3.82-9.25-3.82s-7.01,1.26-9.32,3.78c-2.32,2.52-3.48,5.94-3.48,10.25s1.16,7.67,3.48,10.22c2.32,2.55,5.42,3.82,9.32,3.82s6.94-1.29,9.25-3.85Z" />
    <path d="M109.78,77.77c-3.78-2.11-6.79-5.06-9.01-8.84-2.23-3.78-3.34-8.04-3.34-12.76s1.11-8.97,3.34-12.73c2.22-3.76,5.23-6.7,9.01-8.81,3.78-2.11,7.95-3.17,12.49-3.17s8.7,1.06,12.49,3.17c3.78,2.11,6.77,5.05,8.94,8.81,2.18,3.76,3.27,8,3.27,12.73s-1.1,8.98-3.3,12.76c-2.2,3.78-5.19,6.73-8.95,8.84-3.76,2.11-7.91,3.17-12.45,3.17s-8.7-1.06-12.49-3.17ZM131.52,66.35c2.32-2.57,3.48-5.96,3.48-10.18s-1.16-7.67-3.48-10.22-5.4-3.82-9.25-3.82-7.01,1.26-9.32,3.78c-2.32,2.52-3.48,5.94-3.48,10.25s1.16,7.67,3.48,10.22c2.32,2.55,5.42,3.82,9.32,3.82s6.94-1.29,9.25-3.85Z" />
    <path d="M293.05,72.4h-16.63l-2.67,8.53h-11.36l16.12-48.3h12.56l16.86,48.3h-12.23l-2.67-8.53ZM290.26,63.32l-5.52-17.68-5.46,17.68h10.98Z" />
    <path d="M333.7,80.93l-14.98-21.33v21.33h-10.85v-48.3h10.85v21.19l14.85-21.19h12.76l-17.26,23.67,17.89,24.63h-13.26Z" />
    <path d="M357.65,42.06v9.77h14.53v9.08h-14.53v10.6h16.44v9.43h-27.29v-48.3h27.29v9.43h-16.44Z" />
    <path d="M400.08,80.93l-9.27-18.23h-2.6v18.23h-10.85v-48.3h18.21c3.51,0,6.5.66,8.98,1.99,2.47,1.33,4.32,3.15,5.55,5.47,1.23,2.32,1.84,4.9,1.84,7.74,0,3.21-.84,6.08-2.51,8.6-1.67,2.52-4.14,4.31-7.39,5.37l10.28,19.13h-12.25ZM388.21,54.38h6.73c1.99,0,3.48-.53,4.47-1.58.99-1.05,1.49-2.55,1.49-4.47s-.5-3.28-1.49-4.34c-.99-1.05-2.49-1.58-4.47-1.58h-6.73v11.97Z" />
    <path d="M242.45,15.97v63.84c0,.48-.39.87-.87.87h-6.73c-.48,0-.87-.39-.87-.87v-45.43c0-.78-.89-1.22-1.51-.76l-26.77,19.95c-.31.23-.73.23-1.04,0l-26.77-19.95c-.62-.47-1.51-.02-1.51.76v45.43c0,.48-.39.87-.87.87h-6.73c-.48,0-.87-.39-.87-.87V15.97c0-.72.82-1.13,1.39-.7l35.36,26.43c.31.23.73.23,1.04,0l35.36-26.43c.57-.43,1.39-.02,1.39.7Z" />
    <path d="M227.76,46.1v33.72c0,.48-.39.87-.87.87h-6.73c-.48,0-.87-.39-.87-.87v-15.32c0-.78-.89-1.22-1.51-.76l-12.09,9.03c-.31.23-.73.23-1.04,0l-12.08-9.03c-.62-.47-1.51-.02-1.51.76v15.32c0,.48-.39.87-.87.87h-6.73c-.48,0-.87-.39-.87-.87v-33.72c0-.72.82-1.13,1.39-.7l20.67,15.5c.31.23.73.23,1.04,0l20.68-15.51c.57-.43,1.39-.02,1.39.7Z" />
    <path d="M255.82,95.79h-101.28c-1.55,0-2.81-1.26-2.81-2.81V2.81c0-1.55,1.26-2.81,2.81-2.81h101.28c1.55,0,2.81,1.26,2.81,2.81v90.17c0,1.55-1.26,2.81-2.81,2.81ZM159.2,89.79h91.95c.81,0,1.47-.66,1.47-1.47V7.47c0-.81-.66-1.47-1.47-1.47h-91.95c-.81,0-1.47.66-1.47,1.47v80.84c0,.81.66,1.47,1.47,1.47Z" />
  </svg>;


// === Reveal hook ===
const useReveal = () => {
  useEffect(() => {
    const els = document.querySelectorAll('.reveal');
    const io = new IntersectionObserver((entries) => {
      entries.forEach((e) => {
        if (e.isIntersecting) {
          e.target.classList.add('in');
          io.unobserve(e.target);
        }
      });
    }, { threshold: 0.1, rootMargin: '0px 0px -80px 0px' });
    els.forEach((el) => io.observe(el));
    return () => io.disconnect();
  }, []);
};

// === Mouse glow on pillars ===
const useMouseGlow = (selector) => {
  useEffect(() => {
    const els = document.querySelectorAll(selector);
    const onMove = (e) => {
      const el = e.currentTarget;
      const r = el.getBoundingClientRect();
      el.style.setProperty('--mx', `${e.clientX - r.left}px`);
      el.style.setProperty('--my', `${e.clientY - r.top}px`);
    };
    els.forEach((el) => el.addEventListener('mousemove', onMove));
    return () => els.forEach((el) => el.removeEventListener('mousemove', onMove));
  });
};

// === Live ROI counter (compact stat for hero canvas) ===
const useTickingNumber = (start, perSecond) => {
  const [v, setV] = useState(start);
  useEffect(() => {
    const t0 = Date.now();
    const id = setInterval(() => {
      setV(start + (Date.now() - t0) / 1000 * perSecond);
    }, 100);
    return () => clearInterval(id);
  }, [start, perSecond]);
  return v;
};

// === Hero workflow canvas (animated nodes + lines + particles) ===
// Rotating event log — gives life to the canvas
const useEventTicker = (events, intervalMs = 2200) => {
  const [idx, setIdx] = useState(0);
  useEffect(() => {
    const t = setInterval(() => setIdx((i) => (i + 1) % events.length), intervalMs);
    return () => clearInterval(t);
  }, [events.length, intervalMs]);
  return events[idx];
};

const HeroCanvas = () => {
  const ca = useTickingNumber(847234, 18);
  const events = [
    { who: 'Léa M.', co: 'Stripe',     score: 92, action: 'Email envoyé · sequence "founder"' },
    { who: 'Yann B.', co: 'Doctolib',   score: 87, action: 'LinkedIn · connect + DM 1' },
    { who: 'Sara K.', co: 'Alan',       score: 94, action: 'RDV pris · 14h jeudi' },
    { who: 'Marc D.', co: 'Qonto',      score: 81, action: 'Ajouté CRM · Pipedrive' },
    { who: 'Inès P.', co: 'Payfit',     score: 89, action: 'Email envoyé · sequence "ops"' },
    { who: 'Tom L.',  co: 'Spendesk',   score: 96, action: 'RDV pris · 10h vendredi' },
  ];
  const ev = useEventTicker(events, 2400);

  return (
    <div className="hero-canvas">
      {/* Header: live badge + meta */}
      <div className="hc-head">
        <span className="hc-live"><span className="hc-live-dot" /> Workflow en production</span>
      </div>

      {/* Headline metric — the boom */}
      <div className="hc-hero-stat">
        <div className="hc-hero-lbl">CA généré · workflow client · 30 derniers jours</div>
        <div className="hc-hero-num">
          <span className="num">{Math.round(ca).toLocaleString('fr-FR')}</span>
          <span className="cur">€</span>
        </div>
        <div className="hc-hero-delta">
          <span className="dot" /> +18 €/seconde · 24/7 · sans humain
        </div>
      </div>

      {/* Pipeline river */}
      <div className="hc-river">
        <svg className="hc-river-svg" viewBox="0 0 540 80" preserveAspectRatio="none">
          <defs>
            <linearGradient id="riverGrad" x1="0" y1="0" x2="1" y2="0">
              <stop offset="0%" stopColor="var(--cyan)" stopOpacity="0" />
              <stop offset="50%" stopColor="var(--violet-2)" stopOpacity="1" />
              <stop offset="100%" stopColor="var(--violet-2)" stopOpacity="0" />
            </linearGradient>
            <filter id="riverGlow" x="-20%" y="-50%" width="140%" height="200%">
              <feGaussianBlur stdDeviation="3" />
            </filter>
          </defs>
          {/* glow under */}
          <path d="M 20 40 L 520 40" stroke="url(#riverGrad)" strokeWidth="14" filter="url(#riverGlow)" opacity="0.55" />
          {/* main flowing line */}
          <path className="hc-river-line" d="M 20 40 L 520 40" />
          {/* energy particles */}
          <circle className="hc-river-dot" r="3"><animateMotion dur="2.6s" repeatCount="indefinite" path="M 20 40 L 520 40" /></circle>
          <circle className="hc-river-dot" r="3"><animateMotion dur="2.6s" begin="0.9s" repeatCount="indefinite" path="M 20 40 L 520 40" /></circle>
          <circle className="hc-river-dot" r="3"><animateMotion dur="2.6s" begin="1.7s" repeatCount="indefinite" path="M 20 40 L 520 40" /></circle>
        </svg>

        <div className="hc-river-stops">
          <div className="hc-stop">
            <div className="hc-stop-dot cyan" />
            <div className="hc-stop-icon cyan">🔍</div>
            <div className="hc-stop-name">Sales Nav</div>
            <div className="hc-stop-sub">Trigger</div>
          </div>
          <div className="hc-stop">
            <div className="hc-stop-dot violet" />
            <div className="hc-stop-icon violet"><Brain size={16} /></div>
            <div className="hc-stop-name">Claude · ICP</div>
            <div className="hc-stop-sub">Score 0–100</div>
          </div>
          <div className="hc-stop">
            <div className="hc-stop-dot violet" />
            <div className="hc-stop-icon cyan">✉</div>
            <div className="hc-stop-name">Email + Linkedin</div>
            <div className="hc-stop-sub">Auto · 24/7</div>
          </div>
          <div className="hc-stop boom">
            <div className="hc-stop-dot boom" />
            <div className="hc-stop-icon boom">★</div>
            <div className="hc-stop-name">RDV booked</div>
            <div className="hc-stop-sub">Pipedrive</div>
          </div>
        </div>
      </div>

      {/* Live event ticker — the proof it's running */}
      <div className="hc-ticker">
        <div className="hc-ticker-head">
          <span className="t-pulse" />
          <span className="t-label">Live event</span>
          <span className="t-time">à l'instant</span>
        </div>
        <div className="hc-ticker-body" key={`${ev.who}-${ev.co}`}>
          <div className="t-avatar">{ev.who.split(' ').map(s => s[0]).join('')}</div>
          <div className="t-text">
            <div className="t-line1">
              <strong>{ev.who}</strong> <span className="t-co">@ {ev.co}</span>
            </div>
            <div className="t-line2">{ev.action}</div>
          </div>
          <div className="t-score">
            <div className="t-score-num">{ev.score}</div>
            <div className="t-score-lbl">score IA</div>
          </div>
        </div>
      </div>
    </div>);
};

// === Marquee ===
const Marquee = ({ items }) => {
  const all = [...items, ...items, ...items];
  return (
    <div className="marquee">
      <div className="marquee-track">
        {all.map((it, i) =>
        <span key={i}>
            {it}
            <Spark size={14} />
          </span>
        )}
      </div>
    </div>);

};

// === Brand marks (simple monogram SVGs — placeholders, recognizable shapes) ===
const BrandMark = ({ name }) => {
  const marks = {
    Make:
    <svg viewBox="0 0 32 32" fill="none"><path d="M6 6 L6 26 M11 6 L16 26 L21 6 M26 6 L26 26" stroke="#6E5BFF" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" /></svg>,

    n8n:
    <svg viewBox="0 0 32 32" fill="none"><circle cx="8" cy="16" r="4" fill="#EA4B71" /><circle cx="24" cy="16" r="4" fill="#EA4B71" /><path d="M8 16 H24" stroke="#EA4B71" strokeWidth="2.5" /></svg>,

    Zapier:
    <svg viewBox="0 0 32 32" fill="none"><path d="M16 4 V28 M4 16 H28 M7.5 7.5 L24.5 24.5 M24.5 7.5 L7.5 24.5" stroke="#FF4F00" strokeWidth="2.5" strokeLinecap="round" /><circle cx="16" cy="16" r="3.5" fill="#FF4F00" /></svg>,

    Claude:
    <svg viewBox="0 0 32 32" fill="none"><path d="M10 8 L13 24 M14 8 L17 24 M22 8 L19 24" stroke="#D97757" strokeWidth="2.5" strokeLinecap="round" /></svg>,

    ChatGPT:
    <svg viewBox="0 0 32 32" fill="none"><path d="M16 6 L24 10 V22 L16 26 L8 22 V10 Z" stroke="#10A37F" strokeWidth="2" fill="rgba(16,163,127,0.12)" /><circle cx="16" cy="16" r="2.5" fill="#10A37F" /></svg>,

    Gemini:
    <svg viewBox="0 0 32 32" fill="none"><path d="M16 4 L18 14 L28 16 L18 18 L16 28 L14 18 L4 16 L14 14 Z" fill="#4285F4" /></svg>,

    Emelia:
    <svg viewBox="0 0 32 32" fill="none"><rect x="5" y="9" width="22" height="14" rx="2" stroke="#7C5CFF" strokeWidth="2" fill="rgba(124,92,255,0.1)" /><path d="M5 11 L16 18 L27 11" stroke="#7C5CFF" strokeWidth="2" fill="none" /></svg>,

    'Sales Navigator':
    <svg viewBox="0 0 32 32" fill="none"><rect x="4" y="4" width="24" height="24" rx="4" fill="#0A66C2" /><text x="16" y="22" textAnchor="middle" fontSize="14" fontWeight="700" fontFamily="Arial" fill="white">in</text></svg>,

    HubSpot:
    <svg viewBox="0 0 32 32" fill="none"><circle cx="22" cy="20" r="6" stroke="#FF7A59" strokeWidth="2.5" fill="none" /><circle cx="22" cy="8" r="3" fill="#FF7A59" /><path d="M22 11 V14 M11 14 L19 18" stroke="#FF7A59" strokeWidth="2" /><circle cx="9" cy="13" r="3" fill="#FF7A59" /></svg>,

    Pipedrive:
    <svg viewBox="0 0 32 32" fill="none"><path d="M10 6 H18 a6 6 0 0 1 0 12 H14 V28 H10 Z" fill="#1A1A1A" stroke="#1A1A1A" /><circle cx="18" cy="12" r="3" fill="white" /></svg>,

    Airtable:
    <svg viewBox="0 0 32 32" fill="none"><path d="M4 10 L16 5 L28 10 L16 15 Z" fill="#FFB400" /><path d="M4 10 V20 L15 26 V16 Z" fill="#18BFFF" /><path d="M28 10 V20 L17 26 V16 Z" fill="#F82B60" /></svg>,

    Calendly:
    <svg viewBox="0 0 32 32" fill="none"><rect x="4" y="7" width="24" height="22" rx="3" stroke="#006BFF" strokeWidth="2" fill="rgba(0,107,255,0.08)" /><path d="M4 13 H28" stroke="#006BFF" strokeWidth="2" /><path d="M10 4 V10 M22 4 V10" stroke="#006BFF" strokeWidth="2.5" strokeLinecap="round" /></svg>,

    Notion:
    <svg viewBox="0 0 32 32" fill="none"><rect x="6" y="5" width="20" height="22" rx="2" stroke="currentColor" strokeWidth="2" fill="none" /><path d="M11 10 V22 M11 10 L21 22 M21 10 V22" stroke="currentColor" strokeWidth="2" /></svg>,

    Slack:
    <svg viewBox="0 0 32 32" fill="none"><rect x="13" y="4" width="6" height="14" rx="3" fill="#E01E5A" /><rect x="13" y="14" width="14" height="6" rx="3" fill="#ECB22E" /><rect x="13" y="14" width="6" height="14" rx="3" fill="#2EB67D" /><rect x="5" y="12" width="14" height="6" rx="3" fill="#36C5F0" /></svg>

  };
  return <span className="brand-mark">{marks[name]}</span>;
};

// === Logos ===
const Logos = () => {
  const logos = [
  'Make', 'n8n', 'Zapier', 'Claude', 'ChatGPT', 'Gemini',
  'Emelia', 'Sales Navigator', 'HubSpot', 'Pipedrive', 'Airtable', 'Calendly',
  'Notion', 'Slack'];

  const all = [...logos, ...logos];
  return (
    <div className="logos-section">
      <div className="logos-title">
        <span className="logos-rule" />
        <span className="logos-eyebrow">L'écosystème no-code · IA · CRM</span>
        <span className="logos-rule" />
      </div>
      <p className="logos-lead">14+ outils intégrés. On branche, on automatise, on livre.</p>
      <div className="logos-wrap">
        <div className="logos-track">
          {all.map((name, i) =>
          <div className="logo-chip" key={i}>
              <BrandMark name={name} />
              <span className="logo-name">{name}</span>
            </div>
          )}
        </div>
      </div>
    </div>);

};

/* === Theme toggle (sun/moon) — visible dans la nav, accessible aux visiteurs === */
const SunIcon = ({ size = 18 }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
    <circle cx="12" cy="12" r="4" />
    <line x1="12" y1="2" x2="12" y2="4" />
    <line x1="12" y1="20" x2="12" y2="22" />
    <line x1="4.93" y1="4.93" x2="6.34" y2="6.34" />
    <line x1="17.66" y1="17.66" x2="19.07" y2="19.07" />
    <line x1="2" y1="12" x2="4" y2="12" />
    <line x1="20" y1="12" x2="22" y2="12" />
    <line x1="4.93" y1="19.07" x2="6.34" y2="17.66" />
    <line x1="17.66" y1="6.34" x2="19.07" y2="4.93" />
  </svg>;

const MoonIcon = ({ size = 18 }) =>
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
    <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
  </svg>;

const ThemeToggle = () => {
  const isLight = typeof document !== 'undefined'
    && document.documentElement.classList.contains('theme-light');

  /* Toggle = persiste en localStorage puis reload. Fait un round-trip propre
   * car le state React de useTweaks (dans app.jsx) se ré-initialise depuis
   * localStorage au mount → tout le sub-tree (incl. <div className=theme-X>)
   * se reconstruit avec le bon thème. Évite la divergence entre html.theme-X
   * et div.theme-X qu'on aurait avec un toggle pur côté DOM. */
  const toggle = () => {
    const next = isLight ? 'violet' : 'light';
    try {
      const stored = JSON.parse(localStorage.getItem('bm-tweaks') || '{}');
      stored.theme = next;
      localStorage.setItem('bm-tweaks', JSON.stringify(stored));
    } catch (e) { /* private mode / disabled storage */ }
    window.location.reload();
  };

  return (
    <button
      className="nav-theme-toggle"
      onClick={toggle}
      aria-label={isLight ? 'Passer en mode sombre' : 'Passer en mode clair'}
      title={isLight ? 'Mode sombre' : 'Mode clair'}
    >
      {isLight ? <MoonIcon /> : <SunIcon />}
    </button>
  );
};

/* === FooterSocials — bloc 3 icônes (LinkedIn, Instagram, Facebook).
 * Utilisé dans footer-min (pages secondaires) et le footer plein de la home
 * via .socials. SVG inline pour éviter une dépendance externe. */
const FooterSocials = ({ className = 'footer-min-socials' }) => (
  <div className={className}>
    <a href="https://www.linkedin.com/company/boom-maker/" target="_blank" rel="noopener noreferrer" aria-label="LinkedIn Boom Maker">
      <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3v9zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z"/></svg>
    </a>
    <a href="http://instagram.com/boommaker.io" target="_blank" rel="noopener noreferrer" aria-label="Instagram Boom Maker">
      <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8"><rect x="3" y="3" width="18" height="18" rx="5" /><circle cx="12" cy="12" r="4" /><circle cx="17.5" cy="6.5" r="1" fill="currentColor" stroke="none" /></svg>
    </a>
    <a href="https://www.facebook.com/share/17XFLCw1Yq/?mibextid=wwXIfr" target="_blank" rel="noopener noreferrer" aria-label="Facebook Boom Maker">
      <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M22 12a10 10 0 10-11.6 9.88V14.9H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.4v6.98A10 10 0 0022 12z"/></svg>
    </a>
  </div>
);

/* === FooterMin — footer enrichi pour toutes les pages secondaires.
 * Logo (retour home) · email · CTA Audit gratuit · review Google · socials · liens légaux · copyright.
 * Centralisé ici pour éviter 8 copies inline. */
const FooterMin = () => (
  <footer className="footer-min">
    <div className="container">
      <div className="footer-min-top">
        <a href="/" className="footer-min-brand" aria-label="Boom Maker — accueil"><Logo /></a>
        <div className="footer-min-actions">
          <a href="mailto:julia@boommaker.io" className="footer-min-email">julia@boommaker.io</a>
          <a href="/audit-gratuit" className="footer-min-cta">Audit gratuit <ArrowUpRight size={12} /></a>
          <a
            href="https://g.page/r/CSoj0to7lhC6EAE/review"
            target="_blank"
            rel="noopener noreferrer"
            className="footer-min-review"
            aria-label="Laisser un avis Google sur Boom Maker"
          >
            <span aria-hidden="true" className="footer-min-review-star">★</span>
            Laisse-nous un avis
          </a>
        </div>
        <FooterSocials />
      </div>
      <div className="footer-min-bottom">
        <span>© 2026 Boom Maker · Tel-Aviv ↔ Paris</span>
        <div className="footer-min-links">
          <a href="/mentions-legales">Mentions légales</a>
          <a href="/cgu">CGU</a>
          <a href="/politique-de-confidentialite">Politique de confidentialité</a>
        </div>
      </div>
    </div>
  </footer>
);

window.BMShared = {
  ArrowUpRight, Check, Spark, Bolt, Brain, Workflow, Target,
  Logo, useReveal, useMouseGlow, HeroCanvas, Marquee, Logos,
  SunIcon, MoonIcon, ThemeToggle, FooterSocials, FooterMin
};