﻿/* =====================================================
   🎨 LECTEUR MUSICAL SYNESTHÉTIQUE - STYLES CSS
   ===================================================== */

:root {
    --primary-color: #00D9FF;
    --secondary-color: #FFD700;
    --accent-color: #FF0080;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --primary-glow: rgba(0, 217, 255, 0.4);
    --animation-speed: 0.3s;
    --transition-speed: 0.3s;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at 50% 50%, rgba(0, 217, 255, 0.1) 0%, #000000 50%);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

    /* Particules d'arrière-plan */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: radial-gradient(circle at 20% 80%, rgba(0, 217, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 0, 128, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
        pointer-events: none;
        z-index: -1;
    }

    /* Thèmes dynamiques */
    body.theme-deepocean {
        --primary-color: #00D9FF;
        --secondary-color: #0099CC;
        --accent-color: #00FFFF;
        background: radial-gradient(circle at center, rgba(0, 51, 102, 0.3) 0%, #001122 100%);
    }

    body.theme-cyberneon {
        --primary-color: #00FF00;
        --secondary-color: #FF00FF;
        --accent-color: #FFFF00;
        background: radial-gradient(circle at center, rgba(0, 255, 0, 0.1) 0%, #000011 100%);
    }

    body.theme-sunsetblaze {
        --primary-color: #FF6B35;
        --secondary-color: #FFD700;
        --accent-color: #FF1744;
        background: radial-gradient(circle at center, rgba(255, 107, 53, 0.2) 0%, #2D1B69 100%);
    }

    body.theme-auroraboreal {
        --primary-color: #00FFAB;
        --secondary-color: #00D4FF;
        --accent-color: #7C4DFF;
        background: radial-gradient(circle at center, rgba(0, 255, 171, 0.15) 0%, #0D1421 100%);
    }

    body.theme-matrixgreen {
        --primary-color: #00FF41;
        --secondary-color: #39FF14;
        --accent-color: #ADFF2F;
        background: radial-gradient(circle at center, rgba(0, 255, 65, 0.1) 0%, #000000 100%);
    }

    body.theme-volcanicfire {
        --primary-color: #FF4500;
        --secondary-color: #FF6347;
        --accent-color: #FFD700;
        background: radial-gradient(circle at center, rgba(255, 69, 0, 0.2) 0%, #330000 100%);
    }

    body.theme-crystalcave {
        --primary-color: #E6E6FA;
        --secondary-color: #DDA0DD;
        --accent-color: #DA70D6;
        background: radial-gradient(circle at center, rgba(230, 230, 250, 0.1) 0%, #191970 100%);
    }

    body.theme-toxicglow {
        --primary-color: #32CD32;
        --secondary-color: #7FFF00;
        --accent-color: #ADFF2F;
        background: radial-gradient(circle at center, rgba(50, 205, 50, 0.15) 0%, #0F1F0F 100%);
    }

/* CORRECTIONS MINIMALES POUR LE TOGGLE - À AJOUTER À TON CSS EXISTANT */

/* S'assurer que les boutons de thèmes gardent leur format grid original */
.theme-buttons {
    display: grid !important; /* Forcer le grid même après toggle */
}

    .theme-buttons .theme-btn {
        /* Tes styles originaux sont gardés, juste s'assurer de la visibilité */
        display: block !important;
    }

/* S'assurer que les boutons de contrôle gardent leur format flex original */
.theme-controls {
    display: flex !important; /* Forcer le flex même après toggle */
}

    .theme-controls .control-btn-small {
        /* Tes styles originaux sont gardés, juste s'assurer de la visibilité */
        display: inline-block !important;
    }

/* Correction pour quand les éléments sont masqués par JavaScript */
.theme-buttons[style*="display: none"] {
    display: none !important;
}

.theme-controls .control-btn-small[style*="display: none"] {
    display: none !important;
}

/* Correction pour quand les éléments sont affichés par JavaScript */
.theme-buttons[style*="display: flex"],
.theme-buttons[style*="display: block"] {
    display: grid !important; /* Revenir au grid original */
}

.theme-controls .control-btn-small[style*="display: inline-block"],
.theme-controls .control-btn-small[style*="display: block"] {
    display: inline-block !important; /* Format original des petits boutons */
}

/* Navigation/Theme Selector */
.theme-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(200%);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 20px;
    z-index: 1500;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 100px rgba(0, 217, 255, 0.1);
    transition: all 0.3s ease;
    max-width: 320px;
}

    .theme-selector:hover {
        transform: translateY(-2px);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 120px var(--primary-glow);
    }

    .theme-selector.collapsed {
        transform: translateX(250px);
        opacity: 0.3;
    }

        .theme-selector.collapsed:hover {
            transform: translateX(0);
            opacity: 1;
        }

.theme-label {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    display: block;
    text-shadow: 0 0 20px var(--primary-color);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.theme-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.theme-btn {
    padding: 0.8rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

    .theme-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.5s;
    }

    .theme-btn:hover::before {
        left: 100%;
    }

    .theme-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--primary-color);
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 30px var(--primary-glow);
    }

.theme-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn-small {
    padding: 0.5rem 0.8rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

    .control-btn-small:hover {
        background: rgba(255, 255, 255, 0.15);
        color: var(--primary-color);
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px var(--primary-glow);
    }

    .control-btn-small.active {
        background: var(--primary-color);
        color: var(--bg-primary);
        border-color: var(--primary-color);
        box-shadow: 0 0 20px var(--primary-glow);
        font-weight: 700;
    }

/* Container principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* Header avec logo amélioré */
.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.logo {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-family: 'Orbitron', monospace;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 6px;
    position: relative;
    display: inline-block;
}

    .logo::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 120%;
        height: 120%;
        background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
        z-index: -1;
        animation: logoGlow 3s ease-in-out infinite;
    }

@keyframes logoGlow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 300;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Status display amélioré */
.status-display {
    text-align: center;
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(200%);
    border-radius: 20px;
    margin-bottom: 3rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

    .status-display::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
        animation: statusProgress 3s ease-in-out infinite;
    }

@keyframes statusProgress {
    0%, 100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

/* Section de fichiers */
.file-input-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(200%);
    padding: 3rem;
    border-radius: 25px;
    margin-bottom: 3rem;
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

    .file-input-section h3 {
        margin-bottom: 1.5rem;
        color: var(--primary-color);
        text-shadow: 0 0 20px var(--primary-color);
        font-family: 'Orbitron', monospace;
        font-size: 1.8rem;
        font-weight: 700;
    }

.file-input {
    display: none;
}

.file-input-label {
    display: inline-block;
    padding: 1.5rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px var(--primary-glow);
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

    .file-input-label::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: all 0.6s ease;
    }

    .file-input-label:hover::before {
        width: 300px;
        height: 300px;
    }

    .file-input-label:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 20px 50px var(--primary-glow);
    }

/* Lecteur musical */
.music-player {
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(200%);
    padding: 3rem;
    border-radius: 30px;
    margin-bottom: 3rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.current-track {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.track-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px var(--primary-glow);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.track-artist {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 300;
}

.mood-display {
    color: var(--secondary-color);
    font-weight: 600;
    text-shadow: 0 0 20px var(--secondary-color);
    font-size: 1.2rem;
    background: rgba(255, 215, 0, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    display: inline-block;
}

/* Contrôles de lecture */
.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.control-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

    .control-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: scale(1.15) translateY(-3px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 30px var(--primary-glow);
    }

.play-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    width: 80px;
    height: 80px;
    font-size: 2rem;
    box-shadow: 0 15px 40px var(--primary-glow);
}

    .play-btn.playing {
        animation: pulsePlay 2s ease-in-out infinite;
    }

@keyframes pulsePlay {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Barre de progression améliorée */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
    box-shadow: 0 0 20px var(--primary-color);
    position: relative;
}

    .progress::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        background: var(--primary-color);
        border-radius: 50%;
        box-shadow: 0 0 15px var(--primary-color);
    }

.time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-family: 'Orbitron', monospace;
    font-weight: 500;
}

/* Contrôle du volume */
.volume-control {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.volume-slider {
    width: 200px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    backdrop-filter: blur(10px);
}

    .volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
        cursor: pointer;
        box-shadow: 0 0 15px var(--primary-glow);
        transition: all 0.3s ease;
    }

        .volume-slider::-webkit-slider-thumb:hover {
            transform: scale(1.3);
            box-shadow: 0 0 25px var(--primary-glow);
        }

.volume-value {
    color: var(--primary-color);
    font-weight: 700;
    min-width: 50px;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    text-shadow: 0 0 10px var(--primary-color);
}

/* Liste de pistes */
.track-list {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(200%);
    padding: 3rem;
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

    .track-list h3 {
        margin-bottom: 2rem;
        color: var(--primary-color);
        text-shadow: 0 0 20px var(--primary-color);
        font-family: 'Orbitron', monospace;
        font-size: 1.8rem;
        font-weight: 700;
        text-align: center;
    }

.track-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 1rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

    .track-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
        transition: left 0.5s;
    }

    .track-item:hover::before {
        left: 100%;
    }

    .track-item:hover {
        background: rgba(255, 255, 255, 0.08);
        transform: translateX(10px) translateY(-2px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 40px var(--primary-glow);
    }

    .track-item.playing {
        background: rgba(0, 217, 255, 0.15);
        border-color: var(--primary-color);
        box-shadow: 0 0 40px var(--primary-glow), inset 0 0 20px rgba(0, 217, 255, 0.1);
        animation: trackGlow 2s ease-in-out infinite;
    }

@keyframes trackGlow {
    0%, 100% {
        box-shadow: 0 0 40px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 60px var(--primary-glow), 0 0 80px var(--primary-glow);
    }
}

.track-info {
    flex: 1;
}

.track-name {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.track-mood {
    color: var(--secondary-color);
    font-size: 0.95rem;
    text-shadow: 0 0 10px var(--secondary-color);
    font-weight: 500;
}

.track-analysis {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.3rem;
    font-style: italic;
}

.play-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-shadow: 0 0 15px var(--primary-color);
    transition: all 0.3s ease;
}

.track-item:hover .play-icon {
    transform: scale(1.2);
    color: var(--accent-color);
}

/* Panel graphiques */
.graphics-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(200%);
    padding: 3rem;
    border-radius: 25px;
    margin-top: 3rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    .graphics-panel.hidden {
        opacity: 0;
        transform: translateY(20px);
        pointer-events: none;
        max-height: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }

    .graphics-panel h3 {
        color: var(--primary-color);
        font-family: 'Orbitron', monospace;
        font-size: 1.8rem;
        margin-bottom: 2rem;
        text-shadow: 0 0 20px var(--primary-color);
    }

.visualizer {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 3px;
    padding: 20px;
    overflow: hidden;
}

.bar {
    width: 8px;
    background: linear-gradient(to top, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: height 0.3s ease;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Modes spéciaux */
body.mode-immersive {
    background: radial-gradient(circle at center, var(--primary-glow), #000000) !important;
}

    body.mode-immersive .container {
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(30px);
        border-radius: 25px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

body.mode-minimal .theme-selector {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

    body.mode-minimal .theme-selector:hover {
        opacity: 1;
    }

body.mode-focus .graphics-panel,
body.mode-focus .track-list {
    filter: blur(3px);
    opacity: 0.3;
    transition: all 0.3s ease;
}

body.mode-focus .music-player {
    transform: scale(1.05);
    z-index: 100;
    position: relative;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .theme-selector {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 2rem;
        max-width: 100%;
    }

    .theme-buttons {
        grid-template-columns: 1fr;
    }

    .player-controls {
        gap: 1rem;
    }

    .logo {
        font-size: 2.5rem;
        letter-spacing: 3px;
    }

    .volume-control {
        flex-direction: column;
        gap: 1rem;
    }

    .volume-slider {
        width: 250px;
    }

    .track-item {
        padding: 1rem;
    }

    .track-name {
        font-size: 1rem;
    }

    .track-mood {
        font-size: 0.85rem;
    }

    .track-analysis {
        font-size: 0.75rem;
    }
}

/* Animations d'entrée */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}