/* ============================================================
   ASSISTANT EQUILIBRE BIEN-ETRE - chatbot (CSS autonome du plugin)
   Palette alignee sur le theme (teal #1F6B68 / orange #E39A5E)
   ============================================================ */
:root{
  --ebec-primary:#1F6B68;
  --ebec-primary-dark:#163F3D;
  --ebec-accent:#E39A5E;
  --ebec-pink:#FBEAE1;
  --ebec-bg:#FDFBF9;
}

.ebec-mascot{
  position:fixed;bottom:24px;right:24px;z-index:9998;
  display:flex;align-items:center;gap:10px;cursor:pointer;
}
.ebec-avatar{
  width:60px;height:60px;border-radius:50%;
  background:linear-gradient(135deg,var(--ebec-primary),var(--ebec-primary-dark));
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 20px rgba(31,107,104,0.35);
  font-size:1.6rem;position:relative;flex-shrink:0;
}
.ebec-avatar::after{
  content:'';position:absolute;bottom:2px;right:2px;width:12px;height:12px;border-radius:50%;
  background:#4CAF50;border:2px solid #fff;
}
.ebec-mascot.chat-active .ebec-avatar{box-shadow:0 8px 24px rgba(31,107,104,0.5);}
.ebec-bubble{
  background:#fff;border-radius:14px;padding:10px 14px;font-size:0.82rem;color:var(--ebec-primary-dark);
  box-shadow:0 6px 18px rgba(0,0,0,0.12);max-width:220px;opacity:1;transition:opacity 0.4s ease;
}
.ebec-bubble.visible{opacity:1;}

.ebec-window{
  position:fixed;bottom:100px;right:24px;z-index:9999;width:360px;max-width:calc(100vw - 32px);
  height:520px;max-height:calc(100vh - 140px);background:var(--ebec-bg);border-radius:16px;
  box-shadow:0 24px 60px rgba(0,0,0,0.25);display:none;flex-direction:column;overflow:hidden;
}
.ebec-window.open{display:flex;}

.ebec-header{
  background:linear-gradient(135deg,var(--ebec-primary),var(--ebec-primary-dark));color:#fff;
  padding:14px 16px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;
}
.ebec-header-info{display:flex;align-items:center;gap:10px;}
.ebec-header-avatar{
  width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,0.2);
  display:flex;align-items:center;justify-content:center;font-size:1.1rem;flex-shrink:0;
}
.ebec-name{font-weight:700;font-size:0.95rem;}
.ebec-status{font-size:0.72rem;opacity:0.85;display:flex;align-items:center;gap:5px;}
.ebec-status-dot{width:7px;height:7px;border-radius:50%;background:#4CAF50;display:inline-block;}
.ebec-close{background:none;border:none;color:#fff;font-size:1.1rem;cursor:pointer;line-height:1;padding:4px;}

.ebec-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;}
.ebec-msg{display:flex;gap:8px;max-width:88%;}
.ebec-msg.user{align-self:flex-end;flex-direction:row-reverse;}
.ebec-msg-avatar{
  width:28px;height:28px;border-radius:50%;background:var(--ebec-primary);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:0.8rem;flex-shrink:0;
}
.ebec-bubble-msg{
  padding:10px 13px;border-radius:14px;font-size:0.86rem;line-height:1.45;white-space:pre-wrap;
}
.ebec-msg.assistant .ebec-bubble-msg{background:#fff;color:#2b2b2b;border-radius:4px 14px 14px 14px;box-shadow:0 2px 8px rgba(0,0,0,0.06);}
.ebec-msg.user .ebec-bubble-msg{background:var(--ebec-primary);color:#fff;border-radius:14px 4px 14px 14px;}

.ebec-typing{display:flex;gap:4px;padding:10px 13px;background:#fff;border-radius:4px 14px 14px 14px;width:fit-content;}
.ebec-typing span{width:6px;height:6px;border-radius:50%;background:#ccc;animation:ebec-bounce 1.2s infinite;}
.ebec-typing span:nth-child(2){animation-delay:0.15s;}
.ebec-typing span:nth-child(3){animation-delay:0.3s;}
@keyframes ebec-bounce{0%,80%,100%{transform:translateY(0);opacity:0.5;}40%{transform:translateY(-4px);opacity:1;}}

.ebec-suggestions{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 10px;flex-shrink:0;}
.ebec-chip{
  background:var(--ebec-pink);color:var(--ebec-primary-dark);border:1px solid rgba(31,107,104,0.2);
  border-radius:999px;padding:6px 13px;font-size:0.78rem;cursor:pointer;transition:background 0.2s;
}
.ebec-chip:hover{background:var(--ebec-accent);color:#fff;border-color:var(--ebec-accent);}

.ebec-input-area{display:flex;border-top:1px solid rgba(0,0,0,0.08);padding:10px;gap:8px;flex-shrink:0;background:#fff;}
.ebec-input{flex:1;border:1px solid #ddd;border-radius:999px;padding:9px 14px;font-size:0.85rem;outline:none;}
.ebec-input:focus{border-color:var(--ebec-primary);}
.ebec-send{
  background:var(--ebec-primary);color:#fff;border:none;border-radius:50%;width:38px;height:38px;
  display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;
}

/* Formulaire de contact / RDV injecte dans le fil */
.ebec-cform{background:#fff;border-radius:4px 14px 14px 14px;padding:14px;font-size:0.85rem;box-shadow:0 2px 8px rgba(0,0,0,0.06);}
.ebec-cform-field{margin-bottom:9px;}
.ebec-cform-field label{display:block;font-size:0.72rem;font-weight:600;margin-bottom:3px;color:var(--ebec-primary-dark);}
.ebec-cform-field input,.ebec-cform-field select{width:100%;padding:7px 10px;border:1px solid #ddd;border-radius:8px;font-size:0.82rem;box-sizing:border-box;}
.ebec-cform-rgpd{display:flex;gap:6px;align-items:flex-start;font-size:0.72rem;color:#555;margin:8px 0;}
.ebec-cform-btn{border:none;border-radius:999px;padding:8px 16px;font-size:0.8rem;cursor:pointer;}
.ebec-cform-submit{background:var(--ebec-primary);color:#fff;}
.ebec-cform-cancel{background:#eee;color:#333;}
.ebec-cform-result{margin-top:8px;font-size:0.78rem;}

@media (max-width:480px){
  .ebec-window{right:8px;left:8px;width:auto;bottom:92px;}
  .ebec-mascot{right:16px;bottom:16px;}
}

.ebec-privacy{font-size:.68rem;line-height:1.35;color:#6b6b6b;background:#f6f3ee;padding:6px 12px;flex-shrink:0;}.ebec-privacy a{color:inherit;text-decoration:underline;}
