#mistral-chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-height: 600px;
    border: none;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 9999;
    overflow: hidden;
}

#chat-header {
    background: linear-gradient(135deg, #1f80bc 0%, #32396c 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#chat-toggle {
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


#chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#chat-messages {
    height: 350px;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.user-message, .ai-message {
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.4;
    position: relative;
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.user-message .message-time {
    text-align: right;
    color: #666;
}

.ai-message .message-content {
    background:linear-gradient(135deg, #1f80bc 0%, #32396c 100%);
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 6px;
}

.ai-message .message-time {
    text-align: left;
    color: #666;
}

#chat-input-container {
    display: flex;
    padding: 20px;
    gap: 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 0 0 12px 12px;
}

#user-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid transparent;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

#user-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
    transform: translateY(-1px);
}

#send-button {
    color: #667eea;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#send-button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

#send-button:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#send-button svg {
    width: 25px;
    height: 25px;
    transition: transform 0.2s ease;
}

#send-button:hover:not(:disabled) svg {
    transform: translateX(2px);
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#typing-indicator {
    opacity: 0.8;
    font-style: italic;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

/* Scrollbar personnalisée */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    #mistral-chatbot {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        bottom: 10px;
    }
}

