/* ============================================
ELYSSA CALL · Composants partagés
Nav + Footer + WhatsApp FAB + ChatBot IA
============================================ */
const { useState, useEffect, useRef } = React;
const _sub = window.location.pathname.includes('/services/');
const _r = _sub ? '../' : '';
/* ─── LOGO ─── */
const Logo = ({ width = 160 }) => (
);
/* ─── NAV ─── */
const Nav = () => {
const [scrolled, setScrolled] = useState(false);
const [open, setOpen] = useState(false);
useEffect(() => {
const fn = () => setScrolled(window.scrollY > 40);
window.addEventListener('scroll', fn, { passive: true });
return () => window.removeEventListener('scroll', fn);
}, []);
const links = [
{ href:`${_r}index.html#services`, label:'Services' },
{ href:`${_r}index.html#ia`, label:'IA & Formations' },
{ href:`${_r}index.html#methode`, label:'Méthode' },
{ href:`${_r}index.html#pourquoi`, label:'Pourquoi nous' },
{ href:`${_r}contact.html`, label:'Contact' },
];
return (
);
};
/* ─── FOOTER ─── */
const Footer = () => (
);
/* ─── WHATSAPP FAB ─── */
const WhatsAppFAB = () => (
WhatsApp
);
/* ─── CHATBOT IA ─── */
const SYSTEM_PROMPT = `Tu es l'assistant virtuel d'Elyssa Call, un centre d'externalisation B2B francophone basé à Tunis, Tunisie.
Tu aides les prospects à comprendre les services et à obtenir des devis. Réponds en français, de façon concise (max 3-4 phrases), chaleureuse et professionnelle.
SERVICES ET TARIFS :
• Conseillers Clientèle : support multicanal (téléphone, email, chat, WhatsApp), SAV, fidélisation. Dès 1 100€/mois/agent.
• Téléprospecteurs B2B : prospection sortante, prise de RDV qualifiés BANT. Dès 1 100€/mois/agent.
• Closers : closing high-ticket B2B, rémunération hybride fixe+variable. Dès 1 300€/mois.
• Data Scientists : lead scoring, modèles prédictifs, dashboards KPI. Sur devis.
• Formations IA : 6 programmes (ChatGPT, Python, Data Science, Marketing IA, RGPD) avec licence de commercialisation.
• Agents IA métier : 8 agents déployables en 2-4 semaines (Commercial, Service Client, Marketing, RH, Comptabilité, Analyste, Juridique, Formation).
AVANTAGES :
• Démarrage en 14 jours (72h pour les urgences)
• Devis personnalisé sous 24h, gratuit
• Économies jusqu'à -60% vs équipe interne
• 100% conforme RGPD, DPA systématique
• Collaborateurs bac+3 minimum, accent neutre francophone
• Même fuseau horaire que l'Europe (CET/CEST)
• Chef de projet dédié + reporting hebdomadaire
• Scalabilité : 1 à 50 agents en quelques semaines
MARCHÉS : France, Belgique, Suisse, Luxembourg
CONTACT : contact@elyssa-call.com | +33 6 46 18 54 54 | WhatsApp : +33 6 46 18 54 54
Pour les devis personnalisés, oriente vers le formulaire de contact ou directement par email/WhatsApp. Reste concis.`;
const QUICK_REPLIES = ['Quels sont vos tarifs ?','Délai de démarrage ?','Conformité RGPD ?','Comment ça marche ?'];
const ChatBot = () => {
const [open, setOpen] = useState(false);
const [msgs, setMsgs] = useState([{role:'assistant', content:'Bonjour 👋 Je suis l\'assistant IA d\'Elyssa Call. Posez-moi vos questions sur nos services, tarifs ou délais !'}]);
const [input, setInput] = useState('');
const [loading, setLoading] = useState(false);
const [showQuick, setShowQuick] = useState(true);
const scrollRef = useRef(null);
useEffect(() => {
if (scrollRef.current) scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
}, [msgs, loading]);
const send = async (text) => {
const txt = (text || input).trim();
if (!txt || loading) return;
setShowQuick(false);
const next = [...msgs, {role:'user', content:txt}];
setMsgs(next);
setInput('');
setLoading(true);
try {
if (window.claude) {
const res = await window.claude.complete({ messages: next.map(m=>({role:m.role,content:m.content})), system: SYSTEM_PROMPT });
setMsgs(prev => [...prev, {role:'assistant', content:res}]);
} else {
// Fallback statique
await new Promise(r => setTimeout(r, 800));
setMsgs(prev => [...prev, {role:'assistant', content:'Pour toute question sur nos services, contactez-nous directement : contact@elyssa-call.com ou WhatsApp : +33 6 46 18 54 54. Nous répondons sous 24h ! 😊'}]);
}
} catch {
setMsgs(prev => [...prev, {role:'assistant', content:'Une erreur est survenue. Contactez-nous : contact@elyssa-call.com ou +33 6 46 18 54 54.'}]);
} finally {
setLoading(false);
}
};
return (
{open && (
🤖
Assistant Elyssa Call
IA · Répond instantanément
{msgs.map((m,i) =>
{m.content}
)}
{loading &&
}
{showQuick && (
{QUICK_REPLIES.map((q,i) => )}
)}
)}
);
};
/* ─── SERVICE NAV ─── */
const SERVICE_PAGES = [
{ id:'conseillers', label:'👥 Conseillers Clientèle', href:'conseillers-clientele.html' },
{ id:'teleprospecteurs', label:'📞 Téléprospecteurs B2B', href:'teleprospecteurs.html' },
{ id:'closers', label:'⭐ Closers', href:'closers.html' },
{ id:'data', label:'📊 Data Scientists', href:'data-scientists.html' },
{ id:'ia', label:'🤖 Formations & Agents IA', href:'formations-ia.html' },
];
const ServiceNav = ({ current }) => (
);
Object.assign(window, { Logo, Nav, Footer, WhatsAppFAB, ChatBot, ServiceNav, SERVICE_PAGES });