/* =========================
   BOUTON FLOTTANT
========================= */

.chat-floating-btn {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 75px;
  height: 75px;
  border: none;
  border-radius: 50%;
  background: #0d6efd;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  z-index: 9999;
  cursor: pointer;
  padding: 5px;
  animation: pulseChat 1.8s infinite;
}

.chat-floating-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: white;
}

.chat-notification {
  position: absolute;
  top: -3px;
  right: -3px;
  background: red;
  color: white;
  font-size: 13px;
  font-weight: bold;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   CHAT BOX
========================= */

#chatBox {
  display: none;
  position: fixed;
  right: 25px;
  bottom: 110px;
  width: 360px;
  height: 500px;
  border-radius: 20px;
  overflow: hidden;
  z-index: 9999;
  background: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.chat-header {
  background: #0d6efd;
  color: white;
  padding: 15px;
  font-weight: bold;
  font-size: 18px;
}

#messages {
  height: 360px;
  overflow-y: auto;
  padding: 15px;
  background: #f5f7fb;
}

/* =========================
   MESSAGES
========================= */

.user-msg {
  background: #0d6efd;
  color: white;
  padding: 10px 14px;
  border-radius: 15px 15px 0px 15px;
  margin-bottom: 12px;
  width: fit-content;
  max-width: 80%;
  margin-left: auto;
}

.bot-msg {
  background: white;
  color: #333;
  padding: 10px 14px;
  border-radius: 15px 15px 15px 0px;
  margin-bottom: 12px;
  width: fit-content;
  max-width: 80%;
  border: 1px solid #ddd;
}

/* =========================
   FOOTER
========================= */

.chat-footer {
  padding: 10px;
  border-top: 1px solid #ddd;
  background: white;
  display: flex;
  gap: 10px;
}

.chat-footer input {
  flex: 1;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 10px;
  outline: none;
}

.chat-footer button {
  border: none;
  background: #0d6efd;
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
}

/* =========================
   ANIMATION
========================= */

@keyframes pulseChat {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(13,110,253,0.6);
  }

  70% {
    transform: scale(1.06);
    box-shadow: 0 0 0 15px rgba(13,110,253,0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(13,110,253,0);
  }
}