// 228 FILMS · Hero
// Adapté du proto ACADEMY V1 (sceau monumental + triplet + signature + tuiles).
// Sceau monumental remplacé par DRONE vue de dessus (mirror box 3 groupe228.com,
// en version monumentale). Reste : grammaire ACADEMY préservée.
//
// Composition :
//  · stage flex (max 1400, padding 6rem 5rem 4rem)
//  · drone monumental absolu (820×820, right -10rem top 1rem)
//  · signature trait + label JetBrains Mono bronze · « Architecture cinématique »
//  · triplet Inter 500 clamp(56px, 9.2vw, 132px), rise word animation
//  · sous-paragraphe Inter 300 max 620, fade-up
//  · cta-block : primary noir + 2 tertiary
//  · grille 3 tuiles univers (Entreprises / Immobilier / Drone FPV)

function Hero() {
  const tr = useTr();
  const { t: tw } = useTweaksLive();
  return (
    <section id="top" style={{
      position: 'relative',
      minHeight: '100vh',
      padding: 'clamp(5rem, 8vh, 6rem) clamp(1.5rem, 5vw, 5rem) 4rem',
      maxWidth: 1400, margin: '0 auto',
      display: 'flex', flexDirection: 'column',
    }}>
      <HeroDroneMonumental />

      <Signature />
      <Triplet />
      <SubParagraph />
      <CtaBlock />
      <Tiles tw={tw} />

      {/* Styles spécifiques hero (responsive drone monumental + hover tuiles + rotors) */}
      <style>{`
        .hero-drone { width: 820px; height: 820px; right: -10rem; top: 1rem; }
        @media (max-width: 1400px) { .hero-drone { width: 700px; height: 700px; right: -7rem; top: 2rem; } }
        @media (max-width: 1100px) { .hero-drone { width: 540px; height: 540px; right: -4rem; top: 3rem; } }
        @media (max-width: 720px)  { .hero-drone { width: 360px; height: 360px; right: -3rem; top: 4rem; animation: fade-in-mobile 1.8s ease-out .5s forwards !important; } }
        .triplet-line .word {
          display: inline-block; opacity: 0;
          transform: translateY(110%);
          animation: rise 1.0s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }
        .triplet-line.l1 .word { animation-delay: 0.7s; }
        .triplet-line.l2 .word { animation-delay: 0.9s; }
        .triplet-line.l3 .word { animation-delay: 1.1s; }
        @media (max-width: 1100px) { .tiles-grid { grid-template-columns: repeat(3, 1fr) !important; } }
        @media (max-width: 720px)  { .tiles-grid { grid-template-columns: 1fr !important; } }

        /* Tile hover · accent bronze pulse */
        .tile-card.is-hover .tile-accent {
          animation: tile-accent-pulse 1.8s cubic-bezier(.4,0,.6,1) infinite;
          transform-box: fill-box;
          transform-origin: center;
        }
        @keyframes tile-accent-pulse {
          0%, 100% { opacity: 1; transform: scale(1); }
          50%      { opacity: 0.55; transform: scale(1.30); }
        }
        /* Subtle bg shift on hover · texture warm */
        .tile-card.is-hover {
          background: linear-gradient(180deg, var(--bg-paper) 0%, var(--bg) 100%) !important;
        }

        /* Drone rotors · spin */
        .drone-rotor-cw  { animation: drone-rotor-spin 1.6s linear infinite; transform-box: fill-box; transform-origin: center; }
        .drone-rotor-ccw { animation: drone-rotor-spin 1.6s linear infinite reverse; transform-box: fill-box; transform-origin: center; }
        @keyframes drone-rotor-spin { from{transform:rotate(0)} to{transform:rotate(360deg)} }
        /* Drone body · oscillation hover */
        .drone-body { animation: drone-hover-osc 4s cubic-bezier(.4,0,.6,1) infinite; transform-box: fill-box; transform-origin: center; }
        @keyframes drone-hover-osc { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
        /* Drone eye · pulse */
        .drone-eye { animation: drone-eye-pulse 2.4s cubic-bezier(.4,0,.6,1) infinite; transform-box: fill-box; transform-origin: center; }
        @keyframes drone-eye-pulse { 0%,100%{opacity:.55; transform:scale(1)} 50%{opacity:.95; transform:scale(1.25)} }
      `}</style>
    </section>
  );
}

// ─────────────────────────────────────────────────────────────
// Drone monumental · vue de dessus
// Bras croisés + corps central tourné 45° + œil caméra + 4 rotors animés
// + cible/réticule subtile en arrière-plan + 4 cardinaux signature.
// Mirror géométrie box 3 groupe228.com (200x200) portée en 460x460 monumental.
// ─────────────────────────────────────────────────────────────
function HeroDroneMonumental() {
  const ref = React.useRef(null);
  React.useEffect(() => {
    const el = ref.current; if (!el) return;
    if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
    let raf;
    const update = () => {
      const y = window.scrollY;
      const drift = Math.min(80, y * 0.12);
      el.style.transform = `translate3d(0, ${drift}px, 0)`;
      raf = null;
    };
    const onScroll = () => { if (!raf) raf = requestAnimationFrame(update); };
    update();
    window.addEventListener('scroll', onScroll, { passive: true });
    return () => {
      window.removeEventListener('scroll', onScroll);
      if (raf) cancelAnimationFrame(raf);
    };
  }, []);
  return (
    <div ref={ref} className="hero-drone" aria-hidden="true" style={{
      position: 'absolute',
      pointerEvents: 'none',
      opacity: 0,
      animation: 'fade-in 1.8s ease-out .5s forwards',
      zIndex: 0,
      willChange: 'transform',
    }}>
      <svg viewBox="0 0 460 460" preserveAspectRatio="xMidYMid meet" style={{ width: '100%', height: '100%', display: 'block' }}>
        {/* Axes croisés subtils */}
        <line x1="230" y1="20"  x2="230" y2="440" stroke="var(--bronze)" strokeWidth="0.4" opacity="0.10" strokeDasharray="2 8"/>
        <line x1="20"  y1="230" x2="440" y2="230" stroke="var(--bronze)" strokeWidth="0.4" opacity="0.10" strokeDasharray="2 8"/>

        {/* Réticule arrière-plan · cible drone vue dessus */}
        <circle cx="230" cy="230" r="200" fill="none" stroke="var(--bronze)" strokeWidth="0.6" opacity="0.18" strokeDasharray="2 6"/>
        <circle cx="230" cy="230" r="130" fill="none" stroke="var(--bronze)" strokeWidth="0.5" opacity="0.22"/>

        {/* 4 cardinaux signature · marques de viseur */}
        <line x1="230" y1="36"  x2="230" y2="74"  stroke="var(--bronze)" strokeWidth="0.8" opacity="0.50"/>
        <line x1="230" y1="386" x2="230" y2="424" stroke="var(--bronze)" strokeWidth="0.8" opacity="0.50"/>
        <line x1="36"  y1="230" x2="74"  y2="230" stroke="var(--bronze)" strokeWidth="0.8" opacity="0.50"/>
        <line x1="386" y1="230" x2="424" y2="230" stroke="var(--bronze)" strokeWidth="0.8" opacity="0.50"/>

        {/* DRONE · groupe oscillation hover */}
        <g className="drone-body">
          {/* Bras croisés · structure principale */}
          <line x1="106" y1="106" x2="354" y2="354" stroke="var(--bronze)" strokeWidth="2.4" opacity="0.85" strokeLinecap="round"/>
          <line x1="354" y1="106" x2="106" y2="354" stroke="var(--bronze)" strokeWidth="2.4" opacity="0.85" strokeLinecap="round"/>

          {/* Corps central · carré tourné 45° */}
          <rect x="194" y="194" width="72" height="72" rx="4" fill="var(--bg-paper)" stroke="var(--bronze)" strokeWidth="1.6" transform="rotate(45 230 230)"/>

          {/* Œil caméra · cercle plein + viseur extérieur pulse */}
          <circle cx="230" cy="230" r="8"  fill="var(--bronze)"/>
          <circle className="drone-eye" cx="230" cy="230" r="16" fill="none" stroke="var(--bronze)" strokeWidth="0.8" opacity="0.55"/>

          {/* Rotor TL (106,106) · spin clockwise */}
          <g>
            <circle cx="106" cy="106" r="32" fill="var(--bg)" stroke="var(--bronze)" strokeWidth="1.4" opacity="0.85"/>
            <g className="drone-rotor-cw" style={{ transformOrigin: '106px 106px' }}>
              <line x1="78"  y1="106" x2="134" y2="106" stroke="var(--bronze)" strokeWidth="1.8" strokeLinecap="round"/>
              <line x1="106" y1="78"  x2="106" y2="134" stroke="var(--bronze)" strokeWidth="1.8" strokeLinecap="round" opacity="0.55"/>
            </g>
            <circle cx="106" cy="106" r="3.5" fill="var(--bronze)"/>
          </g>
          {/* Rotor TR (354,106) · spin counter-clockwise */}
          <g>
            <circle cx="354" cy="106" r="32" fill="var(--bg)" stroke="var(--bronze)" strokeWidth="1.4" opacity="0.85"/>
            <g className="drone-rotor-ccw" style={{ transformOrigin: '354px 106px' }}>
              <line x1="326" y1="106" x2="382" y2="106" stroke="var(--bronze)" strokeWidth="1.8" strokeLinecap="round"/>
              <line x1="354" y1="78"  x2="354" y2="134" stroke="var(--bronze)" strokeWidth="1.8" strokeLinecap="round" opacity="0.55"/>
            </g>
            <circle cx="354" cy="106" r="3.5" fill="var(--bronze)"/>
          </g>
          {/* Rotor BR (354,354) · spin clockwise */}
          <g>
            <circle cx="354" cy="354" r="32" fill="var(--bg)" stroke="var(--bronze)" strokeWidth="1.4" opacity="0.85"/>
            <g className="drone-rotor-cw" style={{ transformOrigin: '354px 354px' }}>
              <line x1="326" y1="354" x2="382" y2="354" stroke="var(--bronze)" strokeWidth="1.8" strokeLinecap="round"/>
              <line x1="354" y1="326" x2="354" y2="382" stroke="var(--bronze)" strokeWidth="1.8" strokeLinecap="round" opacity="0.55"/>
            </g>
            <circle cx="354" cy="354" r="3.5" fill="var(--bronze)"/>
          </g>
          {/* Rotor BL (106,354) · spin counter-clockwise */}
          <g>
            <circle cx="106" cy="354" r="32" fill="var(--bg)" stroke="var(--bronze)" strokeWidth="1.4" opacity="0.85"/>
            <g className="drone-rotor-ccw" style={{ transformOrigin: '106px 354px' }}>
              <line x1="78"  y1="354" x2="134" y2="354" stroke="var(--bronze)" strokeWidth="1.8" strokeLinecap="round"/>
              <line x1="106" y1="326" x2="106" y2="382" stroke="var(--bronze)" strokeWidth="1.8" strokeLinecap="round" opacity="0.55"/>
            </g>
            <circle cx="106" cy="354" r="3.5" fill="var(--bronze)"/>
          </g>
        </g>
      </svg>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// Signature kicker · trait bronze + label JetBrains Mono · « Architecture cinématique »
// ─────────────────────────────────────────────────────────────
function Signature() {
  return (
    <div style={{
      position: 'relative', zIndex: 2,
      display: 'flex', alignItems: 'center', gap: '0.9rem',
      marginTop: '4rem', marginBottom: '1.8rem',
      opacity: 0, animation: 'fade-up .7s ease-out .5s forwards',
    }}>
      <span style={{ width: 40, height: 1, background: TOK.bronze }} />
      <span style={{
        fontFamily: TOK.mono, fontSize: '0.7rem',
        letterSpacing: '0.22em', textTransform: 'uppercase',
        color: TOK.bronze, fontWeight: 500,
      }}>
        <span className="fr">Architecture cinématique</span>
        <span className="en">Cinematic architecture</span>
      </span>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// Triplet · Élever. Créer. Délivrer. · Inter 500
// Points noirs intouchables (verrou). Rise word animation décalée.
// NOTE : 3e mot placeholder (à locker — alternatives en discussion).
// ─────────────────────────────────────────────────────────────
function Triplet() {
  const lines = [
    { fr: 'Élever.',   en: 'Elevate.' },
    { fr: 'Créer.',    en: 'Create.'  },
    { fr: 'Livrer.',   en: 'Deliver.' },
  ];
  return (
    <div style={{ position: 'relative', zIndex: 2, maxWidth: 880 }}>
      {lines.map((line, i) => (
        <div key={i} className={`triplet-line l${i + 1}`} style={{
          fontFamily: TOK.sans, fontWeight: 500,
          fontSize: 'clamp(3.5rem, 9.2vw, 8.25rem)',
          lineHeight: 0.96, letterSpacing: '-0.04em',
          color: TOK.ink, overflow: 'hidden',
        }}>
          <span className="word">
            <span className="fr">{line.fr}</span>
            <span className="en">{line.en}</span>
          </span>
        </div>
      ))}
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// Sous-paragraphe · voix v16 diapason
// Pattern : Nous + action + pour vous + bénéfice humain
// ─────────────────────────────────────────────────────────────
function SubParagraph() {
  return (
    <p style={{
      position: 'relative', zIndex: 2,
      fontFamily: TOK.sans, fontWeight: 300,
      fontSize: '1.125rem', lineHeight: 1.55,
      color: TOK.inkMed, maxWidth: 620,
      marginTop: '2.2rem',
      opacity: 0, animation: 'fade-up 1s ease-out 1.7s forwards',
    }}>
      <span className="fr">Nous concevons et réalisons vos films, du tournage classique au drone FPV, pour vous donner des images qui élèvent vos lieux, vos marques et vos œuvres.</span>
      <span className="en">We design and shoot your films, from classic filming to FPV drone, so you get images that elevate your places, your brands and your work.</span>
    </p>
  );
}

// ─────────────────────────────────────────────────────────────
// CTA block · primary noir (Voir les mandats)
// + 2 tertiary (Parcours immobilier · Cadrage en 5 questions)
// ─────────────────────────────────────────────────────────────
function CtaBlock() {
  return (
    <div style={{
      position: 'relative', zIndex: 2,
      marginTop: '2.4rem',
      opacity: 0, animation: 'fade-up 1s ease-out 2.0s forwards',
    }}>
      <div style={{ display: 'inline-flex', alignItems: 'center', gap: 18, flexWrap: 'wrap' }}>
        <PrimaryCTA />
        <CtaMeta />
      </div>
      <div style={{ display: 'flex', gap: 36, marginTop: 26, flexWrap: 'wrap' }}>
        <TertiaryCTA target="immobilier">
          <span className="fr">Immobilier &amp; architecture</span>
          <span className="en">Real estate &amp; architecture</span>
        </TertiaryCTA>
        <TertiaryCTA target="contact">
          <span className="fr">Demander une soumission</span>
          <span className="en">Request a quote</span>
        </TertiaryCTA>
      </div>
    </div>
  );
}

function PrimaryCTA() {
  const [hover, setHover] = React.useState(false);
  return (
    <a
      href="#mandats"
      onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}
      style={{
        background: TOK.ink, color: TOK.ivory,
        border: 0, padding: '15px 28px 15px 26px', borderRadius: 999,
        fontFamily: TOK.sans, fontSize: 15, fontWeight: 500,
        letterSpacing: '0.005em', cursor: 'pointer', textDecoration: 'none',
        display: 'inline-flex', alignItems: 'center', gap: 12,
        boxShadow: hover
          ? '0 14px 38px rgba(0,0,0,0.18), 0 0 0 6px rgba(139,111,31,0.18)'
          : '0 1px 0 rgba(0,0,0,0.04), 0 6px 22px rgba(0,0,0,0.10)',
        transition: 'box-shadow .25s, transform .25s',
      }}>
      <span className="fr">Voir les mandats</span>
      <span className="en">See the engagements</span>
      <span style={{
        color: TOK.aurum, display: 'inline-block',
        transform: hover ? 'translateX(4px)' : 'translateX(0)',
        transition: 'transform .25s',
      }}>→</span>
    </a>
  );
}

function CtaMeta() {
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
      <span style={metaStyle}><span className="fr">Mandats récurrents</span><span className="en">Recurring engagements</span></span>
      <span style={metaStyle}><span className="fr">Trimestriel</span><span className="en">Quarterly</span></span>
      <span style={metaStyle}>FR + EN</span>
    </div>
  );
}
const metaStyle = {
  fontFamily: TOK.mono, fontSize: 11,
  letterSpacing: '0.14em', color: TOK.inkMed,
  textTransform: 'uppercase',
};

function TertiaryCTA({ children, target }) {
  const [hover, setHover] = React.useState(false);
  return (
    <a
      href={`#${target}`}
      onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}
      style={{
        background: 'transparent', border: 0, cursor: 'pointer', textDecoration: 'none',
        display: 'inline-flex', alignItems: 'center', gap: 8,
        fontFamily: TOK.sans, fontSize: 14, fontWeight: 500, color: TOK.ink,
        borderBottom: `1px solid ${hover ? TOK.bronze : TOK.ink22}`,
        padding: '0 0 4px 0', transition: 'border-color .2s',
      }}>
      {children}
      <span style={{
        color: TOK.bronze, display: 'inline-block',
        transform: hover ? 'translateX(3px)' : 'translateX(0)',
        transition: 'transform .2s',
      }}>→</span>
    </a>
  );
}

// ─────────────────────────────────────────────────────────────
// 3 tiles · univers FILMS · libellés verrou
// ─────────────────────────────────────────────────────────────
function Tiles({ tw }) {
  const tiles = [
    {
      id: 'mandats', state: 'ouvert',
      name: { fr: 'mandats récurrents', en: 'recurring engagements' },
      stateLabel: { fr: 'entreprises · trimestriel', en: 'companies · quarterly' },
      Icon: IconMandats,
    },
    {
      id: 'immobilier', state: 'ouvert',
      name: { fr: 'immobilier & architecture', en: 'real estate & architecture' },
      stateLabel: { fr: 'agents et architectes', en: 'agents and architects' },
      Icon: IconImmobilier,
    },
    {
      id: 'drone', state: 'ouvert',
      href: '#contact',
      name: { fr: 'drone cinématique et FPV', en: 'cinematic and FPV drone' },
      stateLabel: { fr: 'sur demande', en: 'on request' },
      Icon: IconDroneFPV,
    },
  ];
  return (
    <div className="tiles-grid" style={{
      position: 'relative', zIndex: 2,
      display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)',
      gap: 14, marginTop: '4.5rem',
      opacity: 0, animation: 'fade-up 1s ease-out 2.3s forwards',
    }}>
      {tiles.map((t) => <Tile key={t.id} tile={t} tw={tw} />)}
    </div>
  );
}

function Tile({ tile, tw }) {
  const [hover, setHover] = React.useState(false);
  const ouvert = tile.state === 'ouvert';
  const Wrapper = ouvert ? 'a' : 'div';
  const href = tile.href || `#${tile.id}`;
  const wrapperProps = ouvert
    ? { href, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false) }
    : {};
  const nameFamily = tw.tileNameFamily === 'garamond' ? TOK.garamond : TOK.sans;
  const nameWeight = tw.tileNameFamily === 'garamond' ? 500 : 300;
  return (
    <Wrapper {...wrapperProps} className={`tile-card ${ouvert ? 'is-ouvert' : 'is-avenir'} ${hover && ouvert ? 'is-hover' : ''}`}
      style={{
        all: 'unset', cursor: ouvert ? 'pointer' : 'default',
        position: 'relative', overflow: 'hidden',
        border: `1px solid ${hover && ouvert ? TOK.bronze : (ouvert ? TOK.tileBOuv : TOK.tileB)}`,
        background: TOK.paper,
        padding: '44px 22px 26px', borderRadius: 4,
        display: 'flex', flexDirection: 'column',
        alignItems: 'center', textAlign: 'center', gap: 16,
        transition: 'border-color .3s cubic-bezier(.2,.7,.2,1), background .3s, transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s',
        minHeight: 260,
        transform: hover && ouvert ? 'translateY(-3px)' : 'translateY(0)',
        boxShadow: hover && ouvert
          ? '0 1px 0 rgba(10,10,10,.04), 0 24px 48px rgba(10,10,10,.10), 0 0 0 1px rgba(139,111,31,.08)'
          : '0 1px 0 rgba(10,10,10,.03)',
        opacity: ouvert ? 1 : 0.55,
      }}>

      {/* Marque d'angle bronze top-right */}
      {ouvert && (
        <div aria-hidden="true" style={{ position: 'absolute', top: 0, right: 0, width: 14, height: 14, pointerEvents: 'none' }}>
          <div style={{ position: 'absolute', top: 0, right: 0, width: 14, height: 1, background: TOK.bronze }} />
          <div style={{ position: 'absolute', top: 0, right: 0, width: 1, height: 14, background: TOK.bronze }} />
        </div>
      )}

      <div className="tile-icon-wrap" style={{
        transition: 'transform .35s cubic-bezier(.2,.7,.2,1)',
        transform: hover && ouvert ? 'scale(1.06)' : 'scale(1)',
      }}>
        <tile.Icon />
      </div>
      <span style={{
        fontFamily: nameFamily, fontStyle: 'normal',
        fontWeight: nameWeight, fontSize: '1.25rem',
        color: TOK.ink, lineHeight: 1.2, letterSpacing: '-0.012em',
        transition: 'color .25s',
      }}>
        <span className="fr">{tile.name.fr}</span>
        <span className="en">{tile.name.en}</span>
      </span>
      <span style={{
        fontFamily: TOK.mono, fontSize: '0.55rem',
        letterSpacing: '0.18em', color: ouvert ? TOK.bronze : TOK.gris,
        textTransform: 'uppercase', marginTop: 'auto', paddingTop: 10,
        fontWeight: ouvert ? 500 : 400,
      }}>
        <span className="fr">{tile.stateLabel.fr}</span>
        <span className="en">{tile.stateLabel.en}</span>
      </span>
    </Wrapper>
  );
}

// ─────────────────────────────────────────────────────────────
// Tile icons · 3 univers FILMS (88px, color: currentColor = bronze)
// ─────────────────────────────────────────────────────────────
const iconStyle = { width: 88, height: 88, color: 'var(--bronze)', display: 'block', marginBottom: 6 };

function IconMandats() {
  // Lemniscate (signe d'infini ∞) · cadence récurrente sans fin.
  // Clin d'œil 228 : le 8 couché = ∞. Point central accent (bronze pulse au hover).
  return (
    <svg style={iconStyle} viewBox="0 0 64 64" fill="none" aria-hidden="true">
      {/* ∞ · 2 boucles Bézier symétriques qui se croisent au centre */}
      <path d="M 32 32 C 36 18, 56 18, 56 32 C 56 46, 36 46, 32 32 C 28 18, 8 18, 8 32 C 8 46, 28 46, 32 32 Z"
        stroke="currentColor" strokeWidth="1.8" fill="none"
        strokeLinecap="round" strokeLinejoin="round"/>
      {/* Point central · accent bronze pulse au hover (croisement du 8) */}
      <circle className="tile-accent" cx="32" cy="32" r="2.6" fill="currentColor"/>
    </svg>
  );
}

function IconImmobilier() {
  // Toit pignon + façade simple · trait architectural. Lit comme bâtiment/lieu.
  return (
    <svg style={iconStyle} viewBox="0 0 64 64" fill="none" aria-hidden="true">
      <path d="M 10 30 L 32 12 L 54 30" stroke="currentColor" strokeWidth="1.6" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
      <rect x="14" y="30" width="36" height="22" stroke="currentColor" strokeWidth="1.4" fill="none"/>
      <rect x="28" y="38" width="8" height="14" stroke="currentColor" strokeWidth="1.0" fill="none" opacity="0.65"/>
      <rect x="19" y="35" width="5" height="5" stroke="currentColor" strokeWidth="0.8" fill="none" opacity="0.55"/>
      <rect x="40" y="35" width="5" height="5" stroke="currentColor" strokeWidth="0.8" fill="none" opacity="0.55"/>
      <circle className="tile-accent" cx="44" cy="22" r="2.2" fill="currentColor"/>
      <line x1="8" y1="52" x2="56" y2="52" stroke="currentColor" strokeWidth="0.8" opacity="0.40"/>
    </svg>
  );
}

function IconDroneFPV() {
  // Drone vue de dessus minimaliste · mirror box 3 groupe228.com.
  return (
    <svg style={iconStyle} viewBox="0 0 64 64" fill="none" aria-hidden="true">
      <line x1="16" y1="16" x2="48" y2="48" stroke="currentColor" strokeWidth="1.4" opacity="0.85" strokeLinecap="round"/>
      <line x1="48" y1="16" x2="16" y2="48" stroke="currentColor" strokeWidth="1.4" opacity="0.85" strokeLinecap="round"/>
      <rect x="27" y="27" width="10" height="10" rx="1.4" stroke="currentColor" strokeWidth="1.2" fill="none" transform="rotate(45 32 32)"/>
      <circle cx="32" cy="32" r="2.2" fill="currentColor"/>
      <circle className="tile-accent" cx="32" cy="32" r="4" stroke="currentColor" strokeWidth="0.6" fill="none" opacity="0.55"/>
      <circle cx="16" cy="16" r="5"  stroke="currentColor" strokeWidth="1.0" fill="none" opacity="0.85"/>
      <circle cx="48" cy="16" r="5"  stroke="currentColor" strokeWidth="1.0" fill="none" opacity="0.85"/>
      <circle cx="48" cy="48" r="5"  stroke="currentColor" strokeWidth="1.0" fill="none" opacity="0.85"/>
      <circle cx="16" cy="48" r="5"  stroke="currentColor" strokeWidth="1.0" fill="none" opacity="0.85"/>
      <circle cx="16" cy="16" r="1.2" fill="currentColor"/>
      <circle cx="48" cy="16" r="1.2" fill="currentColor"/>
      <circle cx="48" cy="48" r="1.2" fill="currentColor"/>
      <circle cx="16" cy="48" r="1.2" fill="currentColor"/>
    </svg>
  );
}

// ─────────────────────────────────────────────────────────────
// Section « Architecture cinématique »
// Manifeste de la philosophie 228 FILMS · placée sur home après Hero.
// Kicker + H2 + lead + 3 piliers (Cadrage / Captation / Finition).
// ─────────────────────────────────────────────────────────────
function ArchitectureCinema() {
  const tr = useTr();
  const { isMobile } = useViewport();
  const piliers = [
    {
      n: '01',
      title: { fr: 'Pré-production', en: 'Pre-production' },
      body: {
        fr: 'Le projet, l\'usage final, le budget. Nous écoutons avant de filmer.',
        en: 'The project, the final use, the budget. We listen before we shoot.',
      },
    },
    {
      n: '02',
      title: { fr: 'Captation', en: 'Capture' },
      body: {
        fr: 'Tournage classique, drone, FPV. Nous adaptons l\'outil à l\'intention.',
        en: 'Classic filming, drone, FPV. We match the tool to the intent.',
      },
    },
    {
      n: '03',
      title: { fr: 'Finition',  en: 'Finishing' },
      body: {
        fr: 'Montage et étalonnage. Nous tenons l\'image jusqu\'au rendu final.',
        en: 'Edit and color. We hold the image all the way to the final delivery.',
      },
    },
  ];
  return (
    <section id="architecture" style={{
      position: 'relative',
      paddingTop: isMobile ? 100 : 140, paddingBottom: isMobile ? 80 : 140,
      background: TOK.ivory,
    }}>
      <Container>
        <div style={{
          display: 'grid', gridTemplateColumns: isMobile ? '1fr' : '1.2fr 1fr',
          gap: isMobile ? 48 : 80, alignItems: 'start',
        }}>
          <div>
            <Reveal>
              <Kicker style={{ marginBottom: 22 }}>{tr({ fr: 'Architecture cinématique', en: 'Cinematic architecture' })}</Kicker>
            </Reveal>
            <Reveal delay={1}>
              <h2 style={{
                margin: 0, fontFamily: TOK.sans, fontWeight: 500,
                fontSize: 'clamp(40px, 5vw, 68px)',
                lineHeight: 1.04, letterSpacing: '-0.025em',
                color: TOK.ink, textWrap: 'balance',
              }}>
                {tr({
                  fr: 'L\'intention\navant l\'image.',
                  en: 'Intent\nbefore image.',
                }).split('\n').map((line, i) => <div key={i}>{line}</div>)}
              </h2>
            </Reveal>
            <Reveal delay={2}>
              <p style={{
                margin: 0, marginTop: 32, maxWidth: 540,
                fontFamily: TOK.sans, fontSize: 16, lineHeight: 1.6,
                color: TOK.ink70,
              }}>
                {tr({
                  fr: 'Nous tenons l\'intention du projet, du repérage au rendu final, pour vous donner des images qui distinguent vos lieux, vos marques et vos œuvres.',
                  en: 'We hold the intent of the project, from scouting to final delivery, to give you images that set your places, your brands and your work apart.',
                })}
              </p>
            </Reveal>
          </div>

          {/* Diagramme · 3 piliers verticaux */}
          <Reveal delay={2}>
            <div style={{
              background: TOK.paper, border: `1px solid ${TOK.ink10}`,
              padding: '40px 36px 36px', position: 'relative',
            }}>
              <div style={{ position: 'absolute', top: 0, right: 0, width: 80, height: 80, pointerEvents: 'none' }}>
                <div style={{ position: 'absolute', top: 0, right: 0, width: 14, height: 1, background: TOK.bronze }} />
                <div style={{ position: 'absolute', top: 0, right: 0, width: 1, height: 14, background: TOK.bronze }} />
              </div>
              <Kicker style={{ marginBottom: 24 }}>{tr({ fr: 'Trois temps', en: 'Three moments' })}</Kicker>
              <ol style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 22 }}>
                {piliers.map((p, i) => (
                  <li key={i} style={{
                    display: 'grid', gridTemplateColumns: '46px 1fr', gap: 16, alignItems: 'flex-start',
                  }}>
                    <div style={{
                      fontFamily: TOK.mono, fontSize: 13, fontWeight: 500,
                      letterSpacing: '.16em', color: TOK.bronze, paddingTop: 2,
                    }}>{p.n}</div>
                    <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
                      <span style={{
                        fontFamily: TOK.sans, fontWeight: 500, fontSize: 18,
                        color: TOK.ink, letterSpacing: '-0.012em',
                      }}>{tr(p.title)}</span>
                      <span style={{
                        fontFamily: TOK.sans, fontSize: 14, lineHeight: 1.55, color: TOK.inkMed,
                      }}>{tr(p.body)}</span>
                    </div>
                  </li>
                ))}
              </ol>
            </div>
          </Reveal>
        </div>
      </Container>
    </section>
  );
}

Object.assign(window, { Hero, ArchitectureCinema });
