/* Reset et variables */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease;
}


/* Container principal */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* Header professionnel */
.app-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 80px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.logo-icon:hover {
    transform: rotate(360deg) scale(1.1);
}

.logo-icon:active {
    transform: rotate(720deg) scale(0.9);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    overflow: hidden;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--surface-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.icon-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Sidebar statistiques */
.stats-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border-color);
    z-index: 200;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
}

.stats-sidebar.open {
    right: 0;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.stats-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.close-sidebar {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-sidebar:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

.stats-content {
    padding: 1.5rem;
}

.stat-item {
    margin-bottom: 1.5rem;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-light);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.stat-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.badges-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.badges-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    padding: 0.5rem 1rem;
    background: var(--surface-light);
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.badge.unlocked {
    opacity: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    animation: badgeUnlock 0.5s ease;
}

@keyframes badgeUnlock {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Avatar animé */
.bot-avatar-container {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: none;
}

@media (min-width: 1200px) {
    .bot-avatar-container {
        display: block;
    }
}

.bot-avatar {
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    min-width: 180px;
}

.avatar-face {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.avatar-face.thinking {
    animation: think 2s ease-in-out infinite;
}

.avatar-face.happy {
    transform: scale(1.1);
}

.avatar-face.confused {
    animation: confused 1s ease-in-out infinite;
}

.avatar-face.sleeping {
    animation: sleeping 3s ease-in-out infinite;
}

@keyframes think {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes confused {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes sleeping {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.eye {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 35px;
    animation: blink 3s infinite;
}

.left-eye {
    left: 35px;
}

.right-eye {
    right: 35px;
}

@keyframes blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.mouth {
    width: 30px;
    height: 15px;
    border: 3px solid white;
    border-top: none;
    border-radius: 0 0 30px 30px;
    position: absolute;
    bottom: 30px;
    transition: all 0.3s ease;
}

.mouth.smile {
    border-radius: 0 0 30px 30px;
    width: 40px;
}

.mouth.confused {
    border-radius: 30px 30px 0 0;
    border-top: 3px solid white;
    border-bottom: none;
    transform: rotate(180deg);
}

.mouth.sleep {
    width: 20px;
    height: 3px;
    border: none;
    background: white;
    border-radius: 3px;
}

.avatar-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.avatar-mood {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Zone de chat */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    overflow: hidden;
    position: relative;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Section de bienvenue */
.welcome-section {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.7;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.welcome-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Messages */
.message {
    display: flex;
    gap: 1rem;
    max-width: 75%;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.bot {
    align-self: flex-start;
}

.message-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    color: white;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.message.user .avatar-circle {
    background: linear-gradient(135deg, var(--success), #059669);
}

.message-content {
    flex: 1;
}

.message-text {
    background: var(--surface);
    padding: 0.875rem 1.25rem;
    border-radius: 16px;
    line-height: 1.6;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    word-wrap: break-word;
}

.message.user .message-text {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding-left: 0.5rem;
}

.message.user .message-time {
    text-align: right;
    padding-right: 0.5rem;
    padding-left: 0;
}

.message-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    flex-wrap: wrap;
}

.message.user .message-tags {
    padding-right: 0.5rem;
    padding-left: 0;
    justify-content: flex-end;
}

.tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: var(--surface-light);
    border-radius: 12px;
    color: var(--text-secondary);
}

/* Citations */
.quote-container {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.quote-container.show {
    opacity: 1;
}

.quote-text {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    font-style: italic;
    color: var(--text-secondary);
    max-width: 500px;
    text-align: center;
    font-size: 0.875rem;
}

/* Zone de saisie */
.input-container {
    margin-top: 1.5rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.attach-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attach-btn:hover {
    background: var(--surface-light);
    color: var(--primary-color);
    transform: rotate(-45deg);
}

#user-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}

#user-input::placeholder {
    color: var(--text-secondary);
}

.send-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.char-count {
    opacity: 0.6;
}

.typing-indicator {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.typing-indicator.active {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

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

/* Modales */
.easter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.easter-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.modal-content.large-modal {
    max-width: 500px;
    text-align: left;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.settings-section input,
.settings-section select {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.avatar-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.avatar-option {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background: var(--surface-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-option:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.avatar-option.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.settings-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.close-modal {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.close-modal.secondary {
    background: var(--surface-light);
    color: var(--text-primary);
}

.close-modal:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.close-modal.secondary:hover {
    background: var(--border-color);
}

/* Canvas */
#particles-canvas,
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#particles-canvas.active {
    opacity: 0.3;
}

#confetti-canvas.active {
    opacity: 1;
}

/* Animations spéciales */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s ease;
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.rainbow {
    animation: rainbow 2s linear infinite;
}

/* Mode jour - Complètement absurde et inutilisable */
body.light-theme {
    --background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    --background-size: 400% 400%;
    --surface: rgba(255, 192, 203, 0.9);
    --surface-light: rgba(255, 255, 0, 0.8);
    --text-primary: #ff00ff;
    --text-secondary: #00ff00;
    --border-color: #ff00ff;
    --primary-color: #ff00ff;
    --primary-dark: #ff0080;
    --secondary-color: #00ffff;
    --success: #00ff00;
    --warning: #ffff00;
    --error: #ff0000;
    animation: chaoticBackground 3s ease infinite;
    font-family: 'Comic Sans MS', 'Papyrus', cursive !important;
}

@keyframes chaoticBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body.light-theme {
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 400% 400%;
    animation: chaoticBackground 3s ease infinite;
}

body.light-theme .app-container {
    transform: rotate(1deg);
    animation: wobble 5s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(1deg); }
    25% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

body.light-theme .app-header {
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 200% 100%;
    animation: slideColors 2s linear infinite;
    border: 5px dashed #00ff00;
    box-shadow: 10px 10px 0px #ff00ff;
}

@keyframes slideColors {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

body.light-theme .logo-text h1 {
    font-family: 'Comic Sans MS', cursive !important;
    text-shadow: 3px 3px 0px #00ffff, -3px -3px 0px #ffff00;
    animation: rainbowText 2s linear infinite;
    transform: rotate(-2deg);
}

@keyframes rainbowText {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

body.light-theme .message {
    animation: messageFloat 3s ease-in-out infinite;
}

@keyframes messageFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

body.light-theme .message-text {
    background: linear-gradient(135deg, #ffff00, #00ffff) !important;
    border: 3px solid #ff00ff !important;
    box-shadow: 5px 5px 0px #00ff00, -5px -5px 0px #ff00ff;
    animation: pulseBorder 2s ease-in-out infinite;
    transform: rotate(0.5deg);
}

@keyframes pulseBorder {
    0%, 100% { border-width: 3px; }
    50% { border-width: 5px; }
}

body.light-theme .message.user .message-text {
    background: linear-gradient(135deg, #ff00ff, #ffff00) !important;
    transform: rotate(-0.5deg);
}

body.light-theme .input-wrapper {
    background: linear-gradient(90deg, #ffff00, #00ffff, #ff00ff, #ffff00);
    background-size: 300% 100%;
    animation: slideColors 3s linear infinite;
    border: 4px dashed #ff00ff;
    box-shadow: 0 0 20px #00ffff;
    transform: rotate(-1deg);
}

body.light-theme #user-input {
    color: #ff00ff !important;
    font-weight: bold;
    text-shadow: 1px 1px 0px #00ffff;
}

body.light-theme #user-input::placeholder {
    color: #00ff00 !important;
    font-weight: bold;
}

body.light-theme .send-btn {
    background: linear-gradient(135deg, #ff00ff, #00ffff) !important;
    animation: spinButton 2s linear infinite;
    box-shadow: 0 0 20px #ffff00;
}

@keyframes spinButton {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body.light-theme .send-btn:hover {
    animation: spinButton 0.5s linear infinite;
    transform: scale(1.2);
}

body.light-theme .icon-btn {
    border: 3px solid #ff00ff;
    animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

body.light-theme .icon-btn:hover {
    background: #ffff00 !important;
    color: #ff00ff !important;
    animation: iconSpin 0.5s linear infinite;
}

@keyframes iconSpin {
    0% { transform: rotate(0deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1.1); }
}

body.light-theme .chat-messages {
    background: rgba(255, 255, 0, 0.1);
    border: 2px dashed #ff00ff;
}

body.light-theme .stats-sidebar {
    background: linear-gradient(135deg, #ffff00, #00ffff);
    border-left: 5px solid #ff00ff;
    box-shadow: -10px 0px 20px #ff00ff;
}

body.light-theme .stat-value {
    color: #ff00ff !important;
    text-shadow: 2px 2px 0px #00ffff;
    animation: numberBounce 1s ease-in-out infinite;
}

@keyframes numberBounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

body.light-theme .progress-fill {
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00, #ff00ff) !important;
    background-size: 200% 100%;
    animation: slideColors 2s linear infinite;
}

body.light-theme .bot-avatar {
    border: 5px dashed #ff00ff;
    background: linear-gradient(135deg, #ffff00, #00ffff) !important;
    box-shadow: 0 0 30px #ff00ff;
    animation: avatarDance 2s ease-in-out infinite;
}

@keyframes avatarDance {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(5deg); }
    75% { transform: translateY(-10px) rotate(-5deg); }
}

body.light-theme .avatar-face {
    background: linear-gradient(135deg, #ff00ff, #00ffff) !important;
    animation: faceSpin 3s linear infinite;
}

@keyframes faceSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body.light-theme .modal-content {
    background: linear-gradient(135deg, #ffff00, #00ffff) !important;
    border: 5px solid #ff00ff;
    box-shadow: 0 0 30px #00ff00;
    animation: modalShake 0.5s ease-in-out infinite;
}

@keyframes modalShake {
    0%, 100% { transform: translateX(0px); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

body.light-theme .quote-text {
    background: linear-gradient(90deg, #ff00ff, #00ffff) !important;
    border: 3px dashed #ffff00;
    color: #000000 !important;
    font-weight: bold;
    animation: quoteFloat 2s ease-in-out infinite;
}

@keyframes quoteFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

body.light-theme * {
    transition: all 0.1s ease !important;
}

body.light-theme .welcome-icon {
    animation: iconChaos 1s ease-in-out infinite;
}

@keyframes iconChaos {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
    25% { transform: translateY(-20px) rotate(90deg) scale(1.2); }
    50% { transform: translateY(0px) rotate(180deg) scale(1); }
    75% { transform: translateY(-20px) rotate(270deg) scale(1.2); }
}

body.light-theme .status-dot {
    animation: dotChaos 0.5s ease-in-out infinite;
    background: #ff00ff !important;
    box-shadow: 0 0 10px #00ffff;
}

@keyframes dotChaos {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

body.light-theme .badge.unlocked {
    background: linear-gradient(135deg, #ff00ff, #00ffff, #ffff00) !important;
    animation: badgeChaos 1s ease-in-out infinite;
}

@keyframes badgeChaos {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        padding: 1rem;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
        order: 3;
        overflow: hidden;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1rem;
    }

    .chat-container {
        padding: 1rem;
    }

    .message {
        max-width: 85%;
    }

    .logo-text h1 {
        font-size: 1.25rem;
    }

    .stats-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 1200px) {
    .header-actions {
        gap: 0.4rem;
    }
    
    .icon-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 1.1rem;
    }
}

/* Effet de chargement */
.message.loading .message-text {
    position: relative;
    overflow: hidden;
}

.message.loading .message-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}
