@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

#aveni-chatbot {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000000;
    font-family: 'DM Sans', sans-serif;
}

/* Bouton flottant premium */
#chat-toggle {
    width: 68px;
    height: 68px;
    background: #0C2F70;
    color: #ffffff;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(12, 47, 112, 0.25);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chat-toggle:hover {
    transform: translateY(-5px) scale(1.05);
    background: #EB6D32;
}

/* Fenêtre de chat style institutionnel */
#chat-window {
    width: 380px;
    height: 580px;
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 90px;
    right: 0;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.03);
}

#chat-window.open { display: flex; animation: aveniReveal 0.5s ease forwards; }

/* Header Corrigé : Texte en Blanc */
#chat-header {
    background: #0C2F70;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ffffff; /* Assure que tout le texte est blanc */
}

.bot-avatar-circle {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.2);
}

.header-info h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff !important; /* Force le blanc */
    letter-spacing: -0.3px;
}

.status-online {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    opacity: 0.8;
    color: #ffffff;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.online-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
    animation: pulseStatus 2s infinite;
}

/* Zone des messages */
#chat-messages {
    flex: 1;
    padding: 25px 20px;
    overflow-y: auto;
    background: #fcfcfd;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.user-msg {
    align-self: flex-end;
    background: #EB6D32;
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 22px 22px 0 22px;
    font-size: 14px;
    max-width: 80%;
    box-shadow: 0 8px 15px rgba(235, 109, 50, 0.15);
}

.bot-msg {
    align-self: flex-start;
    background: #ffffff;
    color: #1e293b;
    padding: 14px 18px;
    border-radius: 22px 22px 22px 0;
    font-size: 14px;
    max-width: 80%;
    border: 1px solid #f0f0f0;
    line-height: 1.5;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* Zone d'input stylisée */
#chat-input-area {
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

#chat-input {
    width: 100%;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    padding: 14px 20px;
    border-radius: 16px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s;
}

#chat-input:focus {
    border-color: #0C2F70;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(12, 47, 112, 0.05);
}

/* Animations */
@keyframes aveniReveal {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulseStatus {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}