.chatbot-toggle {
    position: absolute;
    position: fixed;
    bottom: 20px;
    right: 85px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    text-align: center;
    line-height: 60px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    font-size: 28px;
}


.chatbot-modal {
    display: none;
    position: absolute;
    position: fixed;
    bottom: 0;
    right: 20px;
    width: 350px;
    height: 500px; 
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px 10px 0 0;
    font-family: 'Lato', sans-serif;
    z-index: 1001;
    flex-direction: column;
    max-height: 70% !important;
}

.chatbot-header {
    background-color: #EEEEEE;
    color: black;
    padding: 10px;
    text-align: center;
    position: relative;
    border-radius: 10px 10px 0 0;
}

.close-btn {
    position: absolute;
    right: 10px;
    top: 5px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.chatbot-body {
    flex-grow: 1;
    padding: 10px;
    max-height: 80%; /* Ajustement dynamique */
}

#chat-container {
    max-height: 98%; /* Permet au conteneur de s'étendre */
    overflow-y: auto; /* Active le défilement */
    display: flex;
    flex-direction: column; /* Aligne les messages verticalement */
}

.chatbot-footer {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: calc(350px - 20px); /* Largeur moins padding */
    box-sizing: border-box;
    background: white;
    border-top: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 0 0 10px 10px;
}

.chatbot-footer-row {
    display: flex;
    width: 100%;
}

.chatbot-disclaimer {
    text-align: center;
    font-family: 'Lato', sans-serif;
    font-size: 10px;
    color: #999;
    padding-top: 6px;
    width: 100%;
    box-sizing: border-box;
}

#message-input {
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #d1d1d1;
}

.chatbot-footer button {
    color: #ff214f;
    font-size: 13px;
    margin: 0 5px;
    padding: 9px 0;
    border: 2px solid #ff214f !important;
    border-radius: 50px;
    transition: background-color .5s ease;
    width: 100px;
    background-color: white;
}

.chatbot-footer button:hover {
    background-color: #ff214f;
    color: white;
    cursor: pointer;
}

.chatbot-modal.show {
    display: flex;
    animation: slideUp 0.3s ease;
}

.chatbot-modal.hide {
    animation: slideDown 0.3s ease;
    animation-fill-mode: forwards;
}


.divMsgUser {
    text-align: right;
}

.msgUser {
    display: inline-block; /* Réduit la largeur au contenu */
    background-color: grey;
    padding: 5px 10px; /* Ajoute un peu de padding pour un meilleur aspect */
    border-radius: 5px; /* Ajoute des bords arrondis, optionnel */
    color: white; /* Change la couleur du texte pour une meilleure lisibilité */
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.divMsgBot {
    word-wrap: break-word; /* Permet au texte de passer à la ligne */
    word-break: break-word; /* Gère les mots trop longs */
    overflow-wrap: break-word; /* Alternative pour compatibilité */
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
}


@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}


.thinkingIndicator {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 5px 0;
}

.thinkingIndicator .msgBot {
    background-color: #f1f1f1;
    border-radius: 15px;
    padding: 10px;
    font-size: 14px;
    color: #555;
    animation: pulse 1s infinite;
}

/* Effet d'animation */
@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.thinkingIndicator .msgBotReflechi{
    padding-left: 40px;
    padding-right: 40px;
}


@media(max-width: 768px) {
    .chatbot-modal{
        width: 90%;
    }

    .chatbot-footer{
        width: calc(90% - 20px);
    }
}

.expand-btn {
    position: absolute;
    left: 10px;
    top: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.chatbot-modal.expanded {
    width: 600px;
    height: 700px;
}

.chatbot-footer.expanded {
    width: calc(600px - 20px);
}

.chatbot-modal.expanded .chatbot-header,
.chatbot-modal.expanded .chatbot-body,
.chatbot-modal.expanded .chatbot-footer,
.chatbot-modal.expanded #chat-container,
.chatbot-modal.expanded .msgUser,
.chatbot-modal.expanded .divMsgBot {
    font-size: 16px;
}

.chatbot-footer.expanded .chatbot-disclaimer {
    font-size: 11px;
}

.chatbot-modal:not(.expanded) .msgUser,
.chatbot-modal:not(.expanded) .divMsgBot {
    font-size: 14px;
}


.miniatureImg {
    max-width: 90% !important;
    display: block;
    margin: 0 auto;
    max-height: 250px;
}