/* --- Conteneur principal du Widget --- */
#mes-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

/* --- Bouton flottant (la bulle) --- */
#mes-chatbot-toggle-btn {
    width: 60px;
    height: 60px;
    background-color: #0073aa;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background-color 0.2s;
}

#mes-chatbot-toggle-btn:hover {
    background-color: #005a87;
    transform: scale(1.1);
}

/* --- Fenêtre de Chat --- */
#mes-chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    max-width: 90vw;
    height: 450px;
    max-height: 80vh;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mes-chat-container.mes-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    visibility: hidden;
}

/* --- Entête du Chat --- */
#mes-chat-header {
    background-color: #0073aa;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#mes-chat-header h3 { margin: 0; font-size: 16px; }
#mes-chat-close-btn { background: none; border: none; color: white; font-size: 24px; cursor: pointer; line-height: 1; }

/* --- Boîte de messages --- */
#mes-chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mes-chat-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.4;
    word-wrap: break-word;
}

.user-message {
    background-color: #e1f5fe;
    color: #333;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background-color: #f1f1f1;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.loading-message .mes-message-content { font-style: italic; color: #888; }
.error-message { background-color: #f8d7da; color: #721c24; }

/* --- Zone de saisie --- */
#mes-chat-input-area { display: flex; padding: 10px; border-top: 1px solid #eee; }
#mes-user-input { flex-grow: 1; border: 1px solid #ccc; border-radius: 20px; padding: 8px 15px; font-size: 14px; margin-right: 8px; }
#mes-send-btn { padding: 8px 15px; border: none; background-color: #0073aa; color: white; border-radius: 20px; cursor: pointer; }
#mes-send-btn:disabled { background-color: #999; cursor: not-allowed; }