:root {
  /* Fonts modernisés */
  --main-font: "Open Sans", sans-serif;
  --secondary-font: "Georgia", serif;
  --heading-font: "Inter", sans-serif;

  /* Palette de couleurs moderne */
  --chatbot-primary: #31377b;
  --chatbot-secondary: #673de6;
  --chatbot-surface: #ffffff;
  --chatbot-surface-variant: #f8fafc;
  --chatbot-on-surface: #1e293b;
  --chatbot-on-surface-variant: #64748b;
  --chatbot-border: #e2e8f0;
  --chatbot-border-variant: #cbd5e1;
  --chatbot-success: #10b981;
  --chatbot-error: #ef4444;
  --chatbot-warning: #f59e0b;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 2.5rem;

  /* Transitions */
  --transition-all: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-transform: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-colors: color 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease;
}


#chatbot-container-botami {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 2147483647 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  user-select: none;
}

#chatbot-container-botami *,
#chatbot-container-botami *::before,
#chatbot-container-botami *::after {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  box-sizing: border-box !important;
}

#chatbot-widget-botami {
  display: none;
  width: 384px;
  max-width: 550px;
  height: 640px;
  max-height: 85vh;
  background: var(--chatbot-surface);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transition: var(--transition-all);
  position: relative;
  border: 1px solid var(--chatbot-border);
  backdrop-filter: blur(16px);
  transform-origin: bottom right;
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

#chatbot-widget-botami::-webkit-scrollbar {
  display: none;
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (min-width: 768px) {
  #chatbot-widget-botami {
    width: 384px;
  }
}

@media (min-width: 1024px) {
  #chatbot-widget-botami {
    width: 384px;
  }
}
/* Bouton submit lead avec couleurs PHP */
.btn_submit_lead {
  color: white !important;
  border: none !important;
  border-radius: var(--radius-lg) !important;
  padding: 14px 24px !important;
  font-weight: 600 !important;
  transition: var(--transition-all) !important;
  box-shadow: var(--shadow-md) !important;
  cursor: pointer !important;
  font-family: var(--main-font) !important;
  letter-spacing: -0.025em !important;
}

.btn_submit_lead:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* Header modernisé */
#chatbot-header-botami {
  padding: 20px 24px;
  background: linear-gradient(
    135deg,
    var(--chatbot-primary) 0%,
    var(--chatbot-secondary) 100%
  );
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#chatbot-header-botami::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  pointer-events: none;
}

#chatbot-header-botami h4,
#chatbot-header-botami p {
  font-size: 14px;
  font-family: var(--main-font);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
}

#chatbot-header-botami p {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 500;
}

/* Powered by en bas */
#chatbot-powered-by {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 8px 24px;
  background: var(--chatbot-surface);
  border-top: 1px solid var(--chatbot-border);
  font-family: var(--main-font) !important;
  border-bottom-left-radius: var(--radius-2xl);
  border-bottom-right-radius: var(--radius-2xl);
  z-index: 10;
}

#chatbot-powered-by a {
  font-size: 12px !important;
  color: var(--chatbot-on-surface-variant) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: var(--transition-colors) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

#chatbot-powered-by a:hover {
  color: var(--chatbot-primary) !important;
}

#chatbot-powered-by .powered-by-logo {
  width: 16px !important;
  height: 16px !important;
  object-fit: contain !important;
  border-radius: 3px !important;
}

#chatbot-close {
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-transform);
  padding: 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#chatbot-close:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

/* Messages zone modernisée */
#chatbot-messages {
  background: var(--chatbot-surface-variant);
  height: calc(90% - 150px);
  overflow-y: auto;
  padding: 24px 20px;
  padding-bottom: 35px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}


#chatbot-messages::-webkit-scrollbar {
  display: none;
}

#chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--chatbot-border-variant);
  border-radius: 3px;
  transition: var(--transition-all);
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: var(--chatbot-on-surface-variant);
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Input modernisé */
#chatbot-input {
  flex: 1;
  border: 2px solid var(--chatbot-border);
  border-radius: var(--radius-xl);
  padding: 14px 20px;
  outline: none;
  font-family: var(--main-font);
  font-size: 14px;
  line-height: 1.5;
  transition: var(--transition-all);
  background: var(--chatbot-surface);
  color: var(--chatbot-on-surface);
  resize: none;
  min-height: 52px;
  max-height: 120px;
}

#chatbot-input::-webkit-scrollbar {
  display: none;
}

#chatbot-send {
  color: white !important;
  border: none !important;
  padding: 14px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: var(--transition-all) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 52px !important;
  height: 52px !important;
  flex-shrink: 0 !important;
  box-shadow: var(--shadow-md) !important;
}

 .message.bot-message::before {
        content: '';
        position: absolute;
        left: -1px;
        bottom: 6px;
        width: 0;
        height: 0;
        border: 8px solid transparent;
        border-right-color: var(--chatbot-surface);
        border-left: 0;
        border-bottom: 0;
        margin-top: -4px;
        margin-left: -7px; 
 }

.message.user-message {
        margin-left: auto;
        max-width: 85%;
        color: white;
        padding: 16px 20px;
        border-radius: var(--radius-xl) var(--radius-xl) 6px var(--radius-xl);
        font-size: 14px;
        line-height: 1.5;
        box-shadow: var(--shadow-md);
        animation: userMessageSlide 0.3s ease forwards;
        font-weight: 500;
        letter-spacing: -0.025em;  
}


@keyframes botMessageBounce {
        0% {
            opacity: 0;
            transform: scale(0.8);
        }

        50% {
            opacity: 0.8;
            transform: scale(1.05);
        }

        70% {
            opacity: 0.9;
            transform: scale(0.98);
        }

        100% {
            opacity: 1;
            transform: scale(1);
        }
    }

    @keyframes userMessageSlide {
        0% {
            opacity: 0;
            transform: translateY(20px) translateX(10px);
        }

        100% {
            opacity: 1;
            transform: translateY(0) translateX(0);
        }
    }

    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes fade-in-up {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .animate-fade-in-up {
        animation: fade-in-up 0.5s ease-in-out forwards;
    }


#chatbot-input:focus {
  border-color: var(--chatbot-primary) !important;
  box-shadow: 0 0 0 4px rgba(99, 61, 230, 0.1) !important;
  outline: none !important;
}

#chatbot-input::placeholder {
  color: var(--chatbot-on-surface-variant);
}

.ft-17 {
  font-size: 17px;
}

/* Bouton d'ouverture modernisé */
#chatbot-open-botami {
  background: transparent!important;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483647;
  padding: 0;
  width: 64px;
  height: 64px;
  box-shadow: var(--shadow-xl);
  transition: var(--transition-all);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.9) !important;
}

#chatbot-open-botami img {
  border-radius: 50% !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

#chatbot-open-botami:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 20px 40px -12px rgba(99, 61, 230, 0.4);
}

#chatbot-open-botami::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%
  );
  border-radius: 50%;
}

#chatbot-open-botami::after {
  content: "";
  position: absolute;
  background: #22c55e;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  top: 4px;
  right: 7px;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Message de bienvenue modernisé */
#champ_start_mesage {
  display: none;
  position: fixed;
  padding: 16px 20px;
  background: var(--chatbot-surface);
  color: var(--chatbot-on-surface);
  border-radius: var(--radius-xl);
  right: 100px;
  bottom: 80px;
  z-index: 2147483646;
  box-shadow: var(--shadow-xl);
  font-family: var(--main-font);
  max-width: 280px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--chatbot-border);
  animation: welcomeBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(16px);
}

@keyframes welcomeBounce {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  50% {
    transform: scale(1.05) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#champ_start_mesage::before {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 24px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-top-color: var(--chatbot-surface);
}

#champ_start_mesage_btn_close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--chatbot-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--chatbot-border);
  font-size: 12px;
  font-weight: bold;
  color: var(--chatbot-on-surface-variant);
  transition: var(--transition-all);
  box-shadow: var(--shadow-md);
}

#champ_start_mesage_btn_close:hover {
  background: var(--chatbot-error);
  color: white;
  border-color: var(--chatbot-error);
  transform: scale(1.1);
}

/* Messages améliorés */
.message {
  display: flex;
  align-items: start;
  max-width: 290px;
  animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.question-option-btn {
  background-color: white;
  font-weight: 500;
  color: #333;
  border-radius: 1.5rem;
  padding: 10px 18px;
  line-height: 1.4 !important;
  word-wrap: break-word !important;
  font-size: 13px !important;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: 0 3px 6px rgba(103, 61, 230, 0.1);
  position: relative;
  overflow: hidden;
  max-width: calc(100% - 16px);
  text-overflow: ellipsis;
  text-decoration: none;
  border: none;
}


/* États désactivés */
    #chatbot-send:disabled {
        opacity: 0.6 !important;
        cursor: not-allowed !important;
        transform: none !important;
    }

    .btn_submit_lead:disabled {
        opacity: 0.6 !important;
        cursor: not-allowed !important;
        transform: none !important;
    }

    /* Animations de transition pour l'ouverture/fermeture */
    #chatbot-widget-botami.chatbot-mac-closing {
        animation: macClosingAnimation 0.6s ease-in forwards;
        transform-origin: center top;
        display: block !important;
    }

    #chatbot-widget-botami.chatbot-mac-opening {
        display: block !important;
        animation: macOpeningAnimation 0.7s ease-out forwards;
        transform-origin: center top;
    }

    @keyframes macClosingAnimation {
        0% {
            opacity: 1;
            transform: perspective(1200px) rotateX(0deg) scale(1);
        }

        30% {
            opacity: 1;
            transform: perspective(1200px) rotateX(-5deg) scale(0.95);
        }

        100% {
            opacity: 0;
            transform: perspective(1200px) rotateX(90deg) scale(0.5);
            transform-origin: top center;
        }
    }

    @keyframes macOpeningAnimation {
        0% {
            opacity: 0;
            transform: perspective(1200px) rotateX(-90deg) scale(0.7);
        }

        60% {
            opacity: 1;
            transform: perspective(1200px) rotateX(10deg) scale(1.05);
        }

        100% {
            opacity: 1;
            transform: perspective(1200px) rotateX(0deg) scale(1);
        }
    }

.question-option-btn:hover {
  transform: translateY(-2px);
  color: white;
}

@keyframes messageSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message .icon {
  background: linear-gradient(
    135deg,
    var(--chatbot-primary) 0%,
    var(--chatbot-secondary) 100%
  );
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 12px;
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.message .content {
  background: var(--chatbot-surface);
  padding: 16px 20px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--chatbot-border);
  transition: var(--transition-all);
}


/* Hover effects - désactivé pour les messages */


/* Focus states pour l'accessibilité */
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--chatbot-primary);
    outline-offset: 2px;
}

#btn-unlike{
  margin-left: 10px;
}

.margin-left-9 {
  margin-left: 0px;
  margin-top: -10px;
  margin-bottom: 15px;
}

#btn-like,
#btn-unlike {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--chatbot-surface);
  color: var(--chatbot-on-surface);
  transition: var(--transition-all);
  box-shadow: var(--shadow-sm);
}

#btn-like:hover,
#btn-unlike:hover {
  background: var(--chatbot-success);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.chat-bot-textearea {
  position: absolute;
  display: flex;
  align-items: flex-end;
  padding: 20px 24px;
  background: var(--chatbot-surface);
  border-top: 1px solid var(--chatbot-border);
  bottom: 32px;
  left: 0;
  right: 0;
  height: 90px;
  backdrop-filter: blur(16px);
  gap: 12px;
}

/* Responsive design amélioré */
@media (max-width: 768px) {
  #chatbot-container-botami {
    position: fixed !important;
    bottom: 0px !important;
    right: 0px !important;
    left: 0px !important;
  }

  #chatbot-widget-botami {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @keyframes slideUp {
    0% {
      transform: translateY(100%);
    }
    100% {
      transform: translateY(0);
    }
  }

  .chat-bot-textearea {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin-top: 0 !important;
    z-index: 2 !important;
    border-radius: 0 !important;
  }

  #chatbot-messages {
    height: calc(100% - 260px) !important;
    margin-bottom: 180px !important;
  }

  .chat-bot-textearea {
    bottom: 32px !important;
  }

  #chatbot-powered-by {
    position: fixed !important;
    bottom: 0 !important;
    border-radius: 0 !important;
    z-index: 100 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--chatbot-surface) !important;
  }

  #chatbot-input {
    font-size: 16px; /* Évite le zoom sur iOS */
  }

  #champ_start_mesage {
    right: 80px;
    bottom: 80px;
    max-width: calc(100vw - 120px);
  }
}

@media screen and (max-width: 393px) {
  #chatbot-widget-botami {
    height: 100% !important;
    width: 100vw !important;
  }

  .chat-bot-textearea {
    position: relative;
    margin-top: 0 !important;
  }
}

@media screen and (max-width: 375px) {
  .chat-bot-textearea {
    position: relative;
    margin-top: 0 !important;
  }

  #chatbot-container-botami {
    position: fixed;
    bottom: 0px;
    right: 0px;
    height: 100%;
    z-index: 2147483647;
    max-height: auto;
    bottom: 0px;
    left: 0px;
    display: none;
  }

  #chatbot-widget-botami {
    height: 100% !important;
    width: 100vw !important;
  }
}




/* Animations améliorées */
.dot {
width: 8px !important; height: 8px !important; background: var(--chatbot-on-surface-variant) !important; border-radius: 50% !important; animation: typingBounce 1.4s infinite ease-in-out;
}

.dot:nth-child(1) {
  animation-delay: 0s !important;
}


.dot:nth-child(2) {
  animation-delay: 0.2s !important;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}



@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }

@keyframes blink {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}


.typing-indicator { display: flex; align-items: center; gap: 8px; color: var(--chatbot-on-surface-variant); font-style: italic; }

.concentement{
  margin-top: 3px !important;
}

.typing-dots { display: flex; gap: 4px; }

.image-bot-typing {
  animation: image_bot_typing 1s infinite ease-in-out;
}

@keyframes image_bot_typing {
  0%,
  100% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(3px);
  }
}

.padding-20 {
  padding-bottom: 33px;
}

/* Bouton refresh modernisé */
.btn-refresh {
  padding: 10px 20px !important;
  width: 80% !important;
  border-radius: var(--radius-lg) !important;
  color: white !important;
  text-align: center !important;
  border: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: none;
  cursor: pointer !important;
  transition: var(--transition-all) !important;
  box-shadow: var(--shadow-sm) !important;
  font-family: var(--main-font) !important;
  letter-spacing: -0.025em !important;
  text-transform: none;
}

.btn-refresh:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.-mtop-2 {
  margin-top: -10px;
}

.div-btn-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: linear-gradient(
    to bottom,
    var(--chatbot-surface),
    var(--chatbot-surface-variant)
  );
  border-bottom: 1px solid var(--chatbot-border);
}

.text-smal {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: block;
  margin-top: -2px;
  font-family: var(--main-font);
  font-weight: 500;
}

.btn-rafraich p {
  position: relative;
  top: -5px;
}

/* Styles Markdown modernisés */
#chatbot-container-botami .small_text,
#chatbot-container-botami .quick-reply-btn {
  line-height: 1.5 !important;
  word-wrap: break-word !important;
  font-size: 14px !important;
  font-family: var(--main-font) !important;
}

.md-heading {
  display: block !important;
  font-family: var(--heading-font) !important;
  font-weight: 600 !important;
  margin: 8px 0 4px 0 !important;
  color: var(--chatbot-on-surface) !important;
  line-height: 1.3 !important;
}

.md-h1 {
  font-size: 1.2em !important;
  border-bottom: 2px solid var(--chatbot-border) !important;
  padding-bottom: 4px !important;
}

.md-h2 {
  font-size: 1.1em !important;
  border-bottom: 1px solid var(--chatbot-border) !important;
  padding-bottom: 3px !important;
}

.md-h3 {
  font-size: 1em !important;
}

.md-h4 {
  font-size: 0.9em !important;
}

.md-h5,
.md-h6 {
  font-size: 0.8em !important;
}

.bullet-item,
.numbered-item {
  display: block !important;
  padding-left: 8px !important;
  position: relative !important;
  margin: 2px 0 !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

.small_text strong {
  font-weight: 600 !important;
  color: var(--chatbot-on-surface) !important;
}

.small_text em {
  font-style: italic !important;
  color: var(--chatbot-on-surface-variant) !important;
}

.small_text a {
  color: var(--chatbot-primary) !important;
  text-decoration: none !important;
  transition: var(--transition-colors) !important;
  border-bottom: 1px solid transparent !important;
}

.small_text a:hover {
  color: var(--chatbot-secondary) !important;
  border-bottom-color: var(--chatbot-secondary) !important;
}

.md-code-block {
  background: var(--chatbot-surface-variant) !important;
  padding: 12px 16px !important;
  border-radius: var(--radius-md) !important;
  font-family: "JetBrains Mono", "Fira Code", monospace !important;
  font-size: 0.85em !important;
  margin: 8px 0 !important;
  overflow-x: auto !important;
  white-space: pre !important;
  border: 1px solid var(--chatbot-border) !important;
  display: block !important;
  box-shadow: var(--shadow-sm) !important;
}

.md-code-inline {
  background: var(--chatbot-surface-variant) !important;
  padding: 2px 6px !important;
  border-radius: var(--radius-sm) !important;
  font-family: "JetBrains Mono", "Fira Code", monospace !important;
  font-size: 0.85em !important;
  color: var(--chatbot-primary) !important;
  border: 1px solid var(--chatbot-border) !important;
}

.md-blockquote {
  border-left: 4px solid var(--chatbot-primary) !important;
  padding-left: 12px !important;
  margin: 8px 0 8px 4px !important;
  color: var(--chatbot-on-surface-variant) !important;
  font-style: italic !important;
  font-size: 14px !important;
  display: block !important;
  background: var(--chatbot-surface-variant) !important;
  padding: 12px !important;
  border-radius: var(--radius-md) !important;
}

.md-hr {
  border: 0 !important;
  border-top: 1px solid var(--chatbot-border) !important;
  margin: 16px 0 !important;
  height: 1px !important;
  display: block !important;
}

.input-width-227 {
  width: 225px !important;
  font-size: 14px !important;
  padding: 8px 12px !important;
  border-radius: var(--radius-md);
  border: 2px solid var(--chatbot-border);
  transition: var(--transition-all);
}

.input-width-227:focus {
  border-color: var(--chatbot-primary);
  box-shadow: 0 0 0 3px rgba(99, 61, 230, 0.1);
}

/* Animations macOS améliorées */
@keyframes macClosingAnimation {
  0% {
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg) scale(1);
  }
  30% {
    opacity: 1;
    transform: perspective(1200px) rotateX(-5deg) scale(0.95);
  }
  100% {
    opacity: 0;
    transform: perspective(1200px) rotateX(90deg) scale(0.5);
    transform-origin: top center;
  }
}

@keyframes macOpeningAnimation {
  0% {
    opacity: 0;
    transform: perspective(1200px) rotateX(-90deg) scale(0.7);
  }
  60% {
    opacity: 1;
    transform: perspective(1200px) rotateX(10deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg) scale(1);
  }
}

.chatbot-mac-closing {
  animation: macClosingAnimation 0.6s ease-in forwards;
  transform-origin: center top;
  display: block !important;
}

.chatbot-mac-opening {
  display: block !important;
  animation: macOpeningAnimation 0.7s ease-out forwards;
  transform-origin: center top;
}

@keyframes pulseAnimation {
  0% {
    transform: scale(1);
    box-shadow: var(--shadow-md);
  }
  50% {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-md);
  }
}

.chatbot-pulse {
  animation: pulseAnimation 2s infinite;
}

/* Lead form modernisé */
.lead-form-container {
  max-width: 350px;
  margin: 16px 0;
}

.lead-message,
.lead-form-wrapper {
  transition: var(--transition-all);
  background: var(--chatbot-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--chatbot-border);
}

.lead-form-wrapper:hover {
  box-shadow: var(--shadow-lg) !important;
  transform: translateY(-1px);
}

.avatar-container {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--chatbot-primary) 0%,
    var(--chatbot-secondary) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.avatar-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--chatbot-success);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.form-control:focus {
  box-shadow: 0 0 0 4px rgba(99, 61, 230, 0.1) !important;
  border-color: var(--chatbot-primary) !important;
}

.form-check-input:checked {
  background-color: var(--chatbot-primary) !important;
  border-color: var(--chatbot-primary) !important;
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate__fadeIn {
  animation: fadeIn 0.5s ease forwards;
}

/* Styles spécifiques au widget */
.chatbot-widget-botami ::placeholder {
  color: var(--chatbot-on-surface-variant) !important;
}

.chatbot-widget-botami a,
.chatbot-widget-botami button {
  text-decoration: none !important;
  transition: var(--transition-all) !important;
}

.chatbot-widget-botami input {
  color: var(--chatbot-on-surface) !important;
  font-family: var(--main-font) !important;
}

.chatbot-widget-botami a:hover,
.chatbot-widget-botami button:hover {
  text-decoration: none !important;
}

.chatbot-widget-botami h6,
.chatbot-widget-botami .h6,
.chatbot-widget-botami h5,
.chatbot-widget-botami .h5,
.chatbot-widget-botami h4,
.chatbot-widget-botami .h4,
.chatbot-widget-botami h3,
.chatbot-widget-botami .h3,
.chatbot-widget-botami h2,
.chatbot-widget-botami .h2,
.chatbot-widget-botami h1,
.chatbot-widget-botami .h1 {
  line-height: 1.3 !important;
  font-family: var(--heading-font) !important;
}

.input_lead_chatbot_botami {
  border-radius: var(--radius-lg) !important;
  margin-bottom: 12px !important;
  height: 48px;
  color: var(--chatbot-on-surface) !important;
  border: 2px solid var(--chatbot-border) !important;
  padding: 12px 16px !important;
  font-family: var(--main-font) !important;
  transition: var(--transition-all) !important;
  background: var(--chatbot-surface) !important;
}

.input_lead_chatbot_botami:focus {
  border-color: var(--chatbot-primary) !important;
  box-shadow: 0 0 0 4px rgba(99, 61, 230, 0.1) !important;
  transform: translateY(-1px) !important;
}

.input_lead_chatbot_botami_btn {
  color: white !important;
  background: linear-gradient(
    135deg,
    var(--chatbot-primary) 0%,
    var(--chatbot-secondary) 100%
  ) !important;
  border: none !important;
  border-radius: var(--radius-lg) !important;
  padding: 12px 24px !important;
  font-weight: 600 !important;
  transition: var(--transition-all) !important;
  box-shadow: var(--shadow-md) !important;
}

.input_lead_chatbot_botami_btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-lg) !important;
}

.input_lead_chatbot_botami::placeholder {
  color: var(--chatbot-on-surface-variant) !important;
}

.message.bot-message-botami {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  max-width: 325px !important;
  color: #1f2937 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  margin-right: auto !important;
  position: relative !important;
}

.message.bot-message-botami p {
  color: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
}

.message.bot-message-botami strong,
.message.bot-message-botami b {
  font-weight: bold !important;
}

.message.bot-message-botami em,
.message.bot-message-botami i {
  font-style: italic !important;
}

.message.bot-message-botami br {
  display: block !important;
  content: "" !important;
}

.message.bot-message-botami ul,
.message.bot-message-botami ol {
  margin: 8px 0 !important;
  padding-left: 20px !important;
}

.message.bot-message-botami li {
  margin: 4px 0 !important;
}

.message.bot-message-botami .bullet-item,
.message.bot-message-botami .numbered-item {
  display: block !important;
  margin: 4px 0 !important;
}

.message.bot-message-botami .md-heading,
.message.bot-message-botami h1,
.message.bot-message-botami h2,
.message.bot-message-botami h3,
.message.bot-message-botami h4,
.message.bot-message-botami h5,
.message.bot-message-botami h6 {
  font-weight: 600 !important;
  display: block !important;
  margin: 8px 0 4px 0 !important;
}

.message.bot-message-botami a {
  color: #2563eb !important;
  text-decoration: underline !important;
}

.message.bot-message-botami code {
  font-family: monospace !important;
  background: #f3f4f6 !important;
  padding: 2px 4px !important;
  border-radius: 3px !important;
}

.message.bot-message-botami pre {
  background: #f3f4f6 !important;
  padding: 12px !important;
  border-radius: 6px !important;
  overflow-x: auto !important;
}

.message.bot-message::before {
    content: '';
    position: absolute;
    left: -1px;
    bottom: 6px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: var(--chatbot-surface);
    border-left: 0;
    border-bottom: 0;
    margin-top: -4px;
    margin-left: -7px;
}

#chatbot-container-botami .message.bot-message {
    margin-right: auto;
    max-width: 85%;
    background: var(--chatbot-surface);
    color: var(--chatbot-on-surface);
    padding: 16px 20px;
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 6px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--chatbot-border);
    animation: botMessageBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-origin: bottom left;
    position: relative;
    letter-spacing: -0.025em;
}

.message {
  display: flex;
  align-items: start;
  animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  font-family: var(--main-font);
}

/* Animation de typing pour les messages du bot */
.typing-text::after {
  content: '|';
  animation: blink 0.7s infinite;
  margin-left: 2px;
  font-weight: 100;
  opacity: 0.7;
}

@keyframes blink {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }

}

.bot-message-botami,
.bot-message-botami p,
.bot-message-botami .small_text,
.user-message,
.uersmessage,
.user-message p,
.uersmessage p,
.small_text,
#chatbot-messages,
#chatbot-messages * {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  cursor: text;
}

/* Keep buttons and interactive elements with default cursor */
button,
.feedback-btn,
.question-option-btn,
.chatbot-lead-button,
#chatbot-send,
#chatbot-close,
#refreshbtn {
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
