/* --- Bouton flottant --- */
#chatbot-button-container {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 99999999;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    background-color: #007bff;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, transform 0.2s ease;
}

.chatbot-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.wave {
  animation-name: wave;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes wave {
  0% {box-shadow: 0 0 0px 0px rgba(0, 123, 255, 0.5);}
  100% {box-shadow: 0 0 0px 10px rgba(0, 123, 255, 0);}
}

/* --- Bulle de texte --- */
#chatbot-tooltip {
    position: absolute;
    bottom: 80px; /* Ajuste la position pour être au-dessus du bouton */
    right: 20px;
    background: white;
    color: black;
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    z-index: 1000; /* Visible au début */
    pointer-events: none; /* Empêche l'interaction avec l'élément */
}

/* Affichage après 2 secondes */
#chatbot-tooltip.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto; /* Permet d'interagir lorsqu'il est visible */
}

/* Disparition après quelques secondes */
#chatbot-tooltip.hide {
    opacity: 0;
    transform: translateY(10px);
    z-index: -1; /* Réduit le z-index après disparition */
    pointer-events: none; /* Désactive toute interaction */
}


/* --- Chatbot Iframe --- */
#chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    z-index: 9999999999;
}

/* Mode plein écran sur mobile */
@media screen and (max-width: 768px) {
    #chatbot-container {
        width: 100vw; /* Prend toute la largeur de l'écran */
        height: 100vh; /* Prend toute la hauteur de l'écran */
        right: 0;
        bottom: 0;
        border-radius: 0; /* Supprime les arrondis pour un effet natif */
    }
}

#chatbot-iframe {
    width: 100%;
    height: 100%;
}

/* --- Animation d’apparition --- */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Bouton de fermeture sur mobile */
#chatbot-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: white;
    border: none;
    border-radius: 50%;
    display: none; /* Caché par défaut */
    align-items: center;
    justify-content: center;
    z-index: 9999999999; /* Bien au-dessus du chatbot */
    cursor: pointer;
}

/* Icône croix */
#chatbot-close-button::before {
    content: "x";
    font-size: 15px;
    font-weight: bold;
    color: black;
}