/* Styles personnalisés pour Teddy */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

/* Boutons de mode */
.mode-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid transparent;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mode-btn.active {
    background: white;
    color: #8B5CF6;
    border-color: #8B5CF6;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

/* Animation du micro */
#btn-mic.listening {
    animation: pulse 1.5s ease-in-out infinite;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 12px 48px rgba(239, 68, 68, 0.6);
    }
}

/* Messages du chat */
.message-user {
    display: flex;
    justify-content: flex-end;
}

.message-user .bubble {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 1.5rem;
    border-bottom-right-radius: 0.25rem;
    max-width: 16rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.message-teddy {
    display: flex;
    align-items-start;
    gap: 0.75rem;
}

.message-teddy .avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.message-teddy .bubble {
    background: rgba(255, 255, 255, 0.9);
    color: #1F2937;
    padding: 0.75rem 1rem;
    border-radius: 1.5rem;
    border-top-left-radius: 0.25rem;
    max-width: 16rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    line-height: 1.5;
}

/* Scrollbar personnalisée */
#chat-messages::-webkit-scrollbar {
    width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* Animations d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-user, .message-teddy {
    animation: fadeIn 0.3s ease-out;
}

/* Loader pour Teddy qui pense */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8B5CF6;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Canvas 3D */
#teddy-canvas {
    touch-action: none;
}
