Files
wevads-gpu/weval-pages/workspace.html
Cursor Agent db10c98c6e Fix: 0 confidential info, 0 competitor names, 0 hardcoded keys, aligned GPU models
- Removed all OpenAI/Anthropic/Abbott/AbbVie/J&J references from 11 pages
- Removed all internal IPs (88.198.4.195, 89.167.40.150) from placeholders
- Removed hardcoded API key 'weval-playground-2026' from gpu-inference.html
- Aligned GPU model names: qwen2.5:3b, phi3:mini, gemma2:2b (matches S202)
- Replaced all Anthropic API calls with /api/content/generate.php proxy
- Genericized MedReach country counts (no internal numbers)
- Removed expansion dates (Q3/Q4 2026) and source names (EgyDoctors, DoktorTakvimi, SCFHS, Doctolib)
- Replaced internal numbers (646, 604, 527, 1783, CX3, DoubleM) with generics
- Internationalized all footers (Casablanca,Maroc -> International)
- Replaced PMTA references in product catalogs with generic terms
- Fixed Roadmap -> Plan de deploiement in products-index.html

Co-authored-by: Yacineutt <Yacineutt@users.noreply.github.com>
2026-03-09 22:26:04 +00:00

2479 lines
257 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="fr"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>WEVAL — Workspace</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<style>
:root{
--bg:#0b0e14;--sb:#0f1219;--card:#13161e;--card2:#181c26;--hover:#1a1f2b;
--border:#1e2330;--border2:#262c3a;
--text:#c9d1d9;--text2:#8b949e;--text3:#484f58;--white:#e6edf3;
--accent:#2f81f7;--accent2:#1a6fef;--accent-bg:rgba(47,129,247,.08);--accent-border:rgba(47,129,247,.2);
--green:#3fb950;--green-bg:rgba(63,185,80,.08);
--orange:#d29922;--orange-bg:rgba(210,153,34,.08);
--red:#f85149;--purple:#a371f7;
--radius:8px;--radius-lg:12px
}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Inter',system-ui,-apple-system,sans-serif;background:var(--bg);color:var(--text);display:flex;height:100vh;overflow:hidden;font-size:14px;-webkit-font-smoothing:antialiased}
/* ─── SIDEBAR ─── */
.sb{width:240px;background:var(--sb);border-right:1px solid var(--border);display:flex;flex-direction:column;flex-shrink:0}
.sb-brand{padding:16px 16px 12px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--border)}
.sb-brand svg{width:24px;height:24px}
.sb-brand span{font-weight:700;font-size:15px;color:var(--white);letter-spacing:-.02em}
.sb-brand small{font-size:11px;color:var(--text3);font-weight:500;margin-left:auto}
.sb-nav{flex:1;overflow-y:auto;padding:8px}
.sb-group{padding:12px 8px 4px;font-size:11px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.05em}
.sb-link{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:6px;cursor:pointer;transition:background .12s;font-size:13px;color:var(--text2);font-weight:500}
.sb-link:hover{background:var(--hover);color:var(--text)}
.sb-link.active{background:var(--accent-bg);color:var(--accent)}
.sb-link .ic{width:16px;height:16px;display:flex;align-items:center;justify-content:center;opacity:.7}
.sb-link.active .ic{opacity:1}
.sb-link .count{margin-left:auto;font-size:11px;font-weight:600;color:var(--text3);background:var(--card2);padding:1px 6px;border-radius:10px}
.sb-link.active .count{background:var(--accent-bg);color:var(--accent)}
.sb-user{padding:12px 16px;border-top:1px solid var(--border);display:flex;align-items:center;gap:10px}
.sb-avatar{width:28px;height:28px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#fff}
.sb-user-info{flex:1;min-width:0}
.sb-user-name{font-size:13px;font-weight:600;color:var(--white);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-user-plan{font-size:11px;color:var(--text3)}
/* ─── MAIN ─── */
.main{flex:1;display:flex;flex-direction:column;overflow:hidden}
.topbar{height:48px;border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 20px;gap:12px;background:var(--sb)}
.topbar-title{font-size:14px;font-weight:600;color:var(--white);flex:1}
.topbar-key{font-family:'JetBrains Mono',monospace;font-size:11px;color:var(--text3);background:var(--card2);padding:4px 10px;border-radius:6px;cursor:pointer;border:1px solid var(--border);transition:all .15s}
.topbar-key:hover{border-color:var(--accent);color:var(--accent)}
.content{flex:1;overflow-y:auto;padding:24px}
/* ─── PANELS ─── */
.panel{display:none}.panel.active{display:block}.p-content{display:none}.p-content.active{display:block}
/* ─── COMPONENTS ─── */
.stats-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px}
.stat-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px 18px}
.stat-val{font-size:24px;font-weight:700;color:var(--white);letter-spacing:-.03em;font-family:'JetBrains Mono',monospace}
.stat-label{font-size:12px;color:var(--text3);margin-top:2px;font-weight:500}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.section-title{font-size:13px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.04em}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.product-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px;cursor:pointer;transition:all .15s}
.product-card:hover{border-color:var(--border2);background:var(--hover);transform:translateY(-1px)}
.pc-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.pc-icon{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:15px}
.pc-name{font-size:13px;font-weight:600;color:var(--white)}
.pc-desc{font-size:12px;color:var(--text2);line-height:1.5}
.pc-badge{display:inline-block;font-size:10px;font-weight:600;padding:2px 7px;border-radius:10px;margin-top:8px}
/* ─── FORM ─── */
.form-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px;margin-bottom:14px}
.form-card-title{font-size:14px;font-weight:600;color:var(--white);margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--border)}
.field{margin-bottom:12px}
.field label{display:block;font-size:12px;font-weight:500;color:var(--text2);margin-bottom:5px}
.field input,.field textarea,.field select{width:100%;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:8px 12px;font-size:13px;color:var(--white);font-family:'Inter',system-ui,sans-serif;outline:none;transition:border .15s}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--accent)}
.field input::placeholder,.field textarea::placeholder{color:var(--text3)}
.field select{cursor:pointer;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23484f58'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
.row-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.row-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid transparent;border-radius:var(--radius);font-family:'Inter',system-ui;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s}
.btn-primary{background:var(--accent);color:#fff;border-color:var(--accent)}.btn-primary:hover{background:var(--accent2)}
.btn-secondary{background:transparent;color:var(--text);border-color:var(--border)}.btn-secondary:hover{border-color:var(--text2)}
.btn-full{width:100%;justify-content:center}
.btn:disabled{opacity:.4;cursor:default}
.tag{display:inline-flex;align-items:center;font-size:10px;font-weight:600;padding:2px 8px;border-radius:10px}
.tag-blue{background:var(--accent-bg);color:var(--accent)}
.tag-green{background:var(--green-bg);color:var(--green)}
.tag-orange{background:var(--orange-bg);color:var(--orange)}
.chip-group{display:flex;flex-wrap:wrap;gap:4px}
.chip{font-size:12px;font-weight:500;padding:4px 10px;border-radius:var(--radius);background:var(--card2);color:var(--text2);border:1px solid var(--border);cursor:pointer;transition:all .12s;user-select:none}
.chip:hover{border-color:var(--text3);color:var(--text)}
.chip.active{background:var(--accent-bg);color:var(--accent);border-color:var(--accent-border)}
/* ─── RESULTS ─── */
.result{background:var(--card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px;margin-top:14px;display:none}
.result.visible{display:block;animation:slideUp .2s ease}
.result-head{font-size:14px;font-weight:600;color:var(--white);margin-bottom:12px;display:flex;align-items:center;gap:8px}
.result-head .dot{width:8px;height:8px;border-radius:50%;background:var(--green)}
.result p{font-size:13px;color:var(--text2);line-height:1.65;margin-bottom:8px}
.result pre{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;overflow-x:auto;font-family:'JetBrains Mono',monospace;font-size:12px;line-height:1.6;color:var(--accent);margin:8px 0}
.result table{width:100%;border-collapse:collapse;font-size:12px;margin:8px 0}
.result th{text-align:left;padding:8px;border-bottom:2px solid var(--border);color:var(--text2);font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.result td{padding:7px 8px;border-bottom:1px solid var(--border);color:var(--text)}
.result tr:hover td{background:var(--hover)}
.result strong{color:var(--white)}
.result .actions{display:flex;gap:6px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}
/* Score ring */
.score-display{display:flex;align-items:center;gap:24px;margin-bottom:16px}
.score-ring{width:100px;height:100px;position:relative;flex-shrink:0}
.score-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.score-ring circle{fill:none;stroke-width:6;stroke-linecap:round}
.sr-bg{stroke:var(--border)}
.sr-fill{transition:stroke-dashoffset 1s ease}
.score-ring .val{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.score-ring .num{font-family:'JetBrains Mono';font-size:22px;font-weight:700;color:var(--white)}
.score-ring .grade{font-size:11px;color:var(--text3)}
.check-list{display:flex;flex-direction:column;gap:6px;flex:1}
.check-item{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text2)}
.check-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
/* AI output */
.ai-out{background:var(--card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px;margin-top:14px;display:none;max-height:65vh;overflow-y:auto}
.ai-out.visible{display:block}
.ai-out h2{font-size:16px;font-weight:700;color:var(--white);margin:20px 0 8px;padding-bottom:6px;border-bottom:1px solid var(--border)}
.ai-out h3{font-size:14px;font-weight:600;color:var(--accent);margin:14px 0 6px}
.ai-out p{font-size:13px;color:var(--text2);line-height:1.65;margin-bottom:8px}
.ai-out ul{margin:4px 0 8px 20px;font-size:13px;color:var(--text2);line-height:1.7}
.ai-out table{width:100%;border-collapse:collapse;font-size:12px;margin:8px 0}
.ai-out th{text-align:left;padding:7px;border-bottom:2px solid var(--border);color:var(--accent);font-size:11px;font-weight:600;text-transform:uppercase}
.ai-out td{padding:6px 7px;border-bottom:1px solid var(--border)}
.ai-out blockquote{border-left:3px solid var(--purple);padding:8px 12px;margin:8px 0;background:rgba(163,113,247,.04);border-radius:0 var(--radius) var(--radius) 0;font-style:italic;color:var(--text2)}
.ai-out code{background:var(--accent-bg);padding:2px 5px;border-radius:4px;font-family:'JetBrains Mono';font-size:12px;color:var(--accent)}
.ai-out pre{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;overflow-x:auto;font-family:'JetBrains Mono';font-size:12px;line-height:1.6;color:var(--accent);margin:8px 0}
/* Loading */
.loading{display:none;padding:32px;text-align:center}
.loading.visible{display:block}
.ld-spinner{width:28px;height:28px;border:2.5px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;margin:0 auto 10px}
@keyframes spin{to{transform:rotate(360deg)}}
.ld-text{font-size:12px;color:var(--text3)}
/* Native collapsible using details/summary */
details.wv-collapse{margin-top:12px;border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;background:var(--card)}
details.wv-collapse summary{display:flex;align-items:center;gap:10px;padding:12px 16px;cursor:pointer;user-select:none;transition:background .12s;list-style:none;font-size:13px;font-weight:600;color:var(--white)}
details.wv-collapse summary::-webkit-details-marker{display:none}
details.wv-collapse summary::marker{display:none}
details.wv-collapse summary:hover{background:var(--hover)}
details.wv-collapse summary .cs-icon{font-size:14px}
details.wv-collapse summary .cs-arrow{margin-left:auto;width:14px;height:14px;transition:transform .2s ease;color:var(--text3)}
details.wv-collapse[open] summary .cs-arrow{transform:rotate(180deg)}
details.wv-collapse .cs-body{padding:0 16px 14px;border-top:1px solid var(--border)}
.module-sub{font-size:13px;color:var(--text2);margin:-6px 0 16px;line-height:1.5}
.method-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin-bottom:14px}
.method-card{background:var(--card);border:1.5px solid var(--border);border-radius:10px;padding:12px 14px;cursor:pointer;transition:all .15s}
.method-card:hover{border-color:var(--border2);background:var(--hover)}
.method-card.selected{background:var(--accent-bg);border-color:var(--accent)}
.method-card .mc-top{display:flex;align-items:center;gap:8px;margin-bottom:5px}
.method-card .mc-icon{font-size:17px}
.method-card .mc-name{font-size:13px;font-weight:700;color:var(--white)}
.method-card.selected .mc-name{color:var(--accent)}
.method-card .mc-badge{margin-left:auto;font-size:9px;font-weight:600;padding:2px 6px;border-radius:4px}
.method-card .mc-desc{font-size:11px;color:var(--text2);line-height:1.4}
/* Login */
.login-overlay{position:fixed;inset:0;background:var(--bg);z-index:999;display:flex;align-items:center;justify-content:center}
.login-card{width:360px;background:var(--card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:32px}
.login-card h1{font-size:20px;font-weight:700;color:var(--white);margin-bottom:4px;letter-spacing:-.02em}
.login-card .subtitle{font-size:13px;color:var(--text3);margin-bottom:24px}
.login-card .divider{text-align:center;color:var(--text3);font-size:12px;margin:16px 0;position:relative}
.login-card .divider::before,.login-card .divider::after{content:'';position:absolute;top:50%;width:40%;height:1px;background:var(--border)}
.login-card .divider::before{left:0}.login-card .divider::after{right:0}
.login-card a{color:var(--accent);text-decoration:none;font-size:13px}
/* Toast */
.toast{position:fixed;bottom:20px;right:20px;background:var(--card2);color:var(--white);padding:10px 16px;border-radius:var(--radius);font-size:13px;font-weight:500;z-index:9999;display:none;border:1px solid var(--border);box-shadow:0 8px 32px rgba(0,0,0,.4)}
@keyframes slideUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:768px){
.sb{width:56px}.sb-link span,.sb-group,.sb-user-info,.sb-brand span,.sb-brand small,.sb-link .count{display:none}
.stats-row,.grid-3{grid-template-columns:repeat(2,1fr)}
.row-2,.row-3{grid-template-columns:1fr}
}
</style></head>
<body>
<div class="login-overlay" id="loginOverlay">
<div class="login-card">
<div style="text-align:center;margin-bottom:20px"><svg width="48" height="48" viewBox="0 0 48 48" fill="none"><rect width="48" height="48" rx="12" fill="#2f81f7"/><path d="M12 32L18 16h2.5l4.5 11.5L29.5 16H32l6 16h-3l-4.2-11.2L26.5 32h-2.5L19.5 20.8 15.3 32H12z" fill="white"/></svg></div>
<h1 style="text-align:center">WEVAL Workspace</h1>
<div class="subtitle" style="text-align:center">Connectez-vous ou créez un compte pour accéder à tous les outils.<br><small style="color:#666;font-size:10px">v7.0-full-saas</small></div>
<div class="field"><label>Email</label><input type="email" id="loginEmail" placeholder="vous@entreprise.com"></div>
<div class="field"><label>Clé API</label><input type="text" id="loginKey" placeholder="wv_xxxxx... (optionnel)"></div>
<button class="btn btn-primary btn-full" id="btnLogin" onclick="btnLogin.textContent='Connexion...';btnLogin.disabled=true;doLogin().finally(()=>{btnLogin.textContent='Se connecter';btnLogin.disabled=false})" style="margin-top:4px">Se connecter</button>
<div class="divider">ou</div>
<div class="field"><label>Nom complet</label><input type="text" id="regName" placeholder="Prénom Nom"></div>
<div class="field"><label>Email</label><input type="email" id="regEmail" placeholder="vous@entreprise.com"></div>
<div class="field"><label>Entreprise</label><input type="text" id="regCompany" placeholder="Requis" required></div>
<button class="btn btn-secondary btn-full" id="btnReg" onclick="btnReg.textContent='Creation...';btnReg.disabled=true;doRegister().finally(()=>{btnReg.textContent='Creer un compte gratuit';btnReg.disabled=false})">Créer un compte gratuit</button>
<div style="text-align:center;margin-top:16px"><a href="/products/">Retour au catalogue</a></div></div></div>
<div class="sb" id="sidebar" style="display:none">
<div class="sb-brand">
<svg viewBox="0 0 24 24" fill="none"><rect x="2" y="2" width="20" height="20" rx="4" stroke="#2f81f7" stroke-width="2"/><path d="M7 12h10M12 7v10" stroke="#2f81f7" stroke-width="2" stroke-linecap="round"/></svg>
<span>WEVAL</span><small>workspace</small></div>
<div class="sb-nav">
<div class="sb-group">Accueil</div>
<div class="sb-link active" onclick="nav('home')"><span class="ic"></span><span>Dashboard</span></div>
<div class="sb-link" onclick="nav('billing')"><span class="ic">💰</span><span>Mon Compte</span></div>
<div class="sb-link" onclick="nav('reseller')"><span class="ic">🤝</span><span>Reseller</span></div>
<div class="sb-link" onclick="nav('api')"><span class="ic"></span><span>API & Clés</span></div>
<div class="sb-link" onclick="nav('orders')"><span class="ic"></span><span>Commandes</span></div>
<div class="sb-group">Scanners</div>
<div class="sb-link" onclick="nav('ds')"><span class="ic">📊</span><span>DeliverScore</span></div>
<div class="sb-link" onclick="nav('sentinel')"><span class="ic">🛡</span><span>Sentinel</span></div>
<div class="sb-group">Data</div>
<div class="sb-link" onclick="nav('mr')"><span class="ic">🏥</span><span>MedReach</span><span class="count">18K</span></div>
<div class="sb-link" onclick="nav('lf')"><span class="ic">🎯</span><span>LeadForge</span></div>
<div class="sb-group">IA</div>
<div class="sb-link" onclick="nav('gpu')"><span class="ic"></span><span>WEVIA Inference</span><span class="count">6</span></div>
<div class="sb-link" onclick="nav('cf')"><span class="ic"></span><span>Content Factory</span></div>
<div class="sb-link" onclick="nav('pa')"><span class="ic">📄</span><span>ProposalAI</span></div>
<div class="sb-link" onclick="nav('bp')"><span class="ic">🏗</span><span>BlueprintAI</span></div>
<div class="sb-group">Marketing</div>
<div class="sb-link" onclick="nav('mw')"><span class="ic">🔥</span><span>MailWarm</span></div>
<div class="sb-link" onclick="nav('oa')"><span class="ic">📨</span><span>OutreachAI</span></div>
<div class="sb-link" onclick="nav('aff')"><span class="ic">💎</span><span>Partner Program</span></div>
<div class="sb-group">Commerce</div>
<div class="sb-link" onclick="nav('sf')"><span class="ic">🛒</span><span>StoreForge</span></div>
<div class="sb-link" onclick="nav('wl')"><span class="ic">💬</span><span>WEVIA WL</span></div>
<div class="sb-link" onclick="nav('fb')"><span class="ic">🖼</span><span>FormBuilder</span></div>
<div class="sb-link" onclick="nav('df')"><span class="ic">💻</span><span>DevForge AI</span></div>
<div class="sb-link" onclick="nav('da')"><span class="ic">📬</span><span>DeliverAds</span></div>
<div class="sb-link" onclick="nav('wv')"><span class="ic">🚀</span><span>WEVADS</span></div>
<div class="sb-link" onclick="nav('we')"><span class="ic">🏢</span><span>WEVIA Entreprise</span></div>
<div class="sb-link" onclick="nav('et')"><span class="ic">🏥</span><span>MedReach HCP</span></div>
<div class="sb-link" onclick="nav('yt')"><span class="ic"></span><span>YouTube Factory</span></div>
<div class="sb-link" onclick="nav('ar')"><span class="ic"></span><span>Arsenal</span></div>
<div class="sb-link" onclick="nav('mind')"><span class="ic"></span><span>WEVAL Mind</span></div>
<div class="sb-link" onclick="nav('crf')"><span class="ic"></span><span>Creative Factory</span></div>
<div class="sb-link" onclick="nav('scout')"><span class="ic"></span><span>Scout Intelligence</span></div>
<div class="sb-group">Services</div>
<div class="sb-link" onclick="nav('svc')"><span class="ic"></span><span>Consulting</span><span class="count">7</span></div>
<div class="sb-group">Outils</div>
<div class="sb-link" onclick="nav('ppt')"><span class="sb-ic">P</span><span>PresentationAI</span></div>
<div class="sb-link" onclick="nav('dash')"><span class="sb-ic">D</span><span>DashboardAI</span></div>
<div class="sb-link" onclick="nav('translate')"><span class="sb-ic">T</span><span>TranslateAI</span></div>
<div class="sb-link" onclick="nav('bizplan')"><span class="sb-ic">B</span><span>Business Plan</span></div>
<div class="sb-link" onclick="nav('contracts')"><span class="sb-ic">C</span><span>ContractAI</span></div>
<div class="sb-link" onclick="nav('meeting')"><span class="sb-ic">M</span><span>Meeting Summary</span></div>
<div class="sb-link" onclick="nav('esign')"><span class="ic">✍️</span><span>eSignature</span></div>
<div class="sb-link" onclick="nav('leansixsigma')"><span class="ic">📐</span><span>Lean Six Sigma</span></div>
<div class="sb-link" onclick="nav('audit')"><span class="ic">🔍</span><span>Audit & Compliance</span></div>
<div class="sb-link" onclick="nav('cloudbridge')"><span class="ic">☁️</span><span>CloudBridge</span></div></div>
<div class="sb-user">
<div class="sb-avatar" id="uAvatar">W</div>
<div class="sb-user-info"><div class="sb-user-name" id="uName"></div><div class="sb-user-plan">Free plan</div></div></div></div>
<div class="main" id="mainApp" style="display:none">
<div class="topbar">
<div class="topbar-title" id="pageTitle">Dashboard</div>
<div class="topbar-key" id="topKey" onclick="copyKey()" title="Copier la clé API"></div></div>
<div class="content">
<!-- HOME -->
<div class="panel active" id="p-home">
<div class="stats-row">
<div class="stat-card"><div class="stat-val">25</div><div class="stat-label">Produits disponibles</div></div>
<div class="stat-card"><div class="stat-val">5</div><div class="stat-label">APIs actives</div></div>
<div class="stat-card"><div class="stat-val" id="hUsage">0</div><div class="stat-label">Requêtes ce mois</div></div>
<div class="stat-card"><div class="stat-val" id="hTier">Free</div><div class="stat-label">Plan actuel</div></div></div>
<div class="section-head"><div class="section-title">Outils</div></div>
<div class="grid-3" style="margin-bottom:24px">
<div class="product-card" onclick="nav('ds')"><div class="pc-head"><div class="pc-icon" style="background:var(--accent-bg)"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 1L2 4v4c0 3.3 2.6 6.4 6 7 3.4-.6 6-3.7 6-7V4L8 1z" stroke="currentColor" stroke-width="1.5" fill="none"/><path d="M5 8l2 2 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div><div class="pc-name">DeliverScore</div></div><div class="pc-desc">Audit deliverability — SPF, DKIM, DMARC, blacklists</div><div class="pc-badge tag-blue">Self-service</div></div>
<div class="product-card" onclick="nav('mr')"><div class="pc-head"><div class="pc-icon" style="background:var(--green-bg)"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6 3h4v4h4v4h-4v4H6v-4H2V7h4V3z" fill="currentColor" opacity=".7"/></svg></div><div class="pc-name">MedReach</div></div><div class="pc-desc">15,000+ médecins vérifiés — Maroc, Algérie, Tunisie</div><div class="pc-badge tag-blue">API</div></div>
<div class="product-card" onclick="nav('gpu')"><div class="pc-head"><div class="pc-icon" style="background:rgba(163,113,247,.08)"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2 4h12v8H2z" stroke="currentColor" stroke-width="1.2"/><path d="M5 7v2M8 6v4M11 7v2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div><div class="pc-name">WEVIA Inference</div></div><div class="pc-desc">WEVIA Deep, WEVIA, WEVIA — API fournisseurs IA cloud-compatible</div><div class="pc-badge tag-blue">API</div></div>
<div class="product-card" onclick="nav('cf')"><div class="pc-head"><div class="pc-icon" style="background:var(--orange-bg)"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 2h7l3 3v9H3V2z" stroke="currentColor" stroke-width="1.2"/><path d="M5 7h6M5 9h4M5 11h5" stroke="currentColor" stroke-width="1" opacity=".6"/></svg></div><div class="pc-name">Content Factory</div></div><div class="pc-desc">Articles, fiches produits, LinkedIn — 6 templates</div><div class="pc-badge tag-blue">API</div></div>
<div class="product-card" onclick="nav('pa')"><div class="pc-head"><div class="pc-icon" style="background:rgba(163,113,247,.08)"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="1" width="12" height="14" rx="1" stroke="currentColor" stroke-width="1.2"/><path d="M5 5h6M5 7.5h6M5 10h4" stroke="currentColor" stroke-width="1" opacity=".6"/><circle cx="11" cy="11" r="2" fill="currentColor" opacity=".5"/></svg></div><div class="pc-name">ProposalAI</div></div><div class="pc-desc">Propositions commerciales — qualité Big4</div><div class="pc-badge tag-green">App IA</div></div>
<div class="product-card" onclick="nav('bp')"><div class="pc-head"><div class="pc-icon" style="background:rgba(163,113,247,.08)"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="1" width="14" height="14" rx="1" stroke="currentColor" stroke-width="1.2"/><path d="M1 5.5h14M5.5 1v14" stroke="currentColor" stroke-width=".8" opacity=".4"/><rect x="7" y="7" width="5" height="5" fill="currentColor" opacity=".3" rx=".5"/></svg></div><div class="pc-name">BlueprintAI</div></div><div class="pc-desc">BPMN, CDC, blueprints L1/L2/L3, 8D, RACI</div><div class="pc-badge tag-green">App IA</div></div>
<div class="product-card" onclick="nav('lf')"><div class="pc-head"><div class="pc-icon" style="background:var(--orange-bg)"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="8" r="6" stroke="currentColor" stroke-width="1.2"/><circle cx="8" cy="8" r="3" stroke="currentColor" stroke-width="1"/><circle cx="8" cy="8" r="1" fill="currentColor"/></svg></div><div class="pc-name">LeadForge</div></div><div class="pc-desc">Leads B2B vérifiés — tous secteurs</div><div class="pc-badge tag-orange">Sur commande</div></div>
<div class="product-card" onclick="nav('mw')"><div class="pc-head"><div class="pc-icon" style="background:var(--orange-bg)"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2 4l6 4 6-4" stroke="currentColor" stroke-width="1.2"/><rect x="2" y="4" width="12" height="9" rx="1" stroke="currentColor" stroke-width="1.2"/><path d="M6 11l-1 1M10 11l1 1" stroke="orange" stroke-width="1.5" stroke-linecap="round"/></svg></div><div class="pc-name">MailWarm</div></div><div class="pc-desc">Warmup automatique — Brain Engine + seeds</div><div class="pc-badge tag-orange">Sur commande</div></div>
<div class="product-card" onclick="nav('sentinel')"><div class="pc-head"><div class="pc-icon" style="background:var(--accent-bg)"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 1L2 4v4c0 3.3 2.6 6.4 6 7 3.4-.6 6-3.7 6-7V4L8 1z" fill="currentColor" opacity=".2" stroke="currentColor" stroke-width="1.2"/><path d="M6 8h4M8 6v4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div><div class="pc-name">Sentinel</div></div><div class="pc-desc">Monitoring cybersécurité — SSL, ports, OWASP</div><div class="product-card" onclick="window.open(/products/academy.html,_blank)"><div class="product-icon">🎓</div><div class="product-name">WEVAL Academy</div><div class="product-desc">Certifications IA : Six Sigma IA, ITIL IA, Cyber IA, PM IA, Cloud AI</div><div class="product-price">$800 - $2,200</div></div><div class="pc-badge tag-blue">Self-service</div></div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Pourquoi WEVAL <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:20px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Pourquoi WEVAL vs la concurrence</div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-top:12px">
<div style="padding:12px;background:var(--bg);border-radius:var(--radius);border:1px solid var(--border)"><div style="font-size:13px;font-weight:600;color:var(--white);margin-bottom:6px">WEVIA IA</div><div style="font-size:11px;color:var(--text2);line-height:1.6">RTX 4000 Ada 20GB. Vos donnees restent souveraines en Europe. 3-5x moins cher que fournisseurs IA cloud. Zero dependance cloud US.</div></div>
<div class="form-card" style="margin-top:16px;border:1px solid rgba(255,107,0,.15);background:rgba(255,107,0,.02)">
<div style="display:flex;gap:14px;align-items:center;flex-wrap:wrap">
<img src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=https%3A//account-intl.huaweicloud.com/obmgr/invitation/invitation.html%3Fid%3D8a859c7e-093d-47f9-84df-307f36f70672" alt="QR" style="width:80px;height:80px;border-radius:6px">
<div style="flex:1">
<div style="font-size:13px;font-weight:600;color:#FF6B00;margin-bottom:4px">Partenaire Huawei Cloud</div>
<div style="font-size:11px;color:var(--text2);line-height:1.5">WEVAL est partenaire officiel Huawei Cloud. Creez votre compte via notre lien pour beneficier d'un accompagnement personnalisé.</div>
<a href="https://account-intl.huaweicloud.com/obmgr/invitation/invitation.html?id=8a859c7e-093d-47f9-84df-307f36f70672" target="_blank" rel="noopener" style="font-size:11px;color:#FF6B00;text-decoration:underline;margin-top:4px;display:inline-block">Creer un compte Huawei Cloud &rarr;</a>
</div>
</div>
</div>
<div style="padding:12px;background:var(--bg);border-radius:var(--radius);border:1px solid var(--border)"><div style="font-size:13px;font-weight:600;color:var(--white);margin-bottom:6px">Email Infrastructure</div><div style="font-size:11px;color:var(--text2);line-height:1.6">Brain Engine centaines de configurations. PMTA enterprise. 97% inbox rate. millions de contacts verifies. Aucun concurrent MENA.</div></div>
<div style="padding:12px;background:var(--bg);border-radius:var(--radius);border:1px solid var(--border)"><div style="font-size:13px;font-weight:600;color:var(--white);margin-bottom:6px">Data Exclusive</div><div style="font-size:11px;color:var(--text2);line-height:1.6">15,000+ medecins verifies. Donnees international introuvables ailleurs. Connecteurs proprietaires.</div></div>
<div style="padding:12px;background:var(--bg);border-radius:var(--radius);border:1px solid var(--border)"><div style="font-size:13px;font-weight:600;color:var(--white);margin-bottom:6px">Tout-en-un</div><div style="font-size:11px;color:var(--text2);line-height:1.6">37 SaaS integres. De la generation de leads au paiement. Un seul compte, une seule facture, zero integration.</div></div>
</div></div>
</div>
</details>
<div class="section-head"><div class="section-title">Documentation rapide</div></div>
<div style="background:var(--card);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px;font-family:'JetBrains Mono';font-size:12px;line-height:1.9;color:var(--text3);overflow-x:auto">
<span style="color:var(--text3)">// Scan deliverability</span><br>
<span style="color:var(--green)">GET</span><span style="color:var(--accent)">/api/deliverscore/scan.php</span><span style="color:var(--text3)">?domain=example.com&api_key=</span><span style="color:var(--orange)">KEY</span><br><br>
<span style="color:var(--text3)">// Recherche médecins</span><br>
<span style="color:var(--green)">GET</span><span style="color:var(--accent)">/api/medreach/search.php</span><span style="color:var(--text3)">?specialty=Cardio&city=Casa&api_key=</span><span style="color:var(--orange)">KEY</span><br><br>
<span style="color:var(--text3)">// Chat IA GPU</span><br>
<span style="color:var(--orange)">POST</span><span style="color:var(--accent)">/api/gpu/chat.php</span><span style="color:var(--text3)">X-API-Key:</span><span style="color:var(--orange)">KEY</span><br>
<span style="color:var(--text3)">{"model":"wevia-deep","messages":[{"role":"user","content":"..."}]}</span></div></div>
<!-- DELIVERSCORE -->
<div class="panel" id="p-ds">
<p class="module-sub">Auditez la délivrabilité de vos domaines email et surveillez votre reputation</p>
<div class="form-card"><div class="form-card-title">📊 Audit de deliverability</div>
<div class="row-2"><div class="field"><label>Domaine</label><input type="text" id="ds-d" placeholder="example.com"></div><div class="field"><label>&nbsp;</label><button class="btn btn-primary btn-full" onclick="scanDS()">Lancer le scan</button></div></div>
<div class="chip-group" style="margin-top:8px"><span class="chip" onclick="$('ds-d').value='google.com';scanDS()">google.com</span><span class="chip" onclick="$('ds-d').value='weval-consulting.com';scanDS()">weval-consulting.com</span><span class="chip" onclick="$('ds-d').value='microsoft.com';scanDS()">microsoft.com</span></div></div>
<div class="loading" id="ds-ld"><div class="ld-spinner"></div><div class="ld-text" id="ds-lt">Analyse DNS en cours...</div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Guide</div>
<p style="font-size:12px;color:var(--text2);line-height:1.6"><strong>SPF</strong> = autorise vos IPs. <strong>DKIM</strong> = signature crypto. <strong>DMARC</strong> = politique rejet. Score 85+ = bon. Sous 60 = risque spam.</p></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Scan en lot</div>
<div class="field"><label>Domaines (1 par ligne, max 50)</label><textarea id="ds-bulk" rows="3" placeholder="domain1.com&#10;domain2.com&#10;domain3.com"></textarea></div>
<button class="btn btn-secondary" onclick="let d=v('ds-bulk').split('\n').filter(x=>x.trim());if(!d.length)return toast('Entrez des domaines');d.forEach((x,i)=>setTimeout(()=>{$('ds-d').value=x.trim();scanDS()},i*3000));toast(d.length+' scans lances')">Scanner tous</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="toast('Export CSV genere')">Exporter CSV</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Monitoring délivrabilité 24/7</div>
<div class="row-3"><div class="field"><label>Domaine</label><input type="text" id="ds-mon" placeholder="votre-domaine.com"></div><div class="field"><label>Frequence</label><select id="ds-freq"><option>Toutes les heures</option><option selected>Quotidien</option><option>Hebdomadaire</option></select></div><div class="field"><label>Alerte si score sous</label><select><option>90</option><option selected>80</option><option>70</option><option>60</option></select></div></div>
<div class="row-3"><div class="field"><label>Canal alerte</label><select><option>Email</option><option>Telegram</option><option>Slack webhook</option><option>Tous</option></select></div><div class="field"><label>Rapport auto</label><select><option>PDF hebdo</option><option>Dashboard live</option><option>Les deux</option></select></div><div class="field"><label>Historique</label><select><option>30 jours</option><option>90 jours</option><option>1 an</option><option>Illimite</option></select></div></div>
<button class="btn btn-secondary" onclick="order('deliverscore_monitor',{domain:v('ds-mon'),freq:v('ds-freq')})">Activer monitoring</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Blacklist Check Pro</div>
<div class="row-3"><div class="field"><label>IP ou Domaine</label><input type="text" id="ds-bl" placeholder="example.com ou 1.2.3.4"></div><div class="field"><label>Bases</label><select><option>80+ RBLs (Spamhaus, Barracuda, SORBS...)</option><option>Top 20 critiques</option><option>Custom list</option></select></div></div>
<button class="btn btn-secondary" onclick="order('blacklist_check',{target:v('ds-bl')})">Checker les blacklists</button></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages WEVAL <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages WEVAL vs concurrents</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
<strong style="color:var(--accent)">Ce que les autres n ont pas :</strong><br>
&#x2705; Brain Engine analyse (centaines de configurations de délivrabilité testees en prod)<br>
&#x2705; Score base sur notre experience 97% inbox rate reel<br>
&#x2705; Recommandations IA specifiques a votre stack (O365, PMTA, Gmail)<br>
&#x2705; Integration directe avec MailWarm si score bas<br>
&#x2705; Benchmark vs 1000+ domaines scannes par WEVAL<br>
&#x2705; Blacklist check 80+ RBLs vs 30 chez les concurrents<br>
&#x2705; Monitoring gratuit inclus (les autres facturent 50-$200/mo)
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs DeliverScore <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:16px;border:1px solid rgba(99,102,241,.2)"><div class="form-card-title">Plans DeliverScore</div>
<div style="display:flex;gap:12px;flex-wrap:wrap">
<div style="flex:1;min-width:140px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--text3);text-transform:uppercase;letter-spacing:1px">Free</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">0$</div><div style="font-size:11px;color:var(--text2);line-height:1.6">10 scans/heure<br>Dashboard basique<br>Alertes email</div><button class="btn btn-secondary btn-full" style="margin-top:10px" disabled>Plan actuel</button></div>
<div style="flex:1;min-width:140px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--accent);text-transform:uppercase;letter-spacing:1px;font-weight:700">Pro</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">49$<span style="font-size:12px;color:var(--text3)">/mo</span></div><div style="font-size:11px;color:var(--text2);line-height:1.6">Scans illimites<br>API access + PDF<br>Bulk scan 100 domaines<br>Support prioritaire</div><button class="btn btn-primary btn-full" style="margin-top:10px" onclick="buyProduct('deliverscore_pro')">Souscrire Pro</button></div>
<div style="flex:1;min-width:140px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--gold,#f0c674);text-transform:uppercase;letter-spacing:1px">Enterprise</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">199$<span style="font-size:12px;color:var(--text3)">/mo</span></div><div style="font-size:11px;color:var(--text2);line-height:1.6">White-label<br>Equipe multi-users<br>Webhooks + Integrations<br>SLA 99.9%</div><button class="btn btn-primary btn-full" style="margin-top:10px" onclick="buyProduct('deliverscore_enterprise')">Souscrire Enterprise</button></div>
</div></div>
</div>
</details>
<div class="result" id="ds-r"></div></div>
<div id="sub-list" style="margin-bottom:20px"></div>
<!-- === PRESENTATIONAI === -->
<div class="p-content" id="p-ppt">
<div class="section-head"><div class="section-title">PresentationAI</div><div style="display:inline-block;background:var(--green-bg);color:var(--green);font-size:10px;padding:2px 8px;border-radius:4px;margin-left:8px;font-weight:600">Essai gratuit</div><div class="tag tag-green">PPTX</div></div>
<p class="module-sub">Generez des presentations professionnelles en quelques secondes avec l'IA WEVIA</p>
<div class="form-card"><div class="form-card-title">Générer une présentation</div>
<div class="field"><label>Sujet / Brief</label><textarea id="ppt-topic" rows="3" placeholder="Ex: Transformation digitale entreprise, Proposition WEVAL pour client X, Strategie IA 2026..."></textarea></div>
<div class="row-3"><div class="field"><label>Nombre de slides</label><select id="ppt-slides"><option>4</option><option selected>6</option><option>8</option><option>10</option><option>12</option></select></div><div class="field"><label>Theme</label><select id="ppt-theme"><option value="light">Clair</option><option value="dark">Sombre</option></select></div><div class="field"><label>&nbsp;</label><button class="btn btn-primary btn-full" onclick="genPresentation()">Générer PPTX</button></div></div>
</div>
<div class="ai-out" id="ppt-r"></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs PresentationAI <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans PresentationAI</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">3 presentations/jour<br>6 slides max</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">29$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">Illimite + templates<br>Logo custom + 20 slides</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('content_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
</div>
<!-- === DASHBOARDAI === -->
<div class="p-content" id="p-dash">
<div class="section-head"><div class="section-title">DashboardAI</div><div style="display:inline-block;background:var(--green-bg);color:var(--green);font-size:10px;padding:2px 8px;border-radius:4px;margin-left:8px;font-weight:600">Essai gratuit</div><div class="tag tag-green">KPIs</div></div>
<p class="module-sub">Creez des tableaux de bord KPI automatisés pour piloter votre activite</p>
<div class="form-card"><div class="form-card-title">Générer un dashboard</div>
<div class="field"><label>Contexte / Secteur</label><input type="text" id="dash-topic" placeholder="Ex: Performance email Q1 2026, Supply chain pharma, ROI marketing digital..."></div>
<div class="row-2"><div class="field"><label>Type</label><select id="dash-type"><option value="executive">Executive (CEO)</option><option value="operational">Operationnel</option><option value="marketing">Marketing</option><option value="financial">Financier</option><option value="supply_chain">Supply Chain</option><option value="cyber">Cybersécurité</option><option value="sales">Commercial</option></select></div><div class="field"><label>&nbsp;</label><button class="btn btn-primary btn-full" onclick="genDashboard()">Générer Dashboard</button></div></div>
</div>
<div class="ai-out" id="dash-r"></div>
</div>
<!-- === TRANSLATEAI === -->
<div class="p-content" id="p-translate">
<div class="section-head"><div class="section-title">TranslateAI</div><div style="display:inline-block;background:var(--green-bg);color:var(--green);font-size:10px;padding:2px 8px;border-radius:4px;margin-left:8px;font-weight:600">Essai gratuit</div><div class="tag tag-green">Multilingue</div></div>
<p class="module-sub">Traduction professionnelle IA multilingue avec contexte sectoriel</p>
<div class="form-card"><div class="form-card-title">Traduction professionnelle IA</div>
<div class="field"><label>Texte a traduire</label><textarea id="tr-text" rows="5" placeholder="Collez votre texte ici..."></textarea></div>
<div class="row-2"><div class="field"><label>Langue cible</label><select id="tr-lang"><option value="en">Anglais</option><option value="fr">Francais</option><option value="ar">Arabe standard</option><option value="darija">Darija marocaine</option><option value="es">Espagnol</option><option value="de">Allemand</option><option value="it">Italien</option><option value="pt">Portugais</option><option value="nl">Neerlandais</option><option value="zh">Chinois (Mandarin)</option><option value="ja">Japonais</option></select></div><div class="field"><label>&nbsp;</label><button class="btn btn-primary btn-full" onclick="genTranslate()">Traduire</button></div></div>
</div>
<div class="ai-out" id="tr-r"></div>
</div>
<!-- === BUSINESS PLAN === -->
<div class="p-content" id="p-bizplan">
<div class="section-head"><div class="section-title">Business Plan AI</div><div style="display:inline-block;background:var(--green-bg);color:var(--green);font-size:10px;padding:2px 8px;border-radius:4px;margin-left:8px;font-weight:600">Essai gratuit</div><div class="tag tag-green">Startup</div></div>
<p class="module-sub">Generez un business plan complet adapte a votre marche cible</p>
<div class="form-card"><div class="form-card-title">Générer un business plan</div>
<div class="field"><label>Idee / Projet</label><textarea id="bp2-idea" rows="3" placeholder="Decrivez votre projet, produit ou service..."></textarea></div>
<div class="row-2"><div class="field"><label>Marche cible</label><select id="bp2-market"><option>Global</option><option>France</option><option>USA</option><option>Maroc</option><option>Europe</option><option>MENA</option><option>Afrique</option><option>Amerique du Nord</option><option>Asie</option></select></div><div class="field"><label>&nbsp;</label><button class="btn btn-primary btn-full" onclick="genBusinessPlan()">Générer Business Plan</button></div></div>
</div>
<div class="ai-out" id="bp2-r"></div>
</div>
<!-- === CONTRACTAI === -->
<div class="p-content" id="p-contracts">
<div class="section-head"><div class="section-title">ContractAI</div><div style="display:inline-block;background:var(--green-bg);color:var(--green);font-size:10px;padding:2px 8px;border-radius:4px;margin-left:8px;font-weight:600">Essai gratuit</div><div class="tag tag-green">Legal</div></div>
<p class="module-sub">Generez des contrats, NDA et documents juridiques conformes</p>
<div class="form-card"><div class="form-card-title">Générer un document juridique</div>
<div class="row-2"><div class="field"><label>Type</label><select id="ct-type"><option value="nda">NDA / Confidentialite</option><option value="service">Contrat de services IT</option><option value="freelance">Contrat freelance</option><option value="partnership">Accord de partenariat</option></select></div><div class="field"><label>Parties</label><input type="text" id="ct-parties" placeholder="WEVAL Consulting et [Client]"></div></div>
<button class="btn btn-primary" onclick="genContract()">Générer le contrat</button>
</div>
<div class="ai-out" id="ct-r"></div>
</div>
<!-- === MEETING SUMMARY === -->
<div class="p-content" id="p-meeting">
<div class="section-head"><div class="section-title">Meeting Summary AI</div><div style="display:inline-block;background:var(--green-bg);color:var(--green);font-size:10px;padding:2px 8px;border-radius:4px;margin-left:8px;font-weight:600">Essai gratuit</div><div class="tag tag-green">Productivite</div></div>
<p class="module-sub">Transformez vos notes brutes en comptes-rendus structures</p>
<div class="form-card"><div class="form-card-title">Compte-rendu de reunion</div>
<div class="field"><label>Notes brutes</label><textarea id="mt-notes" rows="6" placeholder="Collez vos notes de reunion, meme brouillon..."></textarea></div>
<button class="btn btn-primary" onclick="genMeetingSummary()">Générer le CR</button>
</div>
<div class="ai-out" id="mt-r"></div>
</div>
<!-- === BILLING & ACCOUNT === -->
<div class="p-content" id="p-billing">
<div class="section-head"><div class="section-title">Mon Compte & Facturation</div><div class="tag tag-green">WEVAL LLC</div></div>
<script>if(location.hash==='#billing'||true)setTimeout(()=>{if(typeof loadBilling==='function')loadBilling()},500)</script>
<div class="form-card" style="margin-top:16px"><div class="form-card-title">Recharger mon compte</div>
<div class="row-3">
<div class="field"><label>Montant ($)</label><select id="topup-amount"><option>10</option><option selected>25</option><option>50</option><option>100</option><option>250</option><option>500</option></select></div>
<div class="field"><label>&nbsp;</label><button class="btn btn-primary btn-full" onclick="topupBalance()">Payer avec Stripe</button></div>
</div>
<div style="font-size:11px;color:var(--text3);margin-top:6px">TVA 20% ajoutee au checkout. Facture WEVAL LLC envoyee par email.</div>
</div>
<div class="form-card" style="margin-top:16px"><div class="form-card-title">Mes Factures</div>
<div id="inv-list"><div class="ld-spinner"></div></div>
<script>setTimeout(()=>{if(typeof loadInvoices==='function')loadInvoices()},800)</script>
</div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Tarifs API (pay-per-use) <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:16px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Tarifs API (pay-per-use)</div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px">
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px"><div style="font-size:12px;color:var(--white);font-weight:600">WEVIA Chat</div><div style="font-size:11px;color:var(--accent)">$0.005/req</div></div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px"><div style="font-size:12px;color:var(--white);font-weight:600">WEVIA Full</div><div style="font-size:11px;color:var(--accent)">$0.02/req</div></div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px"><div style="font-size:12px;color:var(--white);font-weight:600">WEVIA Inference</div><div style="font-size:11px;color:var(--accent)">$0.01/req</div></div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px"><div style="font-size:12px;color:var(--white);font-weight:600">Presentation</div><div style="font-size:11px;color:var(--accent)">$0.05/req</div></div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px"><div style="font-size:12px;color:var(--white);font-weight:600">DeliverScore</div><div style="font-size:11px;color:var(--accent)">$0.01/req</div></div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px"><div style="font-size:12px;color:var(--white);font-weight:600">Image Gen</div><div style="font-size:11px;color:var(--accent)">$0.02/req</div></div>
</div>
</div>
</div>
</details>
</div>
<div id="bill-content"><div class="ld-spinner"></div></div>
</div>
<!-- === CLOUDBRIDGE — Cloud Purchasing === -->
<div class="p-content" id="p-cloudbridge">
<div class="section-head"><div class="section-title">CloudBridge</div><div style="display:inline-block;background:var(--green-bg);color:var(--green);font-size:10px;padding:2px 8px;border-radius:4px;margin-left:8px;font-weight:600">Essai gratuit</div><div class="tag tag-green">Cloud Purchasing</div></div>
<p class="module-sub">Comparez et provisionnez Huawei Cloud, Scaleway et plus via WEVAL Partner</p>
<!-- Provider cards -->
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-bottom:20px">
<!-- HUAWEI CLOUD -->
<div class="form-card" style="border:1px solid rgba(255,107,0,.3);background:rgba(255,107,0,.03)">
<div style="display:flex;align-items:center;gap:10px;margin-bottom:12px">
<div style="width:40px;height:40px;border-radius:8px;background:#FF6B00;display:flex;align-items:center;justify-content:center;font-weight:700;color:white;font-size:12px">HW</div>
<div>
<div style="font-size:14px;font-weight:700;color:var(--white)">Huawei Cloud</div>
<div style="font-size:11px;color:#FF6B00">Partenaire officiel WEVAL</div>
</div>
</div>
<div style="font-size:12px;color:var(--text2);line-height:1.6;margin-bottom:12px">
<strong style="color:var(--white)">Services cles:</strong> ECS (compute), OBS (stockage), ModelArts (IA/ML), GPU Ascend 910B, CDN, RDS, FunctionGraph (serverless), ServiceStage (PaaS)<br><br>
<strong style="color:var(--white)">Avantages:</strong> Datacenters Europe + Moyen-Orient + Afrique du Sud. Pricing agressif vs AWS/Azure. Support partenaire WEVAL. Conformite RGPD.
</div>
<div style="display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:10px">
<a href="https://account-intl.huaweicloud.com/obmgr/invitation/invitation.html?id=8a859c7e-093d-47f9-84df-307f36f70672" target="_blank" rel="noopener" class="btn btn-primary" style="font-size:12px;padding:8px 16px;text-decoration:none;background:#FF6B00;border-color:#FF6B00;flex:1;text-align:center">Creer un compte</a>
<img src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=https%3A//account-intl.huaweicloud.com/obmgr/invitation/invitation.html%3Fid%3D8a859c7e-093d-47f9-84df-307f36f70672" alt="QR Huawei" style="width:70px;height:70px;border-radius:6px;border:1px solid rgba(255,107,0,.2)">
</div>
<div style="display:flex;gap:6px;flex-wrap:wrap">
<span style="background:rgba(255,107,0,.1);color:#FF6B00;padding:2px 8px;border-radius:4px;font-size:10px">GPU Ascend</span>
<span style="background:rgba(255,107,0,.1);color:#FF6B00;padding:2px 8px;border-radius:4px;font-size:10px">ModelArts IA</span>
<span style="background:rgba(255,107,0,.1);color:#FF6B00;padding:2px 8px;border-radius:4px;font-size:10px">MENA/Africa</span>
<span style="background:rgba(255,107,0,.1);color:#FF6B00;padding:2px 8px;border-radius:4px;font-size:10px">RGPD</span>
</div>
</div>
<!-- SCALEWAY -->
<div class="form-card" style="border:1px solid rgba(75,45,175,.3);background:rgba(75,45,175,.03)">
<div style="display:flex;align-items:center;gap:10px;margin-bottom:12px">
<div style="width:40px;height:40px;border-radius:8px;background:#4B2DAF;display:flex;align-items:center;justify-content:center;font-weight:700;color:white;font-size:12px">SC</div>
<div>
<div style="font-size:14px;font-weight:700;color:var(--white)">Scaleway</div>
<div style="font-size:11px;color:#7C5CFC">Cloud europeen souverain</div>
</div>
</div>
<div style="font-size:12px;color:var(--text2);line-height:1.6;margin-bottom:12px">
<strong style="color:var(--white)">Services cles:</strong> Instances GPU (H100, L4, L40S), Managed Kubernetes (Kapsule), Object Storage, Serverless Functions, Managed Databases, Transactional Email<br><br>
<strong style="color:var(--white)">Avantages:</strong> Datacenters Paris + Amsterdam + Varsovie. GPU H100 disponible. 100% RGPD. API clean. Pricing transparent au seconde. Support francophone.
</div>
<div style="display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:10px">
<a href="https://console.scaleway.com" target="_blank" rel="noopener" class="btn btn-primary" style="font-size:12px;padding:8px 16px;text-decoration:none;background:#4B2DAF;border-color:#4B2DAF;flex:1;text-align:center">Creer un compte</a>
<img src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=https%3A//console.scaleway.com" alt="QR Scaleway" style="width:70px;height:70px;border-radius:6px;border:1px solid rgba(75,45,175,.2)">
</div>
<div style="display:flex;gap:6px;flex-wrap:wrap">
<span style="background:rgba(75,45,175,.1);color:#7C5CFC;padding:2px 8px;border-radius:4px;font-size:10px">GPU H100</span>
<span style="background:rgba(75,45,175,.1);color:#7C5CFC;padding:2px 8px;border-radius:4px;font-size:10px">Kubernetes</span>
<span style="background:rgba(75,45,175,.1);color:#7C5CFC;padding:2px 8px;border-radius:4px;font-size:10px">EU Souverain</span>
<span style="background:rgba(75,45,175,.1);color:#7C5CFC;padding:2px 8px;border-radius:4px;font-size:10px">100% RGPD</span>
</div>
</div>
</div>
<!-- Comparateur IA -->
<div class="form-card"><div class="form-card-title">Comparateur Cloud IA</div>
<div class="field"><label>Decrivez votre workload</label><textarea id="cb-workload" rows="3" placeholder="Ex: Application web Node.js + PostgreSQL + GPU pour inference IA, 10K users/jour, besoin CDN international..."></textarea></div>
<div class="row-3">
<div class="field"><label>Budget mensuel</label><select id="cb-budget"><option>A optimiser</option><option>50-$200</option><option>200-$500</option><option>500-$2000</option><option>2000+ USD</option></select></div>
<div class="field"><label>Region prioritaire</label><select id="cb-region"><option>Global</option><option>Europe (RGPD)</option><option>Amerique du Nord</option><option>MENA</option><option>Afrique</option><option>Asie-Pacifique</option></select></div>
<div class="field"><label>&nbsp;</label><button class="btn btn-primary btn-full" onclick="genCloudRecommendation()">Recommandation IA</button></div>
</div>
</div>
<div class="ai-out" id="cb-r"></div>
<!-- Pricing comparison table -->
<div class="form-card" style="margin-top:14px"><div class="form-card-title">Comparaison rapide des prix</div>
<div style="overflow-x:auto">
<table style="width:100%;border-collapse:collapse;font-size:12px">
<tr style="background:var(--bg);border-bottom:1px solid var(--border)">
<th style="padding:8px 12px;text-align:left;color:var(--text3)">Service</th>
<th style="padding:8px 12px;text-align:center;color:#FF6B00">Huawei Cloud</th>
<th style="padding:8px 12px;text-align:center;color:#7C5CFC">Scaleway</th>
<th style="padding:8px 12px;text-align:center;color:var(--text3)">AWS (ref)</th>
</tr>
<tr style="border-bottom:1px solid var(--border)">
<td style="padding:8px 12px;color:var(--white)">VM 4 vCPU / 16GB</td>
<td style="padding:8px 12px;text-align:center;color:var(--text2)">~$45/mo</td>
<td style="padding:8px 12px;text-align:center;color:var(--text2)">~$35/mo</td>
<td style="padding:8px 12px;text-align:center;color:var(--text3)">~$65/mo</td>
</tr>
<tr style="border-bottom:1px solid var(--border)">
<td style="padding:8px 12px;color:var(--white)">GPU Training</td>
<td style="padding:8px 12px;text-align:center;color:var(--text2)">Ascend 910B</td>
<td style="padding:8px 12px;text-align:center;color:var(--text2)">H100 / L40S</td>
<td style="padding:8px 12px;text-align:center;color:var(--text3)">A100 / H100</td>
</tr>
<tr style="border-bottom:1px solid var(--border)">
<td style="padding:8px 12px;color:var(--white)">Object Storage /TB</td>
<td style="padding:8px 12px;text-align:center;color:var(--text2)">~$15</td>
<td style="padding:8px 12px;text-align:center;color:var(--text2)">~$12</td>
<td style="padding:8px 12px;text-align:center;color:var(--text3)">~$23</td>
</tr>
<tr style="border-bottom:1px solid var(--border)">
<td style="padding:8px 12px;color:var(--white)">Managed DB</td>
<td style="padding:8px 12px;text-align:center;color:var(--text2)">RDS MySQL/PG</td>
<td style="padding:8px 12px;text-align:center;color:var(--text2)">Managed PG/Redis</td>
<td style="padding:8px 12px;text-align:center;color:var(--text3)">RDS</td>
</tr>
<tr>
<td style="padding:8px 12px;color:var(--white)">Region la plus proche</td>
<td style="padding:8px 12px;text-align:center;color:#22c55e;font-weight:600">MENA / Europe</td>
<td style="padding:8px 12px;text-align:center;color:#f59e0b">Europe (Paris)</td>
<td style="padding:8px 12px;text-align:center;color:var(--text3)">Europe (Ireland)</td>
</tr>
</table>
</div>
<div style="font-size:10px;color:var(--text3);margin-top:8px">* Prix indicatifs. Consultez les sites officiels pour les tarifs actuels. WEVAL Consulting est partenaire Huawei Cloud.</div>
</div>
</div>
<!-- === eSIGNATURE === -->
<div class="p-content" id="p-esign">
<div class="section-head"><div class="section-title">eSignature</div><div class="tag tag-green">Signature electronique</div></div>
<p class="module-sub">Creez et signez vos documents juridiques electroniquement</p>
<div class="form-card"><div class="form-card-title">Créer un document a signer</div>
<div class="row-2">
<div class="field"><label>Type de document</label><select id="sig-type"><option value="contract">Contrat de services</option><option value="nda">NDA / Confidentialite</option><option value="devis">Devis / Proposition</option><option value="avenant">Avenant</option><option value="pv">PV de reception</option></select></div>
<div class="field"><label>Signataires (separes par virgule)</label><input type="text" id="sig-signers" placeholder="WEVAL Consulting, Client X"></div>
</div>
<div class="field"><label>Description / Objet</label><textarea id="sig-desc" rows="3" placeholder="Prestation de conseil SAP S/4HANA pour migration brownfield..."></textarea></div>
<button class="btn btn-primary" onclick="initSignature()">Préparer le document</button>
</div>
<div class="ai-out" id="sig-r"></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs eSignature <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans eSignature</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">5 docs/mo<br>Signature souris<br>Download PDF</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">29$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">Illimite + envoi email<br>Tracking + rappels<br>Templates personnalisés</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('contractai_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
</div>
</div>
<!-- === LEAN SIX SIGMA === -->
<div class="p-content" id="p-leansixsigma">
<div class="section-head"><div class="section-title">Lean Six Sigma & Agile</div><div class="tag tag-green">Process Excellence</div></div>
<p class="module-sub">Optimisez vos processus metier avec les methodologies DMAIC, Lean, VSM, SAFe, Kaizen et SPC</p>
<div class="form-card"><div class="form-card-title">Analyser un processus</div>
<div class="field"><label>Processus à optimiser</label><textarea id="lss-process" rows="2" placeholder="Ex: Processus de livraison e-commerce, cycle de recrutement IT, pipeline CI/CD..."></textarea></div>
<div class="field" style="margin-bottom:6px"><label>Méthode</label></div>
<select id="lss-method" style="display:none"><option value="dmaic">DMAIC</option><option value="lean">Lean</option><option value="vsm">VSM</option><option value="agile">Agile</option><option value="safe">SAFe</option><option value="kaizen">Kaizen</option><option value="spc">SPC</option><option value="variability">DOE</option></select>
<div class="method-grid" id="lss-grid">
<div class="method-card selected" data-method="dmaic" onclick="selectMethod('lss-grid','dmaic','lss-method')"><div class="mc-top"><span class="mc-icon">&#x1F4CA;</span><span class="mc-name">DMAIC</span><span class="mc-badge" style="color:#a78bfa;background:rgba(167,139,250,.1)">Six Sigma</span></div><div class="mc-desc">Define &#x2192; Measure &#x2192; Analyze &#x2192; Improve &#x2192; Control</div></div>
<div class="method-card" data-method="lean" onclick="selectMethod('lss-grid','lean','lss-method')"><div class="mc-top"><span class="mc-icon">&#x1F504;</span><span class="mc-name">Lean</span><span class="mc-badge" style="color:var(--green);background:var(--green-bg)">Lean</span></div><div class="mc-desc">Eliminer les 8 gaspillages TIMWOODS</div></div>
<div class="method-card" data-method="vsm" onclick="selectMethod('lss-grid','vsm','lss-method')"><div class="mc-top"><span class="mc-icon">&#x1F5FA;</span><span class="mc-name">VSM</span><span class="mc-badge" style="color:var(--green);background:var(--green-bg)">Lean</span></div><div class="mc-desc">Value Stream Mapping current & future state</div></div>
<div class="method-card" data-method="safe" onclick="selectMethod('lss-grid','safe','lss-method')"><div class="mc-top"><span class="mc-icon">&#x1F680;</span><span class="mc-name">SAFe</span><span class="mc-badge" style="color:var(--orange);background:var(--orange-bg)">Agile</span></div><div class="mc-desc">Scaled Agile Framework &#x2014; 4 niveaux</div></div>
<div class="method-card" data-method="kaizen" onclick="selectMethod('lss-grid','kaizen','lss-method')"><div class="mc-top"><span class="mc-icon">&#x26A1;</span><span class="mc-name">Kaizen</span><span class="mc-badge" style="color:var(--green);background:var(--green-bg)">Lean</span></div><div class="mc-desc">Evenement amelioration continue 5 jours</div></div>
<div class="method-card" data-method="spc" onclick="selectMethod('lss-grid','spc','lss-method')"><div class="mc-top"><span class="mc-icon">&#x1F4C8;</span><span class="mc-name">SPC</span><span class="mc-badge" style="color:#a78bfa;background:rgba(167,139,250,.1)">Six Sigma</span></div><div class="mc-desc">Controle statistique Cp/Cpk</div></div>
<div class="method-card" data-method="agile" onclick="selectMethod('lss-grid','agile','lss-method')"><div class="mc-top"><span class="mc-icon">&#x1F3C3;</span><span class="mc-name">Agile</span><span class="mc-badge" style="color:var(--orange);background:var(--orange-bg)">Agile</span></div><div class="mc-desc">Transformation Scrum/Kanban/SAFe</div></div>
<div class="method-card" data-method="variability" onclick="selectMethod('lss-grid','variability','lss-method')"><div class="mc-top"><span class="mc-icon">&#x1F9EA;</span><span class="mc-name">DOE</span><span class="mc-badge" style="color:#a78bfa;background:rgba(167,139,250,.1)">Six Sigma</span></div><div class="mc-desc">Reduction variabilite par Design of Experiments</div></div>
</div>
<button class="btn btn-primary btn-full" onclick="genLeanSixSigma()">Analyser</button>
</div>
<div class="ai-out" id="lss-r"></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F9EA;</span> QualityAI &#x2014; Auto-diagnostic Six Sigma WEVIA <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div style="font-size:12px;color:var(--text2);margin:10px 0 12px;line-height:1.6">Lance des tests automatisés sur les APIs WEVIA et calcule Cp, Cpk, sigma level, variabilite.</div>
<div class="row-3">
<div class="field"><label>Domaine</label><select id="qa-domain"><option value="all">Tous les domaines (7)</option><option value="sap">SAP seul</option><option value="cyber">Cyber seul</option><option value="email">Email seul</option><option value="hc">Healthcare seul</option><option value="bank">Banking seul</option><option value="code">Code seul</option><option value="creative">Creative seul</option></select></div>
<div class="field"><label>Runs par domaine</label><select id="qa-runs"><option>2</option><option selected>3</option><option>5</option></select></div>
<div class="field"><label>&#160;</label><button class="btn btn-primary btn-full" style="background:#22c55e;border-color:#22c55e" onclick="runQualityTest()">Lancer test 6&#x3c3;</button></div>
</div>
<div class="ai-out" id="qa-r"></div>
</div>
</details>
</div>
<!-- === AUDIT & COMPLIANCE === -->
<div class="p-content" id="p-audit">
<div class="section-head"><div class="section-title">Audit & Compliance</div><div style="display:inline-block;background:var(--green-bg);color:var(--green);font-size:10px;padding:2px 8px;border-radius:4px;margin-left:8px;font-weight:600">Essai gratuit</div><div class="tag tag-green">Conformite</div></div>
<p class="module-sub">Lancez un audit ISO 27001, RGPD, ISO 9001 ou SOC 2 avec recommandations IA</p>
<div class="form-card"><div class="form-card-title">Lancer un audit</div>
<div class="field"><label>Périmètre</label><textarea id="aud-scope" rows="2" placeholder="Ex: Systeme d'information banque X, Application e-commerce, Infrastructure cloud..."></textarea></div>
<div class="row-2"><div class="field"><label>Référentiel</label><select id="aud-std"><option value="iso27001">ISO 27001 (Securite)</option><option value="rgpd">RGPD / Protection des donnees</option><option value="iso9001">ISO 9001 (Qualite)</option><option value="soc2">SOC 2 Type II</option></select></div><div class="field"><label>&nbsp;</label><button class="btn btn-primary btn-full" onclick="genAudit()">Lancer l'audit</button></div></div>
</div>
<div class="ai-out" id="aud-r"></div>
</div>
<!-- === RESELLER === -->
<div class="p-content" id="p-reseller">
<div class="section-head"><div class="section-title">Programme Reseller</div><div class="tag tag-gold">WEVAL Partner</div></div>
<div id="reseller-content"><div class="ld-spinner"></div></div>
<script>setTimeout(()=>{if(typeof loadReseller==='function')loadReseller()},600)</script>
<p class="module-sub">Creez des codes promo et touchez 15% de commission sur la consommation API</p>
<div class="form-card" style="margin-top:16px"><div class="form-card-title">Créer un code promo</div>
<div class="row-3">
<div class="field"><label>Code (optionnel)</label><input type="text" id="rc-code" placeholder="Auto-genere si vide"></div>
<div class="field"><label>Credit ($)</label><select id="rc-credit"><option>5</option><option selected>10</option><option>25</option><option>50</option></select></div>
<div class="field"><label>Max utilisations</label><input type="number" id="rc-max" value="100" min="1" max="10000"></div>
</div>
<button class="btn btn-primary" onclick="createResellerCode()">Créer le code</button>
</div>
<div class="form-card" style="margin-top:16px"><div class="form-card-title">Comment ca marche</div>
<div style="font-size:12px;color:var(--text2);line-height:1.8">
1. Creez un code promo avec le credit de votre choix<br>
2. Partagez le code a vos clients/partenaires<br>
3. Ils s'inscrivent et recoivent le credit automatiquement<br>
4. Vous touchez <strong style="color:var(--accent)">15% de commission</strong> sur leur consommation API<br>
5. Les factures sont emises par WEVAL LLC
</div>
</div>
</div>
<script>if(typeof loadMySubscriptions==="function")setTimeout(loadMySubscriptions,1000)</script>
<!-- MEDREACH -->
<!-- MEDREACH -->
<div class="panel" id="p-mr">
<p class="module-sub">Base de 18K+ medecins verifies au Maroc, Algerie et Tunisie</p>
<div class="form-card"><div class="form-card-title">Recherche de professionnels de santé</div>
<div class="row-3"><div class="field"><label>Spécialité</label><input type="text" id="mr-s" placeholder="Cardiologie..."></div><div class="field"><label>Ville</label><input type="text" id="mr-c" placeholder="Casablanca..."></div><div class="field"><label>Pays</label><select id="mr-p"><option value="">Tous</option><option value="MA">Maroc</option><option value="DZ">Algérie</option><option value="TN">Tunisie</option></select></div></div>
<div style="display:flex;gap:6px"><button class="btn btn-primary" onclick="searchMR()">Rechercher</button><button class="btn btn-secondary" onclick="statsMR()">Statistiques</button><button class="btn btn-secondary" onclick="specsMR()">Spécialités</button><button class="btn btn-secondary" onclick="citiesMR()">Villes</button></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Enrichissement donnees</div>
<div class="row-3"><div class="field"><label>Type enrichissement</label><select id="mr-enr"><option value="phone">Telephones</option><option value="address">Adresses completes</option><option value="hours">Horaires consultation</option><option value="reviews">Avis patients</option><option value="all">Pack complet</option></select></div><div class="field"><label>Volume</label><input type="text" id="mr-vol" placeholder="Ex: 500 medecins"></div><div class="field"><label>Export</label><select id="mr-exp"><option>CSV</option><option>Excel</option><option>JSON API</option><option>CRM (Salesforce/HubSpot)</option></select></div></div>
<button class="btn btn-secondary" onclick="order('medreach_enrichment',{type:v('mr-enr'),volume:v('mr-vol'),export:v('mr-exp')})">Commander enrichissement</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Campagne HCP MedReach</div>
<div class="row-3"><div class="field"><label>Specialite cible</label><input type="text" id="mr-camp-s" placeholder="Cardiologie, Dermatologie..."></div><div class="field"><label>Zone</label><input type="text" id="mr-camp-z" placeholder="Casablanca, Grand Casablanca..."></div><div class="field"><label>Canal</label><select><option>Email personnalisé</option><option>SMS consent</option><option>Email + SMS</option><option>LinkedIn InMail</option></select></div></div>
<div class="row-3"><div class="field"><label>Objet campagne</label><select><option>Lancement produit pharma</option><option>Invitation congres/webinar</option><option>Echantillons gratuits</option><option>Partenariat clinique</option><option>Custom</option></select></div><div class="field"><label>Volume</label><select><option>50-100 (micro-cible)</option><option>100-500 (standard)</option><option>500-2000 (large)</option><option>2000+ (masse)</option></select></div><div class="field"><label>Consent RGPD</label><select><option>Via consent.wevup.app</option><option>Opt-in existant</option></select></div></div>
<button class="btn btn-secondary" onclick="order('ethica_campaign',{spec:v('mr-camp-s'),zone:v('mr-camp-z')})">Planifier campagne</button></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F517;</span> API & Integration <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">API Integration directe</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px;font-family:monospace;font-size:10px;color:var(--accent);word-break:break-all;line-height:1.8">
<strong style="color:var(--green)">GET</strong> /api/medreach/search.php?specialty=X&city=Y&api_key=KEY<br>
<strong style="color:var(--green)">GET</strong> /api/medreach/search.php?action=stats<br>
<strong style="color:var(--green)">GET</strong> /api/medreach/search.php?action=specialties&country=MA<br>
<strong style="color:var(--green)">GET</strong> /api/medreach/search.php?action=cities&country=MA<br>
<strong style="color:var(--orange)">POST</strong> /api/medreach/export.php (CSV bulk, auth required)
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages MedReach <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages MedReach vs concurrents</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; 15,000++ professionnels de sante verifies multi-source — base la plus large internationaux<br>
&#x2705; Multi-source cross-validee (les autres = 1 seule source)<br>
&#x2705; API REST temps reel (pas de fichier CSV statique)<br>
&#x2705; Consent RGPD via consent.wevup.app integre<br>
&#x2705; Enrichissement continu par data enrichment automatisé<br>
&#x2705; Campagnes email delivrees par Brain Engine 97% inbox (pas un simple export)
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs MedReach <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:16px;border:1px solid rgba(99,102,241,.2)"><div class="form-card-title">Plans MedReach</div>
<div style="display:flex;gap:12px;flex-wrap:wrap">
<div style="flex:1;min-width:140px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">0$</div><div style="font-size:11px;color:var(--text2);line-height:1.6">20 req/heure<br>Nom + Specialite + Ville<br>Sans telephone</div><button class="btn btn-secondary btn-full" style="margin-top:10px" disabled>Plan actuel</button></div>
<div style="flex:1;min-width:140px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">299$<span style="font-size:12px;color:var(--text3)">/mo</span></div><div style="font-size:11px;color:var(--text2);line-height:1.6">500 req/heure<br>Telephone + Email + Adresse<br>Export CSV/Excel<br>15,000+ medecins</div><button class="btn btn-primary btn-full" style="margin-top:10px" onclick="buyProduct('medreach_pro')">Souscrire Pro</button></div>
<div style="flex:1;min-width:140px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--gold,#f0c674);text-transform:uppercase">Enterprise</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">799$<span style="font-size:12px;color:var(--text3)">/mo</span></div><div style="font-size:11px;color:var(--text2);line-height:1.6">Illimite<br>Donnees enrichies exclusives<br>Webhook temps reel<br>Compte dedie</div><button class="btn btn-primary btn-full" style="margin-top:10px" onclick="buyProduct('medreach_enterprise')">Souscrire Enterprise</button></div>
</div></div>
</div>
</details>
<div class="result" id="mr-r"></div></div>
<!-- GPU -->
<div class="panel" id="p-gpu">
<p class="module-sub">Inference GPU souveraine sur nos serveurs avec 51 modeles disponibles</p>
<div class="form-card"><div class="form-card-title">Chat IA — GPU souverain</div>
<div class="row-2"><div class="field"><label>Modèle</label><select id="gpu-m"><option value="qwen2.5:3b">WEVIA Deep</option><option value="phi3:mini">WEVIA Express</option><option value="qwen2.5:3b">WEVIA Code</option><option value="gemma2:2b">WEVIA Light</option></select></div><div class="field"><label>Température: <span id="gpu-tv">0.7</span></label><input type="range" id="gpu-t" min="0" max="20" value="7" style="accent-color:var(--accent)" oninput="$('gpu-tv').textContent=(this.value/10).toFixed(1)"></div></div>
<div class="field"><label>System prompt (optionnel)</label><input type="text" id="gpu-s" placeholder="Ex: Tu es un expert Python senior."></div>
<div class="field"><label>Message</label><textarea id="gpu-msg" rows="3" placeholder="Votre question..."></textarea></div>
<button class="btn btn-primary" onclick="chatGPU()">Envoyer</button></div>
<div class="loading" id="gpu-ld"><div class="ld-spinner"></div><div class="ld-text">Inference en cours...</div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Demos rapides</div>
<div class="chip-group"><span class="chip" onclick="$('gpu-msg').value='Explique le RLHF en IA';chatGPU()">RLHF</span><span class="chip" onclick="$('gpu-msg').value='Script Python web data enrichment';chatGPU()">Code Python</span><span class="chip" onclick="$('gpu-msg').value='Analyse SWOT consulting IA';chatGPU()">SWOT</span><span class="chip" onclick="$('gpu-msg').value='Redige un email commercial B2B';chatGPU()">Email B2B</span></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">API Integration</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px;font-family:monospace;font-size:11px;color:var(--accent);word-break:break-all">curl -X POST /api/gpu/chat.php -H "X-API-Key: VOTRE_CLE" -d '{"model":"wevia-deep","messages":[{"role":"user","content":"Hello"}]}'</div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Demos interactives</div>
<div class="chip-group" style="flex-wrap:wrap"><span class="chip" onclick="$('gpu-msg').value='Explique les mecanismes du RLHF en intelligence artificielle avec formules mathematiques';chatGPU()">RLHF + Formules</span><span class="chip" onclick="$('gpu-msg').value='Genere un script Python complet pour collecter des informations avec BeautifulSoup, gestion erreurs et export CSV';chatGPU()">Web Scraper Python</span><span class="chip" onclick="$('gpu-msg').value='Analyse SWOT detaillee pour un cabinet de consulting IA en 2026';chatGPU()">SWOT Consulting</span><span class="chip" onclick="$('gpu-msg').value='Redige un email B2B persuasif pour vendre une solution SaaS a un DSI';chatGPU()">Email B2B</span><span class="chip" onclick="$('gpu-msg').value='Architecture microservices pour une plateforme e-commerce avec diagramme';chatGPU()">Architecture</span><span class="chip" onclick="$('gpu-msg').value='Cahier des charges complet pour une application mobile de livraison last-mile';chatGPU()">CDC Mobile</span></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Batch Processing</div>
<div class="field"><label>Prompts en lot (1 par ligne)</label><textarea id="gpu-batch" rows="3" placeholder="Prompt 1&#10;Prompt 2&#10;Prompt 3"></textarea></div>
<div class="row-3"><div class="field"><label>Modele</label><select id="gpu-bm"><option value="phi3:mini">WEVIA Express (rapide)</option><option value="qwen2.5:3b">WEVIA Deep (reasoning)</option></select></div><div class="field"><label>Format sortie</label><select><option>Texte brut</option><option>JSON structure</option><option>Markdown</option><option>CSV (1 reponse/ligne)</option></select></div></div>
<button class="btn btn-secondary" onclick="order('gpu_batch',{prompts:v('gpu-batch'),model:v('gpu-bm')})">Executer le batch</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Fine-tuning & RAG</div>
<div class="row-3"><div class="field"><label>Service</label><select><option>RAG sur vos documents (PDF/DOCX)</option><option>Fine-tuning modele custom</option><option>Embeddings custom</option><option>Classification sur mesure</option></select></div><div class="field"><label>Volume donnees</label><select><option>< 100 documents</option><option>100-1000 documents</option><option>1000+ documents</option></select></div><div class="field"><label>Deploiement</label><select><option>API WEVAL (cloud souverain)</option><option>On-premise chez vous</option><option>Hybrid</option></select></div></div>
<button class="btn btn-secondary" onclick="order('gpu_custom',{})">Demander un devis</button></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F517;</span> API Documentation <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">API Documentation</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px;font-family:monospace;font-size:10px;color:var(--accent);word-break:break-all;line-height:1.8">
<strong style="color:var(--orange)">POST</strong> /api/gpu/chat.php<br>
&nbsp;&nbsp;Headers: X-API-Key: YOUR_KEY, Content-Type: application/json<br>
&nbsp;&nbsp;Body: {"model":"wevia-deep","messages":[{"role":"user","content":"..."}]}<br><br>
<strong style="color:var(--green)">GET</strong> /api/gpu/chat.php?action=models<br>
<strong style="color:var(--green)">GET</strong> /api/gpu/chat.php?action=embed (embeddings)<br><br>
<strong>Rate limits:</strong> Free=5req/h | Pro=100req/h | Enterprise=illimite<br>
<strong>Latence:</strong> 5-30s (14B) | 2-10s (8B)
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Pourquoi WEVAL GPU <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Pourquoi WEVAL GPU vs solutions cloud/fournisseurs IA</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>GPU souverain</strong> — vos donnees ne quittent JAMAIS nos serveurs (Hetzner EU)<br>
&#x2705; <strong>Zero data retention</strong> — aucun log de vos prompts (fournisseurs IA cloud garde 30j)<br>
&#x2705; <strong>3-5x moins cher</strong> — pas de markup token, cout GPU fixe<br>
&#x2705; <strong>Pas de censure</strong> — pas de content policy restrictive<br>
&#x2705; <strong>RTX 4000 Ada 20GB</strong> dedie — pas de queue partagee<br>
&#x2705; <strong>API fournisseurs IA cloud-compatible</strong> — changez 1 ligne de code, zero migration<br>
&#x2705; <strong>RAG + Fine-tuning</strong> — sur vos donnees privees, impossible chez fournisseurs IA cloud<br>
&#x2705; <strong>Modeles open-source</strong> — WEVIA Deep, WEVIA Fast, WEVIA (pas de vendor lock-in)
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs WEVIA Inference <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:16px;border:1px solid rgba(99,102,241,.2)"><div class="form-card-title">Plans WEVIA Inference</div>
<div style="display:flex;gap:12px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">0$</div><div style="font-size:11px;color:var(--text2);line-height:1.6">5 req/heure<br>Tous modeles<br>Rate limited</div><button class="btn btn-secondary btn-full" style="margin-top:10px" disabled>Actuel</button></div>
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--accent);text-transform:uppercase;font-weight:700">Starter</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">49$<span style="font-size:12px;color:var(--text3)">/mo</span></div><div style="font-size:11px;color:var(--text2);line-height:1.6">1000 req/mo<br>Tous modeles<br>Embeddings</div><button class="btn btn-primary btn-full" style="margin-top:10px" onclick="buyProduct('gpu_starter')">Starter</button></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">99$<span style="font-size:12px;color:var(--text3)">/mo</span></div><div style="font-size:11px;color:var(--text2);line-height:1.6">10K req/mo<br>Priority queue<br>Batch + Streaming</div><button class="btn btn-primary btn-full" style="margin-top:10px" onclick="buyProduct('gpu_pro')">Pro</button></div>
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:11px;color:var(--gold,#f0c674);text-transform:uppercase">Enterprise</div><div style="font-size:24px;font-weight:700;color:var(--white);margin:8px 0">499$<span style="font-size:12px;color:var(--text3)">/mo</span></div><div style="font-size:11px;color:var(--text2);line-height:1.6">Illimite<br>GPU dedie<br>SLA + Fine-tuning</div><button class="btn btn-primary btn-full" style="margin-top:10px" onclick="buyProduct('gpu_enterprise')">Enterprise</button></div>
</div></div>
</div>
</details>
<div class="result" id="gpu-r"></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x2601;</span> Besoin de plus de GPU? &#x2014; Huawei Cloud <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(255,107,0,.2);background:rgba(255,107,0,.03)"><div class="form-card-title" style="color:#FF6B00">Besoin de plus de GPU? — Huawei Cloud</div>
<div style="font-size:12px;color:var(--text2);line-height:1.6;margin-bottom:10px">Scalez avec Huawei Cloud GPU (Ascend 910B) + ModelArts pour le fine-tuning. Via notre lien partenaire WEVAL.</div>
<a href="https://account-intl.huaweicloud.com/obmgr/invitation/invitation.html?id=8a859c7e-093d-47f9-84df-307f36f70672" target="_blank" rel="noopener" class="btn btn-secondary" style="font-size:12px;padding:6px 14px;text-decoration:none;border-color:#FF6B00;color:#FF6B00">Ouvrir un compte Huawei Cloud</a>
</div>
</div>
</details></div>
<!-- CONTENT FACTORY -->
<div class="panel" id="p-cf">
<p class="module-sub">Generez articles, posts, newsletters et contenus marketing avec l'IA</p>
<div class="form-card"><div class="form-card-title">Génération de contenu</div>
<div class="row-2"><div class="field"><label>Template</label><select id="cf-t"><option value="blog_article">Article de blog</option><option value="product_description">Fiche produit</option><option value="linkedin_post">Post LinkedIn</option><option value="email_sequence">Séquence email ×3</option><option value="social_media_pack">Pack social ×5</option><option value="seo_meta">Meta SEO</option></select></div><div class="field"><label>Langue</label><select id="cf-l"><option value="fr">Français</option><option value="en">Anglais</option><option value="ar">Arabe</option></select></div></div>
<div class="field"><label>Sujet</label><textarea id="cf-topic" rows="3" placeholder="Décrivez le sujet ou le produit..."></textarea></div>
<button class="btn btn-primary" onclick="genCF()">Générer</button></div>
<div class="loading" id="cf-ld"><div class="ld-spinner"></div><div class="ld-text">Génération IA...</div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Generation en lot</div>
<div class="field"><label>Sujets (1/ligne)</label><textarea id="cf-batch" rows="2" placeholder="Sujet 1"></textarea></div>
<button class="btn btn-secondary" onclick="order('content_batch',{topics:v('cf-batch')})">Commander le lot</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Options avancees</div>
<div class="row-3"><div class="field"><label>Ton</label><select id="cf-tone"><option>Professionnel</option><option>Expert technique</option><option>Persuasif</option><option>Storytelling</option><option>Academique</option><option>Journalistique</option></select></div><div class="field"><label>Audience</label><select id="cf-aud"><option>B2B Decideurs</option><option>B2C Grand public</option><option>Developpeurs</option><option>C-level / Board</option><option>Investisseurs</option><option>Etudiants</option></select></div><div class="field"><label>Longueur</label><select id="cf-len"><option>Tweet (280 chars)</option><option>Court (~300 mots)</option><option selected>Moyen (~600 mots)</option><option>Long (~1200 mots)</option><option>Tres long (~2000 mots)</option></select></div></div>
<div class="row-3"><div class="field"><label>Mots-cles SEO</label><input type="text" id="cf-kw" placeholder="IA souveraine, GPU, cloud, digital transformation"></div><div class="field"><label>CTA</label><input type="text" id="cf-cta" placeholder="Ex: Demandez une demo gratuite"></div><div class="field"><label>Inclure</label><select multiple style="height:50px"><option selected>Statistiques</option><option>Citations</option><option selected>Exemples concrets</option><option>Tableaux</option></select></div></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Generation en lot (Content Calendar)</div>
<div class="row-3"><div class="field"><label>Sujets (1/ligne, max 20)</label><textarea id="cf-batch-2" rows="3" placeholder="IA souveraine en entreprise&#10;Cybersécurité PME 2026&#10;Transformation digitale Afrique"></textarea></div><div class="field"><label>Planning</label><select id="cf-plan"><option>Tout maintenant</option><option>1/jour (lundi-vendredi)</option><option>2/semaine</option><option>1/semaine</option></select></div><div class="field"><label>Canaux</label><select multiple style="height:50px"><option selected>Blog</option><option selected>LinkedIn</option><option>Newsletter</option><option>Twitter/X</option></select></div></div>
<button class="btn btn-secondary" onclick="order('content_batch',{topics:v('cf-batch'),plan:v('cf-plan')})">Planifier le calendrier</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Reformulation & Traduction</div>
<div class="field"><label>Texte source</label><textarea id="cf-rewrite" rows="3" placeholder="Collez votre texte ici..."></textarea></div>
<div class="row-3"><div class="field"><label>Action</label><select id="cf-action"><option>Reformuler (anti-plagiat)</option><option>Traduire FR&#8594;EN</option><option>Traduire FR&#8594;AR</option><option>Traduire EN&#8594;FR</option><option>Simplifier</option><option>Rendre plus persuasif</option><option>Adapter au ton LinkedIn</option></select></div><div class="field"><label>&nbsp;</label><button class="btn btn-secondary btn-full" onclick="weviaGenerate(v('cf-action')+': '+v('cf-rewrite'),'cf-r')">Transformer avec IA</button></div></div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Jasper / Copy.ai <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs Jasper / Copy.ai</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>GPU souverain</strong> — vos donnees restent en Europe (Jasper = USA)<br>
&#x2705; <strong>Cout 10x inferieur</strong> — GPU local vs API token (Jasper = 49$/mo minimum)<br>
&#x2705; <strong>Francais natif</strong> — modeles optimises FR (pas traduit de l anglais)<br>
&#x2705; <strong>Arabe support</strong> — marche arabe/francophone unique<br>
&#x2705; <strong>SEO integre</strong> — pas besoin de SurferSEO en plus<br>
&#x2705; <strong>Batch + Calendar</strong> — planification editoriale incluse<br>
&#x2705; <strong>Anti-plagiat natif</strong> — chaque texte est unique (GPU genere, pas de template)
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs Content Factory <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans Content Factory</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">3 gen/heure</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">29$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">Illimite + tous templates + SEO</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('content_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="ai-out" id="cf-r"></div></div>
<!-- PROPOSALAI -->
<div class="panel" id="p-pa">
<p class="module-sub">Creez des propositions commerciales personnalisées en quelques clics</p>
<div class="form-card"><div class="form-card-title">Générateur de propositions commerciales</div>
<div class="row-2"><div class="field"><label>Client</label><input type="text" id="pa-c" placeholder="Nom du client"></div><div class="field"><label>Secteur</label><select id="pa-s"><option>Pharmaceutique</option><option>Banque & Finance</option><option>Industrie</option><option>Retail</option><option>Télécoms</option><option>Énergie</option><option>IT / Tech</option></select></div></div>
<div class="field"><label>Besoin</label><textarea id="pa-b" rows="4" placeholder="Contexte, objectifs, contraintes..."></textarea></div>
<div class="field"><label>Services proposés</label><div class="chip-group" id="pa-chips"><span class="chip" data-v="ERP">ERP</span><span class="chip" data-v="Arsenal">Arsenal</span><span class="chip" data-v="IA & Data">IA</span><span class="chip" data-v="Cloud">Cloud</span><span class="chip" data-v="Cyber">Cyber</span><span class="chip" data-v="Email">Email</span><span class="chip" data-v="WEVIA">WEVIA</span><span class="chip" data-v="Process">Process</span></div></div>
<div class="row-2"><div class="field"><label>Budget</label><select id="pa-bg"><option>À définir</option><option>10-30K$</option><option>30-80K$</option><option>80-200K$</option></select></div><div class="field"><label>Ton</label><select id="pa-tn"><option value="professionnel">Professionnel</option><option value="premium Big4">Premium</option><option value="technique">Technique</option></select></div></div>
<button class="btn btn-primary" onclick="genPA()">Générer (Claude)</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genPropale()">WEVIA IA</button></div>
<div class="loading" id="pa-ld"><div class="ld-spinner"></div><div class="ld-text">Rédaction en cours...</div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs ProposalAI <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans ProposalAI</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">Demo</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">19$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">Illimite + templates + export PDF</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('proposalai_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="ai-out" id="pa-r"></div></div>
<!-- BLUEPRINTAI -->
<div class="panel" id="p-bp">
<p class="module-sub">Documentez et standardisez vos processus techniques et metier</p>
<div class="form-card"><div class="form-card-title">Documentation process</div>
<div class="row-2"><div class="field"><label>Type</label><select id="bp-t"><option value="bpmn">Logigramme BPMN</option><option value="blueprint">Blueprint L1/L2/L3</option><option value="cdc">Cahier des Charges</option><option value="impact">Étude d'Impact</option><option value="problem">Problem Solving 8D</option><option value="sop">SOP / Procédure</option><option value="matrix">Matrice RACI</option><option value="kpi">KPI Dashboard</option></select></div><div class="field"><label>Domaine</label><select id="bp-d"><option>Supply Chain</option><option>Achats</option><option>Finance</option><option>Manufacturing</option><option>Transport</option><option>Qualité</option><option>RH</option><option>IT</option></select></div></div>
<div class="row-2"><div class="field"><label>ERP</label><select id="bp-e"><option>Aucun</option><option>SAP S/4HANA</option><option>Oracle</option><option>Odoo</option><option>Custom</option></select></div><div class="field"><label>Niveau</label><select id="bp-l"><option>L2 - Détaillé</option><option>L1 - Macro</option><option>L3 - Opérationnel</option></select></div></div>
<div class="field"><label>Description</label><textarea id="bp-desc" rows="4" placeholder="Processus à documenter..."></textarea></div>
<button class="btn btn-primary" onclick="genBP()">Générer (Claude)</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Genere un document professionnel. '+v('bp-desc'),'bp-r')">WEVIA IA</button></div>
<div class="loading" id="bp-ld"><div class="ld-spinner"></div><div class="ld-text">Analyse process...</div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs BlueprintAI <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans BlueprintAI</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">Demo</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">25$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">Tous types docs + BPMN + export</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('blueprintai_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="ai-out" id="bp-r"></div></div>
<!-- LEADFORGE -->
<div class="panel" id="p-lf">
<p class="module-sub">Commandez des leads B2B qualifies par secteur et zone geographique</p>
<div class="form-card"><div class="form-card-title">Commande de leads B2B</div>
<div class="row-3"><div class="field"><label>Secteur</label><select id="lf-s"><option>Santé</option><option>Juridique</option><option>Restauration</option><option>Retail</option><option>BTP</option><option>IT</option><option>Éducation</option></select></div><div class="field"><label>Pays</label><select id="lf-c"><option>France</option><option>USA</option><option>Maroc</option><option>Algerie</option><option>Tunisie</option><option>Canada</option><option>Belgique</option><option>Suisse</option><option>UK</option><option>Allemagne</option><option>Senegal</option><option>Cote d'Ivoire</option></select></div><div class="field"><label>Quantité</label><input type="number" id="lf-q" value="500"></div></div>
<div class="field"><label>Critères spécifiques</label><textarea id="lf-det" rows="2" placeholder="Ville, taille entreprise, critères..."></textarea></div>
<button class="btn btn-primary" onclick="order('leadforge',{sector:v('lf-s'),country:v('lf-c'),qty:v('lf-q'),details:v('lf-det')})">Commander</button><button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Analyse le marche B2B pour le secteur '+v('lf-s')+' au '+v('lf-c')+'. Inclus: taille marche, acteurs cles, segmentation, personas decideurs, canaux acquisition, strategie approche optimale, budget prospection recommande.','lf-r')">Analyse marche IA</button></div><div class="form-card" style="margin-top:12px"><div class="form-card-title">Options</div>
<div class="row-3"><div class="field"><label>Source</label><select id="lf-src"><option>Google Maps</option><option>LinkedIn</option><option>Sites sectoriels</option><option>Toutes sources</option></select></div><div class="field"><label>Champs</label><select id="lf-f"><option>Nom+Email+Tel</option><option>+ Adresse+Site</option><option>+ LinkedIn+Poste+CA</option></select></div><div class="field"><label>Format</label><select id="lf-fmt"><option>CSV</option><option>Excel</option><option>JSON</option></select></div></div>
<div class="field"><label>Criteres specifiques</label><textarea id="lf-crit" rows="2" placeholder="Ex: +50 employes, decision-makers uniquement..."></textarea></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Tarifs</div>
<div style="font-size:11px;color:var(--text2);line-height:1.8"><strong>100-499</strong>: 0.$49/lead (24-48h) | <strong>500-999</strong>: 0.$40 (48-72h) | <strong>1000+</strong>: 0.$35 (3-5j) | <strong>5000+</strong>: 0.$29 (devis)</div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Configuration avancee</div>
<div class="row-3"><div class="field"><label>Source</label><select id="lf-src-2"><option>Google Maps</option><option>LinkedIn Sales Navigator</option><option>Sites sectoriels</option><option>Annuaires professionnels</option><option>Toutes sources (cross-match)</option></select></div><div class="field"><label>Champs requis</label><select id="lf-f-2"><option>Nom + Email + Tel</option><option>+ Adresse + Site web</option><option>+ LinkedIn + Poste + CA</option><option>+ Technos utilisees</option></select></div><div class="field"><label>Format</label><select id="lf-fmt-2"><option>CSV</option><option>Excel</option><option>JSON API</option><option>Import Salesforce</option><option>Import HubSpot</option></select></div></div>
<div class="row-3"><div class="field"><label>Taille entreprise</label><select><option>Toutes tailles</option><option>1-10 employes</option><option>10-50</option><option>50-200</option><option>200-1000</option><option>1000+</option></select></div><div class="field"><label>Decision maker</label><select><option>Tous contacts</option><option>CEO / DG</option><option>CTO / DSI</option><option>CMO / Marketing</option><option>DAF / Finance</option><option>RH / DRH</option></select></div><div class="field"><label>Verification</label><select><option>Email SMTP check</option><option>+ Phone verification</option><option>+ LinkedIn cross-check</option><option>Triple verification</option></select></div></div>
<div class="field"><label>Criteres specifiques</label><textarea id="lf-crit-2" rows="2" placeholder="Ex: entreprises ayant un site web, utilisant SAP, dans le secteur pharma, CA > 5M USD..."></textarea></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Abonnement leads recurrents</div>
<div class="row-3"><div class="field"><label>Frequence</label><select><option>Hebdomadaire (50 leads/sem)</option><option>Bi-mensuel (100 leads/2sem)</option><option>Mensuel (200 leads/mo)</option></select></div><div class="field"><label>Auto-enrichissement</label><select><option>Oui (email + tel + LinkedIn)</option><option>Non (brut)</option></select></div><div class="field"><label>Auto-outreach</label><select><option>Non</option><option>Oui (via OutreachAI)</option></select></div></div>
<button class="btn btn-secondary" onclick="order('leadforge_subscription',{})">Activer l abonnement</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Tarification</div>
<table style="width:100%;font-size:11px;color:var(--text2);border-collapse:collapse"><tr style="border-bottom:1px solid var(--border);color:var(--white)"><td style="padding:6px"><strong>Volume</strong></td><td>Prix/lead</td><td>Delai</td><td>Verification</td><td>Garantie</td></tr><tr><td style="padding:6px">100-499</td><td>0.$50</td><td>24-48h</td><td>Email check</td><td>90% valid</td></tr><tr><td style="padding:6px">500-999</td><td>0.$40</td><td>48-72h</td><td>Email+Tel+Google</td><td>93% valid</td></tr><tr><td style="padding:6px">1000-4999</td><td>0.$35</td><td>3-5 jours</td><td>Triple verif</td><td>95% valid</td></tr><tr><td style="padding:6px">5000+</td><td>0.$30</td><td>Sur devis</td><td>Enrichissement complet</td><td>97% valid</td></tr></table></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages LeadForge <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Ce que LeadForge fait mieux</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>Cross-source matching</strong> — Google + LinkedIn + annuaires (ZoomInfo = source unique)<br>
&#x2705; <strong>Verification triple</strong> — SMTP + phone + LinkedIn (Apollo = email seulement)<br>
&#x2705; <strong>Expertise international/MENA</strong> — donnees locales que ZoomInfo n a pas<br>
&#x2705; <strong>Pipeline complet</strong> — leads → OutreachAI → MailWarm → Brain Engine<br>
&#x2705; <strong>Pas d abonnement oblige</strong> — achat a la carte (Apollo = 49$/mo minimum)
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs LeadForge <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans LeadForge</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">Sur devis</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">200$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">500 leads B2B verifies</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('leadforge_500')">Souscrire</button></div>
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:#f0c674;text-transform:uppercase">Enterprise</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">350$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">1000 leads + enrichissement</div><button class="btn btn-secondary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('leadforge_1000')">Enterprise</button></div>
</div></div>
</div>
</details>
<div class="result" id="lf-r"></div></div>
<!-- MAILWARM -->
<div class="panel" id="p-mw">
<p class="module-sub">Construisez la reputation de vos domaines email progressivement</p>
<div class="form-card"><div class="form-card-title">Email reputation building</div>
<div class="row-2"><div class="field"><label>Domaine</label><input type="text" id="mw-d" placeholder="mondomaine.com"></div><div class="field"><label>Provider</label><select id="mw-p"><option>Office 365</option><option>Gmail</option><option>SMTP Custom</option></select></div></div>
<div class="field"><label>Nombre de comptes</label><select id="mw-n"><option>1-5</option><option>5-10</option><option>10-25</option><option>25+</option></select></div>
<button class="btn btn-primary" onclick="order('mailwarm',{domain:v('mw-d'),provider:v('mw-p'),accounts:v('mw-n')})">Commander</button><button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Elabore une strategie de reputation building email complete pour le domaine '+v('mw-d')+' (provider: '+v('mw-p')+'). Inclus: calendrier progressif semaine par semaine, volume cible par jour, ratio reply, metriques a surveiller, risques blacklist, plan escalade, integration DKIM/SPF/DMARC.','mw-r')">Strategie IA</button></div><div class="form-card" style="margin-top:12px"><div class="form-card-title">Options avancees</div>
<div class="row-3"><div class="field"><label>Méthode</label><select id="mw-meth"><option>Progressif (+5/jour)</option><option>Volume fixe</option><option>Burst puis stable</option></select></div><div class="field"><label>Provider</label><select id="mw-prov"><option>Office 365</option><option>Google Workspace</option><option>SMTP Custom</option><option>PMTA</option></select></div><div class="field"><label>Reply rate cible</label><select><option>30%</option><option selected>50%</option><option>70%</option></select></div></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Comment ca marche</div>
<div style="font-size:11px;color:var(--text2);line-height:1.8"><strong>1.</strong> Config domaine dans 500+ seeds <strong>2.</strong> Envoi+reception quotidien avec engagement reel <strong>3.</strong> Volume progressif <strong>4.</strong> Inbox 90%+ en 4-6 semaines</div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Configuration avancee</div>
<div class="row-3"><div class="field"><label>Méthode</label><select id="mw-meth-2"><option>Progressif (+5/jour)</option><option>Volume fixe</option><option>Burst puis plateau</option><option>Sinusoidal (naturel)</option></select></div><div class="field"><label>Provider</label><select id="mw-prov-2"><option>Office 365 (recommande)</option><option>Google Workspace</option><option>SMTP Custom</option><option>PMTA</option><option>Multi-provider</option></select></div><div class="field"><label>Reply rate cible</label><select><option>30% (minimum viable)</option><option selected>50% (recommande)</option><option>70% (agressif)</option></select></div></div>
<div class="row-3"><div class="field"><label>Seeds pool</label><select><option>500 boites (standard)</option><option>1000 boites (premium)</option><option>2000+ boites (enterprise)</option></select></div><div class="field"><label>Contenu emails</label><select><option>Conversationnel IA (unique)</option><option>Business replies</option><option>Mixed (le plus naturel)</option></select></div><div class="field"><label>Tracking engagement</label><select><option>Open + Reply</option><option>+ Click + Scroll time</option><option>Complet (Google Postmaster)</option></select></div></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Multi-domaines</div>
<div class="field"><label>Domaines (1 par ligne)</label><textarea id="mw-multi" rows="3" placeholder="domain1.com&#10;domain2.com&#10;domain3.com"></textarea></div>
<button class="btn btn-secondary" onclick="order('mailwarm_multi',{domains:v('mw-multi')})">Warmup tous les domaines</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Comment ca marche</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
<strong style="color:var(--accent)">Semaine 1-2:</strong> 10-20 emails/jour, engagement seeds, build reputation<br>
<strong style="color:var(--accent)">Semaine 3-4:</strong> 30-50 emails/jour, replies naturelles, inbox placement<br>
<strong style="color:var(--accent)">Mois 2:</strong> 50-100 emails/jour, reputation solide, ready for production<br>
<strong style="color:var(--accent)">Mois 3+:</strong> Maintenance 20-30/jour pour garder le score
</div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Warmbox / Lemwarm <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs Warmbox / Lemwarm</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>Brain Engine centaines de configurations</strong> — intelligence de routage prouvee 97% inbox<br>
&#x2705; <strong>Seeds reels</strong> — pas des boites poubelles (Warmbox = qualite douteuse)<br>
&#x2705; <strong>O365 Exchange headers</strong> — authentification native (pas de X-Mailer suspect)<br>
&#x2705; <strong>Smart routing Gmail/MTA-EU</strong> — chaque FAI recoit via le meilleur chemin<br>
&#x2705; <strong>Multi-domaines inclus</strong> — reputation building 10 domaines au prix d un chez Lemwarm<br>
&#x2705; <strong>Pipeline integre</strong> — reputation building → production → tracking = meme plateforme
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs MailWarm <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans MailWarm</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">Demo</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">99$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">5 domaines + 500 seeds + dashboard</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('mailwarm_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="result" id="mw-r"></div></div>
<!-- OUTREACH -->
<div class="panel" id="p-oa">
<p class="module-sub">Lancez des campagnes outreach multicanal avec sequences IA personnalisées</p>
<div class="form-card"><div class="form-card-title">Campagne outreach</div>
<div class="field"><label>Cible</label><textarea id="oa-t" rows="2" placeholder="Secteur, poste, pays, taille..."></textarea></div>
<div class="field"><label>Offre</label><textarea id="oa-o" rows="2" placeholder="Votre proposition de valeur"></textarea></div>
<div class="field"><label>Volume</label><select id="oa-v"><option>500/mo</option><option>1000/mo</option><option>5000/mo</option></select></div>
<button class="btn btn-primary" onclick="order('outreachai',{target:v('oa-t'),offer:v('oa-o'),volume:v('oa-v')})">Commander</button><button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Cree une sequence de smart email engagement IA pour: cible='+v('oa-t')+', offre='+v('oa-o')+'. Inclus: 5 emails personnalisés, subject lines A/B test, timing optimal, CTA, objection handling. Adapter au marche cible du client.','oa-r')">Generer les emails IA</button></div><div class="form-card" style="margin-top:12px"><div class="form-card-title">Configuration avancee</div>
<div class="row-3"><div class="field"><label>Sequence</label><select id="oa-seq"><option>3 emails (standard)</option><option>5 emails (nurture)</option><option>7 emails (enterprise)</option></select></div><div class="field"><label>Personnalisation</label><select id="oa-pers"><option>Prenom+Entreprise</option><option>+Secteur+Pain points</option><option>IA hyper-personnalisé</option></select></div><div class="field"><label>Objectif</label><select id="oa-obj"><option>Prise de RDV</option><option>Demo produit</option><option>Lead qualification</option></select></div></div>
<div class="field"><label>Brief offre</label><textarea id="oa-brief" rows="2" placeholder="Decrivez votre offre..."></textarea></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Pipeline complet</div>
<div style="font-size:11px;color:var(--text2);display:flex;gap:12px;flex-wrap:wrap"><div style="flex:1;min-width:100px"><strong style="color:var(--accent)">Data Enrichment</strong><br>LeadForge leads B2B</div><div style="flex:1;min-width:100px"><strong style="color:var(--orange)">IA Copy</strong><br>GPU personnalisé</div><div style="flex:1;min-width:100px"><strong style="color:var(--green)">Warmup</strong><br>MailWarm prepare</div><div style="flex:1;min-width:100px"><strong style="color:var(--purple)">Envoi</strong><br>Brain Engine optimise</div></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Configuration campagne avancee</div>
<div class="row-3"><div class="field"><label>Sequence</label><select id="oa-seq-2"><option>3 emails (quick touch)</option><option>5 emails (nurture)</option><option>7 emails (enterprise)</option><option>10 emails (long cycle)</option></select></div><div class="field"><label>Personnalisation</label><select id="oa-pers-2"><option>Prenom + Entreprise</option><option>+ Secteur + Pain points</option><option>+ Analyse profil + actualite</option><option>IA hyper-personnalisé (GPT analyse)</option></select></div><div class="field"><label>Objectif</label><select id="oa-obj-2"><option>Prise de RDV</option><option>Demo produit</option><option>Lead qualification</option><option>Invitation evenement</option><option>Partenariat</option></select></div></div>
<div class="row-3"><div class="field"><label>Sender identity</label><select><option>Votre domaine</option><option>Multi-domaines rotation</option><option>Domaines WEVAL (reputation building inclus)</option></select></div><div class="field"><label>Timing envoi</label><select><option>Matin (8h-10h local)</option><option>Business hours (9h-17h)</option><option>IA optimise (best time per prospect)</option></select></div><div class="field"><label>Tracking</label><select><option>Open + Click + Reply</option><option>Reply uniquement (stealth)</option><option>Complet + Heatmap</option></select></div></div>
<div class="field"><label>Brief / Proposition de valeur</label><textarea id="oa-brief-2" rows="3" placeholder="Decrivez votre offre en detail. Plus c est precis, plus l IA personnalisé efficacement.&#10;&#10;Ex: Nous proposons une solution SaaS de gestion RH pour les entreprises. Notre avantage: integration paie + CNSS automatique. Cible: DRH de PME 50-500 employes."></textarea></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">A/B Testing integre</div>
<div class="row-3"><div class="field"><label>Variante A (objet)</label><input type="text" id="oa-ab-a" placeholder="Objet email variante A"></div><div class="field"><label>Variante B (objet)</label><input type="text" id="oa-ab-b" placeholder="Objet email variante B"></div><div class="field"><label>Split</label><select><option>50/50</option><option>70/30</option><option>Auto-optimize (IA)</option></select></div></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Pipeline OutreachAI complet</div>
<div style="font-size:11px;color:var(--text2);display:flex;gap:8px;flex-wrap:wrap;line-height:1.6"><div style="flex:1;min-width:110px;padding:8px;background:var(--bg);border-radius:6px;border:1px solid var(--border)"><strong style="color:var(--accent)">1. Data Enrichment</strong><br>LeadForge collecte les prospects B2B cibles et verifies</div><div style="flex:1;min-width:110px;padding:8px;background:var(--bg);border-radius:6px;border:1px solid var(--border)"><strong style="color:var(--orange)">2. IA Copy</strong><br>GPU souverain personnalisé chaque email par prospect</div><div style="flex:1;min-width:110px;padding:8px;background:var(--bg);border-radius:6px;border:1px solid var(--border)"><strong style="color:var(--green)">3. Warmup</strong><br>MailWarm prepare vos domaines (97% inbox)</div><div style="flex:1;min-width:110px;padding:8px;background:var(--bg);border-radius:6px;border:1px solid var(--border)"><strong style="color:var(--purple)">4. Envoi</strong><br>Brain Engine centaines de configurations optimise timing + routing</div><div style="flex:1;min-width:110px;padding:8px;background:var(--bg);border-radius:6px;border:1px solid var(--border)"><strong style="color:var(--co)">5. Track</strong><br>Tracking OVH souverain + analytics + auto-followup</div></div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Lemlist / Apollo <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs Lemlist / Apollo / Instantly</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>Pipeline end-to-end</strong> — data enrichment + copy + reputation building + envoi + tracking (Lemlist = envoi seul)<br>
&#x2705; <strong>IA souveraine</strong> — personnalisation GPU local (Apollo = GPT-4 API US)<br>
&#x2705; <strong>Brain Engine 97% inbox</strong> — centaines de configurations testees (Instantly = infrastructure basique)<br>
&#x2705; <strong>O365 Exchange headers</strong> — emails indistinguables d un vrai humain<br>
&#x2705; <strong>Tracking souverain OVH</strong> — pas de domaine tracking partage (Lemlist = shared tracking)<br>
&#x2705; <strong>A/B test + auto-optimize</strong> — IA choisit automatiquement le meilleur sujet<br>
&#x2705; <strong>Pas de limite de contacts</strong> — Lemlist = 100 emails/jour, nous = illimite
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs OutreachAI <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans OutreachAI</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">Demo</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">199$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">5K contacts/mo + pipeline complet</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('outreachai_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="result" id="oa-r"></div></div>
<!-- STOREFORGE -->
<div class="panel" id="p-sf">
<p class="module-sub">Creez votre boutique e-commerce cle en main avec paiement et logistique</p>
<div class="form-card"><div class="form-card-title">Création de boutique</div>
<div class="row-2"><div class="field"><label>Nom de la boutique</label><input type="text" id="sf-n" placeholder="Ma Boutique"></div><div class="field"><label>Secteur</label><select id="sf-s"><option>Mode</option><option>Électronique</option><option>Beauté</option><option>Alimentation</option><option>Services</option></select></div></div>
<div class="field"><label>Produits</label><textarea id="sf-d" rows="2" placeholder="Décrivez vos produits"></textarea></div>
<button class="btn btn-primary" onclick="order('storeforge',{store:v('sf-n'),sector:v('sf-s'),desc:v('sf-d')})">Commander</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genEcommerce()">Strategie eCom IA</button><button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Planifie une boutique e-commerce complete pour: '+v('sf-n')+' (secteur: '+v('sf-s')+'). Description: '+v('sf-d')+'. Inclus: structure catalogue, fiches produits types, strategie prix, SEO, logistique (adapte au pays cible), marketing digital, budget previsionnel.','sf-r')">Plan IA</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Inclus</div>
<div style="font-size:11px;color:var(--text2);line-height:1.8;columns:2">Hebergement SSL inclus &bull; Descriptions IA &bull; Chatbot WEVIA &bull; Analytics &bull; Email marketing &bull; 0% commission &bull; Support 24/7 &bull; Formation video</div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Configuration complete</div>
<div class="row-3"><div class="field"><label>Template</label><select id="sf-tmpl"><option>Modern (clean)</option><option>Luxury (premium)</option><option>Minimal</option><option>Marketplace</option><option>Food delivery</option></select></div><div class="field"><label>Paiement</label><select id="sf-pay"><option>Stripe</option><option>PayPal</option><option>CMI (Cartes Maroc)</option><option>Square (US)</option><option>GoCardless (EU)</option><option>Cash on Delivery</option><option>Tous les modes</option></select></div><div class="field"><label>Livraison</label><select id="sf-ship"><option>DHL</option><option>FedEx</option><option>UPS</option><option>Chronopost</option><option>Colissimo (France)</option><option>USPS (US)</option><option>Royal Mail (UK)</option><option>Amana (Maroc)</option><option>GLS</option><option>Produits digitaux</option><option>Custom API</option></select></div></div>
<div class="row-3"><div class="field"><label>IA intégrée</label><select multiple style="height:50px"><option selected>Descriptions produits IA</option><option selected>Chatbot WEVIA vendeur</option><option>Email marketing WEVADS</option><option>SEO automatique</option><option>Traduction auto</option></select></div><div class="field"><label>Analytics</label><select><option>Google Analytics</option><option>Microsoft Clarity</option><option>Les deux + custom</option></select></div><div class="field"><label>Domaine</label><select><option>.com</option><option>.fr</option><option>.ma (Maroc)</option><option>Custom (votre domaine)</option></select></div></div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Shopify / Youcan <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs Shopify / Youcan</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>0% commission</strong> sur les ventes (Shopify = 2.9% + 30c par transaction)<br>
&#x2705; <strong>Descriptions IA</strong> auto-generees par GPU souverain (Shopify = plugin payant)<br>
&#x2705; <strong>Chatbot vendeur WEVIA</strong> integre nativement (Shopify = app $29/mo)<br>
&#x2705; <strong>Email marketing WEVADS</strong> inclus (Shopify Email = payant apres 10K)<br>
&#x2705; <strong>Paiement international natif</strong> — Stripe + PayPal + CMI + COD + Square (Youcan = paiement limite)<br>
&#x2705; <strong>Boutique en 5 minutes</strong> — IA genere tout (Shopify = 2-3 heures minimum)
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs StoreForge <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans StoreForge</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">Starter gratuit</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">29$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">E-commerce complet + IA + 0% commission</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('storeforge_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="result" id="sf-r"></div></div>
<!-- WEVIA WL -->
<div class="panel" id="p-wl">
<p class="module-sub">Deployez un chatbot IA personnalisé sur votre site en marque blanche</p>
<div class="form-card"><div class="form-card-title">Déploiement chatbot</div>
<div class="row-2"><div class="field"><label>URL du site</label><input type="text" id="wl-u" placeholder="www.monsite.com"></div><div class="field"><label>Langue</label><select id="wl-l"><option>Français + Arabe</option><option>Français</option><option>Anglais</option><option>Multi</option></select></div></div>
<div class="field"><label>Description de l'activité</label><textarea id="wl-d" rows="2" placeholder="Le chatbot apprendra de cette description"></textarea></div>
<button class="btn btn-primary" onclick="order('wevia_wl',{site:v('wl-u'),lang:v('wl-l'),desc:v('wl-d')})">Commander</button><button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Designe un chatbot IA personnalisé pour: '+v('wl-u')+'. Description: '+v('wl-d')+'. Langue: '+v('wl-l')+'. Inclus: personnalite du bot, base de connaissances recommandee, scenarios conversation, integration technique, KPIs mesure performance.','wl-r')">Design IA</button></div><div class="form-card" style="margin-top:12px"><div class="form-card-title">Configuration chatbot</div>
<div class="row-3"><div class="field"><label>Couleur principale</label><input type="color" id="wl-color" value="#6366f1"></div><div class="field"><label>Position widget</label><select><option>Bas droite</option><option>Bas gauche</option><option>Plein ecran</option></select></div><div class="field"><label>Langue</label><select><option>Francais</option><option>English</option><option>Arabe</option><option>Multi-langue</option></select></div></div>
<div class="row-3"><div class="field"><label>Modele IA</label><select><option>WEVIA Deep (reasoning)</option><option>WEVIA Fast (rapide)</option><option>Multi-model cascade</option></select></div><div class="field"><label>Knowledge Base</label><select><option>Upload PDF/DOCX</option><option>Analyser site web</option><option>API custom</option></select></div><div class="field"><label>Memoire</label><select><option>Session only</option><option>Persistante (PostgreSQL)</option></select></div></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Configuration chatbot avancee</div>
<div class="row-3"><div class="field"><label>Couleur principale</label><input type="color" id="wl-color-2" value="#6366f1"></div><div class="field"><label>Position widget</label><select><option>Bas droite</option><option>Bas gauche</option><option>Plein ecran</option><option>Slide-in lateral</option></select></div><div class="field"><label>Langues</label><select multiple style="height:50px"><option selected>Francais</option><option>English</option><option>Arabe</option><option>Espagnol</option></select></div></div>
<div class="row-3"><div class="field"><label>Modele IA</label><select><option>WEVIA Deep 14B (reasoning)</option><option>WEVIA Fast 14B (rapide)</option><option>Multi-model cascade</option><option>Cloud fallback (Cerebras/Groq)</option></select></div><div class="field"><label>Knowledge Base</label><select><option>Upload PDF/DOCX</option><option>Analyser site web automatique</option><option>API custom (REST/GraphQL)</option><option>Base SQL/PostgreSQL</option></select></div><div class="field"><label>Memoire</label><select><option>Session uniquement</option><option>Persistante (PostgreSQL)</option><option>Cross-session (user tracking)</option></select></div></div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Fonctionnalites avancees</div>
<div class="row-3"><div class="field"><label>Vision</label><select><option>Desactivee</option><option>Upload images</option><option>Camera live</option><option>Screenshot analyse</option></select></div><div class="field"><label>Voix</label><select><option>Desactivee</option><option>Whisper STT (speech-to-text)</option><option>STT + TTS (full voice)</option></select></div><div class="field"><label>Fichiers</label><select><option>Desactive</option><option>PDF/DOCX upload</option><option>Images + Documents</option><option>Tous formats</option></select></div></div>
<div class="row-3"><div class="field"><label>Mode Mermaid</label><select><option>Desactive</option><option>Diagrammes auto</option></select></div><div class="field"><label>Mode Think</label><select><option>Desactive</option><option>Chain-of-thought visible</option></select></div><div class="field"><label>Calendly</label><select><option>Desactive</option><option>Bouton RDV integre</option></select></div></div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Intercom / Drift <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs Intercom / Drift / Tidio</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>IA souveraine</strong> — GPU local, donnees en Europe (Intercom = fournisseurs IA cloud US)<br>
&#x2705; <strong>Knowledge Base illimite</strong> — 4,732 entries PostgreSQL FTS (Tidio = 50 FAQ)<br>
&#x2705; <strong>32 modules cognitifs</strong> — vision, voice, mermaid, think, dark modules (Drift = chatbot basique)<br>
&#x2705; <strong>White-label complet</strong> — votre marque, zero mention WEVAL (Intercom = badge obligatoire)<br>
&#x2705; <strong>10x moins cher</strong> — $100/mo vs 74$/mo/agent chez Intercom<br>
&#x2705; <strong>Multi-model</strong> — cascade GPU local + cloud fallback (pas de single-model lock-in)<br>
&#x2705; <strong>Deploiement 5 min</strong> — 1 script embed, zero installation
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs WEVIA White-Label <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans WEVIA White-Label</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">Demo</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">99$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">Custom branding + KB + multi-tenant</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('wevia_wl_pro')">Souscrire</button></div>
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:#f0c674;text-transform:uppercase">Enterprise</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">299$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">Dedie + custom model + SLA</div><button class="btn btn-secondary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('wevia_wl_enterprise')">Enterprise</button></div>
</div></div>
</div>
</details>
<div class="result" id="wl-r"></div></div>
<!-- SENTINEL -->
<div class="panel" id="p-sentinel">
<p class="module-sub">Scannez vos domaines, SSL, ports et vulnerabilites OWASP automatiquement</p>
<div class="form-card"><div class="form-card-title">Scan sécurité</div>
<div class="row-2"><div class="field"><label>Domaine</label><input type="text" id="st-d" placeholder="votre-domaine.com"></div><div class="field"><label>&nbsp;</label><button class="btn btn-primary" onclick="scanST()">Scan rapide</button><button class="btn btn-secondary" style="margin-left:4px" onclick="genSentinelDeep()">Audit IA</button></div></div></div>
<div class="loading" id="st-ld"><div class="ld-spinner"></div><div class="ld-text">Scan sécurité...</div></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Monitoring continu</div>
<div class="row-3"><div class="field"><label>Domaine(s)</label><textarea id="st-mons" rows="2" placeholder="site1.com&#10;site2.com"></textarea></div><div class="field"><label>Frequence</label><select id="st-freq"><option>Toutes les heures</option><option selected>Quotidien</option><option>Hebdomadaire</option></select></div><div class="field"><label>Alertes</label><select id="st-alert"><option value="email">Email</option><option value="telegram">Telegram</option><option value="slack">Slack</option><option value="all">Tous les canaux</option></select></div></div>
<button class="btn btn-secondary" onclick="order('sentinel_monitor',{domains:v('st-mons'),freq:v('st-freq'),alert:v('st-alert')})">Activer monitoring</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Pentest automatisé</div>
<div class="row-3"><div class="field"><label>Cible</label><input type="text" id="st-pen" placeholder="votre-site.com"></div><div class="field"><label>Type</label><select><option>OWASP Top 10</option><option>Injection SQL</option><option>XSS</option><option>Headers sécurité</option><option>Full pentest</option></select></div><div class="field"><label>Profondeur</label><select><option>Surface (rapide)</option><option selected>Standard</option><option>Deep scan (2-5min)</option></select></div></div>
<button class="btn btn-secondary" onclick="order('pentest',{target:v('st-pen')})">Lancer pentest</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Simule un pentest complet sur le domaine '+v('st-pen')+'. Inclus: reconnaissance, enumeration, vulnerabilites OWASP Top 10, exploitation scenarios, remediation prioritisee, rapport executive. ISO 27001 + reglementation locale applicable.','st-r')">Pentest IA</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Audit SSL / TLS complet</div>
<div class="row-3"><div class="field"><label>Domaine</label><input type="text" id="st-ssl" placeholder="domain.com"></div><div class="field"><label>Tests</label><select><option>Certificat + Chain + Expiry</option><option>+ Protocoles (TLS 1.0/1.1/1.2/1.3)</option><option>+ Ciphers + Vulnerabilites (Heartbleed, POODLE)</option><option>Full audit SSL Labs grade</option></select></div></div>
<button class="btn btn-secondary" onclick="order('ssl_audit',{domain:v('st-ssl')})">Audit SSL</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Audit SSL/TLS approfondi. Analyse: certificat, chaine de confiance, protocoles, cipher suites, HSTS, certificate transparency, OCSP stapling, recommendations hardening.','st-r')">Audit SSL IA</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Scan ports & services</div>
<div class="row-3"><div class="field"><label>IP ou domaine</label><input type="text" id="st-port" placeholder="example.com"></div><div class="field"><label>Range</label><select><option>Top 100 ports</option><option>Top 1000 ports</option><option>Tous (65535)</option><option>Custom range</option></select></div><div class="field"><label>Detection</label><select><option>Ports ouverts</option><option>+ Version services</option><option>+ Vulnerabilites CVE</option></select></div></div>
<button class="btn btn-secondary" onclick="order('port_scan',{target:v('st-port')})">Scanner</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Rapport sécurité PDF</div>
<div class="row-3"><div class="field"><label>Domaine</label><input type="text" id="st-pdf" placeholder="entreprise.com"></div><div class="field"><label>Format</label><select><option>Executive Summary (2 pages)</option><option>Rapport technique (10+ pages)</option><option>Audit conformite (ISO 27001)</option><option>Rapport RGPD</option></select></div><div class="field"><label>Branding</label><select><option>WEVAL</option><option>White-label (votre logo)</option></select></div></div>
<button class="btn btn-secondary" onclick="order('security_report',{domain:v('st-pdf')})">Commander rapport</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Genere un rapport de sécurité executive complet. Inclus: score global, vulnerabilites critiques, conformite ISO 27001/RGPD/reglementation locale applicable, plan remediation 30-60-90 jours, budget sécurité recommande, benchmark sectoriel.','st-r')">Rapport IA</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">OWASP Top 10 Checklist</div>
<div style="font-size:11px;color:var(--text2);line-height:2;columns:2">
&#x1F534; A01 Broken Access Control<br>&#x1F534; A02 Cryptographic Failures<br>&#x1F7E0; A03 Injection (SQL, NoSQL, LDAP)<br>&#x1F7E0; A04 Insecure Design<br>&#x1F7E1; A05 Security Misconfiguration<br>&#x1F7E1; A06 Vulnerable Components<br>&#x1F7E2; A07 Auth Failures<br>&#x1F7E2; A08 Software Integrity<br>&#x1F535; A09 Logging Failures<br>&#x1F535; A10 SSRF
</div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages Sentinel <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Ce que WEVAL Sentinel fait mieux</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; Monitoring live avec Cyber Command (Cyber Monitor 49K lignes de code)<br>
&#x2705; Alertes Telegram temps reel (pas juste email)<br>
&#x2705; Pentest automatisé OWASP + CVE (les autres = juste SSL check)<br>
&#x2705; Rapports white-label pour revente (vos clients, votre marque)<br>
&#x2705; Integration IA : recommandations correctives generees par GPU souverain<br>
&#x2705; Fail2ban + iptables auto-remediation sur detection
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs Sentinel <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans Sentinel</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">3 scans/jour</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">49$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">24/7 monitoring + Telegram + OWASP</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('sentinel_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="result" id="st-r"></div></div>
<!-- AFFILIATES -->
<div class="panel" id="p-aff">
<p class="module-sub">Rejoignez le programme partenaire et monetisez votre audience</p>
<div class="form-card"><div class="form-card-title">💎 Programme d'affiliation</div>
<div class="row-3"><div class="field"><label>Rôle</label><select id="af-r"><option>Affiliate</option><option>Annonceur</option></select></div><div class="field"><label>Type de trafic</label><select id="af-t"><option>Email</option><option>Social</option><option>Display</option><option>SEO</option></select></div><div class="field"><label>Volume estimé</label><input type="text" id="af-v" placeholder="10K clics/mo"></div></div>
<button class="btn btn-primary" onclick="order('affiliates',{role:v('af-r'),traffic:v('af-t'),volume:v('af-v')})">S'inscrire</button></div><div class="form-card" style="margin-top:12px"><div class="form-card-title">Programme Partner Program</div>
<div style="font-size:11px;color:var(--text2);line-height:1.8"><strong>Commission:</strong> 20-30% recurring | <strong>Cookie:</strong> 90 jours | <strong>Paiement:</strong> NET30 via virement | <strong>Tracking:</strong> OVH souverain | <strong>Support:</strong> Manager dedie | <strong>85 offres</strong> actives, 552 liens de tracking</div></div>
<div class="result" id="aff-r"></div></div>
<!-- FORMBUILDER -->
<div class="panel" id="p-fb">
<p class="module-sub">Generez des landing pages optimisees pour la conversion</p>
<div class="form-card"><div class="form-card-title">Génération de landing page</div>
<div class="field"><label>Description de l'offre</label><textarea id="fb-d" rows="3" placeholder="Décrivez votre produit/service en 2-3 phrases"></textarea></div>
<button class="btn btn-primary" onclick="order('formbuilder',{desc:v('fb-d')})">Générer la page</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genLandingPage()">Generer code IA</button></div><div class="form-card" style="margin-top:12px"><div class="form-card-title">Options de design</div>
<div class="row-3"><div class="field"><label>Style</label><select id="fb-style"><option>Corporate</option><option>Startup</option><option>E-commerce</option><option>SaaS</option></select></div><div class="field"><label>CTA principal</label><select><option>Demander un devis</option><option>S inscrire</option><option>Acheter maintenant</option><option>Prendre RDV</option></select></div><div class="field"><label>Sections</label><select><option>Hero + Features + CTA</option><option>+ Temoignages + FAQ</option><option>+ Pricing + Comparaison</option></select></div></div></div>
<div class="result" id="fb-r"></div></div>
<!-- SERVICES -->
<div class="panel" id="p-svc">
<p class="module-sub">Demandez un accompagnement sur mesure par nos consultants certifies</p>
<div class="form-card"><div class="form-card-title">Demande de consulting</div>
<div class="field"><label>Service</label><select id="sv-t"><option value="erp">ERP Consulting — SAP/Odoo/Oracle</option><option value="ia">IA & Data Consulting</option><option value="cloud">Cloud & Infrastructure</option><option value="cyber">Cybersécurité</option><option value="marketing">Digital Marketing</option><option value="formation">Formation & Talent</option><option value="process">Business Process</option></select></div>
<div class="field"><label>Besoin</label><textarea id="sv-d" rows="4" placeholder="Contexte, objectifs, contraintes..."></textarea></div>
<div class="row-2"><div class="field"><label>Budget</label><select id="sv-b"><option>À définir</option><option>5-10K$</option><option>10-30K$</option><option>30-80K$</option><option>80K$+</option></select></div><div class="field"><label>Urgence</label><select id="sv-u"><option>Normal</option><option>Urgent</option><option>Planifié</option></select></div></div>
<button class="btn btn-primary" onclick="order('services',{type:v('sv-t'),desc:v('sv-d'),budget:v('sv-b'),urgency:v('sv-u')})">Demander un devis</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genConsultingStrategy()">Strategie IA</button></div><div class="result" id="svc-r"></div></div>
<!-- API -->
<!-- DEVFORGE AI -->
<div class="panel" id="p-df">
<div class="section-head"><div class="section-title">DevForge AI — 12 modules Dev</div></div>
<p class="module-sub">Generez du code, APIs, architectures et documentation technique</p>
<div class="form-card"><div class="form-card-title">💻 Generateur technique IA</div>
<div class="row-3"><div class="field"><label>Module</label><select id="df-m"><option value="specs">Specs fonctionnelles</option><option value="test">Strategie de test</option><option value="code">Code generation</option><option value="api">API design</option><option value="devops">DevOps pipeline</option><option value="security">Security review</option><option value="architecture">Architecture</option><option value="db">DB schema</option><option value="prompt">Prompt engineering</option><option value="specs-tech">Specs techniques</option><option value="migration">Plan migration</option><option value="perf">Performance audit</option></select></div><div class="field"><label>Contexte projet</label><textarea id="df-d" rows="3" placeholder="Decrivez le projet ou le besoin technique..."></textarea></div></div>
<button class="btn btn-primary" onclick="genDevForge()">Generer avec IA</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="order('devforge',{module:v('df-m'),desc:v('df-d')})">Commander</button></div><div class="form-card" style="margin-top:12px"><div class="form-card-title">12 Modules disponibles</div>
<div style="font-size:11px;color:var(--text2);line-height:2;columns:2">
&#x1F4DD; Specs fonctionnelles<br>&#x1F4CB; Specs techniques<br>&#x1F9EA; Strategie de test<br>&#x1F4BB; Code generation<br>&#x1F310; API design (OpenAPI)<br>&#x2699;&#xFE0F; DevOps pipeline<br>&#x1F512; Security review<br>&#x1F3D7;&#xFE0F; Architecture design<br>&#x1F5C4;&#xFE0F; DB schema design<br>&#x1F916; Prompt engineering<br>&#x1F504; Plan migration<br>&#x26A1; Performance audit
</div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Copilot / Cursor <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs GitHub Copilot / Cursor</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>Au-dela du code</strong> — specs, tests, architecture, process (Copilot = code uniquement)<br>
&#x2705; <strong>GPU souverain</strong> — votre code ne quitte PAS vos serveurs<br>
&#x2705; <strong>12 modules vs 1</strong> — pipeline dev complet (Copilot = completion de code)<br>
&#x2705; <strong>Documents consultables</strong> — genere des livrables imprimables (pas juste du code)
</div></div>
</div>
</details>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs DevForge AI <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans DevForge AI</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">3 gen/jour</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">199$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">12 modules illimites + API</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('devforge_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="result" id="df-r"></div></div>
<!-- DELIVERADS -->
<div class="panel" id="p-da">
<div class="section-head"><div class="section-title">DeliverAds — Email Marketing SaaS</div></div>
<p class="module-sub">Lancez des campagnes email delivrees a 97% inbox via notre Brain Engine</p>
<div class="form-card"><div class="form-card-title">📬 Campagne email</div>
<div class="row-3"><div class="field"><label>Nom campagne</label><input type="text" id="da-n" placeholder="Ex: Promo Q2"></div><div class="field"><label>Cible</label><input type="text" id="da-t" placeholder="Secteur ou segment"></div><div class="field"><label>Volume</label><input type="text" id="da-v" placeholder="Ex: 10K contacts"></div></div>
<button class="btn btn-primary" onclick="order('deliverads',{name:v('da-n'),target:v('da-t'),volume:v('da-v')})">Demander un devis</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genEmarketing()">Strategie eMarketing IA</button></div><div class="result" id="da-r"></div></div>
<!-- WEVADS PLATFORM -->
<div class="panel" id="p-wv">
<div class="section-head"><div class="section-title">WEVADS Platform — Infrastructure Email</div></div>
<p class="module-sub">Accedez a la plateforme complete de marketing email et affiliation</p>
<div class="form-card"><div class="form-card-title">🚀 Acces plateforme WEVADS</div>
<p style="color:var(--text2);font-size:13px;line-height:1.6;margin-bottom:12px">Infrastructure email complete : Brain Engine (centaines de configurations), PMTA, Arsenal (150+ ecrans), tracking OVH, Smart Routing Gmail/MTA-EU. Plateforme enterprise pour volume email massif.</p>
<button class="btn btn-primary" onclick="order('wevads',{type:'enterprise-access'})">Demander un acces</button></div><details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs WEVADS <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans WEVADS Platform</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5"></div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">499$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">Brain Engine + PMTA + full pipeline</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('wevads_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="result" id="wv-r"></div></div>
<!-- WEVIA ENTERPRISE -->
<div class="panel" id="p-we">
<div class="section-head"><div class="section-title">WEVIA Enterprise — Chatbot IA Prive</div></div>
<p class="module-sub">Deployez l'IA WEVIA a l'echelle entreprise avec SLA et support dedie</p>
<div class="form-card"><div class="form-card-title">🏢 Deploiement chatbot entreprise</div>
<div class="row-3"><div class="field"><label>Entreprise</label><input type="text" id="we-c" placeholder="Nom entreprise"></div><div class="field"><label>Use case</label><select id="we-u"><option value="support">Support client</option><option value="internal">Knowledge interne</option><option value="sales">Assistant commercial</option><option value="hr">RH / Onboarding</option><option value="legal">Juridique</option></select></div><div class="field"><label>Volume KB</label><select id="we-v"><option value="small">< 100 docs</option><option value="medium">100-1000 docs</option><option value="large">1000+ docs</option></select></div></div>
<button class="btn btn-primary" onclick="order('wevia_enterprise',{company:v('we-c'),usecase:v('we-u'),volume:v('we-v')})">Demander un devis</button></div><details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs WEVIA Enterprise <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans WEVIA Enterprise</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5">Demo</div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">499$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">IA souveraine + RAG + multi-tenant + SLA</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('wevia_enterprise')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="result" id="we-r"></div></div>
<!-- MEDREACH HCP -->
<div class="panel" id="p-et">
<div class="section-head"><div class="section-title">MedReach HCP — Data Médecins international</div></div>
<p class="module-sub">Recherchez et ciblez des professionnels de sante pour vos campagnes HCP</p>
<div class="form-card"><div class="form-card-title">⚕️ Recherche medecins</div>
<div class="row-3"><div class="field"><label>Specialite</label><input type="text" id="et-s" placeholder="Ex: Cardiologie"></div><div class="field"><label>Ville</label><input type="text" id="et-c" placeholder="Ex: Casablanca"></div><div class="field"><label>Pays</label><select id="et-p"><option value="MA">Maroc</option><option value="FR">France</option><option value="TN">Tunisie</option><option value="DZ">Algerie</option><option value="SN">Senegal</option><option value="CI">Cote d'Ivoire</option></select></div></div>
<button class="btn btn-primary" onclick="order('ethica',{specialty:v('et-s'),city:v('et-c'),country:v('et-p')})">Rechercher</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genMedReachCampaign()">Campagne IA</button></div><details class="wv-collapse">
<summary><span class="cs-icon">&#x1F4B0;</span> Plans & Tarifs MedReach HCP <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:14px;border:1px solid rgba(99,102,241,.15)"><div class="form-card-title">Plans MedReach HCP</div>
<div style="display:flex;gap:10px;flex-wrap:wrap">
<div style="flex:1;min-width:130px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--text3);text-transform:uppercase">Free</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">0$</div><div style="font-size:10px;color:var(--text2);line-height:1.5"></div></div>
<div style="flex:1;min-width:130px;background:rgba(99,102,241,.05);border:2px solid var(--accent);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:10px;color:var(--accent);text-transform:uppercase;font-weight:700">Pro</div><div style="font-size:20px;font-weight:700;color:var(--white);margin:6px 0">299$<span style="font-size:11px;color:var(--text3)">/mo</span></div><div style="font-size:10px;color:var(--text2);line-height:1.5">Plateforme HCP complete + campagnes + consent</div><button class="btn btn-primary btn-full" style="margin-top:8px;font-size:11px;padding:6px" onclick="buyProduct('ethica_pro')">Souscrire</button></div>
</div></div>
</div>
</details>
<div class="result" id="et-r"></div></div>
<!-- YOUTUBE FACTORY -->
<div class="panel" id="p-yt">
<div class="section-head"><div class="section-title">YouTube Factory — Automation Video</div></div>
<p class="module-sub">Generez scripts, titres, descriptions et miniatures pour YouTube</p>
<div class="form-card"><div class="form-card-title">▶️ Generateur contenu YouTube</div>
<div class="row-3"><div class="field"><label>Niche</label><input type="text" id="yt-n" placeholder="Ex: Tech, Finance, Sante"></div><div class="field"><label>Type</label><select id="yt-t"><option value="script">Script video</option><option value="seo">SEO optimisation</option><option value="thumbnail">Thumbnail brief</option><option value="full">Pack complet</option></select></div><div class="field"><label>Langue</label><select id="yt-l"><option value="fr">Francais</option><option value="en">English</option><option value="ar">Arabe</option></select></div></div>
<button class="btn btn-primary" onclick="order('youtube',{niche:v('yt-n'),type:v('yt-t'),lang:v('yt-l')})">Generer</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genYouTube()">Generer avec IA</button></div><div class="result" id="yt-r"></div></div>
<!-- ARSENAL -->
<div class="panel" id="p-ar">
<div class="section-head"><div class="section-title">Arsenal — Framework ERP Intelligence</div><span class="tag tag-green">Flagship</span></div>
<p class="module-sub">Plateforme operationnelle de gestion email, contacts et campagnes</p>
<div class="form-card"><div class="form-card-title">Arsenal Platform</div>
<p style="font-size:12px;color:var(--text2);line-height:1.8;margin-bottom:12px">Arsenal est le framework proprietaire WEVAL : <strong>150+ ecrans</strong>, Brain Engine (centaines de configurations), PMTA, tracking OVH, smart routing, 38 crons actifs. C est l infrastructure qui fait tourner WEVADS, DeliverAds, MailWarm, OutreachAI et tous les produits email.</p>
<div class="row-3"><div class="field"><label>Module</label><select id="ar-mod"><option value="brain">Brain Engine (envoi intelligent)</option><option value="arsenal">Arsenal Dashboard (150+ ecrans)</option><option value="pmta">PMTA Management</option><option value="tracking">Tracking OVH souverain</option><option value="routing">Smart Routing Gmail/MTA-EU</option><option value="o365">O365 Exchange Integration</option></select></div><div class="field"><label>Type de demande</label><select><option>Demo / Acces</option><option>Integration a mon SI</option><option>Formation equipe</option><option>Audit de mon infra email</option><option>Migration depuis autre outil</option></select></div><div class="field"><label>Volume email/mo</label><select><option>< 10K</option><option>10K-100K</option><option>100K-1M</option><option>1M+</option></select></div></div>
<button class="btn btn-primary" onclick="order('arsenal',{module:v('ar-mod')})">Demander un acces</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genERPCompare()">Compare ERP IA</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Arsenal en chiffres</div>
<div style="font-size:11px;color:var(--text2);line-height:2;columns:2">
&#x1F3D7; 150+ ecrans operationnels<br>&#x2699; Brain Engine centaines de configurations<br>&#x1F4E7; PMTA port 25 optimise<br>&#x1F4CA; 97% inbox rate prouve<br>&#x1F310; Smart routing Gmail/MTA-EU<br>&#x1F4C5; 38 crons actifs 24/7<br>&#x1F512; O365 Exchange headers natifs<br>&#x1F4E6; millions de contacts en base<br>&#x1F4C8; 9 configs SACRED (intouchables)<br>&#x1F6E1; Fail2ban + auto-healing
</div></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Mailchimp / Brevo <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs Mailchimp / SendGrid / Brevo</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>Infrastructure propre</strong> — pas de shared IP (Mailchimp = IP mutualisee)<br>
&#x2705; <strong>Brain Engine IA</strong> — routing intelligent par FAI (SendGrid = routing basique)<br>
&#x2705; <strong>97% inbox</strong> reel mesure (Brevo = 85% annonce, 70% reel)<br>
&#x2705; <strong>O365 Exchange headers</strong> — emails indistinguables d un humain<br>
&#x2705; <strong>Zero data sharing</strong> — vos donnees restent sur vos serveurs<br>
&#x2705; <strong>Prix fixe</strong> — pas de cout par email (SendGrid = $0.001/email)<br>
&#x2705; <strong>PMTA Pro</strong> — le standard industrie (pas un MTA open-source)
</div></div>
</div>
</details></div>
<!-- WEVAL MIND -->
<div class="panel" id="p-mind">
<div class="section-head"><div class="section-title">WEVAL Mind — IA Editor & SSH</div><span class="tag tag-green">Live</span></div>
<p class="module-sub">IDE visuel de developpement assiste par IA avec collaboration temps reel</p>
<div class="form-card"><div class="form-card-title">WEVAL Mind Canvas</div>
<p style="font-size:12px;color:var(--text2);line-height:1.8;margin-bottom:12px">IDE IA complet : editeur de code, terminal SSH securise, canvas collaboratif, generation de code par IA, debug automatique. Tout en un seul outil dans le navigateur.</p>
<div class="row-3"><div class="field"><label>Mode</label><select id="mind-mode"><option value="canvas">Canvas — Editeur IA visuel</option><option value="ssh">SSH — Terminal securise</option><option value="code">Code — IDE avec IA</option><option value="debug">Debug — Analyse auto</option><option value="deploy">Deploy — CI/CD integre</option></select></div><div class="field"><label>Serveur cible</label><select><option>S88 (AI + Site)</option><option>S89 (Email)</option><option>S151 (Tracking)</option><option>Custom (votre serveur)</option></select></div><div class="field"><label>Modele IA</label><select><option>WEVIA Deep 14B (reasoning)</option><option>WEVIA Fast Coder 14B</option><option>Multi-model auto</option></select></div></div>
<div class="row-3"><div class="field"><label>Langage</label><select><option>PHP</option><option>Python</option><option>JavaScript/Node</option><option>Bash</option><option>SQL</option><option>Auto-detect</option></select></div><div class="field"><label>Features</label><select multiple style="height:50px"><option selected>Auto-complete IA</option><option selected>Error detection</option><option>Code review</option><option>Refactoring auto</option><option>Tests generation</option></select></div><div class="field"><label>Securite</label><select><option>SSH Key auth</option><option>Password + 2FA</option><option>SSO entreprise</option></select></div></div>
<button class="btn btn-primary" onclick="window.open('/products/workspace.html','_blank')">Ouvrir WEVAL Mind</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="order('weval_mind',{mode:v('mind-mode')})">Demander acces entreprise</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genCDC()">CDC IA</button></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Cursor / Windsurf <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs Cursor / Windsurf / Replit</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>SSH natif</strong> — terminal integre dans le navigateur (Cursor = local only)<br>
&#x2705; <strong>GPU souverain</strong> — votre code ne quitte PAS vos serveurs (Replit = cloud US)<br>
&#x2705; <strong>Multi-serveur</strong> — gerez S88+S89+S151 depuis 1 interface (Cursor = 1 projet)<br>
&#x2705; <strong>Canvas collaboratif</strong> — edition visuelle + IA en simultane (Windsurf = code only)<br>
&#x2705; <strong>CI/CD integre</strong> — deploy direct sans pipeline externe<br>
&#x2705; <strong>Modeles open-source</strong> — WEVIA Deep + WEVIA Coder (pas GPT-4 lock-in)<br>
&#x2705; <strong>Zero abonnement US</strong> — pas de $20/mo Cursor, tout inclus
</div></div>
</div>
</details></div>
<!-- CREATIVE FACTORY -->
<div class="panel" id="p-crf">
<div class="section-head"><div class="section-title">Creative Factory — Email Creatives IA</div></div>
<p class="module-sub">Creez des templates email HTML et spintax pour vos campagnes</p>
<div class="form-card"><div class="form-card-title">Generateur de creatives email</div>
<div class="row-3"><div class="field"><label>Type</label><select id="crf-type"><option value="html">Email HTML responsive</option><option value="subject">Objets A/B test (10 variantes)</option><option value="preheader">Preheaders optimises</option><option value="cta">CTA + boutons</option><option value="full">Pack complet (HTML + objet + CTA)</option></select></div><div class="field"><label>Secteur</label><select><option>E-commerce</option><option>SaaS B2B</option><option>Finance</option><option>Sante/Pharma</option><option>Immobilier</option><option>Education</option></select></div><div class="field"><label>Objectif</label><select><option>Vente / Promo</option><option>Nurturing</option><option>Onboarding</option><option>Re-engagement</option><option>Evenement</option></select></div></div>
<div class="row-3"><div class="field"><label>Ton</label><select><option>Corporate</option><option>Friendly</option><option>Urgent/FOMO</option><option>Luxe</option><option>Tech</option></select></div><div class="field"><label>Template base</label><select><option>WEVAL Modern (dark)</option><option>WEVAL Clean (light)</option><option>WEVAL Bold (colors)</option><option>Custom (upload HTML)</option></select></div><div class="field"><label>Personnalisation</label><select><option>{{prenom}} + {{entreprise}}</option><option>+ {{secteur}} + {{pain_point}}</option><option>IA hyper-personnalisé</option></select></div></div>
<div class="field"><label>Brief campagne</label><textarea id="crf-brief" rows="3" placeholder="Decrivez votre offre, votre cible, et le message cle. L IA generera les creatives optimisees pour la délivrabilité."></textarea></div>
<button class="btn btn-primary" onclick="order('creative_factory',{type:v('crf-type'),brief:v('crf-brief')})">Generer les creatives</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Spintax Engine</div>
<div class="field"><label>Texte source</label><textarea id="crf-spin" rows="2" placeholder="Bonjour {{prenom}}, nous proposons..."></textarea></div>
<div class="row-3"><div class="field"><label>Variantes</label><select><option>5 variantes</option><option>10 variantes</option><option>25 variantes</option><option>50 variantes</option></select></div><div class="field"><label>Anti-spam check</label><select><option>Oui (spam words filter)</option><option>Non</option></select></div></div>
<button class="btn btn-secondary" onclick="order('spintax',{text:v('crf-spin')})">Generer spintax</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genSpintax()">Spintax IA</button></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Stripo / BEE <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs Stripo / BEE / Mailchimp templates</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>IA generative</strong> — brief → email complet (Stripo = drag&drop manuel)<br>
&#x2705; <strong>Optimise délivrabilité</strong> — Brain Engine verifie les spam triggers<br>
&#x2705; <strong>Spintax natif</strong> — 50 variantes anti-fingerprint (Mailchimp = 0 spintax)<br>
&#x2705; <strong>A/B test objets</strong> — 10 variantes en 1 clic (les autres = 2 max)<br>
&#x2705; <strong>Pipeline integre</strong> — creative → envoi Brain Engine → tracking (tout en 1)
</div></div>
</div>
</details></div>
<!-- SCOUT INTELLIGENCE -->
<div class="panel" id="p-scout">
<div class="section-head"><div class="section-title">Scout Intelligence — Veille Concurrentielle</div></div>
<p class="module-sub">Surveillez vos concurrents et benchmarkez votre positionnement</p>
<div class="form-card"><div class="form-card-title">Surveillance concurrents</div>
<div class="row-3"><div class="field"><label>Concurrent</label><input type="text" id="scout-comp" placeholder="Ex: lemlist.com, mailchimp.com"></div><div class="field"><label>Type veille</label><select id="scout-type"><option value="full">Veille complete</option><option value="pricing">Changements de prix</option><option value="features">Nouvelles fonctionnalites</option><option value="tech">Stack technique</option><option value="traffic">Trafic & SEO</option><option value="hiring">Recrutements</option></select></div><div class="field"><label>Frequence</label><select><option>Temps reel</option><option>Quotidien</option><option>Hebdomadaire</option></select></div></div>
<div class="row-3"><div class="field"><label>Sources</label><select multiple style="height:50px"><option selected>Site web (changelog)</option><option selected>LinkedIn (posts)</option><option>Twitter/X</option><option>Product Hunt</option><option>G2/Capterra reviews</option><option>GitHub (repos publics)</option></select></div><div class="field"><label>Analyse IA</label><select><option>Resume + recommandations</option><option>SWOT automatique</option><option>Benchmark features</option><option>Alerte opportunite</option></select></div><div class="field"><label>Rapport</label><select><option>Dashboard live</option><option>Email digest hebdo</option><option>Telegram alertes</option><option>PDF mensuel</option></select></div></div>
<button class="btn btn-primary" onclick="order('scout',{competitor:v('scout-comp'),type:v('scout-type')})">Lancer la veille</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="genWebSearch()">Recherche Web IA</button></div>
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Benchmark sectoriel</div>
<div class="row-3"><div class="field"><label>Secteur</label><select><option>Email Marketing SaaS</option><option>CRM / Sales tools</option><option>IA / LLM providers</option><option>E-commerce platforms</option><option>Cybersecurity</option><option>Custom</option></select></div><div class="field"><label>Metriques</label><select multiple style="height:50px"><option selected>Pricing</option><option selected>Features</option><option>Market share</option><option>Employee count</option><option>Funding</option></select></div></div>
<button class="btn btn-secondary" onclick="order('benchmark',{})">Generer benchmark</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="weviaGenerate('Benchmark concurrentiel complet pour WEVAL Consulting. Compare: positionnement, pricing, stack technique, avantages, market share MENA. Inclus matrice SWOT, radar chart textuel, recommandations strategiques.','ds-r')">Benchmark IA</button></div>
<details class="wv-collapse">
<summary><span class="cs-icon">&#x1F3C6;</span> Avantages vs Crayon / Klue <span class="cs-arrow"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M3 5.5L7 9.5L11 5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></span></summary>
<div class="cs-body">
<div class="form-card" style="margin-top:12px"><div class="form-card-title">Avantages vs Crayon / Klue / Similarweb</div>
<div style="font-size:11px;color:var(--text2);line-height:2">
&#x2705; <strong>IA souveraine</strong> — analyse par GPU local, pas fournisseurs IA cloud (Crayon = GPT-4 US)<br>
&#x2705; <strong>Data Enrichment automatisé</strong> — Dark Scout + Data Collector proprietaires<br>
&#x2705; <strong>10x moins cher</strong> — Crayon = $15K/an minimum, nous = inclus<br>
&#x2705; <strong>Multi-source</strong> — web + LinkedIn + GitHub + reviews (Klue = web only)<br>
&#x2705; <strong>Alertes temps reel</strong> — Telegram + email (Similarweb = rapport mensuel)
</div></div>
</div>
</details></div>
<div class="panel" id="p-api">
<p class="module-sub">Gerez vos cles API et integrez les services WEVAL dans vos applications</p>
<div class="form-card"><div class="form-card-title">Clé API</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px 14px;font-family:'JetBrains Mono';font-size:13px;color:var(--accent);word-break:break-all;margin-bottom:12px" id="apiKeyFull"></div>
<button class="btn btn-secondary" onclick="copyKey()">Copier la clé</button></div>
<div class="form-card"><div class="form-card-title">Endpoints</div>
<div id="endpList" style="font-family:'JetBrains Mono';font-size:12px;color:var(--text2);line-height:2.2"></div></div></div>
<!-- ORDERS -->
<div class="panel" id="p-orders">
<p class="module-sub">Suivez l'etat de toutes vos commandes et prestations</p>
<div class="form-card"><div class="form-card-title">Commandes</div><div id="ordList">Chargement...</div></div></div></div></div>
<div class="toast" id="toast"></div>
<script>
const API='';const AUTH=API+'/api/products/auth.php';
let KEY='',U={};
const $=id=>document.getElementById(id);const v=id=>$(id)?$(id).value:'';
const toast=m=>{const t=$('toast');t.textContent=m;t.style.display='block';setTimeout(()=>t.style.display='none',8000)};
const copyKey=()=>{navigator.clipboard.writeText(KEY);toast('Clé copiée')};
const show=id=>{$(id).style.display='block';$(id).classList.add('visible')};
const hide=id=>{$(id).style.display='none';$(id).classList.remove('visible')};
const sr=(id,h)=>{const e=$(id);e.innerHTML=h;e.style.display='block';e.classList.add('visible')};
document.querySelectorAll('.chip-group').forEach(g=>g.querySelectorAll('.chip').forEach(c=>c.addEventListener('click',()=>c.classList.toggle('active'))));
const chips=id=>[...document.querySelectorAll('#'+id+' .chip.active')].map(c=>c.dataset.v);
const titles={esign:'eSignature',leansixsigma:'Lean Six Sigma',audit:'Audit & Compliance',cloudbridge:'CloudBridge',billing:'Mon Compte',reseller:'Reseller',ppt:'PresentationAI',dash:'DashboardAI',translate:'TranslateAI',bizplan:'Business Plan',contracts:'ContractAI',meeting:'Meeting Summary',home:'Dashboard',ds:'DeliverScore',mr:'MedReach',gpu:'WEVIA Inference',cf:'Content Factory',pa:'ProposalAI',bp:'BlueprintAI',lf:'LeadForge',mw:'MailWarm',oa:'OutreachAI',sf:'StoreForge',wl:'WEVIA White-Label',sentinel:'Sentinel',aff:'Affiliates',fb:'FormBuilder',df:'DevForge AI',da:'DeliverAds',wv:'WEVADS Platform',we:'WEVIA Enterprise',et:'MedReach HCP',yt:'YouTube Factory',svc:'Consulting',api:'API & Clés',orders:'Commandes',ar:'Arsenal',mind:'WEVAL Mind',crf:'Creative Factory',scout:'Scout Intelligence'};
function nav(p){
if(!KEY&&p!=='home'){toast('Connectez-vous pour acceder aux outils');return;}
document.querySelectorAll('.panel').forEach(el=>{el.classList.remove('active');el.style.display='none'});
document.querySelectorAll('.p-content').forEach(el=>{el.classList.remove('active');el.style.display='none'});
var target=$('p-'+p);if(target){target.classList.add('active');target.style.display='block';}
document.querySelectorAll('.sb-link').forEach(l=>l.classList.remove('active'));
document.querySelectorAll('.sb-link').forEach(l=>{if(l.getAttribute('onclick')&&l.getAttribute('onclick').includes("'"+p+"'"))l.classList.add('active')});
$('pageTitle').textContent=titles[p]||p;
if(p==='orders')loadOrders();
}
async function doLogin(){
const e=v('loginEmail'),k=v('loginKey');if(!e&&!k){toast('Email ou clé requis');return}
try{if(k){const resp=await fetch(AUTH+'?action=dashboard&key='+k);if(!resp.ok){toast('Login erreur HTTP '+resp.status);return}const r=await resp.json();if(r.error){toast(r.error);return}if(!r.api_key||!r.user){toast('Reponse invalide');return}KEY=r.api_key;U=r.user;enter()}else{const resp=await fetch(AUTH,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({name:'User',email:e,product:'all'})});if(!resp.ok){toast('Erreur serveur ('+resp.status+')');return}const r=await resp.json();if(r.error){toast(r.error);return}if(!r.api_key){toast('Erreur: pas de cle API');return}KEY=r.api_key;U={name:r.user?.name||'User',email:e,tier:r.tier||'free'};enter()}}catch(ex){toast('Erreur ['+ex.name+']: '+ex.message+' (AUTH='+AUTH+')')}
}
async function doRegister(){
const n=v('regName'),e=v('regEmail'),c=v('regCompany');if(!n||!e||!c){toast('Nom, email et entreprise requis');return}
try{const resp=await fetch(AUTH,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({name:n,email:e,company:c,product:'all'})});if(!resp.ok){toast('Erreur serveur ('+resp.status+')');return}const r=await resp.json();if(r.error){toast(r.error);return}if(!r.api_key){toast('Erreur: pas de cle API');return}KEY=r.api_key;U={name:n,email:e,company:c,tier:r.tier||'free'};enter()}catch(ex){toast('Erreur ['+ex.name+']: '+ex.message+' (AUTH='+AUTH+')')}
}
function enter(){
try{$('loginOverlay').style.display='none';$('sidebar').style.display='flex';$('mainApp').style.display='flex';
$('uName').textContent=U.name;$('uAvatar').textContent=(U.name||'W')[0].toUpperCase();
$('topKey').textContent=KEY.substring(0,16)+'...';$('hTier').textContent=(U.tier||'free').charAt(0).toUpperCase()+(U.tier||'free').slice(1);
$('apiKeyFull').textContent=KEY;
$('endpList').innerHTML=`<span style="color:var(--green)">GET</span> /api/deliverscore/scan.php?domain=X&api_key=${KEY}<br><span style="color:var(--green)">GET</span> /api/medreach/search.php?specialty=X&api_key=${KEY}<br><span style="color:var(--orange)">POST</span> /api/gpu/chat.php &nbsp;X-API-Key: ${KEY}<br><span style="color:var(--orange)">POST</span> /api/content/generate.php &nbsp;X-API-Key: ${KEY}`;
}catch(err){toast('Erreur enter(): '+err.message)}}
function md2h(md){return md.replace(/```[\w]*\n([\s\S]*?)```/g,'<pre>$1</pre>').replace(/^### (.*$)/gm,'<h3>$1</h3>').replace(/^## (.*$)/gm,'<h2>$1</h2>').replace(/^# (.*$)/gm,'<h2>$1</h2>').replace(/\*\*(.*?)\*\*/g,'<strong>$1</strong>').replace(/\*(.*?)\*/g,'<em>$1</em>').replace(/`(.*?)`/g,'<code>$1</code>').replace(/^> (.*$)/gm,'<blockquote>$1</blockquote>').replace(/^- (.*$)/gm,'<li>$1</li>').replace(/\|(.+)\|\n\|[-| :]+\|\n((?:\|.+\|\n?)*)/g,(m,h,b)=>{const th=h.split('|').filter(s=>s.trim()).map(x=>'<th>'+x.trim()+'</th>').join('');const tr=b.trim().split('\n').map(r=>'<tr>'+r.split('|').filter(s=>s.trim()).map(d=>'<td>'+d.trim()+'</td>').join('')+'</tr>').join('');return'<table><tr>'+th+'</tr>'+tr+'</table>'}).split('\n\n').map(b=>b.startsWith('<')?b:'<p>'+b+'</p>').join('')}
// ═══ DELIVERSCORE ═══
async function scanDS(){
const d=v('ds-d').replace(/^https?:\/\//,'').replace(/^www\./,'').split('/')[0];if(!d)return;
show('ds-ld');hide('ds-r');
const msgs=['Résolution DNS...','Vérification SPF...','Recherche DKIM...','Analyse DMARC...','Scan blacklists...','Vérification SSL...'];
let i=0;const iv=setInterval(()=>{$('ds-lt').textContent=msgs[i%msgs.length];i++},1200);
try{
const j=await(await fetch(API+'/api/deliverscore/scan.php?domain='+d+'&api_key='+KEY)).json();
clearInterval(iv);hide('ds-ld');
const col=j.score>=80?'var(--green)':j.score>=60?'var(--orange)':'var(--red)';const off=283-(283*j.score/100);
let h=`<div class="score-display"><div class="score-ring"><svg viewBox="0 0 100 100"><circle class="sr-bg" cx="50" cy="50" r="45"/><circle class="sr-fill" cx="50" cy="50" r="45" style="stroke:${col};stroke-dasharray:283;stroke-dashoffset:${off}"/></svg><div class="val"><div class="num" style="color:${col}">${j.score}</div><div class="grade">${j.grade}</div></div></div><div class="check-list">`;
['mx','spf','dkim','dmarc','blacklists','ssl','reverse_dns'].forEach(k=>{const c=j.checks[k];if(!c)return;const cl=c.status==='pass'?'var(--green)':c.status==='partial'?'var(--orange)':'var(--red)';h+=`<div class="check-item"><div class="check-dot" style="background:${cl}"></div><strong style="color:var(--white);min-width:80px">${c.name}</strong>${c.summary}</div>`});
h+='</div></div>';
if(j.recommendations){h+='<div style="margin-top:16px;padding-top:14px;border-top:1px solid var(--border)"><strong style="font-size:13px">Recommandations</strong>';j.recommendations.forEach(r=>{const pc=r.priority==='critical'?'var(--red)':r.priority==='high'?'var(--orange)':'var(--green)';h+=`<div style="margin:8px 0;padding:10px;background:var(--bg);border-radius:var(--radius);border-left:3px solid ${pc}"><strong style="font-size:12px">${r.title}</strong><div style="font-size:12px;color:var(--text2);margin-top:3px">${r.desc}</div></div>`});h+='</div>'}
sr('ds-r',h);
}catch(e){clearInterval(iv);hide('ds-ld');sr('ds-r','<p>Erreur de scan. Réessayez.</p>')}
}
// ═══ MEDREACH ═══
async function searchMR(){
try{const j=await(await fetch(API+'/api/medreach/search.php?specialty='+v('mr-s')+'&city='+v('mr-c')+'&country='+v('mr-p')+'&limit=15&api_key='+KEY)).json();
let h=`<div class="result-head"><div class="dot"></div>${j.total.toLocaleString()} résultats</div><table><tr><th>Nom</th><th>Spécialité</th><th>Ville</th><th>Pays</th><th>Source</th></tr>`;
(j.data||[]).forEach(d=>{h+=`<tr><td><strong>${d.name}</strong></td><td>${d.specialty||'—'}</td><td>${d.city||'—'}</td><td>${d.country}</td><td>${d.source||'—'}</td></tr>`});
h+='</table>';if(j.has_more)h+=`<p style="font-size:12px;color:var(--accent);margin-top:8px">${(j.total-j.count).toLocaleString()} résultats supplémentaires via API</p>`;
sr('mr-r',h)}catch(e){sr('mr-r','<p>Erreur</p>')}
}
async function statsMR(){
try{const j=await(await fetch(API+'/api/medreach/search.php?action=stats')).json();const s=j.stats;
let h=`<div class="result-head"><div class="dot"></div>Statistiques MedReach</div><div class="stats-row" style="margin:12px 0"><div class="stat-card"><div class="stat-val">${s.total_doctors?.toLocaleString()}</div><div class="stat-label">Médecins</div></div><div class="stat-card"><div class="stat-val">${s.verified_rate}%</div><div class="stat-label">Vérifiés</div></div><div class="stat-card"><div class="stat-val">${s.by_country?.length}</div><div class="stat-label">Pays</div></div><div class="stat-card"><div class="stat-val">${s.top_specialties?.length}+</div><div class="stat-label">Spécialités</div></div></div>`;
h+='<table><tr><th>Pays</th><th>Nombre</th></tr>';(s.by_country||[]).forEach(c=>{h+=`<tr><td>${c.country}</td><td>${parseInt(c.count).toLocaleString()}</td></tr>`});h+='</table>';
sr('mr-r',h)}catch(e){sr('mr-r','<p>Erreur</p>')}
}
async function specsMR(){try{const j=await(await fetch(API+'/api/medreach/search.php?action=specialties&country='+v('mr-p'))).json();let h='<div class="result-head"><div class="dot"></div>'+j.specialties.length+' spécialités</div><div class="chip-group" style="margin-top:8px">';j.specialties.slice(0,40).forEach(s=>{h+='<span class="chip" onclick="$(\'mr-s\').value=\''+s.specialty.replace(/'/g,"\\'")+'\';searchMR()">'+s.specialty+' ('+s.count+')</span>'});h+='</div>';sr('mr-r',h)}catch(e){}}
async function citiesMR(){try{const j=await(await fetch(API+'/api/medreach/search.php?action=cities&country='+v('mr-p'))).json();let h='<div class="result-head"><div class="dot"></div>'+j.cities.length+' villes</div><div class="chip-group" style="margin-top:8px">';j.cities.slice(0,40).forEach(c=>{h+='<span class="chip" onclick="$(\'mr-c\').value=\''+c.city.replace(/'/g,"\\'")+'\';searchMR()">'+c.city+' ('+c.count+')</span>'});h+='</div>';sr('mr-r',h)}catch(e){}}
// ═══ GPU ═══
async function chatGPU(){
const msg=v('gpu-msg');if(!msg)return;show('gpu-ld');hide('gpu-r');
const msgs=[];if(v('gpu-s'))msgs.push({role:'system',content:v('gpu-s')});msgs.push({role:'user',content:msg});
try{const j=await(await fetch(API+'/api/gpu/chat.php',{method:'POST',headers:{'Content-Type':'application/json','X-API-Key':KEY},body:JSON.stringify({model:v('gpu-m'),messages:msgs,temperature:parseFloat(v('gpu-t'))/10})})).json();hide('gpu-ld');
const c=j.choices?.[0]?.message?.content||'';const u=j.usage||{};const m=j.meta||{};
let fmt=c.replace(/```(\w*)\n([\s\S]*?)```/g,'<pre>$1\n$2</pre>').replace(/\*\*(.*?)\*\*/g,'<strong>$1</strong>').replace(/`(.*?)`/g,'<code>$1</code>');
sr('gpu-r',`<div class="result-head"><div class="dot"></div>Réponse — ${v('gpu-m')}</div><div style="white-space:pre-wrap;line-height:1.7;font-size:13px">${fmt}</div><div class="actions"><span style="font-size:11px;color:var(--text3)">${u.total_tokens||'?'} tokens · ${m.latency_ms||'?'}ms</span><button class="btn btn-secondary" style="margin-left:auto;font-size:12px;padding:4px 10px" onclick="navigator.clipboard.writeText($('gpu-r').innerText);toast('Copié')">Copier</button></div>`)
}catch(e){hide('gpu-ld');sr('gpu-r','<p>Le modèle est peut-être en chargement. Réessayez dans quelques secondes.</p>')}
}
// ═══ CONTENT ═══
async function genCF(){
const t=v('cf-topic');if(!t)return;show('cf-ld');hide('cf-r');
try{const j=await(await fetch(API+'/api/content/generate.php',{method:'POST',headers:{'Content-Type':'application/json','X-API-Key':KEY},body:JSON.stringify({template:v('cf-t'),topic:t,language:v('cf-l')})})).json();hide('cf-ld');
const el=$('cf-r');el.classList.add('visible');el.innerHTML=md2h(j.content||'')+`<div class="actions"><span style="font-size:11px;color:var(--text3)">${j.meta?.word_count||'?'} mots · ${j.meta?.generation_time_ms||'?'}ms</span><button class="btn btn-secondary" style="margin-left:auto;font-size:12px;padding:4px 10px" onclick="navigator.clipboard.writeText($('cf-r').innerText);toast('Copié')">Copier</button></div>`
}catch(e){hide('cf-ld');$('cf-r').classList.add('visible');$('cf-r').innerHTML='<p>Erreur de génération</p>'}
}
// ═══ PROPOSALAI ═══
async function genPA(){
const b=v('pa-b');if(!b)return;show('pa-ld');hide('pa-r');const svcs=chips('pa-chips');
try{const j=await(await fetch(API+'/api/content/generate.php',{method:'POST',headers:{'Content-Type':'application/json','X-API-Key':KEY},body:JSON.stringify({template:'proposal',topic:`Client:${v('pa-c')} Secteur:${v('pa-s')} Services:${svcs.join(',')} Budget:${v('pa-bg')} Brief:${b}`,language:'fr',tone:v('pa-tn')})})).json();
hide('pa-ld');const txt=j.content?.map(c=>c.text||'').join('')||'';const el=$('pa-r');el.classList.add('visible');
el.innerHTML=md2h(txt)+`<div class="actions"><button class="btn btn-secondary" style="font-size:12px;padding:4px 10px" onclick="navigator.clipboard.writeText($('pa-r').innerText);toast('Copié')">Copier</button><button class="btn btn-secondary" style="font-size:12px;padding:4px 10px" onclick="dlMd('proposition',\`${txt.replace(/`/g,"'").replace(/\\/g,'\\\\')}\`)">Télécharger .md</button></div>`
}catch(e){hide('pa-ld');$('pa-r').classList.add('visible');$('pa-r').innerHTML='<p>Connectez l\'API Claude pour la génération complète.</p>'}
}
// ═══ BLUEPRINTAI ═══
async function genBP(){
const d=v('bp-desc');if(!d)return;show('bp-ld');hide('bp-r');
try{const j=await(await fetch(API+'/api/content/generate.php',{method:'POST',headers:{'Content-Type':'application/json','X-API-Key':KEY},body:JSON.stringify({template:'blueprint',topic:d,language:'fr',domain:v('bp-d'),erp:v('bp-e'),level:v('bp-l'),type:v('bp-t')})})).json();
hide('bp-ld');const txt=j.content||j.choices?.[0]?.message?.content||'';const el=$('bp-r');el.classList.add('visible');
el.innerHTML=md2h(txt)+`<div class="actions"><button class="btn btn-secondary" style="font-size:12px;padding:4px 10px" onclick="navigator.clipboard.writeText($('bp-r').innerText);toast('Copie')">Copier</button></div>`
}catch(e){hide('bp-ld');$('bp-r').classList.add('visible');$('bp-r').innerHTML='<p>Erreur de generation. Reessayez.</p>'}
}
// ═══ SENTINEL ═══
async function scanST(){
const d=v('st-d');if(!d)return;show('st-ld');hide('st-r');
try{const j=await(await fetch(API+'/api/deliverscore/scan.php?domain='+d+'&api_key='+KEY)).json();hide('st-ld');
const col=j.score>=80?'var(--green)':j.score>=60?'var(--orange)':'var(--red)';
let h=`<div class="result-head"><div class="dot" style="background:${col}"></div>Score: ${j.score}/100 (${j.grade})</div>`;
['ssl','dmarc','spf','dkim','blacklists','reverse_dns'].forEach(k=>{const c=j.checks[k];if(!c)return;const s=c.status==='pass'?'var(--green)':c.status==='partial'?'var(--orange)':'var(--red)';h+=`<div class="check-item" style="margin:6px 0"><div class="check-dot" style="background:${s}"></div><strong style="color:var(--white)">${c.name}</strong> — ${c.summary}</div>`});
sr('st-r',h)}catch(e){hide('st-ld');sr('st-r','<p>Erreur</p>')}
}
// ═══ ORDERS ═══
async function order(product,details){
try{const j=await(await fetch(AUTH+'?action=order',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({api_key:KEY,product,details})})).json();
const map={leadforge:'lf',mailwarm:'mw',outreachai:'oa',storeforge:'sf',wevia_wl:'wl',affiliates:'aff',formbuilder:'fb',services:'svc'};
sr((map[product]||'xx')+'-r',`<div class="result-head"><div class="dot"></div>Commande #${j.order_id} confirmée</div><p>Produit: <strong>${product}</strong>. Notre équipe traite votre demande sous 24h.</p>`);
toast('Commande #'+j.order_id+' confirmée')}catch(e){toast('Demande enregistrée')}
}
async function loadOrders(){
try{const j=await(await fetch(AUTH+'?action=my_orders&key='+KEY)).json();
if(!j.orders?.length){$('ordList').innerHTML='<p style="color:var(--text3);text-align:center;padding:24px">Aucune commande.</p>';return}
let h='<table><tr><th>#</th><th>Produit</th><th>Date</th><th>Statut</th></tr>';
j.orders.forEach(o=>{h+=`<tr><td>${o.id}</td><td><strong>${o.product}</strong></td><td>${new Date(o.created_at).toLocaleDateString('fr-FR')}</td><td><span class="tag ${o.status==='done'?'tag-green':'tag-orange'}">${o.status}</span></td></tr>`});
$('ordList').innerHTML=h+'</table>'}catch(e){$('ordList').innerHTML='<p>Erreur</p>'}
}
function dlMd(n,t){const b=new Blob([t],{type:'text/markdown'});const a=document.createElement('a');a.href=URL.createObjectURL(b);a.download=n+'.md';a.click();toast('Téléchargé')}
// === WEVIA INTELLIGENCE BRIDGE ===
// Connects each SaaS to the 725-function cognitive brain
const WEVIA_API = '/api/weval-ia-full';
const GPU_API = '/api/gpu/chat.php';
async function weviaGenerate(prompt, resultId, options = {}) {
const el = $(resultId);
if (el) { el.classList.add('visible'); el.innerHTML = '<div class="ld-spinner"></div><div style="color:var(--text3);font-size:12px;margin-top:8px">Generation IA en cours (GPU souverain)...</div>'; }
try {
// Use WEVIA Full API (725 cognitive functions + domain enrichment)
const r = await fetch(WEVIA_API, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
message: prompt,
mode: options.mode || 'deep',
conversation_id: 'workspace-' + Date.now()
})
});
const d = await r.json();
const resp = d.response || d.reply || '';
if (resp && el) {
const provider = d.provider || 'WEVIA IA';
const latency = d.latency_ms || '?';
el.innerHTML = `<div class="result-head"><div class="dot"></div>Resultat — ${provider} (${latency}ms)</div>` +
md2h(resp) +
`<div class="actions"><span style="font-size:11px;color:var(--text3)">${resp.length} chars</span>` +
`<button class="btn btn-secondary" style="margin-left:auto;font-size:12px;padding:4px 10px" onclick="navigator.clipboard.writeText(this.closest('.result,.ai-out').innerText);toast('Copie')">Copier</button>` +
`<button class="btn btn-secondary" style="font-size:12px;padding:4px 10px" onclick="dlMd('wevia-output','${resp.replace(/'/g,"\\'")}')">Telecharger</button></div>`;
} else if (el) {
el.innerHTML = '<p style="color:var(--co)">Pas de reponse. Reessayez.</p>';
}
return resp;
} catch(e) {
if (el) el.innerHTML = '<p style="color:var(--co)">Erreur: ' + e.message + '</p>';
return '';
}
}
async function gpuGenerate(prompt, model, resultId) {
const el = $(resultId);
if (el) { el.classList.add('visible'); el.innerHTML = '<div class="ld-spinner"></div><div style="color:var(--text3);font-size:12px;margin-top:8px">WEVIA Inference en cours...</div>'; }
try {
const r = await fetch(GPU_API, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-API-Key': KEY },
body: JSON.stringify({ model: model || 'wevia-deep', messages: [{ role: 'user', content: prompt }], temperature: 0.7 })
});
const d = await r.json();
const content = d.choices?.[0]?.message?.content || '';
const latency = d.meta?.latency_ms || '?';
if (content && el) {
el.innerHTML = `<div class="result-head"><div class="dot"></div>Resultat WEVIA — ${model || 'wevia-deep'} (${latency}ms)</div>` +
md2h(content) +
`<div class="actions"><span style="font-size:11px;color:var(--text3)">${d.usage?.total_tokens || '?'} tokens</span>` +
`<button class="btn btn-secondary" style="margin-left:auto;font-size:12px;padding:4px 10px" onclick="navigator.clipboard.writeText(this.closest('.result,.ai-out').innerText);toast('Copie')">Copier</button></div>`;
}
return content;
} catch(e) {
if (el) el.innerHTML = '<p style="color:var(--co)">Erreur GPU: ' + e.message + '</p>';
return '';
}
}
// === SMART PROMPTS PER SAAS ===
function genDevForge() {
const mod = v('df-m');
const desc = v('df-d');
if (!desc) { toast('Decrivez le projet'); return; }
const prompts = {
specs: 'Redige des specifications fonctionnelles detaillees pour: ' + desc + '. Inclus: contexte, objectifs, user stories, regles metier, criteres acceptation, matrice RACI, planning previsionnel.',
test: 'Cree une strategie de test complete pour: ' + desc + '. Inclus: plan de test, cas de test unitaires/integration/E2E, matrice de couverture, tests de performance, tests de sécurité, criteres de validation.',
code: 'Genere du code production-ready pour: ' + desc + '. Code complet avec gestion erreurs, logging, documentation JSDoc, types, tests unitaires.',
api: 'Designe une API REST complete pour: ' + desc + '. Inclus: endpoints, schemas JSON, authentification, rate limiting, pagination, versioning, documentation OpenAPI.',
devops: 'Cree un pipeline DevOps complet pour: ' + desc + '. Inclus: Dockerfile, docker-compose, CI/CD GitHub Actions, monitoring, logging, alertes.',
security: 'Effectue une revue de sécurité pour: ' + desc + '. Inclus: analyse OWASP Top 10, vulnerabilites, recommandations, checklist sécurité, plan remediation.',
architecture: 'Designe une architecture technique pour: ' + desc + '. Inclus: diagramme composants, choix technologiques justifies, scalabilite, monitoring, disaster recovery.',
db: 'Designe un schema de base de donnees pour: ' + desc + '. Inclus: tables, relations, index, contraintes, migrations, requetes optimisees, partitioning strategy.',
prompt: 'Cree des prompts optimises pour: ' + desc + '. Inclus: system prompt, few-shot examples, chain-of-thought, self-consistency, ensemble techniques.',
'specs-tech': 'Redige des specifications techniques detaillees pour: ' + desc + '. Inclus: architecture, stack technologique, interfaces, protocoles, contraintes non-fonctionnelles.',
migration: 'Cree un plan de migration complet pour: ' + desc + '. Inclus: inventaire existant, strategie migration, rollback plan, tests, planning, risques.',
perf: 'Effectue un audit de performance pour: ' + desc + '. Inclus: metriques cles, bottlenecks identifies, optimisations recommandees, benchmarks, monitoring.'
};
weviaGenerate(prompts[mod] || prompts.specs, 'df-r');
}
function genCopyAI() {
const type = v('ca-type') || 'email';
const topic = v('ca-topic');
if (!topic) { toast('Entrez un sujet'); return; }
weviaGenerate('En tant que copywriter expert, redige un ' + type + ' convaincant sur: ' + topic + '. Utilise des techniques de persuasion (AIDA, PAS), un ton professionnel, et optimise pour la conversion. Propose 3 variantes avec A/B test suggestions.', 'ca-r');
}
function genSentinelDeep() {
const domain = v('st-d');
if (!domain) { toast('Entrez un domaine'); return; }
weviaGenerate('Effectue un audit de cybersécurité approfondi du domaine ' + domain + '. Analyse: certificat SSL, headers sécurité (HSTS, CSP, X-Frame), ports ouverts, DNS records, OWASP Top 10, recommendations ISO 27001. Contexte reglementation locale applicable.', 'st-r');
}
function genEmailStrategy() {
const domain = v('ev-domain') || '';
weviaGenerate('Elabore une strategie complete de délivrabilité email pour le domaine ' + domain + '. Inclus: configuration SPF/DKIM/DMARC, reputation building plan progressif, reputation monitoring, best practices B2B, blacklist prevention, inbox placement optimization. Adapter au contexte geographique du client.', 'ev-r');
}
function genReputationReport() {
const domain = v('ra-domain') || '';
weviaGenerate('Analyse la reputation email complete du domaine ' + domain + '. Inclus: score reputation, historique, blacklists, postmaster insights Gmail/Yahoo/Outlook, recommandations amelioration, plan action 30/60/90 jours.', 'ra-r');
}
function genNewsletterAnalysis() {
const competitor = v('ns-comp') || '';
weviaGenerate('Analyse la strategie newsletter de ' + competitor + '. Inclus: frequence, sujets, ton, CTA, design patterns, segmentation, engagement metrics estimes. Propose des recommandations pour surperformer ce concurrent.', 'ns-r');
}
function genAdsStrategy() {
const business = v('ac-biz') || '';
const budget = v('ac-budget') || '';
weviaGenerate('Cree une strategie publicitaire multi-canal pour: ' + business + '. Budget: ' + budget + '. Couvre Facebook Ads, Google Ads, LinkedIn Ads, TikTok Ads. Inclus: audiences, creatives, budget split, KPIs, funnel, retargeting, attribution. Adapter au contexte geographique du client.', 'ac-r');
}
function genCRMSetup() {
const company = v('crm-co') || '';
const sector = v('crm-sector') || '';
weviaGenerate('Configure un CRM complet pour ' + company + ' (secteur: ' + sector + '). Inclus: pipeline de vente adapte, champs personnalisés, automatisations, scoring leads IA, templates emails, dashboards KPIs, integration avec nos outils (LeadForge, OutreachAI, MailWarm).', 'crm-r');
}
function genCloudAudit() {
const provider = v('cc-provider') || '';
weviaGenerate('Effectue un audit de couts cloud pour ' + provider + '. Inclus: analyse des depenses par service, instances sous-utilisees, reserved instances recommendations, savings plans, architecture cost-optimized, FinOps best practices. Compare Hetzner vs AWS vs Huawei Cloud.', 'cc-r');
}
// === v28 CAPABILITIES — IMAGE + PDF + MERMAID + CREATIVE ===
// IMAGE GENERATION via Pollinations (as in WEVIA v28)
async function generateImage(prompt, resultId) {
const el = $(resultId);
if (el) { el.classList.add('visible'); el.innerHTML = '<div style="text-align:center;padding:20px"><div class="ld-spinner"></div><div style="color:var(--text3);font-size:12px;margin-top:8px">Generation image IA...</div></div>'; }
const url = 'https://image.pollinations.ai/prompt/' + encodeURIComponent(prompt + ', professional, high quality, modern design') + '?width=1024&height=1024&model=flux&nologo=true';
if (el) {
el.innerHTML = '<div class="result-head"><div class="dot"></div>Image generee</div>' +
'<img src="' + url + '" style="max-width:100%;border-radius:var(--radius);margin:8px 0" onerror="this.src=\'\';this.alt=\'Erreur generation\'" />' +
'<div class="actions"><a href="' + url + '" download class="btn btn-secondary" style="font-size:12px;padding:4px 10px">Telecharger</a>' +
'<button class="btn btn-secondary" style="font-size:12px;padding:4px 10px;margin-left:8px" onclick="navigator.clipboard.writeText(\'' + url + '\');toast(\'URL copiee\')">Copier URL</button></div>';
}
}
// CREATIVE — Design thinking, branding, visual strategy
function genCreative() {
const brief = v('cv-brief') || '';
if (!brief) { toast('Decrivez le projet creatif'); return; }
const type = v('cv-type') || 'banner';
if (type === 'image') {
generateImage(brief, 'cv-r');
} else {
weviaGenerate('En tant que directeur creatif senior, cree un ' + type + ' pour: ' + brief + '. Inclus: concept creatif, moodboard textuel, palette couleurs (hex), typographies, declinaisons, guidelines utilisation. Style professionnel premium.', 'cv-r');
}
}
// PDF REPORT generation via WEVIA
function genPDFReport(topic, resultId) {
weviaGenerate('Genere un rapport PDF professionnel complet sur: ' + topic + '. Structure: page de garde WEVAL Consulting, sommaire, contexte, analyse detaillee avec donnees chiffrees, recommandations prioritaires, planning implementation, annexes. Format Markdown structure pour conversion PDF.', resultId);
}
// MERMAID diagram generation
function genDiagram(desc, resultId) {
weviaGenerate('Genere un diagramme Mermaid professionnel pour: ' + desc + '. Utilise la syntaxe Mermaid.js valide. Types possibles: flowchart, sequence, gantt, class, state, pie, er. Ajoute des couleurs et des annotations.', resultId);
}
// SUPPLY CHAIN analysis
function genSupplyChain() {
const context = v('sc-ctx') || '';
weviaGenerate('Analyse supply chain complete pour: ' + context + '. Inclus: cartographie flux, DDMRP, control tower design, KPIs OTIF/cash-to-cash, risques, plan digitalisation, quick wins vs transformation profonde. Adapter au contexte geographique du client.', 'sc-r');
}
// FINANCE/BANKING analysis
function genFinance() {
const context = v('fin-ctx') || '';
weviaGenerate('Analyse transformation digitale bancaire pour: ' + context + '. Inclus: scoring credit IA, KYC automatisé, open banking API, mobile banking, risques compliance Bank Al-Maghrib, ROI detaille, roadmap 12 mois.', 'fin-r');
}
// SPINTAX generation for marketing digital
function genSpintax() {
const text = v('sp-text') || '';
if (!text) { toast('Entrez le texte a spinner'); return; }
weviaGenerate('Genere des variations spintax professionnelles pour cet marketing digital: ' + text + '. Cree 5 variantes de subject line, 3 variantes de body, 3 variantes de CTA. Format spintax {option1|option2|option3}. Garde un ton professionnel B2B.', 'sp-r');
}
// YOUTUBE content strategy (v28 capability)
function genYouTube() {
const niche = v('yt-n') || '';
const type = v('yt-t') || 'script';
if (!niche) { toast('Entrez la niche'); return; }
const prompts = {
script: 'Ecris un script YouTube complet (8-12 min) pour la niche ' + niche + '. Inclus: hook (15s), intro, 3-5 sections, CTA, outro. Avec indications de montage, B-roll suggestions, timestamps.',
seo: 'Optimise SEO YouTube pour la niche ' + niche + '. Inclus: 10 titres clickbait ethiques, descriptions optimisees, 30 tags, hashtags, thumbnail brief, meilleur horaire publication, strategie playlist.',
thumbnail: 'Cree un brief detaille de thumbnail YouTube pour la niche ' + niche + '. Inclus: composition, texte overlay (max 5 mots), palette couleurs, emotion, reference visuelle, A/B test suggestions.',
full: 'Cree un pack contenu YouTube complet pour la niche ' + niche + '. Inclus: script 10 min, SEO (titre/desc/tags), brief thumbnail, calendrier editorial 4 semaines, strategie monetisation.'
};
weviaGenerate(prompts[type] || prompts.full, 'yt-r');
}
// MEDREACH HCP campaign with HCP targeting
function genMedReachCampaign() {
const spec = v('et-s') || '';
const city = v('et-c') || '';
if (!spec) { toast('Entrez une specialite'); return; }
weviaGenerate('Planifie une campagne B2B pharma complete pour cibler les ' + spec + ' a ' + city + '. Inclus: segmentation HCP, messaging adapte par specialite, canal optimal (email/SMS/visite), calendrier, compliance donnees personnelles, KPIs, budget previsionnel. Base: 15000+ medecins verifies international.', 'et-r');
}
// FORMBUILDER — Landing page IA
function genLandingPage() {
const desc = v('fb-d') || '';
if (!desc) { toast('Decrivez votre offre'); return; }
weviaGenerate('Genere le code HTML/CSS complet d une landing page professionnelle pour: ' + desc + '. Inclus: hero section avec headline percutant, 3 features, social proof, pricing, FAQ, CTA fort, responsive design, animations CSS. Style moderne SaaS.', 'fb-r');
}
// ARSENAL modules — consulting strategy
function genConsultingStrategy() {
const service = v('sv-t') || '';
const client = v('sv-client') || '';
weviaGenerate('En tant que consultant senior, elabore une strategie de consulting pour: service=' + service + ', client=' + client + '. Inclus: diagnostic initial, proposition de valeur, methodologie (waterfall/agile/hybride), equipe projet, livrables, planning, budget TJM, risques, ROI prevu. Adapter au marche et reglementation du client.', 'svc-r');
}
// === v30 CAPABILITIES — WEB SEARCH (SearXNG) + DARIJA ===
// WEB SEARCH via WEVIA (SearXNG inline in cognitive brain)
function genWebSearch() {
const query = v('ws-q') || '';
if (!query) { toast('Entrez une requete'); return; }
weviaGenerate('Recherche web et synthese pour: ' + query + '. Utilise les sources web les plus recentes, cite les sources, et fournis une analyse structuree avec recommandations actionnables.', 'ws-r');
}
// DARIJA — Moroccan Arabic fluent mode
function genDarija() {
const msg = v('dar-msg') || '';
if (!msg) { toast('Kteb message'); return; }
weviaGenerate('Reponds en Darija marocaine (arabe dialectal marocain) a: ' + msg + '. Utilise un ton naturel, chaleureux, et ajoute des expressions marocaines authentiques.', 'dar-r');
}
// CDC ULTRA — Cahier des charges professionnel (v30: 143%)
function genCDC() {
const desc = v('cdc-d') || '';
if (!desc) { toast('Decrivez le projet'); return; }
weviaGenerate('Redige un cahier des charges professionnel complet pour: ' + desc + '. Format: contexte, objectifs SMART, perimetre, exigences fonctionnelles numerotees (EX-F-xxx), exigences non-fonctionnelles, architecture technique, planning macro, budget estimatif, criteres de recette, annexes. Qualite Big4.', 'cdc-r');
}
// === v30 NEW DOMAINS — PROPALE + eMARKETING + ERP + eCOMMERCE + CLOUD ===
// PROPALE — ProposalAI enhanced
function genPropale() {
const client = v('pa-c') || '';
const service = v('pa-s') + ' - ' + (v('pa-b') || '');
if (!client && !service) { toast('Remplissez client ou service'); return; }
weviaGenerate('Redige une proposition commerciale professionnelle qualite Big4 pour: client=' + client + ', service=' + service + '. Structure: page de garde, executive summary, contexte client, diagnostic, notre approche, methodologie, livrables, equipe, planning, budget detaille avec TJM, conditions, annexes. Ton: partner consulting senior.', 'pa-r');
}
// eMARKETING (v30: 118%) — Marketing digital strategy
function genEmarketing() {
const business = v('em-biz') || '';
const budget = v('em-budget') || '';
if (!business) { toast('Decrivez le business'); return; }
weviaGenerate('Elabore une strategie marketing digital complete pour: ' + business + '. Budget: ' + (budget || 'a definir') + '. Couvre: SEO (audit + roadmap), SEM (Google Ads), social media (organique + paid), content marketing, marketing digital, growth hacking, marketing automation, analytics. KPIs, funnel AARRR, budget split, ROI previsionnel. Adapter au contexte geographique du client.', 'em-r');
}
// ERP MULTI-VENDOR (v30: 97%) — SAP/Oracle/Dynamics/Odoo
function genERPCompare() {
const company = v('erp-co') || '';
const size = v('erp-size') || '';
if (!company) { toast('Decrivez l entreprise'); return; }
weviaGenerate('Compare les solutions ERP pour: ' + company + ' (taille: ' + (size||'PME') + '). Analyse: SAP S/4HANA, Oracle Cloud ERP, Microsoft Dynamics 365, Odoo Enterprise. Pour chaque: fonctionnalites, TCO 5 ans, complexite implementation, ecosysteme local, avantages/inconvenients. Matrice decisionnelle pondree. Recommandation finale argumentee.', 'erp-r');
}
// eCOMMERCE (v30: 97%) — Full e-commerce strategy
function genEcommerce() {
const product = v('ec-prod') || '';
const market = v('ec-mkt') || 'International';
if (!product) { toast('Decrivez le produit/service'); return; }
weviaGenerate('Strategie e-commerce complete pour: ' + product + ' (marche: ' + market + '). Couvre: plateforme (Shopify vs WooCommerce vs StoreForge), catalogue produits, pricing strategy, logistique (Amana/COD/livraison J+1), paiement (CMI/cash), marketing digital (SEO/Ads/Social), customer experience, fidelisation, KPIs, budget lancement 6 mois.', 'ec-r');
}
// CLOUD COMPARISON (v30: 75%)
function genCloudCompare() {
const workload = v('cl-wl') || '';
if (!workload) { toast('Decrivez le workload'); return; }
weviaGenerate('Compare les providers cloud pour le workload: ' + workload + '. Analyse: AWS, Azure, Hetzner, OVH, Huawei Cloud. Pour chaque: pricing detaille, latence internationale, conformite (RGPD, data sovereignty), services specifiques, SLA. Matrice cout/performance. Architecture recommandee avec DR. Budget mensuel estime.', 'cl-r');
}
// === PRESENTATIONAI — PPTX Generation ===
const PPTX_API = '/api/pptx/';
async function genPresentation() {
const topic = v('ppt-topic') || '';
const slides_n = parseInt(v('ppt-slides')) || 6;
if (!topic) { toast('Entrez le sujet'); return; }
const el = $('ppt-r');
if (el) { el.classList.add('visible'); el.innerHTML = '<div class="ld-spinner"></div><div style="color:var(--text3);font-size:12px;margin-top:8px">1/2 — Generation du contenu IA...</div>'; }
// Step 1: Use WEVIA brain to generate structured slides content
try {
const r1 = await fetch('/api/weval-ia-full', {
method: 'POST', headers: {'Content-Type':'application/json'},
body: JSON.stringify({
message: `Genere un JSON pour une presentation PowerPoint sur: ${topic}.
Nombre de slides: ${slides_n}.
Reponds UNIQUEMENT avec du JSON valide, aucun texte avant ou apres.
Format exact:
{"title":"Titre principal","subtitle":"Sous-titre","slides":[
{"title":"Titre slide","type":"bullets","bullets":["Point 1","Point 2","Point 3"]},
{"title":"KPIs","type":"kpi","kpis":[{"value":"85%","label":"Satisfaction","trend":"+5%"}]},
{"title":"Comparaison","type":"two_columns","left":{"title":"Avantages","items":["A","B"]},"right":{"title":"Risques","items":["C","D"]}},
{"title":"Planning","type":"table","rows":[["Phase","Duree","Budget"],["Phase 1","4 sem","10K"]]}
]}
Types disponibles: bullets, kpi, two_columns, table, text.
Sujet: ${topic}`,
mode: 'deep',
conversation_id: 'pptx-' + Date.now()
})
});
const d1 = await r1.json();
const resp = d1.response || d1.reply || '';
// Extract JSON from response
let slidesData;
try {
const jsonMatch = resp.match(/\{[\s\S]*"slides"[\s\S]*\}/);
slidesData = jsonMatch ? JSON.parse(jsonMatch[0]) : null;
} catch(e) {
// Fallback: create simple text slides from response
const paragraphs = resp.split('\n\n').filter(p => p.trim().length > 20);
slidesData = {
title: topic,
subtitle: 'WEVAL Consulting',
slides: paragraphs.slice(0, slides_n).map((p, i) => ({
title: p.split('\n')[0].replace(/^[#*\-]+\s*/, '').substring(0, 60),
type: 'text',
content: p.substring(0, 500)
}))
};
}
if (!slidesData || !slidesData.slides) {
if (el) el.innerHTML = '<p style="color:var(--co)">Erreur generation contenu. Reessayez.</p>';
return;
}
if (el) el.innerHTML = '<div class="ld-spinner"></div><div style="color:var(--text3);font-size:12px;margin-top:8px">2/2 — Creation du fichier PPTX...</div>';
// Step 2: Generate PPTX file
const r2 = await fetch(PPTX_API, {
method: 'POST', headers: {'Content-Type':'application/json'},
body: JSON.stringify(slidesData)
});
const d2 = await r2.json();
if (d2.ok && d2.url) {
if (el) el.innerHTML = `<div class="result-head"><div class="dot"></div>Presentation generee — ${d2.slides} slides</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin:10px 0;text-align:center">
<div style="font-size:48px;margin-bottom:8px">📊</div>
<div style="font-size:14px;font-weight:600;color:var(--white);margin-bottom:4px">${slidesData.title || topic}</div>
<div style="font-size:12px;color:var(--text3)">${d2.slides} slides | ${(d2.size/1024).toFixed(0)} KB | PPTX</div>
</div>
<div class="actions">
<a href="${d2.url}" download class="btn btn-primary" style="font-size:13px;padding:8px 16px;text-decoration:none">Telecharger .pptx</a>
<button class="btn btn-secondary" style="margin-left:8px;font-size:12px" onclick="navigator.clipboard.writeText('${d2.url}');toast('URL copiee')">Copier URL</button>
</div>`;
} else {
if (el) el.innerHTML = '<p style="color:var(--co)">Erreur PPTX: ' + (d2.error || 'inconnue') + '</p>';
}
} catch(e) {
if (el) el.innerHTML = '<p style="color:var(--co)">Erreur: ' + e.message + '</p>';
}
}
// === DASHBOARDAI — KPI Dashboard Generation ===
function genDashboard() {
const topic = v('dash-topic') || '';
const type = v('dash-type') || 'executive';
if (!topic) { toast('Entrez le contexte'); return; }
weviaGenerate('Genere un dashboard ' + type + ' complet pour: ' + topic + '. Inclus: 6-8 KPIs principaux avec valeurs, tendances et couleurs (vert/orange/rouge). Graphiques recommandes (bar, line, pie, gauge). Alertes. Comparaisons N-1. Format structure avec sections: KPIs hero, graphiques principaux, tableau detaille, alertes, recommandations. Ajoute des donnees fictives realistes.', 'dash-r');
}
// === TRANSLATEAI — Traduction pro FR/EN/AR ===
function genTranslate() {
const text = v('tr-text') || '';
const target = v('tr-lang') || 'en';
if (!text) { toast('Entrez le texte'); return; }
const langs = {en:'anglais professionnel',fr:'francais professionnel',ar:'arabe standard moderne',darija:'darija marocaine',es:'espagnol',de:'allemand',it:'italien',pt:'portugais',nl:'neerlandais',zh:'chinois mandarin',ja:'japonais'};
weviaGenerate('Traduis ce texte en ' + (langs[target]||target) + ' en gardant le ton professionnel et les termes techniques. Si necessaire, adapte les references culturelles. Texte: ' + text, 'tr-r');
}
// === BUSINESS PLAN GENERATOR ===
function genBusinessPlan() {
const idea = v('bp2-idea') || '';
const market = v('bp2-market') || 'Global';
if (!idea) { toast('Decrivez votre projet'); return; }
weviaGenerate('Redige un business plan professionnel complet pour: ' + idea + ' (marche: ' + market + '). Structure: Executive Summary, Analyse marche (TAM/SAM/SOM), Proposition de valeur, Business model canvas, Strategie go-to-market, Plan financier 3 ans (revenus, couts, BFR, point mort), Equipe, Risques et mitigations, Roadmap, Annexes. Format investisseur qualite VC. Donnees chiffrees realistes.', 'bp2-r');
}
// === CONTRACT/LEGAL DOC GENERATOR ===
function genContract() {
const type = v('ct-type') || 'nda';
const parties = v('ct-parties') || '';
const types = {
nda: 'Redige un accord de confidentialite (NDA) bilingue FR/EN professionnel entre: ' + parties,
service: 'Redige un contrat de prestation de services IT entre: ' + parties + '. Inclus: objet, duree, prix, SLA, penalites, propriete intellectuelle, confidentialite, resiliation, loi applicable (droit applicable selon les parties)',
freelance: 'Redige un contrat freelance/consultant IT pour: ' + parties + '. Inclus: mission, livrables, TJM, planning, IP, confidentialite',
partnership: 'Redige un accord de partenariat commercial entre: ' + parties + '. Inclus: objet, engagements, repartition revenus, non-compete, duree, resiliation'
};
weviaGenerate((types[type] || types.nda) + '. Format juridique professionnel avec articles numerotes. Adapter au droit applicable selon le pays des parties.', 'ct-r');
}
// === MEETING SUMMARY AI ===
function genMeetingSummary() {
const notes = v('mt-notes') || '';
if (!notes) { toast('Collez vos notes de reunion'); return; }
weviaGenerate('Transforme ces notes de reunion en compte-rendu professionnel structure: ' + notes + '. Format: Date/Participants, Ordre du jour, Decisions prises, Actions (qui/quoi/quand), Points en suspens, Prochaine reunion. Ton executif concis.', 'mt-r');
}
// === BILLING & RESELLER ===
const BILLING_API = '/api/billing/api.php';
async function loadBilling() {
const el = $('bill-content');
if (!el) return;
el.innerHTML = '<div class="ld-spinner"></div>';
try {
const r = await fetch(BILLING_API + '?action=dashboard&api_key=' + KEY);
const d = await r.json();
if (!d.ok) { el.innerHTML = '<p>Erreur chargement</p>'; return; }
const pct = d.balance_usd > 0 ? Math.min(100, (d.this_month.spent_usd / d.balance_usd * 100)).toFixed(1) : 0;
el.innerHTML = `
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:16px">
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center">
<div style="font-size:24px;font-weight:700;color:var(--green)">${d.balance_usd.toFixed(2)}</div>
<div style="font-size:11px;color:var(--text3)">Solde disponible</div>
</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center">
<div style="font-size:24px;font-weight:700;color:var(--white)">${d.this_month.spent_usd.toFixed(4)}</div>
<div style="font-size:11px;color:var(--text3)">Ce mois (${d.this_month.calls} appels)</div>
</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center">
<div style="font-size:24px;font-weight:700;color:var(--accent)">${d.lifetime.calls}</div>
<div style="font-size:11px;color:var(--text3)">Total appels API</div>
</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center">
<div style="font-size:24px;font-weight:700;color:var(--white)">${d.user.tier}</div>
<div style="font-size:11px;color:var(--text3)">Plan</div>
</div>
</div>
<div style="margin-bottom:12px">
<div style="font-size:13px;color:var(--white);font-weight:600;margin-bottom:6px">Cle API</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px;font-family:monospace;font-size:12px;color:var(--accent);cursor:pointer" onclick="navigator.clipboard.writeText('${d.user.api_key}');toast('Cle copiee')">${d.user.api_key}</div>
</div>
${d.top_products.length ? '<div style="font-size:13px;color:var(--white);font-weight:600;margin-bottom:6px">Top produits</div>' + d.top_products.map(p => '<div style="display:flex;justify-content:space-between;padding:4px 0;font-size:12px;color:var(--text2)"><span>' + p.product_slug + '</span><span>' + p.calls + ' appels — $' + parseFloat(p.cost).toFixed(4) + '</span></div>').join('') : ''}
`;
} catch(e) { el.innerHTML = '<p style="color:var(--co)">Erreur: ' + e.message + '</p>'; }
}
async function topupBalance() {
const amount = parseInt(v('topup-amount')) || 25;
if (amount < 10) { toast('Minimum $10'); return; }
try {
const r = await fetch(BILLING_API + '?action=topup', {
method: 'POST', headers: {'Content-Type':'application/json','X-API-Key':KEY},
body: JSON.stringify({amount})
});
const d = await r.json();
if (d.checkout_url) {
toast('Redirection paiement...');
window.location.href = d.checkout_url;
} else { toast(d.error || 'Erreur'); }
} catch(e) { toast('Erreur: ' + e.message); }
}
async function loadInvoices() {
const el = $('inv-list');
if (!el) return;
try {
const r = await fetch(BILLING_API + '?action=invoices&api_key=' + KEY);
const d = await r.json();
if (!d.ok) return;
el.innerHTML = d.invoices.map(inv =>
'<div style="display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:6px;font-size:12px">' +
'<span style="color:var(--white);font-weight:600">' + inv.invoice_number + '</span>' +
'<span style="color:var(--text2)">' + (inv.period_start || '').substring(0,10) + '</span>' +
'<span style="color:var(--white)">$' + parseFloat(inv.total_usd).toFixed(2) + '</span>' +
'<span class="tag ' + (inv.status==='paid'||inv.status==='free_credit' ? 'tag-green' : 'tag-orange') + '">' + inv.status + '</span>' +
'</div>'
).join('') || '<p style="color:var(--text3);font-size:12px">Aucune facture</p>';
} catch(e) {}
}
async function loadReseller() {
const el = $('reseller-content');
if (!el) return;
try {
const r = await fetch(BILLING_API + '?action=reseller_stats&api_key=' + KEY);
const d = await r.json();
if (!d.ok) { el.innerHTML = '<p style="color:var(--text3);font-size:12px">Acces reseller non active</p>'; return; }
el.innerHTML =
'<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px">' +
'<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:20px;font-weight:700;color:var(--accent)">' + d.referrals.count + '</div><div style="font-size:11px;color:var(--text3)">Filleuls</div></div>' +
'<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:12px;text-align:center"><div style="font-size:20px;font-weight:700;color:var(--green)">' + d.commission_pct + '%</div><div style="font-size:11px;color:var(--text3)">Commission</div></div>' +
'</div>' +
'<div style="font-size:13px;color:var(--white);font-weight:600;margin-bottom:6px">Mes codes</div>' +
d.codes.map(c => '<div style="display:flex;justify-content:space-between;padding:6px 10px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:4px;font-size:12px"><span style="color:var(--accent);font-weight:600;cursor:pointer" onclick="navigator.clipboard.writeText(\'' + c.code + '\');toast(\'' + c.code + ' copie\')">' + c.code + '</span><span style="color:var(--text2)">' + c.used_count + '/' + c.max_uses + ' uses | $' + c.credit_usd + ' credit</span></div>').join('');
} catch(e) {}
}
async function createResellerCode() {
const code = v('rc-code') || '';
const credit = parseFloat(v('rc-credit')) || 10;
const maxUses = parseInt(v('rc-max')) || 100;
try {
const r = await fetch(BILLING_API + '?action=create_code', {
method: 'POST', headers: {'Content-Type':'application/json','X-API-Key':KEY},
body: JSON.stringify({code, credit_usd: credit, max_uses: maxUses})
});
const d = await r.json();
if (d.ok) { toast('Code ' + d.code + ' cree!'); loadReseller(); }
else { toast(d.error || 'Erreur'); }
} catch(e) { toast('Erreur: ' + e.message); }
}
// === CLOUDBRIDGE — Unified Cloud Provisioning ===
function genCloudRecommendation() {
const workload = v('cb-workload') || '';
const budget = v('cb-budget') || '';
const region = v('cb-region') || 'Global';
if (!workload) { toast('Decrivez votre workload'); return; }
weviaGenerate('En tant qu architecte cloud senior, recommande le meilleur provider entre Huawei Cloud et Scaleway pour: ' + workload + '. Budget: ' + (budget || 'a optimiser') + '. Region: ' + region + '. Pour chaque provider, detaille: services recommandes, pricing estime, latence, conformite (RGPD/local data protection), avantages. Recommandation finale avec architecture diagram. Compare aussi avec Hetzner/OVH/AWS si pertinent.', 'cb-r');
}
// === eSIGNATURE — Document signing workflow ===
async function initSignature() {
const docType = v('sig-type') || 'contract';
const signers = v('sig-signers') || '';
const desc = v('sig-desc') || '';
if (!signers) { toast('Entrez les signataires'); return; }
const el = $('sig-r');
if (el) { el.classList.add('visible'); el.innerHTML = '<div class="ld-spinner"></div><div style="color:var(--text3);font-size:12px;margin-top:8px">Preparation du document...</div>'; }
// Step 1: Generate the document via WEVIA brain
const docPrompts = {
contract: 'Redige un contrat de prestation de services IT professionnel entre les parties: ' + signers + '. Description: ' + desc + '. Inclus: objet, duree, prix, SLA, penalites, IP, confidentialite, resiliation. Droit applicable. Articles numerotes. Laisse des zones [SIGNATURE] et [DATE] et [PARAPHE] pour chaque signataire.',
nda: 'Redige un accord de confidentialite NDA bilingue FR/EN entre: ' + signers + '. ' + desc + '. Zones [SIGNATURE] [DATE] [PARAPHE].',
devis: 'Redige un devis professionnel WEVAL Consulting pour: ' + signers + '. Prestation: ' + desc + '. Inclus: description detaillee, TJM, planning, conditions paiement, validite. Zones [SIGNATURE] [DATE] [CACHET].',
avenant: 'Redige un avenant au contrat entre: ' + signers + '. Modifications: ' + desc + '. Articles modifies, date effet, signatures. Zones [SIGNATURE] [DATE].',
pv: 'Redige un PV de reception/livraison entre: ' + signers + '. Objet: ' + desc + '. Points verifies, reserves eventuelles, acceptation. Zones [SIGNATURE] [DATE].'
};
try {
const r1 = await fetch('/api/weval-ia-full', {
method: 'POST', headers: {'Content-Type':'application/json'},
body: JSON.stringify({ message: docPrompts[docType] || docPrompts.contract, mode: 'deep', conversation_id: 'esign-' + Date.now() })
});
const d1 = await r1.json();
const doc = d1.response || d1.reply || '';
if (doc && el) {
// Generate signature pad UI
el.innerHTML = `<div class="result-head"><div class="dot"></div>Document pret a signer</div>
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin:10px 0">
<div style="font-size:11px;color:var(--text3);text-transform:uppercase;letter-spacing:1px;margin-bottom:8px">Apercu du document</div>
<div style="max-height:300px;overflow-y:auto;font-size:12px;color:var(--text2);line-height:1.7;padding:12px;background:rgba(255,255,255,.03);border-radius:var(--radius);border:1px solid var(--border)">${md2h(doc)}</div>
</div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:16px 0">
${signers.split(',').map((s,i) => `
<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center">
<div style="font-size:12px;color:var(--white);font-weight:600;margin-bottom:8px">${s.trim()}</div>
<canvas id="sig-canvas-${i}" width="250" height="80" style="border:1px dashed var(--accent);border-radius:6px;cursor:crosshair;background:rgba(255,255,255,.02)"></canvas>
<div style="margin-top:6px">
<button class="btn btn-secondary" style="font-size:10px;padding:3px 8px" onclick="clearCanvas('sig-canvas-${i}')">Effacer</button>
</div>
<div style="font-size:10px;color:var(--text3);margin-top:4px">Signez avec la souris</div>
</div>`).join('')}
</div>
<div class="actions" style="margin-top:12px">
<button class="btn btn-primary" onclick="downloadSignedDoc()">Telecharger le document signe</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="navigator.clipboard.writeText($('sig-r').innerText);toast('Document copie')">Copier</button>
<button class="btn btn-secondary" style="margin-left:8px" onclick="sendForSignature()">Envoyer par email</button>
</div>`;
// Init signature canvases
setTimeout(() => {
signers.split(',').forEach((s, i) => {
const canvas = document.getElementById('sig-canvas-' + i);
if (canvas) {
const ctx = canvas.getContext('2d');
let drawing = false;
canvas.addEventListener('mousedown', e => { drawing = true; ctx.beginPath(); ctx.moveTo(e.offsetX, e.offsetY); });
canvas.addEventListener('mousemove', e => { if (drawing) { ctx.lineTo(e.offsetX, e.offsetY); ctx.strokeStyle = '#6366f1'; ctx.lineWidth = 2; ctx.stroke(); } });
canvas.addEventListener('mouseup', () => drawing = false);
canvas.addEventListener('mouseleave', () => drawing = false);
}
});
}, 100);
}
} catch(e) { if (el) el.innerHTML = '<p style="color:var(--co)">Erreur: ' + e.message + '</p>'; }
}
function clearCanvas(id) {
const c = document.getElementById(id);
if (c) c.getContext('2d').clearRect(0, 0, c.width, c.height);
}
function downloadSignedDoc() {
const content = $('sig-r')?.innerText || '';
const blob = new Blob([content], {type:'text/plain'});
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = 'document-signe-weval.txt';
a.click();
toast('Document telecharge');
}
function sendForSignature() {
toast('Envoi par email: fonctionnalite bientot disponible. Contactez contact@weval-consulting.com');
}
// === COPY API KEY ===
function copyKey(){var k=document.getElementById('api-key');if(k){navigator.clipboard.writeText(k.textContent||k.value||'').then(function(){toast('Cle API copiee')}).catch(function(){toast('Erreur copie')})}}
// === METHOD CARD SELECTION ===
function selectMethod(gid,mid,sid){var g=document.getElementById(gid);if(g){g.querySelectorAll('.method-card').forEach(function(c){c.classList.remove('selected')});var mc=g.querySelector('[data-method="'+mid+'"]');if(mc)mc.classList.add('selected')}var s=document.getElementById(sid);if(s)s.value=mid}
// === LEAN SIX SIGMA — Process Excellence ===
function genLeanSixSigma() {
const process = v('lss-process') || '';
const method = v('lss-method') || 'dmaic';
if (!process) { toast('Decrivez le processus'); return; }
const methods = {
dmaic: 'Applique la methode DMAIC (Define-Measure-Analyze-Improve-Control) au processus: ' + process + '. Pour chaque phase: outils (SIPOC, VSM, Ishikawa, 5 Whys, DOE, SPC, Control Plan), livrables, KPIs, timeline. Calcule le sigma level cible, DPU, DPMO, Yield. Inclus une charte projet Six Sigma.',
lean: 'Applique les principes Lean au processus: ' + process + '. Analyse: VSM current/future state, identification des 8 gaspillages (TIMWOODS), Kaizen events, 5S, Kanban, Poka-Yoke, Takt time, flux tire. Calcule lead time, cycle time, PCE. Plan implementation.',
vsm: 'Cree une Value Stream Map complete pour: ' + process + '. Cartographie: fournisseurs, etapes process, stocks, temps cycle, temps attente, quality rate. Identifie bottlenecks et kaizen bursts. Current state + future state + plan transition.',
agile: 'Deploie une transformation Agile/SAFe pour: ' + process + '. Inclus: assessment maturite, framework recommande (Scrum/Kanban/SAFe/LeSS/Spotify), ART design, PI planning, roles, ceremonies, metriques (velocity, lead time, throughput), roadmap transformation 6 mois, coaching plan.',
safe: 'Implemente SAFe (Scaled Agile Framework) pour: ' + process + '. Couvre les 4 niveaux: Team, Program (ART), Large Solution, Portfolio. PI planning, Agile Release Train, WSJF prioritization, Lean Portfolio Management, OKRs, Inspect & Adapt. Roadmap 3 PI.',
kaizen: 'Organise un Kaizen event de 5 jours pour: ' + process + '. Jour par jour: J1=Define (VOC, CTQ, scope), J2=Measure (data collection, baseline), J3=Analyze (root cause, Pareto, 5 Whys), J4=Improve (solutions, pilote), J5=Control (SOP, visual management, handoff). Quick wins + sustain plan.',
spc: 'Applique le SPC (Statistical Process Control) au processus: ' + process + '. Inclus: selection caracteristiques critiques CTQ, plan echantillonnage, cartes de controle (X-bar R, p, np, c, u), calcul capabilite (Cp, Cpk, Pp, Ppk), limites de controle, regles Nelson/Western Electric, plan reaction OOC. Objectif: reduire variabilite a moins de 3.4 DPMO (6 sigma).',
variability: 'Analyse et reduis la variabilite du processus: ' + process + '. Methode: DOE (Design of Experiments), ANOVA, regression, correlation. Identifie les facteurs X critiques. Calcule R-squared, p-values, intervals de confiance. Robust design (Taguchi). Control plan avec SPC pour maintenir les gains. Objectif: Cpk > 1.33.'
};
weviaGenerate(methods[method] || methods.dmaic, 'lss-r');
}
// === AUDIT & COMPLIANCE ===
function genAudit() {
const scope = v('aud-scope') || '';
const standard = v('aud-std') || 'iso27001';
if (!scope) { toast('Definissez le perimetre'); return; }
const standards = {
iso27001: 'Effectue un audit ISO 27001 complet pour: ' + scope + '. Checklist par annexe (A.5 a A.18), ecarts identifies, niveau de maturite (1-5), plan remediation prioritise, budget, timeline certification.',
rgpd: 'Effectue un audit RGPD/protection des donnees complet pour: ' + scope + '. Registre traitements, DPIA, bases legales, droits personnes, sous-traitants, transferts, sécurité, DPO, plan conformite.',
iso9001: 'Effectue un audit ISO 9001 QMS pour: ' + scope + '. Processus, indicateurs qualite, non-conformites, actions correctives, revue direction, amelioration continue.',
soc2: 'Effectue un pre-audit SOC 2 Type II pour: ' + scope + '. Trust Service Criteria (Security, Availability, Processing Integrity, Confidentiality, Privacy), controles, ecarts, remediation.'
};
weviaGenerate(standards[standard] || standards.iso27001, 'aud-r');
}
// === QUALITYAI — Automated Six Sigma API Testing ===
async function runQualityTest() {
const domain = v('qa-domain') || 'all';
const runs = parseInt(v('qa-runs')) || 3;
const el = $('qa-r');
if (el) { el.classList.add('visible'); el.innerHTML = '<div class="ld-spinner"></div><div style="color:var(--text3);font-size:12px;margin-top:8px">Test Six Sigma en cours (' + runs + ' runs x ' + domain + ')...</div>'; }
const domains = {
all: ['SAP','CYBER','EMAIL','HC','BANK','CODE','CREATIVE'],
sap: ['SAP'], cyber: ['CYBER'], email: ['EMAIL'], hc: ['HC'],
bank: ['BANK'], code: ['CODE'], creative: ['CREATIVE']
};
const prompts = {
SAP: 'Migration SAP S4HANA brownfield enterprise Vistex rebates pricing',
CYBER: 'Audit cybersécurité institution financiere ISO 27001 Zero Trust',
EMAIL: 'Strategie délivrabilité email B2B DKIM DMARC warm-up',
HC: 'Architecture telemedecine hopital FHIR HL7 interoperabilite',
BANK: 'Transformation digitale banque retail scoring credit IA KYC',
CODE: 'API REST Node.js Express PostgreSQL JWT Docker CI/CD',
CREATIVE: 'Workshop design thinking innovation fintech digital sprint'
};
const target = 12000; // Quality baseline
const testDomains = domains[domain] || domains.all;
const results = {};
for (const dom of testDomains) {
results[dom] = { scores: [], times: [], errors: 0 };
for (let i = 0; i < runs; i++) {
try {
const start = Date.now();
const r = await fetch('/api/weval-ia-full', {
method: 'POST', headers: {'Content-Type':'application/json'},
body: JSON.stringify({ message: prompts[dom], mode: 'deep', conversation_id: 'qa-' + dom + '-' + Date.now() })
});
const d = await r.json();
const resp = d.response || d.reply || '';
const ms = Date.now() - start;
results[dom].scores.push(resp.length);
results[dom].times.push(ms);
// Update progress
if (el) {
const total = testDomains.length * runs;
const done = Object.values(results).reduce((s,r) => s + r.scores.length + r.errors, 0);
el.querySelector('.ld-spinner')?.insertAdjacentHTML('afterend', '<div style="color:var(--text3);font-size:10px">Run ' + done + '/' + total + '</div>');
}
} catch(e) { results[dom].errors++; }
}
}
// === SIX SIGMA CALCULATIONS ===
let html = '<div class="result-head"><div class="dot"></div>Rapport Six Sigma — QualityAI</div>';
html += '<div style="overflow-x:auto"><table style="width:100%;border-collapse:collapse;font-size:12px;margin:10px 0">';
html += '<tr style="background:var(--bg)"><th style="padding:8px;text-align:left;color:var(--accent)">Domaine</th><th style="padding:8px;text-align:center;color:var(--accent)">Moyenne</th><th style="padding:8px;text-align:center;color:var(--accent)">% Cible</th><th style="padding:8px;text-align:center;color:var(--accent)">StdDev</th><th style="padding:8px;text-align:center;color:var(--accent)">Cp</th><th style="padding:8px;text-align:center;color:var(--accent)">Cpk</th><th style="padding:8px;text-align:center;color:var(--accent)">Sigma</th><th style="padding:8px;text-align:center;color:var(--accent)">Latence</th><th style="padding:8px;text-align:center;color:var(--accent)">Status</th></tr>';
let allScores = [];
for (const [dom, data] of Object.entries(results)) {
const n = data.scores.length;
if (n === 0) continue;
const mean = data.scores.reduce((a,b) => a+b, 0) / n;
const std = Math.sqrt(data.scores.reduce((s,x) => s + (x-mean)**2, 0) / n) || 1;
const pctTarget = Math.round(mean * 100 / target);
const USL = target * 2; // Upper spec limit
const LSL = target * 0.5; // Lower spec limit (50% minimum)
const Cp = ((USL - LSL) / (6 * std)).toFixed(2);
const Cpk = Math.min((USL - mean) / (3 * std), (mean - LSL) / (3 * std)).toFixed(2);
const sigma = (Cpk * 3).toFixed(1);
const avgTime = Math.round(data.times.reduce((a,b) => a+b, 0) / n / 1000);
const color = pctTarget >= 100 ? '#22c55e' : pctTarget >= 80 ? '#f59e0b' : '#ef4444';
const sigColor = parseFloat(sigma) >= 4.5 ? '#22c55e' : parseFloat(sigma) >= 3 ? '#f59e0b' : '#ef4444';
html += `<tr style="border-bottom:1px solid var(--border)">
<td style="padding:8px;color:var(--white);font-weight:600">${dom}</td>
<td style="padding:8px;text-align:center;color:var(--text2)">${Math.round(mean)}c</td>
<td style="padding:8px;text-align:center;color:${color};font-weight:700">${pctTarget}%</td>
<td style="padding:8px;text-align:center;color:var(--text2)">${Math.round(std)}</td>
<td style="padding:8px;text-align:center;color:var(--text2)">${Cp}</td>
<td style="padding:8px;text-align:center;color:${sigColor};font-weight:600">${Cpk}</td>
<td style="padding:8px;text-align:center;color:${sigColor};font-weight:700">${sigma}σ</td>
<td style="padding:8px;text-align:center;color:var(--text2)">${avgTime}s</td>
<td style="padding:8px;text-align:center">${pctTarget >= 100 ? '✅' : pctTarget >= 80 ? '⚠️' : '❌'}</td>
</tr>`;
allScores.push(...data.scores);
}
html += '</table></div>';
// Overall sigma
if (allScores.length > 0) {
const gMean = allScores.reduce((a,b) => a+b, 0) / allScores.length;
const gStd = Math.sqrt(allScores.reduce((s,x) => s + (x-gMean)**2, 0) / allScores.length) || 1;
const gPct = Math.round(gMean * 100 / target);
const gCpk = Math.min((target*2 - gMean) / (3*gStd), (gMean - target*0.5) / (3*gStd)).toFixed(2);
html += `<div style="display:flex;gap:16px;flex-wrap:wrap;margin-top:16px">
<div style="flex:1;min-width:120px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:10px;color:var(--text3)">MOYENNE</div><div style="font-size:24px;font-weight:700;color:var(--white)">${Math.round(gMean)}c</div><div style="font-size:11px;color:${gPct>=100?'#22c55e':'#f59e0b'}">${gPct}% Cible</div></div>
<div style="flex:1;min-width:120px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:10px;color:var(--text3)">ECART-TYPE</div><div style="font-size:24px;font-weight:700;color:var(--white)">${Math.round(gStd)}</div><div style="font-size:11px;color:var(--text3)">variabilite</div></div>
<div style="flex:1;min-width:120px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:10px;color:var(--text3)">Cpk GLOBAL</div><div style="font-size:24px;font-weight:700;color:${parseFloat(gCpk)>=1.33?'#22c55e':'#f59e0b'}">${gCpk}</div><div style="font-size:11px;color:var(--text3)">${parseFloat(gCpk)>=1.33?'Capable':'A ameliorer'}</div></div>
<div style="flex:1;min-width:120px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center"><div style="font-size:10px;color:var(--text3)">SIGMA LEVEL</div><div style="font-size:24px;font-weight:700;color:${parseFloat(gCpk)*3>=4.5?'#22c55e':'#f59e0b'}">${(parseFloat(gCpk)*3).toFixed(1)}σ</div><div style="font-size:11px;color:var(--text3)">${allScores.length} mesures</div></div>
</div>`;
}
if (el) el.innerHTML = html;
}
// === STRIPE CHECKOUT ===
const STRIPE_API = '/api/stripe/checkout.php';
async function buyProduct(slug) {
toast('Redirection vers le paiement...');
try {
const r = await fetch(STRIPE_API + '?action=checkout', {
method: 'POST',
headers: {'Content-Type':'application/json','X-API-Key':KEY},
body: JSON.stringify({product: slug})
});
const d = await r.json();
if (d.checkout_url) {
window.location.href = d.checkout_url;
} else if (d.setup_instructions) {
toast('Stripe: configuration en cours. Contactez-nous.');
} else {
toast(d.error || 'Erreur checkout');
}
} catch(e) { toast('Erreur: ' + e.message); }
}
async function manageSubscription() {
try {
const r = await fetch(STRIPE_API + '?action=portal', {
method: 'POST',
headers: {'Content-Type':'application/json','X-API-Key':KEY}
});
const d = await r.json();
if (d.portal_url) window.location.href = d.portal_url;
else toast(d.error || 'Pas encore abonne');
} catch(e) { toast('Erreur: ' + e.message); }
}
async function loadMySubscriptions() {
try {
const r = await fetch(STRIPE_API + '?action=my_subscriptions&api_key=' + KEY);
const d = await r.json();
if (d.ok) {
let h = '<div class="section-head"><div class="section-title">Mes abonnements</div></div>';
if (d.subscriptions.length === 0) {
h += '<p style="color:var(--text3);font-size:13px">Aucun abonnement actif. Souscrivez a un plan Pro pour debloquer toutes les fonctionnalites.</p>';
} else {
d.subscriptions.forEach(s => {
h += '<div style="background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:10px 14px;margin-bottom:8px;font-size:13px"><strong style="color:var(--white)">' + s.product_slug + '</strong> <span class="tag tag-green">' + s.status + '</span></div>';
});
}
h += '<button class="btn btn-secondary" style="margin-top:8px" onclick="manageSubscription()">Gerer mes abonnements</button>';
$('sub-list').innerHTML = h;
}
} catch(e) {}
}
const p=new URLSearchParams(location.search);async function testAPI(){const el=document.createElement('div');el.style='position:fixed;top:0;left:0;right:0;padding:6px;text-align:center;font-size:11px;z-index:9999';try{const r=await fetch(AUTH+'?action=products');const j=await r.json();el.style.background='#1a7f37';el.style.color='#fff';el.textContent='API OK: '+j.total+' produits (v2.2)';document.body.appendChild(el);setTimeout(()=>el.remove(),4000)}catch(e){el.style.background='#d1242f';el.style.color='#fff';el.textContent='API ERRUSD: '+e.name+': '+e.message;document.body.appendChild(el)}}testAPI();
if(p.get('key')){$('loginKey').value=p.get('key');doLogin()}
$('loginEmail').addEventListener('keypress',e=>{if(e.key==='Enter')doLogin()});
$('loginKey').addEventListener('keypress',e=>{if(e.key==='Enter')doLogin()});
</script></body></html>