/* ERP Diagnostic — Assistant */
#erpa-root{--erpa-c1:#2f6bff;--erpa-c2:#22d3ee;--erpa-ink:#0f172a;--erpa-muted:#64748b;--erpa-line:#e2e8f0;--erpa-bg:#fff;--erpa-soft:#f1f5f9;
	position:fixed;right:20px;bottom:var(--erpa-bottom,20px);z-index:99990;font-family:inherit;font-size:15px;line-height:1.45;color:var(--erpa-ink);
	display:flex;flex-direction:column;align-items:flex-end;gap:10px;pointer-events:none}
#erpa-root *{box-sizing:border-box}
#erpa-root>*{pointer-events:auto}
#erpa-root button,#erpa-root input,#erpa-root textarea{font-family:inherit;font-size:inherit;line-height:1.4;letter-spacing:normal;text-transform:none;margin:0;box-shadow:none;min-height:0;width:auto}
#erpa-root [hidden]{display:none!important}

/* Bouton en forme de bulle de discussion */
#erpa-root .erpa-launcher{position:relative;height:46px;min-width:46px;width:auto;border:0;padding:0 16px 0 13px;cursor:pointer;color:#fff;
	border-radius:23px 23px 6px 23px;background:linear-gradient(110deg,var(--erpa-c1),var(--erpa-c2));box-shadow:0 10px 26px rgba(15,23,42,.28);
	display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px;white-space:nowrap;transition:transform .15s ease}
#erpa-root .erpa-launcher::after{content:"";position:absolute;right:0;bottom:-8px;width:14px;height:10px;background:var(--erpa-c2);clip-path:polygon(0 0,100% 0,100% 100%)}
#erpa-root .erpa-launcher svg{width:22px;height:22px;flex:0 0 22px}
#erpa-root .erpa-l-short{display:none}
#erpa-root .erpa-launcher:hover{transform:translateY(-1px)}
#erpa-root .erpa-launcher:focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 6px var(--erpa-c1)}

/* En haut à droite : la fenêtre s'ouvre sous la bulle */
#erpa-root.erpa-pos-top{top:var(--erpa-top,110px);bottom:auto;flex-direction:column-reverse;gap:16px;transition:top .2s ease}
#erpa-root.erpa-pos-top .erpa-panel{height:min(600px,calc(100vh - var(--erpa-top,110px) - 80px))}
#erpa-root.erpa-pos-top .erpa-teaser{border-radius:14px 4px 14px 14px}
#erpa-root.erpa-pos-bottom .erpa-launcher{margin-bottom:8px}

/* Petit message discret */
#erpa-root .erpa-teaser{max-width:280px;display:flex;align-items:flex-start;gap:4px;background:var(--erpa-bg);color:var(--erpa-ink);border:1px solid var(--erpa-line);
	border-radius:14px 14px 4px 14px;box-shadow:0 10px 28px rgba(15,23,42,.18);padding:4px 4px 4px 0;opacity:0;transform:translateY(6px);transition:opacity .25s ease,transform .25s ease}
#erpa-root .erpa-teaser.erpa-show{opacity:1;transform:none}
#erpa-root .erpa-teaser-text{background:none;border:0;padding:8px 6px 8px 14px;line-height:1.35;text-align:left;cursor:pointer;color:inherit;font-size:14px;font-weight:500}
#erpa-root .erpa-teaser-x{background:none;border:0;padding:4px;width:26px;height:26px;justify-content:center;align-items:center;cursor:pointer;color:var(--erpa-muted);border-radius:8px;display:flex}
#erpa-root .erpa-teaser-x svg{width:16px;height:16px}
#erpa-root .erpa-teaser-x:hover{background:var(--erpa-soft)}

/* Fenêtre */
#erpa-root .erpa-panel{width:380px;max-width:calc(100vw - 24px);height:min(600px,calc(100vh - 110px));background:var(--erpa-bg);border-radius:18px;
	box-shadow:0 24px 60px rgba(15,23,42,.32);border:1px solid var(--erpa-line);display:flex;flex-direction:column;overflow:hidden}
#erpa-root .erpa-head{display:flex;align-items:center;gap:10px;padding:12px 10px 12px 14px;color:#fff;background:linear-gradient(110deg,var(--erpa-c1),var(--erpa-c2))}
#erpa-root .erpa-avatar{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;flex:0 0 36px}
#erpa-root .erpa-avatar svg{width:20px;height:20px}
#erpa-root .erpa-titles{flex:1;min-width:0;display:flex;flex-direction:column}
#erpa-root .erpa-title{font-size:15px;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#erpa-root .erpa-sub{font-size:12.5px;opacity:.92}
#erpa-root .erpa-icon-btn{background:transparent;border:0;color:#fff;padding:7px;width:34px;height:34px;justify-content:center;align-items:center;border-radius:9px;cursor:pointer;display:flex}
#erpa-root .erpa-icon-btn:hover,#erpa-root .erpa-icon-btn:focus-visible{background:rgba(255,255,255,.18);outline:none}

#erpa-root .erpa-log{flex:1;overflow-y:auto;padding:14px 12px 6px;background:#f8fafc;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
#erpa-root .erpa-msg{display:flex;flex-direction:column;max-width:90%}
#erpa-root .erpa-bot{align-self:flex-start}
#erpa-root .erpa-user{align-self:flex-end;align-items:flex-end}
#erpa-root .erpa-bubble{padding:9px 12px;border-radius:14px;word-wrap:break-word;overflow-wrap:anywhere}
#erpa-root .erpa-bot .erpa-bubble{background:var(--erpa-bg);border:1px solid var(--erpa-line);border-top-left-radius:4px}
#erpa-root .erpa-user .erpa-bubble{background:var(--erpa-c1);color:#fff;border-top-right-radius:4px;white-space:pre-wrap}
#erpa-root .erpa-bubble p,#erpa-root .erpa-bubble li{font-size:inherit;line-height:inherit;color:inherit;font-weight:inherit;letter-spacing:normal}
#erpa-root .erpa-bubble p{margin:0 0 6px;padding:0}
#erpa-root .erpa-bubble p:last-child{margin-bottom:0}
#erpa-root .erpa-bubble ul,#erpa-root .erpa-bubble ol{margin:2px 0 6px;padding-left:20px}
#erpa-root .erpa-bubble li{margin:2px 0}
#erpa-root .erpa-bubble strong{font-weight:700}
#erpa-root .erpa-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
#erpa-root .erpa-action{display:inline-block;padding:7px 12px;line-height:1.3;border-radius:10px;border:0;cursor:pointer;font-weight:600;font-size:14px;color:#fff!important;text-decoration:none!important;
	background:linear-gradient(110deg,var(--erpa-c1),var(--erpa-c2))}
#erpa-root .erpa-action:hover,#erpa-root .erpa-action:focus-visible{filter:brightness(1.07);outline:none}

#erpa-root .erpa-typing .erpa-bubble{display:flex;gap:4px;padding:12px 14px}
#erpa-root .erpa-typing span{width:7px;height:7px;border-radius:50%;background:#94a3b8;animation:erpa-dot 1.2s infinite ease-in-out}
#erpa-root .erpa-typing span:nth-child(2){animation-delay:.15s}
#erpa-root .erpa-typing span:nth-child(3){animation-delay:.3s}
@keyframes erpa-dot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

#erpa-root .erpa-chips{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px;background:#f8fafc;max-height:150px;overflow-y:auto;border-top:1px solid transparent}
#erpa-root .erpa-chips:empty{display:none}
#erpa-root .erpa-chip{background:var(--erpa-bg);border:1px solid #c7d2fe;color:#1e3a8a;border-radius:999px;padding:6px 11px;font-weight:500;line-height:1.3;cursor:pointer;font-size:13.5px;text-align:left}
#erpa-root .erpa-chip:hover,#erpa-root .erpa-chip:focus-visible{background:#eef2ff;outline:none}
#erpa-root .erpa-chip-more{border-style:dashed;color:var(--erpa-muted);border-color:#cbd5e1}

#erpa-root .erpa-form{display:flex;align-items:flex-end;gap:8px;padding:10px 10px 6px 12px;border-top:1px solid var(--erpa-line);background:var(--erpa-bg)}
#erpa-root .erpa-input{flex:1;resize:none;border:1px solid var(--erpa-line);border-radius:12px;padding:9px 11px;background:#fff;color:var(--erpa-ink);max-height:110px;outline:none;width:100%}
#erpa-root .erpa-input:focus{border-color:var(--erpa-c1);box-shadow:0 0 0 3px rgba(47,107,255,.15)}
#erpa-root .erpa-send{width:40px;height:40px;flex:0 0 40px;border:0;padding:0;border-radius:12px;cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;
	background:linear-gradient(135deg,var(--erpa-c1),var(--erpa-c2))}
#erpa-root .erpa-send:disabled{opacity:.5;cursor:default}
#erpa-root .erpa-note{font-size:11.5px;color:var(--erpa-muted);text-align:center;padding:0 12px 9px;background:var(--erpa-bg)}

/* Formulaire « Écrire à l'équipe » */
#erpa-root .erpa-contact{flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:9px;background:#f8fafc}
#erpa-root .erpa-contact-title{font-size:16px}
#erpa-root .erpa-contact-intro{margin:0 0 4px;color:var(--erpa-muted);font-size:14px}
#erpa-root .erpa-field{width:100%!important;border:1px solid var(--erpa-line);border-radius:10px;padding:9px 11px;background:#fff;color:var(--erpa-ink);outline:none}
#erpa-root .erpa-field:focus{border-color:var(--erpa-c1);box-shadow:0 0 0 3px rgba(47,107,255,.15)}
#erpa-root .erpa-field-msg{resize:vertical;min-height:96px}
#erpa-root .erpa-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0}
#erpa-root .erpa-contact-err{margin:0;color:#b91c1c;font-size:13.5px;min-height:1em}
#erpa-root .erpa-contact-err:empty{display:none}
#erpa-root .erpa-contact-row{display:flex;gap:8px;justify-content:flex-end}
#erpa-root .erpa-btn{border-radius:10px;padding:9px 14px;line-height:1.3;cursor:pointer;font-weight:600;border:1px solid transparent}
#erpa-root .erpa-btn-main{color:#fff;border:0;background:linear-gradient(110deg,var(--erpa-c1),var(--erpa-c2))}
#erpa-root .erpa-btn-main:disabled{opacity:.6}
#erpa-root .erpa-btn-ghost{background:#fff;border-color:var(--erpa-line);color:var(--erpa-ink)}

/* Case « Je confirme » mise en évidence */
.erpa-pulse{border-radius:10px;animation:erpa-pulse 1s ease-in-out 4}
@keyframes erpa-pulse{0%,100%{box-shadow:0 0 0 0 rgba(34,211,238,0)}50%{box-shadow:0 0 0 6px rgba(34,211,238,.55)}}

/* Mobile */
@media (max-width:640px){
	#erpa-root{right:12px;bottom:calc(var(--erpa-bottom-m,16px) + env(safe-area-inset-bottom,0px))}
	#erpa-root .erpa-launcher{height:40px;padding:0 13px 0 11px;font-size:14px;gap:6px;border-radius:20px 20px 6px 20px}
	#erpa-root .erpa-launcher svg{width:19px;height:19px;flex-basis:19px}
	#erpa-root .erpa-l-long{display:none}
	#erpa-root .erpa-l-short{display:inline}
	#erpa-root.erpa-open,#erpa-root.erpa-pos-top.erpa-open{left:0;right:0;bottom:0;top:0;align-items:stretch;gap:0;transition:none}
	#erpa-root.erpa-open .erpa-launcher{display:none}
	#erpa-root.erpa-open .erpa-panel,#erpa-root.erpa-pos-top.erpa-open .erpa-panel{width:100%;max-width:none;height:100%;border-radius:0;border:0}
	#erpa-root .erpa-head{padding-top:calc(12px + env(safe-area-inset-top,0px))}
	#erpa-root .erpa-note{padding-bottom:calc(9px + env(safe-area-inset-bottom,0px))}
	#erpa-root .erpa-input{font-size:16px} /* évite le zoom automatique sur iPhone */
	#erpa-root .erpa-teaser{display:none!important}
	#erpa-root .erpa-chips{max-height:118px}
}
@media (prefers-reduced-motion:reduce){
	#erpa-root .erpa-launcher,#erpa-root .erpa-teaser,#erpa-root.erpa-pos-top{transition:none}
	#erpa-root .erpa-typing span,.erpa-pulse{animation:none}
}
