/* Root peut rester, mais n'a plus besoin d'être fixed */
#ec-assistant-root{
  position: static;
  z-index: 999999;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* Bouton: TOUJOURS en bas à droite */
.ec-btn{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999999;
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:0;
  border-radius:999px;
  padding:12px 14px;
  background:#0f172a;
  color:#fff;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(0,0,0,.22);
}

/* Panel: au-dessus du bouton */
.ec-panel{
  position: fixed;
  right: 18px;
  bottom: 78px; /* ajuste si besoin */
  z-index: 999999;
  width:425px;
  max-width:calc(100vw - 36px);
  border-radius:16px;
  background:#fff;
  box-shadow:0 18px 60px rgba(0,0,0,.25);
  overflow:hidden;
  border:1px solid rgba(0,0,0,.08);

  /* animation douce */
  opacity:0;
  transform:translateY(14px);
  pointer-events:none;
  transition:opacity .28s ease, transform .28s ease;
}

.ec-panel.is-open{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.ec-btn.is-hidden{
  display:none !important;
}

.ec-btn{display:inline-flex;align-items:center;gap:10px;border:0;border-radius:999px;padding:12px 14px;background:#0f172a;color:#fff;cursor:pointer;box-shadow:0 12px 28px rgba(0,0,0,.22)}
.ec-dot{width:10px;height:10px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.18)}
.ec-panel{width:425px;max-width:calc(100vw - 36px);border-radius:16px;background:#fff;box-shadow:0 18px 60px rgba(0,0,0,.25);overflow:hidden;border:1px solid rgba(0,0,0,.08)}
.ec-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#07294a;color:#fff}
.ec-head strong{font-size:14px}
.ec-close{background:transparent;border:0;color:#fff;font-size:18px;cursor:pointer;line-height:1}
.ec-body{padding:12px 12px 10px;max-height:50vh;overflow:auto}
.ec-msg{margin:10px 0;display:flex}
.ec-msg.is-user{justify-content:flex-end}
.ec-bubble{max-width:85%;padding:10px 12px;border-radius:14px;font-size:13px;line-height:1.35;background:#f1f5f9;color:#0f172a}
.ec-msg.is-user .ec-bubble{background:#0f172a;color:#fff}
.ec-products{margin-top:10px;display:grid;gap:10px}
.ec-card{display:flex;gap:10px;align-items:flex-start;border:1px solid rgba(0,0,0,.08);border-radius:14px;padding:10px;text-decoration:none;color:inherit}
.ec-card img{width:56px;height:56px;object-fit:cover;border-radius:10px;background:#f1f5f9}
.ec-card strong{display:block;font-size:13px;line-height:1.2}
.ec-card .ec-meta{font-size:12px;opacity:.8;margin-top:4px}
.ec-card .ec-why{font-size:12px;margin-top:6px;opacity:.9}
.ec-foot{display:flex;gap:8px;padding:10px;border-top:1px solid rgba(0,0,0,.08);background:#fff}
.ec-input{flex:1;border:1px solid rgba(0,0,0,.18);border-radius:999px;padding:10px 12px;font-size:13px;outline:none}
.ec-send{border:0;border-radius:999px;padding:10px 12px;background:#fed339;color:#000;cursor:pointer}
.ec-mini{font-size:11px;opacity:.65;margin-top:6px}
.ec-loading{display:inline-flex;gap:6px;align-items:center}
.ec-pill{width:6px;height:6px;border-radius:999px;background:#94a3b8;animation:ecPulse 1s infinite ease-in-out}
.ec-pill:nth-child(2){animation-delay:.15s}
.ec-pill:nth-child(3){animation-delay:.3s}
@keyframes ecPulse{0%,100%{transform:translateY(0);opacity:.4}50%{transform:translateY(-3px);opacity:1}}

.ec-btn.is-hidden{display:none!important;}
.ec-panel{opacity:0;transform:translateY(14px);pointer-events:none;transition:opacity .28s ease,transform .28s ease;}
.ec-panel.is-open{opacity:1;transform:translateY(0);pointer-events:auto;}
