/* ---------- Prospection (v5.1) ---------- */ .prosp-card{border:1px solid var(--line);border-radius:14px;padding:12px;margin:10px 0;background:var(--card2)} .prosp-card.approuve{border-color:var(--ok);box-shadow:0 0 0 1px var(--ok)} .prosp-card.refuse{border-color:var(--bad);opacity:.72} .prosp-top{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between} .prosp-name{font-weight:700;font-size:15px} .prosp-mail{background:var(--inset);border:1px solid var(--line);border-radius:10px;padding:10px;margin-top:8px;white-space:pre-wrap;font-size:13px;line-height:1.5} .prosp-obj{font-weight:700;margin-bottom:6px;color:var(--txt)} .prosp-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px} .prosp-actions button{flex:1 1 140px} details.prosp-det{margin-top:8px} details.prosp-det>summary{cursor:pointer;color:var(--acc);font-weight:700;min-height:46px;display:flex;align-items:center;list-style:none} details.prosp-det>summary::-webkit-details-marker{display:none} /* ==================== v5.2 : densite pro + tiroir mobile ==================== */ :root{--r:13px;--tap:42px} body{font-size:13px;line-height:1.5;background:radial-gradient(760px 280px at 50% -10%,#121b31 0%,transparent 62%),var(--bg);background-attachment:fixed} .tab.on{gap:10px;padding:12px 16px 22px} .tab.on .card{animation:rise .16s ease-out both} .tab.on .card:nth-child(n){animation-delay:0s!important} .card{padding:12px;background:var(--card)} .card h2{font-size:13px;margin:0 0 7px} td,th{padding:5px 7px;font-size:12.5px} input[type=text],input[type=password],textarea,select,input.s{font-size:13px} button{font-size:12.5px} #nav button{font-size:13.5px;padding:7px 12px;gap:9px;min-height:var(--tap);border-radius:10px} #nav button::before{font-size:17px;width:24px} .topbar{padding:9px 16px} .topbar h1{font-size:16px} .brand-txt strong{font-size:14.5px} .brand-txt span{font-size:10.5px} #chatbar{margin:10px 16px 2px;padding:10px 12px} #log{height:170px} .mut{font-size:11.5px} .big{font-size:19px} .kpi div{padding:6px 10px;min-width:100px} .prosp-card{padding:10px;margin:8px 0;border-radius:12px} .prosp-name{font-size:13.5px} .prosp-mail{font-size:12.5px} .menu-btn{display:none} #drawerWrap{display:none} @media (max-width:900px){ .sidebar{display:none!important} .maincol{margin-left:0;padding-bottom:0} .menu-btn{display:flex;align-items:center;justify-content:center;width:42px;height:42px;flex:0 0 auto;font-size:20px;border-radius:11px;background:var(--card2);border:1px solid var(--line2);color:var(--txt);cursor:pointer} .topbar{padding:8px 12px;gap:10px} .topbar h1{font-size:15px} .tab.on{padding:10px 10px 18px;gap:10px} .card{padding:11px} td,th{padding:8px 6px;font-size:12.5px} button{min-height:42px;font-size:12.5px} input[type=text],input[type=password],textarea,select{min-height:42px} details.prosp-det>summary{min-height:42px} #drawerWrap{display:block;position:fixed;inset:0;z-index:100;visibility:hidden;pointer-events:none} #drawerWrap.open{visibility:visible;pointer-events:auto} #drawerBg{position:absolute;inset:0;background:rgba(4,7,13,.62);opacity:0;transition:opacity .18s} #drawerWrap.open #drawerBg{opacity:1} #drawer{position:absolute;top:0;left:0;bottom:0;width:min(320px,86vw);background:#0d1424;border-right:1px solid var(--line2);display:flex;flex-direction:column;transform:translateX(-102%);transition:transform .2s ease-out;box-shadow:24px 0 60px rgba(0,0,0,.5)} #drawerWrap.open #drawer{transform:none} .drawer-head{display:flex;align-items:center;gap:10px;padding:14px 14px 12px;border-bottom:1px solid var(--line)} .drawer-head .brand-txt{flex:1} .drawer-x{width:40px;height:40px;min-height:40px;border-radius:10px;background:var(--card2);border:1px solid var(--line2);color:var(--txt);font-size:16px;cursor:pointer} #drawerNav{flex:1;overflow-y:auto;padding:8px 10px 12px;display:flex;flex-direction:column;gap:2px} #drawerNav button{display:flex;align-items:center;gap:11px;width:100%;min-height:44px;padding:8px 12px;background:transparent;border:0;border-radius:10px;color:var(--mut);font-size:13.5px;font-weight:600;text-align:left;cursor:pointer} #drawerNav button .di{font-size:18px;width:26px;text-align:center;flex:0 0 auto} #drawerNav button.on{background:var(--acc-soft);color:var(--txt)} .drawer-foot{padding:12px 14px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px} .drawer-foot .b{align-self:flex-start} }

Electronic HOUSE

Entrez la clé d'administration (la même que la boîte de réception).

🎯 Prospection email

Chargement du lot de prospection…

/* ================= Prospection — ajout v5.1 (fonctions nouvelles uniquement, rien d'existant modifié) ================= */ const PROSP_KEY='eh_prosp_v1'; let PROSP=null, PROSP_CHOIX={}; function prospLoadChoix(){try{PROSP_CHOIX=JSON.parse(localStorage.getItem(PROSP_KEY)||'{}')}catch(e){PROSP_CHOIX={}}} function prospSaveChoix(){try{localStorage.setItem(PROSP_KEY,JSON.stringify(PROSP_CHOIX))}catch(e){}} function prospKey(i){return 'p'+i} async function prospInit(){ if(PROSP&&PROSP._done)return prospRender(); if(typeof EH_BATCH_1!=='undefined'&&EH_BATCH_1){PROSP=EH_BATCH_1;PROSP._done=true;prospLoadChoix();prospRender();return;} try{ const r=await fetch('batches/batch_1.json'); if(!r.ok)throw new Error('lot introuvable'); PROSP=await r.json();PROSP._done=true;prospLoadChoix();prospRender(); }catch(e){ document.getElementById('prosp-intro').textContent='Aucun lot de prospection pour le moment.'; document.getElementById('prosp-list').innerHTML=''; document.getElementById('prosp-counters').innerHTML=''; } } function prospEmails(){const m={};(PROSP.emails_rediges||[]).forEach(e=>{m[e.prospect]=e});return m} function prospRender(){ const P=PROSP.prospects||[],EM=prospEmails(); document.getElementById('prosp-intro').innerHTML='Lot '+esc(PROSP.batch||'batch_1')+' — '+P.length+' prospects. Valide les emails ici : Horyon les enverra depuis electronichouze@gmail.com.'; let na=0,nr=0,nw=0,ne=0; document.getElementById('prosp-list').innerHTML=P.map((p,i)=>{ const em=EM[p.entreprise],ch=PROSP_CHOIX[prospKey(i)]; let badge,actions='',cls=''; if(!em){ne++;badge='pas d\u2019email public \u2192 WhatsApp'} else{ if(ch==='approuve'){na++;cls='approuve';badge='Approuv\u00e9'} else if(ch==='refuse'){nr++;cls='refuse';badge='Refus\u00e9'} else{nw++;badge='En attente'} actions='
'; } const mail=em?'
\u2709\ufe0f Voir l\u2019email r\u00e9dig\u00e9
Objet : '+esc(em.objet)+'
'+esc(em.corps)+'
':''; return '
'+esc(p.entreprise)+''+badge+'
' +'
'+esc(p.activite||'')+' \u00b7 '+esc(p.ville||'')+(p.email?' \u00b7 '+esc(p.email):'')+'
'+mail+actions+'
'; }).join(''); document.getElementById('prosp-counters').innerHTML= '
'+na+'
approuv\u00e9s
' +'
'+nr+'
refus\u00e9s
' +'
'+nw+'
en attente
' +'
'+ne+'
via WhatsApp
'; } function prospSet(i,v){PROSP_CHOIX[prospKey(i)]=v;prospSaveChoix();prospRender()} function prospAll(v){const EM=prospEmails();(PROSP.prospects||[]).forEach((p,i)=>{if(EM[p.entreprise])PROSP_CHOIX[prospKey(i)]=v});prospSaveChoix();prospRender()} function prospReset(){PROSP_CHOIX={};prospSaveChoix();prospRender()} function prospCopy(){ const P=PROSP.prospects||[],EM=prospEmails(),ap=[],rf=[],pe=[],wa=[]; P.forEach((p,i)=>{ const em=EM[p.entreprise]; if(!em){wa.push(p.entreprise);return} const c=PROSP_CHOIX[prospKey(i)]; if(c==='approuve')ap.push(p.entreprise+' <'+(p.email||em.email_destinataire||'')+'>'); else if(c==='refuse')rf.push(p.entreprise); else pe.push(p.entreprise); }); const sec=(t,a)=>t+' ('+a.length+') :\n'+(a.map(x=>'- '+x).join('\n')||'- aucun'); const txt='VALIDATION PROSPECTION \u2014 lot '+(PROSP.batch||'batch_1')+'\n' +sec('APPROUV\u00c9S',ap)+'\n'+sec('REFUS\u00c9S',rf)+'\n' +sec('EN ATTENTE',pe)+'\n'+sec('SANS EMAIL PUBLIC \u2014 \u00e0 contacter via WhatsApp',wa); const done=()=>{document.getElementById('prosp-hint').innerHTML='\u2705 Validation copi\u00e9e ! Colle ce texte \u00e0 Horyon dans le chat \u2014 il enverra les emails approuv\u00e9s depuis electronichouze@gmail.com. (Aucun envoi n\u2019est fait depuis le centre de contr\u00f4le.)'}; const fb=()=>{const ta=document.createElement('textarea');ta.value=txt;ta.style.position='fixed';ta.style.opacity='0';document.body.appendChild(ta);ta.select();try{document.execCommand('copy');done()}catch(e){document.getElementById('prosp-hint').textContent='Copie impossible automatiquement : recopie le texte manuellement.'}document.body.removeChild(ta)}; if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(txt).then(done,fb);else fb(); } /* Charge l'onglet quand il devient visible — sans modifier tab() ni load() */ new MutationObserver(()=>{const s=document.getElementById('t-prosp');if(s&&s.classList.contains('on'))prospInit()}) .observe(document.getElementById('t-prosp'),{attributes:true,attributeFilter:['class']});