:root {
  --regie-red: #FF2621;
  --text-dark: #111;
  --border-light: #e5e5e5;
}

/* =========================
   CHATBOT WIDGET
   ========================= */
#messages .thinking {
  font-style: italic;
  opacity: 0.8;
}

.typing-dots {
  display: inline-block;
}

.typing-dots span {
  animation: blink 1.4s infinite both;
  display: inline-block;
  margin-left: 2px;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% { opacity: 0.2; }
  20% { opacity: 1; }
  100% { opacity: 0.2; }
}


#chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

/* Tooltip */
#chatbot-tooltip {
    position: absolute;
    bottom: 125px;
    right: 5rem;
    border-radius: 3rem 3rem 0 3rem;
    background: #fff;
    padding: 20px 25px;
    font-size: 13px;
    border: 2px solid #FF2621;
    color: var(--text-dark);
    line-height: 1.4em;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    display: none;
    min-width: 205px;
    max-width: 220px;
}

/* Bouton robot */
#chatbot-button {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 18px rgb(0 0 0 / 49%);
  transition: transform 0.2s ease;
}

#chatbot-button:hover {
  transform: scale(1.03);
}

#chatbot-button video {
  width: 100%;
  height: 100%;
  object-fit: fill;
  background: #fff;
}

/* =========================
   FENÊTRE CHAT
   ========================= */

#chatbot-window {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 340px;
  height: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
}

/* Header */
#chatbot-header {
    padding: 14px 16px;
    background: var(--regie-red);
    color: #fff;
    font-weight: bold;
    border-bottom: 2px solid var(--regie-red);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-close {
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* Messages */
#messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  font-size: 14px;
}

.user {
  color: var(--regie-red);
  margin-bottom: 8px;
}

.assistant {
  color: var(--text-dark);
  margin-bottom: 14px;
}

/* =========================
   INPUT (style formulaire Regie)
   ========================= */

#chatbot-input {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--border-light);
}

#chatbot-input textarea {
  flex: 1;
  border: none;
  border-bottom: 2px solid #ccc;
  padding: 6px 0;
  font-size: 14px;
  resize: none;
  outline: none;
  background: transparent;
  transition: border-color 0.2s ease;
}

#chatbot-input textarea:focus {
  border-bottom-color: var(--regie-red);
}

/* Bouton envoyer */
#chatbot-input button {
  border: none;
  background: none;
  color: var(--regie-red);
  font-size: 18px;
  cursor: pointer;
  padding-left: 10px;
  transition: transform 0.15s ease;
}

#chatbot-input button:hover {
  transform: translateX(2px);
}