#chatbot-rag-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    padding: 15px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#chatbot-rag-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    height: 450px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
}

#chatbot-rag-header {
    background: #007bff;
    color: white;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-rag-messages {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
    font-size: 14px;
    height: 330px;
}

#chatbot-rag-input-area {
    display: flex;
    border-top: 1px solid #ddd;
    padding: 10px;
    gap: 6px;
}

#chatbot-rag-input {
    flex: 1;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

#chatbot-rag-send {
    background: #007bff;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 10px;
    cursor: pointer;
}

#chatbot-rag-mic {
    background: #eee;
    border: none;
    padding: 0 10px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 8px;
}

.message {
    padding: 8px 12px;
    margin: 6px;
    border-radius: 12px;
    max-width: 70%;
}

.message.user {
    background-color: #0084ff;
    color: white;
    align-self: flex-end;
}

.message.bot {
    background-color: #f1f0f0;
    color: #333;
    align-self: flex-start;
}

/* Typing indicator */
#typing-indicator {
    display: none;       /* Masqué par défaut */
    width: 40px;
    height: 24px;
    border-radius: 12px;
    background-color: #f1f0f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 6px;         /* Pour espacement comme les messages */
    align-self: flex-start;
}

#typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.4s infinite both;
}

#typing-indicator span:nth-child(1) { animation-delay: 0s; }
#typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
#typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}
