/**
 * Gestion des logos selon le thème - Metronic 8 Native
 * Utilise uniquement les mécanismes natifs de Metronic
 */

/* ============================================
   CLASSES METRONIC NATIVES
   ============================================ */

/* 
 * Metronic utilise [data-bs-theme] pour gérer les thèmes
 * light = thème clair
 * dark = thème sombre
 */

/* Logo thème clair - visible UNIQUEMENT en mode clair */
[data-bs-theme="light"] .theme-light-show {
    display: inline-block !important;
}

[data-bs-theme="light"] .theme-dark-show {
    display: none !important;
}

/* Logo thème sombre - visible UNIQUEMENT en mode sombre */
[data-bs-theme="dark"] .theme-dark-show {
    display: inline-block !important;
}

[data-bs-theme="dark"] .theme-light-show {
    display: none !important;
}

/* Par défaut (au cas où data-bs-theme n'est pas défini) */
html:not([data-bs-theme]) .theme-light-show {
    display: inline-block !important;
}

html:not([data-bs-theme]) .theme-dark-show {
    display: none !important;
}

/* ============================================
   STYLES DES LOGOS
   ============================================ */

/* Styles communs pour tous les logos */
img[id^="logo-"] {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

/* Responsive - Mobile */
@media (max-width: 991px) {
    img[id^="logo-"] {
        max-height: 40px !important;
    }
}

/* Optimisations de performance */
img[id^="logo-"] {
    /* GPU acceleration pour les transitions */
    transform: translateZ(0);
    backface-visibility: hidden;
    
    /* Optimiser le rendu */
    image-rendering: -webkit-optimize-contrast;
}

/* ============================================
   TRANSITIONS SMOOTH (Optionnel)
   ============================================ */

/* Transition fluide lors du changement de thème */
img[id^="logo-"] {
    transition: opacity 0.2s ease-in-out;
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */

/* Réduire les animations si demandé par l'utilisateur */
@media (prefers-reduced-motion: reduce) {
    img[id^="logo-"] {
        transition: none !important;
    }
}

/* ============================================
   PRINT
   ============================================ */

/* En impression, toujours afficher le logo clair */
@media print {
    .theme-dark-show {
        display: none !important;
    }
    
    .theme-light-show {
        display: inline-block !important;
    }
}

