/* ════════════════════════════════════════════════════════════════
   🚨 CIVIC OS - FIX TEMPORAIRE ANIMATIONS GLOBALES
   CSS d'urgence pour corriger le problème de performance
   ════════════════════════════════════════════════════════════════ */

/* 🎯 CORRECTION IMMÉDIATE - Empêcher l'invisibilité massive */
*[style*="opacity: 0"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* 🛡️ PROTECTION NAVBAR - Toujours visible */
.civic-navbar,
#civic-main-nav {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1030 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

/* 📄 CONTENU PRINCIPAL - Toujours visible */
body {
    opacity: 1 !important;
    transform: none !important;
}

.civic-main,
main,
.civic-section {
    opacity: 1 !important;
    transform: none !important;
}

/* 🚫 DÉSACTIVER LES ANIMATIONS AUTOMATIQUES PROBLÉMATIQUES */
*:not(.civic-btn):not(.civic-card):not(.civic-navbar):not([data-animation="allowed"]) {
    animation: none !important;
    transition: none !important;
}

/* ✅ RÉACTIVER LES TRANSITIONS IMPORTANTES SEULEMENT */
.civic-btn {
    transition: all 0.2s ease !important;
}

.civic-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.civic-navbar {
    transition: background 0.3s ease, backdrop-filter 0.3s ease !important;
}

/* 🔄 LOADER - Masquer automatiquement */
#civic-startup-loader {
    opacity: 0 !important;
    display: none !important;
}

/* 💫 PARTICULES - Optimiser */
#civic-particles {
    opacity: 0.1 !important;
    display: none !important;
}

/* 📱 FOOTER - Toujours visible */
.civic-footer {
    opacity: 1 !important;
    transform: none !important;
}

/* 🔝 BOUTON RETOUR EN HAUT */
.civic-back-to-top {
    opacity: 1 !important;
    transform: none !important;
}

/* ⚡ AMÉLIORATION DES PERFORMANCES */
* {
    will-change: auto !important;
}

/* 🎨 THÈME - Assurer la cohérence visuelle */
[data-theme="modern"] body {
    background: var(--civic-bg-modern, #0a0a0a) !important;
}

/* 📋 MODE DEBUG - Identifier les éléments problématiques */
.civic-debug-hidden {
    outline: 2px solid red !important;
    background: rgba(255, 0, 0, 0.1) !important;
}

.civic-debug-fixed {
    outline: 2px solid green !important;
    background: rgba(0, 255, 0, 0.1) !important;
}

/* 🔧 CLASSE DE RÉPARATION TEMPORAIRE */
.civic-emergency-fix {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* 📊 OPTIMISATION DES PERFORMANCES */
img[src=""],
img[src="#"],
img:not([src]) {
    display: none !important;
}

/* 🎯 STYLE DE FALLBACK POUR LES CAS D'URGENCE */
.civic-fallback-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: auto !important;
    background: rgba(10, 10, 10, 0.95) !important;
    color: #E6C200 !important;
    padding: 20px !important;
    border-radius: 8px !important;
    margin: 20px !important;
}

/* 🚀 INDICATEUR DE RÉPARATION ACTIVE */
body::before {
    content: "🔧 Mode Réparation Actif";
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #E74C3C;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 9999;
    opacity: 0.8;
    pointer-events: none;
}