const { useEffect } = React; const ACCENT_PALETTES = [ { name: 'Bleu électrique', accent: '#4a6cf7', glow: '74,108,247' }, { name: 'Cyan halo', accent: '#22b8ff', glow: '34,184,255' }, { name: 'Violet aurore', accent: '#8a5cff', glow: '138,92,255' }, { name: 'Vert tropical', accent: '#2acc6d', glow: '42,204,109' }, ]; function VGNTweaks() { const defaults = window.__VGN_TWEAK_DEFAULTS__; const [t, setTweak] = useTweaks(defaults); useEffect(() => { window.__VGN_APPLY_TWEAKS__(t); }, [t]); const currentPaletteIndex = Math.max(0, ACCENT_PALETTES.findIndex(p => p.accent.toLowerCase() === (t.accent || '').toLowerCase())); return ( {ACCENT_PALETTES.map((p, i) => { const active = i === currentPaletteIndex; return ( setTweak({ accent: p.accent, accentGlow: p.glow })} title={p.name} style={{ position: 'relative', aspectRatio: '1 / 1', borderRadius: 12, border: active ? `2px solid ${p.accent}` : '1px solid rgba(255,255,255,0.12)', background: `linear-gradient(180deg, ${p.accent}, ${p.accent}55)`, cursor: 'pointer', boxShadow: active ? `0 0 0 4px ${p.accent}33, 0 12px 30px -10px ${p.accent}88` : 'none', padding: 0, }} /> ); })} {ACCENT_PALETTES[currentPaletteIndex]?.name || 'Custom'} setTweak('showGlow', v)} /> setTweak('showGrid', v)} /> ); } const root = document.createElement('div'); document.body.appendChild(root); ReactDOM.createRoot(root).render();