/* ===== MENU DÉROULANT D'ANNÉES ===== */
.year-navigation {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(20, 20, 50, 0.9);
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.year-label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.year-select {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.9) 0%, rgba(107, 204, 178, 0.9) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    min-width: 100px;
}

.year-select:hover {
    border-color: #6bccb2;
    box-shadow: 0 0 20px rgba(107, 204, 178, 0.4);
    transform: translateY(-2px);
}

.year-select option {
    background: #1a1a40;
    color: #fff;
    padding: 8px;
}

/* ===== BOUTON RETOUR MODE ARTISTIQUE ===== */
.btn-back-to-home {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-back-to-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
    background: linear-gradient(135deg, #0099cc 0%, #00d4ff 100%);
}

.btn-back-to-home:active {
    transform: translateY(-1px);
}

/* ===== ANIMATIONS AU SURVOL DES STATS (AGRANDISSEMENT) ===== */
.metric-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.metric-card:hover {
    transform: scale(1.15) translateY(-10px) !important;
    box-shadow: 0 15px 40px rgba(255, 107, 139, 0.4) !important;
    z-index: 10;
}

.metric-card:hover .metric-value {
    font-size: 2.2rem !important;
    color: #ff6b8b;
    text-shadow: 0 0 25px rgba(255, 107, 139, 0.8);
}

.metric-card:hover .metric-label {
    font-size: 1.1rem !important;
    font-weight: 700;
    color: #fff;
}

.metric-card:hover .metric-detail {
    font-size: 0.95rem !important;
    opacity: 1;
}

.metric-card:hover .metric-trend {
    transform: scale(1.2);
}

/* ===== TEXTURE D'ÉCRAN CRT (désactivée par défaut, seulement pour l'intro) ===== */
.dashboard-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(255, 0, 0, 0.03),
            rgba(0, 255, 0, 0.02),
            rgba(0, 0, 255, 0.03)
        );
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    display: none;
}

body.intro-active .dashboard-container::before {
    display: block;
    opacity: 0.3;
    animation: screenFlicker 0.15s infinite;
}

/* Ne jamais appliquer les scanlines au mode artistique */
.artistic-mode-container::before {
    display: none !important;
}

@keyframes screenFlicker {
    0% { opacity: 0.27; }
    50% { opacity: 0.3; }
    100% { opacity: 0.28; }
}

/* ===== ANIMATION GLITCH ENTRE GRAPHIQUES ===== */
.chart-view {
    position: relative;
}

.chart-view.glitch-transition {
    animation: glitchEffect 0.3s ease-out;
}

@keyframes glitchEffect {
    0% {
        transform: translate(0);
        opacity: 1;
    }
    10% {
        transform: translate(-5px, 5px);
        opacity: 0.8;
    }
    20% {
        transform: translate(5px, -5px);
        opacity: 0.6;
    }
    30% {
        transform: translate(-5px, -5px);
        opacity: 0.8;
    }
    40% {
        transform: translate(5px, 5px);
        opacity: 0.6;
    }
    50% {
        transform: translate(0);
        opacity: 0.9;
    }
    60% {
        transform: translate(-2px, 2px);
        opacity: 0.95;
    }
    70% {
        transform: translate(2px, -2px);
        opacity: 0.9;
    }
    80% {
        transform: translate(-2px, -2px);
        opacity: 0.95;
    }
    90% {
        transform: translate(2px, 2px);
        opacity: 0.98;
    }
    100% {
        transform: translate(0);
        opacity: 1;
    }
}

/* Effet de distorsion RGB */
.chart-view.glitch-transition::before,
.chart-view.glitch-transition::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    opacity: 0.8;
    pointer-events: none;
}

.chart-view.glitch-transition::before {
    animation: glitchRed 0.3s ease-out;
    mix-blend-mode: screen;
}

.chart-view.glitch-transition::after {
    animation: glitchBlue 0.3s ease-out;
    mix-blend-mode: screen;
}

@keyframes glitchRed {
    0%, 100% { transform: translate(0); opacity: 0; }
    33% { transform: translate(-3px, 0); opacity: 0.5; filter: hue-rotate(0deg); }
    66% { transform: translate(3px, 0); opacity: 0.5; filter: hue-rotate(0deg); }
}

@keyframes glitchBlue {
    0%, 100% { transform: translate(0); opacity: 0; }
    33% { transform: translate(3px, 0); opacity: 0.5; filter: hue-rotate(180deg); }
    66% { transform: translate(-3px, 0); opacity: 0.5; filter: hue-rotate(180deg); }
}

/* ===== FILTRE TV/RADIO ===== */
.media-filter {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(20, 20, 50, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    border-color: #6bccb2;
    box-shadow: 0 0 15px rgba(107, 204, 178, 0.3);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff6b8b 0%, #6bccb2 100%);
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 107, 139, 0.5);
}

.filter-btn.tv-filter.active {
    background: linear-gradient(135deg, #ff6b8b 0%, #ff8e53 100%);
}

.filter-btn.radio-filter.active {
    background: linear-gradient(135deg, #6bccb2 0%, #4a6fa5 100%);
}

/* ===== SUPERPOSITION IMAGE ILLUSTRATOR ===== */
.illustrator-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.illustrator-overlay-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
    mix-blend-mode: multiply;
}

.illustrator-overlay-image.visible {
    opacity: 0.4;
}

.btn-toggle-illustrator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #00d4ff;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.btn-toggle-illustrator:hover {
    background: #00d4ff;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* ===== STATS MATHÉMATIQUES DYNAMIQUES ===== */
.metric-value {
    transition: all 0.3s ease;
}

.metric-value.updating {
    animation: valueUpdate 0.6s ease-out;
}

@keyframes valueUpdate {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.5;
        color: #6bccb2;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== VIGNETTE (désactivée pour garder le fond blanc propre) ===== */
.dashboard-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .year-navigation {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .year-select {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .btn-back-to-home {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .media-filter {
        top: 10px;
        right: 10px;
        flex-direction: column;
    }
}

