
    /* Variables et Reset local */
:root {
    --primary-chat: #2D95D5;
    --secondary-chat: #E1740D;
    --fifth-chat : #181D29;
    --sixth-chat : #F8F7EE;
    --tertiary-chat: #374051;
}

#chatbot-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

/* Fenêtre de Chat */
#chatbot-window {
    display: none;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 550px;
    max-height: 75vh;
    background: var(--sixth-chat);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    overflow: hidden;
    border: 1px solid var(--fifth-chat);
    margin-bottom: 10px;
    flex-direction: column;
    box-sizing: border-box;
    pointer-events: auto;
}

.chat-header {
    background: var(--fifth-chat);
    color: var(--sixth-chat);
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    height: 45px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* --- ANIMATIONS --- */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(45, 149, 213, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(45, 149, 213, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 149, 213, 0); }
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Bouton Bulle (Robot) */
#chatbot-button {
    /* Caché par défaut pour la temporisation */
    display: none;
    opacity: 0;
    transform: translateY(30px);

    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-chat);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 28px;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    position: relative;
    /* Transition pour l'apparition fluide et le hover */
    transition: opacity 0.8s ease, transform 0.8s ease, background-color 0.3s ease;
}

/* Classe ajoutée par JS après 4 secondes */
#chatbot-button.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: pulse-glow 2.5s infinite; /* Déclenche le pulse une fois visible */
}

#chatbot-button span {
    display: block;
    animation: icon-bounce 2s infinite ease-in-out;
}

#chatbot-button:hover {
    transform: scale(1.1) !important; /* Priorité sur le transform de l'apparition */
    animation: none;
}

/* Badge de notification */
#chatbot-button::after {
    content: '1';
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--secondary-chat);
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#chatbot-iframe {
    width: 100%;
    border: none;
    flex-grow: 1;
    display: block;
    background: white;
}

/* --- AJUSTEMENTS MOBILES --- */
@media (max-width: 400px) {
    #chatbot-window { width: 300px; height: 480px; }
    #chatbot-button { width: 50px; height: 50px; font-size: 22px; }
}

