#chat-button {
    position: fixed;
    bottom: 20px;
    right: 75px;
    width: 60px;
    height: 60px;
    background-color: #0d6efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    z-index: 10000;
    box-sizing: border-box; /* Assure que padding et border soient inclus */
}

/* Désactive les styles de hover/focus/active imposés par le thème */
#chat-send-button:hover,
#chat-send-button:focus,
#chat-send-button:active {
  background-color: #004a80 !important;
  opacity: 0.8;              /* Ou tout autre effet que vous souhaitez */
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
  transform: none !important;
  text-decoration: none !important;
}




/* Pseudo-élément pour l'effet de brillance multicolore */

/* Pseudo-élément pour l'effet de brillance multicolore fin */
#chat-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent; /* Épaisseur de la brillance */
    border-radius: 50%;
    background: linear-gradient(45deg,
    rgba(255, 0, 255, 0.5),
    rgba(0, 255, 255, 0.5),
    rgba(255, 255, 0, 0.5),
    rgba(255, 0, 0, 0.5),
    rgba(0, 255, 0, 0.5)
    );
    background-size: 300% 300%;
    opacity: 0; /* Initialement invisible */
    animation: magicShineSmall 10s linear infinite; /* Animation continue plus rapide */
    pointer-events: none; /* Permet de cliquer sur le bouton sans interférence */
    z-index: -1; /* Place la brillance sous l'icône */
}

/* Animation pour la brillance magique */
/* Animation pour la brillance magique fine */
@keyframes magicShineSmall {
    0% {
        transform: rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        transform: rotate(360deg);
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

#chat-button:hover {
    transform: scale(1.1);
}


#chat-button i {
    color: #fff;
    font-size: 24px;
}

/* Optionnel : Ajout d'un effet de scintillement supplémentaire */
/*#chat-button::after {*/
/*    content: "";*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    border: 2px solid transparent;*/
/*    border-radius: 50%;*/
/*    background: linear-gradient(45deg,*/
/*        transparent,*/
/*        rgba(255, 255, 255, 0.2),*/
/*        transparent*/
/*    );*/
/*    animation: sparkle 2s infinite;*/
/*    pointer-events: none;*/
/*    z-index: 0;*/
/*}*/

/* Animation pour le scintillement */
@keyframes sparkleSmall {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 0.3;
    }
}

/* Styles pour le conteneur du chat */
#chat-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px; /* Largeur “par défaut” sur grands écrans */
    height: 400px; /* Hauteur “par défaut” */
    max-width: 90vw; /* Sur mobiles, ne pas dépasser 90% de la largeur viewport */
    max-height: 80vh; /* Idem pour la hauteur : 80% de l’écran max */
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    display: none;
    flex-direction: column;
    z-index: 10000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* On masque l’overflow */
}

/* Ajustement supplémentaire en dessous de 768px */
@media (max-width: 768px) {
    #chat-container {
        bottom: 20px; /* Remonter le conteneur un peu plus haut */
        right: 10px; /* Réduire l’espace latéral */
        width: auto; /* On laisse “auto” pour s’appuyer sur max-width: 90vw */
        height: auto; /* Idem, la hauteur s’ajuste automatiquement */
    }

    #chat-button {
        right: 10px; /* On rapproche également le bouton du bord */
        bottom: 20px;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#chat-header {
    background-color: #004a80; /* Bleu foncé */
    color: #ffffff;
    padding: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

#chat-input-container {
    padding: 10px;
    display: flex;
}

#chat-input {
    flex: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}


/* Styles pour les messages */
.message {
    margin-bottom: 10px;
}

.message.user {
    text-align: right;
}

.message.assistant {
    text-align: left;
}

.message-content {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 80%;
}

.message.user .message-content {
    background-color: #007bff;
    color: #fff;
    animation: slideRight 0.3s ease-out;
}

.message.assistant .message-content {
    background-color: #eef5ff; /* Bleu très clair */
    color: #000;
    animation: slideLeft 0.3s ease-out;
}

@keyframes slideRight {
    from {
        transform: translateX(10px);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(-10px);
    }
    to {
        transform: translateX(0);
    }
}

/* Styles pour les réponses prédéfinies */
.quick-reply {
    display: inline-block;
    padding: 5px 10px;
    margin: 5px;
    background-color: #f1f1f1;
    color: #007bff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
}


/* Icône de message en blanc */
#chat-button i {
    color: #fff;
    font-size: 24px;
}

/* Bouton d'envoi */
#chat-send-button {
    background-color: #004a80; /* Vert foncé */
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 8px 10px;
    margin-left: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

#chat-send-button:active {
    transform: scale(0.95);
}

#chat-header, #chat-messages, #chat-input, #chat-send-button {
    font-family: 'Poppins', sans-serif;
}

/* Style pour le texte sous le bouton de chat */
/* Style pour le texte sous le bouton de chat */
#chat-help-text {
    position: fixed;
    bottom: 90px; /* Ajustement par rapport à l'icône de chat */
    right: 30px;
    color: #666; /* Gris doux pour discrétion */
    font-size: 0.85em; /* Taille de texte réduite */
    font-family: 'Poppins', sans-serif; /* Assortie au thème */
    text-align: center;
    max-width: 80px;
    opacity: 0.8; /* Légère transparence pour un effet subtil */
}


/* Indicateur de saisie */
.typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.typing-indicator .dot {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #bfbfbf;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0% {
        transform: translateY(0);
    }
    20% {
        transform: translateY(-10px);
    }
    40% {
        transform: translateY(0);
    }
}

/* Style pour le nom de l’assistant en bas de la zone de message */
#assistant-name {
    text-align: right;
    padding: 5px 10px;
    color: #666; /* Couleur gris doux pour discrétion */
    font-style: italic;
    font-size: 0.85em;
    font-family: 'Poppins', sans-serif;
}

.user-profile {
    display: flex;
    align-items: center;
}

.status-indicator {
    color: #28a745; /* Vert vif pour indiquer "en ligne" */
    font-size: 12px; /* Taille optimale pour un point de statut */
    margin-right: 8px; /* Espacement entre le point et le nom */
}

.username {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #333; /* Couleur du texte */
}

/* Voyant Vert pour Indiquer que l'Assistant est en Ligne */
.online-indicator {
    position: absolute;
    top: 5px; /* Ajustez selon vos besoins */
    right: 5px; /* Ajustez selon vos besoins */
    width: 12px;
    height: 12px;
    background-color: #28a745; /* Vert Bootstrap */
    border: 2px solid #fff; /* Bordure blanche pour le contraste */
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

#chat-appear-sound {
    display: none;
}
