import React, { useState } from 'react'; import { Check, X, Smartphone, CreditCard, Loader, ShieldCheck } from 'lucide-react'; interface Plan { id: string; name: string; priceXOF: string; priceEUR: string; description: string; features: string[]; recommended?: boolean; color: string; } const PLANS: Plan[] = [ { id: 'starter', name: 'Starter', priceXOF: 'Gratuit', priceEUR: '0€', description: 'Pour démarrer votre présence en ligne.', features: [ 'Fiche entreprise basique', 'Visible dans la recherche', '1 Offre produit/service', 'Support par email' ], color: 'gray' }, { id: 'booster', name: 'Booster', priceXOF: '5.000 FCFA', priceEUR: '8€', description: 'L\'indispensable pour les entreprises en croissance.', recommended: true, features: [ 'Tout du plan Starter', 'Badge "Vérifié" ✅', 'Jusqu\'à 10 Offres produits', 'Lien vers réseaux sociaux & Site Web', 'Statistiques de base (Vues)' ], color: 'brand' }, { id: 'empire', name: 'Empire', priceXOF: '15.000 FCFA', priceEUR: '23€', description: 'Dominez votre marché avec une visibilité maximale.', features: [ 'Tout du plan Booster', 'Badge "Recommandé" 🏆', 'Offres illimitées', 'Intégration vidéo Youtube', 'Interview écrite sur le Blog', 'Support prioritaire WhatsApp' ], color: 'gray' } ]; const PricingSection = () => { const [selectedPlan, setSelectedPlan] = useState(null); const [billingCycle, setBillingCycle] = useState<'monthly' | 'yearly'>('monthly'); const [isPaymentModalOpen, setIsPaymentModalOpen] = useState(false); // Payment State const [paymentStep, setPaymentStep] = useState<'method' | 'processing' | 'success'>('method'); const [paymentMethod, setPaymentMethod] = useState<'mobile_money' | 'card' | null>(null); const handleSelectPlan = (plan: Plan) => { if (plan.id === 'starter') return; // Free plan, no payment setSelectedPlan(plan); setPaymentStep('method'); setIsPaymentModalOpen(true); }; const handlePayment = () => { setPaymentStep('processing'); // Fake API delay setTimeout(() => { setPaymentStep('success'); }, 2500); }; const closePayment = () => { setIsPaymentModalOpen(false); setPaymentStep('method'); setSelectedPlan(null); setPaymentMethod(null); }; return (

Tarifs

Investissez dans votre croissance

Choisissez le plan adapté à vos ambitions. Changez ou annulez à tout moment.

{/* Billing Toggle */}
{/* Plans Grid */}
{PLANS.map((plan) => (
{plan.recommended && (
Populaire
)}

{plan.name}

{plan.description}

{plan.priceXOF === 'Gratuit' ? 'Gratuit' : (billingCycle === 'yearly' && plan.id !== 'starter' ? 'Sur Devis' : plan.priceXOF)} {plan.priceXOF !== 'Gratuit' && /mois}
{plan.priceXOF !== 'Gratuit' && (

soit env. {plan.priceEUR} /mois

)}
    {plan.features.map((feature) => (
  • {feature}

  • ))}
))}
{/* FAKE PAYMENT MODAL */} {isPaymentModalOpen && selectedPlan && (
{/* Overlay */}
{/* Header */}
{/* Content based on step */} {paymentStep === 'method' && ( <>

Vous avez choisi le plan {selectedPlan.name}

{selectedPlan.priceXOF}

Moyen de paiement

{paymentMethod === 'mobile_money' && (
)} {paymentMethod === 'card' && (
)} )} {paymentStep === 'processing' && (

Traitement en cours...

Veuillez valider la transaction sur votre mobile si nécessaire.

)} {paymentStep === 'success' && (

Paiement Réussi !

Votre abonnement {selectedPlan.name} est maintenant actif.

)}
{paymentStep === 'method' && (
)}
)}
); }; export default PricingSection;