// ─────────────────────────────────────────────────────────────
// Mezoo — Visual simulations
// SVG-based denser-than-placeholder mocks. Each one is a self-contained
// vector composition designed to read as "real activity" without needing
// asset files. Shapes use currentColor / palette tokens so they adapt
// to the active theme (light/dark) and accent intensity automatically.
//
// All sims have a unified frame (corner ticks, top-left mono label,
// top-right tabular tag) so they feel like instruments in the same
// system, regardless of what's inside.
// ─────────────────────────────────────────────────────────────

// ── Frame wrapper ───────────────────────────────────────────────
function MockFrame({ label, tag, ratio = '16 / 9', tone = 'paper', grid = true, children, style }) {
  // tone: 'paper' (--surface) | 'ink' (--fg) | 'plain' (--bg)
  const palette = {
    paper: { bg: 'var(--surface)', fg: 'var(--fg)', line: 'var(--hairline)' },
    ink: { bg: 'var(--fg)', fg: 'var(--bg)', line: 'var(--ink-2)' },
    plain: { bg: 'var(--bg)', fg: 'var(--fg)', line: 'var(--hairline)' },
  }[tone];

  return (
    <div className={`mz-mock ${grid ? 'mz-mock-grid' : ''}`} style={{
      '--mock-ratio': ratio,
      background: palette.bg, color: palette.fg, borderColor: palette.line,
      ...style,
    }}>
      {[
        { top: 10, left: 10, borderTop: '1px solid', borderLeft: '1px solid' },
        { top: 10, right: 10, borderTop: '1px solid', borderRight: '1px solid' },
        { bottom: 10, left: 10, borderBottom: '1px solid', borderLeft: '1px solid' },
        { bottom: 10, right: 10, borderBottom: '1px solid', borderRight: '1px solid' },
      ].map((s, i) => (
        <div key={i} style={{
          position: 'absolute', width: 10, height: 10,
          borderColor: tone === 'ink' ? 'rgba(241,237,230,0.45)' : 'var(--fg-subtle)',
          ...s,
        }} />
      ))}
      {label && <span className="mz-mock-tlabel" style={{ color: tone === 'ink' ? 'rgba(241,237,230,0.55)' : undefined }}>↳ {label}</span>}
      {tag && <span className="mz-mock-trlabel" style={{ color: tone === 'ink' ? 'rgba(241,237,230,0.55)' : undefined }}>{tag}</span>}
      <div style={{ position: 'absolute', inset: 28, display: 'flex' }}>
        {children}
      </div>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// 1. HORTIS ARCHITECTURE — five regional sites → Mezoo platform → outputs
//    Used as the cover capture on the case study page.
// ─────────────────────────────────────────────────────────────
function ArchitectureDiagram() {
  const sites = ['HORTIS · NORD', 'HORTIS · LYON', 'HORTIS · OUEST', 'HORTIS · SUD', 'HORTIS · ALPES'];
  const outputs = [
    { label: 'CATALOGUE B2B', meta: '14 320 réf.' },
    { label: 'TUNNEL B2C', meta: '5 marchés' },
    { label: 'BACK-OFFICE', meta: 'rôles · 6' },
    { label: 'API · ERP', meta: 'temps réel' },
    { label: 'REPORTING', meta: 'hebdo · auto' },
  ];

  return (
    <MockFrame label="Architecture · hortis.fr" tag="MZ-VIS-047 / R1" ratio="16 / 9">
      <svg viewBox="0 0 800 360" preserveAspectRatio="xMidYMid meet"
        style={{ width: '100%', height: '100%' }}>
        <defs>
          <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">
            <path d="M0,0 L10,5 L0,10 L2,5 z" fill="currentColor" />
          </marker>
        </defs>

        {/* Left column — 5 source sites */}
        {sites.map((s, i) => {
          const y = 30 + i * 60;
          return (
            <g key={s}>
              <rect x="20" y={y} width="160" height="44" fill="var(--bg)" stroke="currentColor" strokeWidth="1" />
              <text x="32" y={y + 18} fontFamily="var(--font-mono)" fontSize="9" letterSpacing="1.4" fill="var(--fg-subtle)">SITE_{i + 1}</text>
              <text x="32" y={y + 33} fontFamily="var(--font-display)" fontSize="11" fontWeight="500" letterSpacing="-0.2" fill="currentColor">{s}</text>
              {/* Curve to center */}
              <path d={`M 180 ${y + 22} C 250 ${y + 22}, 280 180, 350 180`}
                fill="none" stroke="var(--accent)" strokeWidth="1.2" opacity="0.7"
                markerEnd="url(#arrow)" style={{ color: 'var(--accent)' }} />
            </g>
          );
        })}

        {/* Center — Mezoo platform */}
        <g>
          <rect x="320" y="130" width="160" height="100" fill="var(--bg)"
            stroke="currentColor" strokeWidth="1.5" />
          {/* Inner sub-cells */}
          <line x1="320" y1="160" x2="480" y2="160" stroke="currentColor" strokeWidth="0.8" opacity="0.3" />
          <line x1="320" y1="200" x2="480" y2="200" stroke="currentColor" strokeWidth="0.8" opacity="0.3" />
          <line x1="400" y1="160" x2="400" y2="230" stroke="currentColor" strokeWidth="0.8" opacity="0.3" />
          <text x="400" y="148" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="9" letterSpacing="1.6" fill="var(--accent)">↳ PLATEFORME UNIFIÉE</text>
          <text x="360" y="180" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="9" fill="currentColor">NEXT 14</text>
          <text x="440" y="180" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="9" fill="currentColor">SANITY</text>
          <text x="360" y="220" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="9" fill="currentColor">POSTGRES</text>
          <text x="440" y="220" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="9" fill="currentColor">STRIPE</text>
          {/* Accent marker */}
          <rect x="468" y="218" width="6" height="6" fill="var(--accent)" />
        </g>

        {/* Right column — outputs */}
        {outputs.map((o, i) => {
          const y = 30 + i * 60;
          return (
            <g key={o.label}>
              <path d={`M 480 180 C 550 180, 580 ${y + 22}, 620 ${y + 22}`}
                fill="none" stroke="currentColor" strokeWidth="1" opacity="0.5" strokeDasharray="3 3"
                markerEnd="url(#arrow)" />
              <rect x="620" y={y} width="160" height="44" fill="var(--bg)" stroke="currentColor" strokeWidth="1" />
              <text x="632" y={y + 18} fontFamily="var(--font-mono)" fontSize="9" letterSpacing="1.4" fill="var(--fg-subtle)">OUT_{i + 1}</text>
              <text x="632" y={y + 33} fontFamily="var(--font-display)" fontSize="11" fontWeight="500" letterSpacing="-0.2" fill="currentColor">{o.label}</text>
              <text x="772" y={y + 33} textAnchor="end" fontFamily="var(--font-mono)" fontSize="8" fill="var(--fg-subtle)">{o.meta}</text>
            </g>
          );
        })}

        {/* Bottom dimensional axis */}
        <g transform="translate(0 340)">
          <line x1="20" y1="0" x2="180" y2="0" stroke="var(--fg-subtle)" strokeWidth="0.6" />
          <line x1="320" y1="0" x2="480" y2="0" stroke="var(--fg-subtle)" strokeWidth="0.6" />
          <line x1="620" y1="0" x2="780" y2="0" stroke="var(--fg-subtle)" strokeWidth="0.6" />
          <text x="100" y="14" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="8" letterSpacing="1.4" fill="var(--fg-subtle)">INPUT — 5 SITES LEGACY</text>
          <text x="400" y="14" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="8" letterSpacing="1.4" fill="var(--fg-subtle)">PROCESS — MEZOO STACK</text>
          <text x="700" y="14" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="8" letterSpacing="1.4" fill="var(--fg-subtle)">OUTPUT — 5 SURFACES</text>
        </g>
      </svg>
    </MockFrame>
  );
}

// ─────────────────────────────────────────────────────────────
// 2. APP DASHBOARD — sparkline + KPI grid + activity log
//    Used inside the case study captures row.
// ─────────────────────────────────────────────────────────────
function AppDashboardMock() {
  return (
    <MockFrame label="App · Tableau de bord" tag="LIVE · 02:14" ratio="4 / 3" grid={false}>
      <div style={{ width: '100%', height: '100%', display: 'flex', flexDirection: 'column', gap: 10, fontFamily: 'var(--font-mono)', fontSize: 9 }}>
        {/* Header tabs */}
        <div style={{ display: 'flex', gap: 12, borderBottom: '1px solid var(--hairline)', paddingBottom: 8 }}>
          {['Performance', 'Sécurité', 'SEO'].map((t, i) => (
            <span key={t} style={{
              padding: '4px 8px',
              background: i === 0 ? 'var(--fg)' : 'transparent',
              color: i === 0 ? 'var(--bg)' : 'var(--fg-muted)',
              letterSpacing: '0.1em', textTransform: 'uppercase',
            }}>{t}</span>
          ))}
          <span style={{ marginLeft: 'auto', color: 'var(--fg-subtle)' }}>30J</span>
        </div>

        {/* KPI strip */}
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 8 }}>
          {[
            ['UPTIME', '99.98', '%'],
            ['TTFB p50', '78', 'ms'],
            ['CVE', '0', 'ouv.'],
          ].map(([k, v, u]) => (
            <div key={k} style={{ padding: 8, border: '1px solid var(--hairline)' }}>
              <div style={{ color: 'var(--fg-subtle)', letterSpacing: '0.1em' }}>{k}</div>
              <div style={{ fontFamily: 'var(--font-display)', fontSize: 22, fontWeight: 500, letterSpacing: '-0.03em', color: 'var(--fg)', marginTop: 2 }}>
                {v}<span style={{ fontSize: 11, color: 'var(--fg-muted)', marginLeft: 2 }}>{u}</span>
              </div>
            </div>
          ))}
        </div>

        {/* Chart */}
        <div style={{ flex: 1, position: 'relative' }}>
          <svg viewBox="0 0 280 80" preserveAspectRatio="none" style={{ width: '100%', height: '100%' }}>
            <defs>
              <linearGradient id="appchart" x1="0" y1="0" x2="0" y2="1">
                <stop offset="0" stopColor="var(--accent)" stopOpacity="0.32" />
                <stop offset="1" stopColor="var(--accent)" stopOpacity="0" />
              </linearGradient>
            </defs>
            {[20, 40, 60].map((y) => (
              <line key={y} x1="0" x2="280" y1={y} y2={y}
                stroke="var(--hairline)" strokeWidth="0.5" strokeDasharray="2 4" />
            ))}
            <path d="M0 50 L20 46 L40 48 L60 40 L80 44 L100 36 L120 38 L140 30 L160 32 L180 26 L200 30 L220 22 L240 26 L260 18 L280 22 L280 80 L0 80 Z" fill="url(#appchart)" />
            <path d="M0 50 L20 46 L40 48 L60 40 L80 44 L100 36 L120 38 L140 30 L160 32 L180 26 L200 30 L220 22 L240 26 L260 18 L280 22" fill="none" stroke="var(--accent)" strokeWidth="1.5" />
            <circle cx="260" cy="18" r="2.5" fill="var(--accent)" />
            <circle cx="260" cy="18" r="5" fill="var(--accent)" fillOpacity="0.25" />
          </svg>
        </div>

        {/* Activity log */}
        <div style={{ display: 'flex', flexDirection: 'column', gap: 4, paddingTop: 6, borderTop: '1px solid var(--hairline)' }}>
          {[
            ['12:04', 'Déploiement', 'prod / v2.4.1', 'var(--signal-ok)'],
            ['11:21', 'Patch sécurité', 'CVE-2026-0188', 'var(--accent)'],
            ['09:58', 'Backup', 'PG · 41 GB', 'var(--fg-subtle)'],
          ].map(([t, k, d, c]) => (
            <div key={t} style={{ display: 'grid', gridTemplateColumns: '40px 10px 1fr auto', gap: 6, alignItems: 'center' }}>
              <span style={{ color: 'var(--fg-subtle)' }}>{t}</span>
              <span style={{ width: 5, height: 5, background: c, borderRadius: 999 }} />
              <span style={{ color: 'var(--fg)' }}>{k}</span>
              <span style={{ color: 'var(--fg-subtle)' }}>{d}</span>
            </div>
          ))}
        </div>
      </div>
    </MockFrame>
  );
}

// ─────────────────────────────────────────────────────────────
// 3. CATALOG GRID — product tiles with mini metadata. Used for the
//    second case-study capture.
// ─────────────────────────────────────────────────────────────
function CatalogGridMock() {
  const products = [
    { name: 'Hêtre commun', sku: 'FAG-040', price: '14,80', stock: 1240 },
    { name: 'Chêne sessile', sku: 'QUE-022', price: '22,40', stock: 480 },
    { name: 'Bouleau verruqueux', sku: 'BET-118', price: '9,60', stock: 2010 },
    { name: 'Charme commun', sku: 'CAR-074', price: '11,20', stock: 765 },
    { name: 'Aulne glutineux', sku: 'ALN-051', price: '13,90', stock: 320 },
    { name: 'Tilleul à grandes feuilles', sku: 'TIL-208', price: '28,00', stock: 90 },
  ];

  return (
    <MockFrame label="App · Catalogue · 14 320 réf." tag="vue: grille" ratio="4 / 3" grid={false}>
      <div style={{ width: '100%', height: '100%', display: 'flex', flexDirection: 'column', gap: 8 }}>
        {/* Search bar */}
        <div style={{
          display: 'flex', alignItems: 'center', gap: 8,
          padding: '6px 10px', border: '1px solid var(--hairline)',
          fontFamily: 'var(--font-mono)', fontSize: 10, color: 'var(--fg-subtle)',
        }}>
          <svg width="11" height="11" viewBox="0 0 11 11" fill="none" stroke="currentColor" strokeWidth="1.4">
            <circle cx="4.5" cy="4.5" r="3.5" /><path d="M7.5 7.5L10 10" />
          </svg>
          <span>↳ rechercher · 14&thinsp;320 réf.</span>
          <span style={{ marginLeft: 'auto' }}>FILTRES · 3</span>
        </div>

        {/* Grid */}
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 6, flex: 1 }}>
          {products.map((p, i) => (
            <div key={p.sku} style={{
              border: '1px solid var(--hairline)',
              padding: 8, display: 'flex', flexDirection: 'column', gap: 4,
              background: i === 0 ? 'var(--brass-tint)' : 'transparent',
            }}>
              <div style={{ aspectRatio: '1', background: 'var(--hairline)', position: 'relative' }}>
                <svg viewBox="0 0 40 40" style={{ width: '100%', height: '100%', opacity: 0.5 }}>
                  <line x1="0" y1="0" x2="40" y2="40" stroke="var(--fg-subtle)" strokeWidth="0.5" />
                  <line x1="40" y1="0" x2="0" y2="40" stroke="var(--fg-subtle)" strokeWidth="0.5" />
                </svg>
                {i === 0 && <span style={{ position: 'absolute', top: 4, left: 4, width: 5, height: 5, background: 'var(--accent)' }} />}
              </div>
              <span style={{ fontSize: 9, fontFamily: 'var(--font-mono)', color: 'var(--fg-subtle)', letterSpacing: '0.06em' }}>{p.sku}</span>
              <span style={{ fontSize: 10, color: 'var(--fg)', fontWeight: 500, lineHeight: 1.2 }}>{p.name}</span>
              <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline', marginTop: 'auto', fontFamily: 'var(--font-mono)', fontSize: 9 }}>
                <span style={{ color: 'var(--fg)' }}>{p.price}€</span>
                <span style={{ color: p.stock > 200 ? 'var(--signal-ok)' : 'var(--accent)' }}>● {p.stock}</span>
              </div>
            </div>
          ))}
        </div>

        <div style={{ display: 'flex', justifyContent: 'space-between', fontFamily: 'var(--font-mono)', fontSize: 9, color: 'var(--fg-subtle)', letterSpacing: '0.06em' }}>
          <span>↳ page 01 / 478</span>
          <span>6 / 14&thinsp;320</span>
        </div>
      </div>
    </MockFrame>
  );
}

// ─────────────────────────────────────────────────────────────
// 4. HERO RADAR — minimal "live mission control" composition used in
//    the home hero right column. Pulses + radial graph.
// ─────────────────────────────────────────────────────────────
function HeroLiveMock() {
  return (
    <MockFrame label="Mezoo · live ops" tag="● 18 SITES SURVEILLÉS" ratio="4 / 5" grid={false}>
      <div style={{ width: '100%', height: '100%', display: 'flex', flexDirection: 'column', gap: 10 }}>
        {/* Radial */}
        <div style={{ flex: 1, position: 'relative' }}>
          <svg viewBox="-50 -50 100 100" style={{ width: '100%', height: '100%' }}>
            {/* Concentric rings */}
            {[12, 24, 36, 48].map((r) => (
              <circle key={r} cx="0" cy="0" r={r}
                fill="none" stroke="var(--hairline)" strokeWidth="0.4"
                strokeDasharray={r === 48 ? '0' : '1 2'} />
            ))}
            {/* Axes */}
            <line x1="-48" y1="0" x2="48" y2="0" stroke="var(--hairline)" strokeWidth="0.3" />
            <line x1="0" y1="-48" x2="0" y2="48" stroke="var(--hairline)" strokeWidth="0.3" />

            {/* Site nodes */}
            {[
              { a: 30, r: 22, n: 'HORTIS' },
              { a: 75, r: 28, n: 'BERGER' },
              { a: 130, r: 18, n: 'CLOS-M.' },
              { a: 180, r: 34, n: 'PARQUET' },
              { a: 225, r: 25, n: 'OURSE-N.' },
              { a: 290, r: 30, n: 'STUDIO-LB' },
              { a: 340, r: 16, n: 'BERG/IO' },
            ].map((p, i) => {
              const x = Math.cos((p.a * Math.PI) / 180) * p.r;
              const y = Math.sin((p.a * Math.PI) / 180) * p.r;
              const active = i === 0;
              return (
                <g key={p.n}>
                  <line x1="0" y1="0" x2={x} y2={y}
                    stroke={active ? 'var(--accent)' : 'var(--fg-subtle)'} strokeWidth="0.3" />
                  <circle cx={x} cy={y} r={active ? 2 : 1.4}
                    fill={active ? 'var(--accent)' : 'var(--fg)'} />
                  {active && (
                    <>
                      <circle cx={x} cy={y} r="4" fill="var(--accent)" fillOpacity="0.25">
                        <animate attributeName="r" values="2;7;2" dur="2.4s" repeatCount="indefinite" />
                        <animate attributeName="fill-opacity" values="0.35;0;0.35" dur="2.4s" repeatCount="indefinite" />
                      </circle>
                    </>
                  )}
                  <text x={x + 2.5} y={y - 2}
                    fontFamily="var(--font-mono)" fontSize="2.8"
                    fill={active ? 'var(--fg)' : 'var(--fg-subtle)'}>{p.n}</text>
                </g>
              );
            })}

            {/* Center mark */}
            <circle cx="0" cy="0" r="3" fill="var(--fg)" />
            <rect x="-0.7" y="-0.7" width="1.4" height="1.4" fill="var(--accent)" />
          </svg>
        </div>

        {/* Stats row */}
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: 6, borderTop: '1px solid var(--hairline)', paddingTop: 8 }}>
          {[
            ['UPTIME · 30J', '99.98%'],
            ['INCIDENTS · 30J', '0'],
            ['CVE OUVERTES', '0'],
            ['DÉPLOIEMENTS', '142'],
          ].map(([k, v]) => (
            <div key={k} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline', fontFamily: 'var(--font-mono)', fontSize: 10 }}>
              <span style={{ color: 'var(--fg-subtle)', letterSpacing: '0.08em' }}>{k}</span>
              <span style={{ color: 'var(--fg)' }}>{v}</span>
            </div>
          ))}
        </div>
      </div>
    </MockFrame>
  );
}

// ─────────────────────────────────────────────────────────────
// 5. PORTFOLIO MINI MOCKS — one per case card. Each is a tiny sim
//    that hints at the project's domain without being literal.
// ─────────────────────────────────────────────────────────────

// 5a · Hortis — collapsed network (5 nodes → 1)
function PieceHortisMock() {
  return (
    <MockFrame label="N°47 · Hortis SA" tag="11J · LH 99" ratio="1 / 1" grid={false}>
      <svg viewBox="0 0 100 100" style={{ width: '100%', height: '100%' }}>
        {[0, 1, 2, 3, 4].map((i) => {
          const y = 10 + i * 18;
          return (
            <g key={i}>
              <rect x="6" y={y} width="22" height="11" fill="none" stroke="var(--fg-subtle)" strokeWidth="0.6" />
              <path d={`M 28 ${y + 5.5} Q 45 ${y + 5.5} 60 50`}
                fill="none" stroke="var(--accent)" strokeWidth="0.5" opacity="0.7" />
            </g>
          );
        })}
        <rect x="60" y="40" width="34" height="20" fill="var(--bg)" stroke="var(--fg)" strokeWidth="1" />
        <rect x="88" y="54" width="4" height="4" fill="var(--accent)" />
        <text x="77" y="52" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="3.5" fill="var(--fg)">PLATFORM</text>
        <text x="77" y="57" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="3" fill="var(--fg-subtle)">NEXT · PG · STRIPE</text>
      </svg>
    </MockFrame>
  );
}

// 5b · Berger & Associés — vault with chain of trust
function PieceBergerMock() {
  return (
    <MockFrame label="N°46 · Berger & Assoc." tag="A+ · ISO 27001" ratio="1 / 1" grid={false}>
      <svg viewBox="0 0 100 100" style={{ width: '100%', height: '100%' }}>
        {/* Vault block */}
        <rect x="32" y="28" width="36" height="44" fill="var(--bg)" stroke="var(--fg)" strokeWidth="1" />
        <line x1="32" y1="40" x2="68" y2="40" stroke="var(--fg)" strokeWidth="0.6" />
        {/* Lock */}
        <rect x="48" y="32" width="4" height="6" fill="var(--accent)" />
        <circle cx="50" cy="36" r="0.8" fill="var(--bg)" />
        {/* Document rows */}
        {[44, 50, 56, 62].map((y, i) => (
          <g key={y}>
            <line x1="38" y1={y} x2={62 - i * 4} y2={y} stroke="var(--fg-muted)" strokeWidth="0.6" />
            <rect x="62 - 4 * i" y={y - 1} width="2" height="2" fill={i === 0 ? 'var(--accent)' : 'var(--fg-subtle)'} />
          </g>
        ))}
        {/* Chain links right */}
        {[20, 35, 50, 65, 80].map((y, i) => (
          <g key={y}>
            <rect x="78" y={y} width="14" height="6" fill="none" stroke={i === 2 ? 'var(--accent)' : 'var(--fg-subtle)'} strokeWidth="0.5" />
            <text x="85" y={y + 4.5} textAnchor="middle" fontFamily="var(--font-mono)" fontSize="3" fill="var(--fg-subtle)">SHA-{i + 1}</text>
          </g>
        ))}
        {/* Chain left */}
        {[20, 35, 50, 65, 80].map((y, i) => (
          <rect key={'L' + y} x="8" y={y} width="14" height="6" fill="none" stroke="var(--fg-subtle)" strokeWidth="0.5" />
        ))}
        <text x="50" y="80" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="3.5" letterSpacing="0.4" fill="var(--fg-subtle)">CHAÎNE DE CONFIANCE</text>
      </svg>
    </MockFrame>
  );
}

// 5c · Clos-Marie — bottle silhouettes + conversion arrow
function PieceClosMarieMock() {
  return (
    <MockFrame label="N°45 · Clos-Marie" tag="×3.2 PANIER" ratio="1 / 1" grid={false}>
      <svg viewBox="0 0 100 100" style={{ width: '100%', height: '100%' }}>
        {/* Bottle silhouettes */}
        {[15, 35, 55, 75].map((x, i) => (
          <g key={x}>
            <path d={`M ${x + 4} 18 L ${x + 4} 24 Q ${x + 4} 26 ${x + 6} 28 L ${x + 12} 38 Q ${x + 14} 42 ${x + 14} 48 L ${x + 14} 72 Q ${x + 14} 76 ${x + 10} 76 L ${x + 4} 76 Q 0 76 0 72 L 0 48 Q 0 42 ${x + 2 - x} 38 L ${x + 8 - x} 28 Q ${x + 10 - x} 26 ${x + 10 - x} 24 L ${x + 10 - x} 18 Z`}
              transform={`translate(${x - 4} 0)`}
              fill={i === 1 ? 'var(--accent)' : 'var(--bg)'}
              stroke="var(--fg)" strokeWidth="0.5"
              opacity={i === 1 ? 0.9 : 1} />
            <text x={x + 3} y="84" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="3" fill="var(--fg-subtle)">N°{i + 1}</text>
          </g>
        ))}
        {/* Conversion curve */}
        <path d="M 6 92 Q 50 92 90 56" fill="none" stroke="var(--accent)" strokeWidth="0.8" />
        <circle cx="6" cy="92" r="1" fill="var(--fg)" />
        <polygon points="88,52 92,56 88,60" fill="var(--accent)" />
        <text x="50" y="98" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="3" letterSpacing="0.3" fill="var(--fg-subtle)">PANIER · MARS → AVRIL</text>
      </svg>
    </MockFrame>
  );
}

// 5d · Parquet & Fils — 3D iso wireframe of a parquet pattern
function PieceParquetMock() {
  return (
    <MockFrame label="N°44 · Parquet & Fils" tag="DEVIS ×7" ratio="1 / 1" grid={false}>
      <svg viewBox="0 0 100 100" style={{ width: '100%', height: '100%' }}>
        {/* Iso planks: rhombus tiles */}
        <g stroke="var(--fg)" strokeWidth="0.5" fill="none">
          {[0, 1, 2, 3].map((row) =>
            [0, 1, 2, 3].map((col) => {
              const cx = 16 + col * 18 + (row % 2 ? 9 : 0);
              const cy = 24 + row * 14;
              return (
                <polygon key={`${row}-${col}`}
                  points={`${cx},${cy - 6} ${cx + 14},${cy} ${cx},${cy + 6} ${cx - 14},${cy}`}
                  fill={row === 1 && col === 2 ? 'var(--accent)' : 'transparent'}
                  fillOpacity={row === 1 && col === 2 ? 0.3 : 0}
                  stroke="var(--fg)" strokeWidth="0.4" />
              );
            })
          )}
        </g>
        {/* Dimension callouts */}
        <line x1="6" y1="86" x2="36" y2="86" stroke="var(--fg-subtle)" strokeWidth="0.4" />
        <line x1="6" y1="84" x2="6" y2="88" stroke="var(--fg-subtle)" strokeWidth="0.4" />
        <line x1="36" y1="84" x2="36" y2="88" stroke="var(--fg-subtle)" strokeWidth="0.4" />
        <text x="21" y="93" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="3" fill="var(--fg-subtle)">L · 1200mm</text>
        <text x="78" y="93" textAnchor="middle" fontFamily="var(--font-mono)" fontSize="3" fill="var(--accent)">DEVIS · 28&thinsp;sec</text>
      </svg>
    </MockFrame>
  );
}

Object.assign(window, {
  MockFrame,
  ArchitectureDiagram, AppDashboardMock, CatalogGridMock, HeroLiveMock,
  PieceHortisMock, PieceBergerMock, PieceClosMarieMock, PieceParquetMock,
});
