/* Chatbot Sync LABSS – site HTML */
.chat-trigger {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  z-index: 9998;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: chat-pulse 2s ease-in-out infinite;
}
.chat-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 255, 136, 0.5);
}
.chat-trigger__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #0a0a0a;
  color: #00ff88;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid #00ff88;
  white-space: nowrap;
}
@keyframes chat-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4); }
  50% { box-shadow: 0 4px 28px rgba(0, 255, 136, 0.6); }
}

.chat-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 400px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: #0a0a0a;
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
  animation: chat-window-in 0.25s ease-out;
}
@keyframes chat-window-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 480px) {
  .chat-window {
    bottom: 0; right: 0; left: 0;
    width: 100vw; max-width: 100vw;
    height: 100vh; max-height: 100vh;
    border-radius: 0; border-left: none; border-right: none;
  }
}

.chat-header {
  padding: 16px 20px;
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.chat-header__title { font-size: 1.1rem; font-weight: 700; color: #fff; margin: 0; }
.chat-header__sub { font-size: 0.75rem; color: #00ff88; margin-left: auto; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: #111; }
.chat-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.chat-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 90%; }
.chat-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg--bot { align-self: flex-start; }
.chat-msg__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.chat-msg__avatar--bot { background: rgba(0, 255, 136, 0.15); }
.chat-msg__avatar--user { background: rgba(255, 255, 255, 0.1); }
.chat-msg__bubble {
  padding: 10px 14px; border-radius: 16px;
  font-size: 0.9rem; line-height: 1.45; word-break: break-word;
}
.chat-msg__bubble--bot {
  background: #1a1a1a; border: 1px solid #252525; color: #e0e0e0;
  border-bottom-left-radius: 4px;
}
.chat-msg__bubble--user {
  background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
  color: #0a0a0a; border-bottom-right-radius: 4px;
}
.chat-msg__bubble--typing {
  display: flex; align-items: center; gap: 4px; padding: 14px 18px;
}
.chat-typing-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #00ff88;
  animation: chat-typing 1.2s ease-in-out infinite;
}
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-typing {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.9); }
  40% { opacity: 1; transform: scale(1); }
}

.chat-quick-replies {
  padding: 0 16px 12px; display: flex; flex-wrap: wrap; gap: 8px;
  flex-shrink: 0;
}
.chat-quick-reply {
  padding: 8px 14px; background: #1a1a1a;
  border: 1px solid rgba(0, 255, 136, 0.3); border-radius: 20px;
  color: #00ff88; font-size: 0.8rem; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.chat-quick-reply:hover {
  background: rgba(0, 255, 136, 0.1); border-color: #00ff88;
}

.chat-input-wrap {
  padding: 12px 16px 16px; background: #0a0a0a;
  border-top: 1px solid #1a1a1a; flex-shrink: 0;
}
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-input {
  flex: 1; min-height: 44px; max-height: 120px;
  padding: 12px 16px; background: #1a1a1a; border: 1px solid #333;
  border-radius: 22px; color: #fff; font-size: 0.9rem;
  resize: none; font-family: inherit; transition: border-color 0.2s;
}
.chat-input:focus { outline: none; border-color: #00ff88; }
.chat-input::placeholder { color: #666; }
.chat-send {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
  border: none; color: #0a0a0a; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.2s, opacity 0.2s;
}
.chat-send:hover { transform: scale(1.05); }
.chat-send svg { width: 20px; height: 20px; }

/* ========== Bulle promotion chatbot (page d'accueil) ========== */
.chat-promo-tooltip {
  position: fixed;
  bottom: 28px;
  right: 92px;
  width: 280px;
  max-width: calc(100vw - 140px);
  padding: 14px 36px 14px 16px;
  background: linear-gradient(145deg, #0f1412 0%, #0a0a0a 100%);
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 136, 0.1);
  z-index: 9997;
  font-family: inherit;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px) scale(0.96);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.chat-promo-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  animation: chat-promo-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both;
}
.chat-promo-tooltip.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px) scale(0.96);
  transition-duration: 0.25s;
  pointer-events: none;
}
@keyframes chat-promo-bounce {
  0% { transform: translateX(0) scale(1); }
  40% { transform: translateX(-4px) scale(1.02); }
  70% { transform: translateX(2px) scale(0.99); }
  100% { transform: translateX(0) scale(1); }
}

.chat-promo-tooltip__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #e8e8e8;
}
.chat-promo-tooltip__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #999;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.chat-promo-tooltip__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.chat-promo-tooltip__arrow {
  position: absolute;
  right: -8px;
  bottom: 28px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 10px solid rgba(0, 255, 136, 0.4);
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.4));
}
.chat-promo-tooltip__arrow::after {
  content: '';
  position: absolute;
  top: -7px;
  left: -11px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 9px solid #0f1412;
}

@media (max-width: 480px) {
  .chat-promo-tooltip {
    right: 16px;
    bottom: 88px;
    width: calc(100vw - 32px);
    max-width: 280px;
  }
  .chat-promo-tooltip__arrow {
    right: auto;
    left: 24px;
    bottom: -8px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid rgba(0, 255, 136, 0.4);
    border-bottom: none;
  }
  .chat-promo-tooltip__arrow::after {
    top: -9px;
    left: -9px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid #0f1412;
    border-bottom: none;
  }
}
