/* Metuvox Assistant IA - Design Professionnel */
#metuvox-chat-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    z-index: 10000;
}

/* Bouton principal */
#metuvox-chat-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, #001a8f 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 20px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    z-index: 10001;
}

#metuvox-chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.metuvox-btn-icon {
    font-size: 18px;
}

.metuvox-btn-text {
    font-weight: 600;
    font-size: 14px;
}

/* Container du chat */
#metuvox-chat-container {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.metuvox-hidden {
    display: none !important;
}

/* Header */
.metuvox-chat-header {
    background: linear-gradient(135deg, #0020b1 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metuvox-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.metuvox-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.metuvox-header-text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

.metuvox-status {
    font-size: 12px;
    opacity: 0.9;
}

.metuvox-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.metuvox-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Zone des messages */
.metuvox-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metuvox-welcome-message {
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    text-align: center;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.4;
}

/* Messages utilisateur */
.metuvox-message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 6px 18px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Messages assistant */
.metuvox-message-assistant {
    align-self: flex-start;
    background: white;
    color: #2d3748;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 6px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Zone de saisie */
.metuvox-chat-input {
    padding: 20px;
    background: white;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 10px;
}

#metuvox-user-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border 0.2s;
}

#metuvox-user-input:focus {
    border-color: #06186b;
}

.metuvox-chat-input button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.metuvox-chat-input button:hover {
    transform: scale(1.05);
}

/* Animation de chargement */
.metuvox-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px 18px 18px 6px;
    align-self: flex-start;
}

.metuvox-typing-dot {
    width: 8px;
    height: 8px;
    background: #a0aec0;
    border-radius: 50%;
    animation: metuvox-typing 1.4s infinite ease-in-out;
}

.metuvox-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.metuvox-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes metuvox-typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Scrollbar personnalisée */
.metuvox-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.metuvox-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.metuvox-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.metuvox-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Responsive */
@media (max-width: 480px) {
    #metuvox-chat-container {
        width: calc(100vw - 40px);
        height: 70vh;
        right: 20px;
        bottom: 80px;
    }
    
    #metuvox-chat-toggle {
        right: 20px;
        bottom: 20px;
    }
}