/* ─── Bulle flottante ─────────────────────────────────────────── */
#ov-bubble {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a6ef5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,110,245,.35);
  transition: transform .2s, box-shadow .2s;
}
#ov-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(26,110,245,.45);
}

/* ─── Modal ───────────────────────────────────────────────────── */
#ov-modal {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 99998;
  width: 340px;
  max-height: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(.97);
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
#ov-modal.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
#ov-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #1a6ef5;
  color: #fff;
  flex-shrink: 0;
}
#ov-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
#ov-bot-name  { font-size: 14px; font-weight: 600; }
#ov-bot-status { font-size: 11px; opacity: .8; }
#ov-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  opacity: .8;
}
#ov-close:hover { opacity: 1; }

/* Messages */
#ov-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8f9fc;
}
.ov-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}
.ov-msg.bot {
  background: #fff;
  border: 1px solid #e8eaf0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.ov-msg.user {
  background: #1a6ef5;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.ov-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  width: fit-content;
}
.ov-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #b0b4c0;
  animation: ov-bounce .9s infinite;
}
.ov-typing span:nth-child(2) { animation-delay: .15s; }
.ov-typing span:nth-child(3) { animation-delay: .3s;  }
@keyframes ov-bounce {
  0%,80%,100% { transform: translateY(0); }
  40%         { transform: translateY(-5px); }
}

/* Input */
#ov-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #eef0f5;
  background: #fff;
  flex-shrink: 0;
}
#ov-input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 20px;
  border: 1px solid #dde0ea;
  font-size: 13.5px;
  outline: none;
  background: #f8f9fc;
  color: #1a1a2e;
  transition: border-color .2s;
}
#ov-input:focus { border-color: #1a6ef5; background: #fff; }
#ov-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #1a6ef5;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
#ov-send:hover { background: #155de0; }

/* Responsive mobile */
@media (max-width: 420px) {
  #ov-modal { width: calc(100vw - 24px); right: 12px; bottom: 84px; }
  #ov-bubble { right: 16px; bottom: 20px; }
}