document.addEventListener('DOMContentLoaded', function() { // Current active module let activeModule = 'generation'; const modules = [ { id: 'generation', name: 'Génération Rapide', icon: '⚡', color: 'from-blue-600 to-purple-600' }, { id: 'pricing', name: 'Pricing SaaS', icon: '💰', color: 'from-green-600 to-emerald-600' }, { id: 'landing', name: 'Landing Pro', icon: '🚀', color: 'from-orange-600 to-red-600' }, { id: 'dashboard', name: 'Dashboard Pro', icon: '📊', color: 'from-cyan-600 to-blue-600' }, { id: 'boutique', name: 'Boutique Pro', icon: '🛍️', color: 'from-pink-600 to-rose-600' }, { id: 'video', name: 'Script Vidéo', icon: '🎬', color: 'from-purple-600 to-indigo-600' }, ]; // Initialize with default module loadModuleContent(activeModule); // Handle module switching document.addEventListener('click', function(e) { if (e.target.closest('[data-module]')) { const moduleId = e.target.closest('[data-module]').getAttribute('data-module'); activeModule = moduleId; loadModuleContent(moduleId); updatePreviewPanel(moduleId); } }); // Load module content function loadModuleContent(moduleId) { const panel = document.getElementById('generator-panel'); const module = modules.find(m => m.id === moduleId); let content = ''; switch(moduleId) { case 'generation': content = `
Générez vos interfaces en quelques secondes
Créez des pages de tarification professionnelles