/* =====================================================
   FIX DARK MODE - Haute priorité
   ===================================================== */

/* Force dark mode for ALL header sections */
html.dark body,
body.dark,
html[data-theme="dark"] body {
    color: #fff;
}

/* TOP BAR - Dark Mode Fix */
html.dark .glamzn-topbar-pro,
body.dark .glamzn-topbar-pro,
html[data-theme="dark"] .glamzn-topbar-pro,
.dark .glamzn-topbar-pro {
    background: #0f172a !important;
    border-bottom-color: #1e293b !important;
}

/* Top bar text colors */
html.dark .glamzn-topbar-pro *,
body.dark .glamzn-topbar-pro *,
html[data-theme="dark"] .glamzn-topbar-pro *,
.dark .glamzn-topbar-pro * {
    color: #d1d5db !important;
}

html.dark .glamzn-datetime-compact,
body.dark .glamzn-datetime-compact,
html[data-theme="dark"] .glamzn-datetime-compact,
.dark .glamzn-datetime-compact {
    color: #d1d5db !important;
}

html.dark .glamzn-weather-compact,
body.dark .glamzn-weather-compact,
html[data-theme="dark"] .glamzn-weather-compact,
.dark .glamzn-weather-compact {
    color: #d1d5db !important;
}

html.dark .glamzn-social-icon,
body.dark .glamzn-social-icon,
html[data-theme="dark"] .glamzn-social-icon,
.dark .glamzn-social-icon {
    color: #9ca3af !important;
}

/* MAIN NAVBAR - Dark Mode Fix */
html.dark .glamzn-main-navbar,
body.dark .glamzn-main-navbar,
html[data-theme="dark"] .glamzn-main-navbar,
.dark .glamzn-main-navbar {
    background: #111827 !important;
    border-bottom-color: #1f2937 !important;
}

/* Logo text in dark mode */
html.dark .glamzn-logo-text,
body.dark .glamzn-logo-text,
html[data-theme="dark"] .glamzn-logo-text,
.dark .glamzn-logo-text {
    color: #fff !important;
}

/* Categories in navbar - dark mode */
html.dark .glamzn-category-link,
body.dark .glamzn-category-link,
html[data-theme="dark"] .glamzn-category-link,
.dark .glamzn-category-link {
    color: #9ca3af !important;
}

html.dark .glamzn-category-link:hover,
body.dark .glamzn-category-link:hover,
html[data-theme="dark"] .glamzn-category-link:hover,
.dark .glamzn-category-link:hover {
    color: #e5e7eb !important;
}

/* Action buttons in dark mode */
html.dark .glamzn-action-btn,
body.dark .glamzn-action-btn,
html[data-theme="dark"] .glamzn-action-btn,
.dark .glamzn-action-btn {
    border-color: #374151 !important;
    color: #d1d5db !important;
}

html.dark .glamzn-action-btn:hover,
body.dark .glamzn-action-btn:hover,
html[data-theme="dark"] .glamzn-action-btn:hover,
.dark .glamzn-action-btn:hover {
    background: #1f2937 !important;
    border-color: #818cf8 !important;
    color: #818cf8 !important;
}

/* Mobile trigger in dark mode */
html.dark .glamzn-mobile-trigger,
body.dark .glamzn-mobile-trigger,
html[data-theme="dark"] .glamzn-mobile-trigger,
.dark .glamzn-mobile-trigger {
    border-color: #374151 !important;
    color: #d1d5db !important;
}

html.dark .glamzn-mobile-trigger:hover,
body.dark .glamzn-mobile-trigger:hover,
html[data-theme="dark"] .glamzn-mobile-trigger:hover,
.dark .glamzn-mobile-trigger:hover {
    background: #1f2937 !important;
    border-color: #818cf8 !important;
    color: #818cf8 !important;
}

/* User dropdown in dark mode */
html.dark .glamzn-user-trigger,
body.dark .glamzn-user-trigger,
html[data-theme="dark"] .glamzn-user-trigger,
.dark .glamzn-user-trigger {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #fff !important;
}

html.dark .glamzn-user-avatar,
body.dark .glamzn-user-avatar,
html[data-theme="dark"] .glamzn-user-avatar,
.dark .glamzn-user-avatar {
    border-color: #374151 !important;
}

/* Categories mobile in dark mode */
html.dark .glamzn-categories-mobile,
body.dark .glamzn-categories-mobile,
html[data-theme="dark"] .glamzn-categories-mobile,
.dark .glamzn-categories-mobile {
    background: #111827 !important;
    border-bottom-color: #1f2937 !important;
}

/* Ensure proper contrast */
html.dark,
body.dark,
html[data-theme="dark"] {
    color-scheme: dark;
}

/* =====================================================
   FIX CATEGORY HOVER EFFECTS - Force proper display
   ===================================================== */

/* Ensure hover background and underline work properly */
.glamzn-category-link,
.glamzn-categories-section .glamzn-category-link {
    position: relative !important;
    overflow: visible !important;
}

/* Force hover background to display */
.glamzn-category-link:hover,
.glamzn-categories-section .glamzn-category-link:hover,
.glamzn-category-item:hover .glamzn-category-link {
    color: #4F46E5 !important;
}

.glamzn-category-link:hover::before,
.glamzn-categories-section .glamzn-category-link:hover::before,
.glamzn-category-item:hover .glamzn-category-link::before {
    opacity: 1 !important;
}

.glamzn-category-link:hover::after,
.glamzn-categories-section .glamzn-category-link:hover::after,
.glamzn-category-item:hover .glamzn-category-link::after {
    width: calc(100% - 36px) !important;
}

/* Dark mode hover */
html.dark .glamzn-category-link:hover,
body.dark .glamzn-category-link:hover,
html[data-theme="dark"] .glamzn-category-link:hover,
.dark .glamzn-category-link:hover,
html.dark .glamzn-categories-section .glamzn-category-link:hover,
body.dark .glamzn-categories-section .glamzn-category-link:hover,
.dark .glamzn-categories-section .glamzn-category-link:hover {
    color: #a5b4fc !important;
}

/* =====================================================
   FIX DROPDOWN VISIBILITY - Force display
   ===================================================== */

/* Force dropdowns to be visible and on top - DIRECTION DOWN */
.glamzn-category-dropdown,
.glamzn-categories-section .glamzn-category-dropdown {
    top: calc(100% + 8px) !important;
    bottom: auto !important;
    transform: translateY(10px) !important;
    z-index: 99999 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Keep dropdown visible when hovering category item */
.glamzn-category-item:hover .glamzn-category-dropdown,
.glamzn-category-item:focus-within .glamzn-category-dropdown,
.glamzn-categories-section .glamzn-category-item:hover .glamzn-category-dropdown,
.glamzn-categories-section .glamzn-category-item:focus-within .glamzn-category-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* Keep dropdown visible when hovering dropdown itself */
.glamzn-category-dropdown:hover,
.glamzn-categories-section .glamzn-category-dropdown:hover {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* Add bridge area to prevent dropdown from closing */
.glamzn-category-item::before,
.glamzn-categories-section .glamzn-category-item::after {
    pointer-events: auto !important;
}

/* Ensure dropdown background is visible */
.glamzn-category-dropdown {
    background: white !important;
}

html.dark .glamzn-category-dropdown,
body.dark .glamzn-category-dropdown,
.dark .glamzn-category-dropdown {
    background: #1f2937 !important;
}

/* =====================================================
   FIX DROPDOWN "POPULAIRES" - Force visibility
   ===================================================== */

/* Ensure Popular dropdown has proper base styles */
.glamzn-popular-dropdown {
    position: fixed !important; /* Changed to fixed to escape overflow container */
    top: auto !important;
    left: auto !important;
    background: white !important;
    z-index: 999999 !important; /* Very high z-index to be on top of everything */
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(10px) !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

html.dark .glamzn-popular-dropdown,
body.dark .glamzn-popular-dropdown,
.dark .glamzn-popular-dropdown {
    background: #1f2937 !important;
}

/* Force Popular dropdown to show on hover */
.glamzn-popular-subcategories:hover .glamzn-popular-dropdown,
.glamzn-popular-subcategories:focus-within .glamzn-popular-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* Keep dropdown visible when hovering the dropdown itself */
.glamzn-popular-dropdown:hover {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* Add bridge for Popular dropdown */
.glamzn-popular-subcategories::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
    z-index: 9998;
    pointer-events: auto;
    display: none;
}

.glamzn-popular-subcategories:hover::before {
    display: block;
}

/* =====================================================
   FOOTER - DARK MODE FIX - ULTIMATE PRIORITY
   ===================================================== */

/* Footer Background - FORCE BLACK */
html.uc-dark .glamzn-footer,
html.dark .glamzn-footer,
body.dark .glamzn-footer,
html[data-theme="dark"] .glamzn-footer,
.dark .glamzn-footer,
html[data-bs-theme="dark"] .glamzn-footer {
    background: #000000 !important;
    border-top-color: #262626 !important;
}

/* Footer Bottom - FORCE DARK */
html.uc-dark .glamzn-footer-bottom,
html.dark .glamzn-footer-bottom,
body.dark .glamzn-footer-bottom,
html[data-theme="dark"] .glamzn-footer-bottom,
.dark .glamzn-footer-bottom,
html[data-bs-theme="dark"] .glamzn-footer-bottom {
    background: #0a0a0a !important;
    border-top-color: #262626 !important;
}

/* Footer Logo - Gradient */
html.uc-dark .glamzn-footer-logo,
html.dark .glamzn-footer-logo,
body.dark .glamzn-footer-logo,
html[data-theme="dark"] .glamzn-footer-logo,
.dark .glamzn-footer-logo,
html[data-bs-theme="dark"] .glamzn-footer-logo {
    background: linear-gradient(135deg, #a78bfa, #c4b5fd) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Footer Texts */
html.uc-dark .glamzn-footer-tagline,
html.dark .glamzn-footer-tagline,
body.dark .glamzn-footer-tagline,
html[data-theme="dark"] .glamzn-footer-tagline,
.dark .glamzn-footer-tagline,
html[data-bs-theme="dark"] .glamzn-footer-tagline {
    color: #d1d5db !important;
}

html.uc-dark .glamzn-footer-desc,
html.dark .glamzn-footer-desc,
body.dark .glamzn-footer-desc,
html[data-theme="dark"] .glamzn-footer-desc,
.dark .glamzn-footer-desc,
html[data-bs-theme="dark"] .glamzn-footer-desc {
    color: #9ca3af !important;
}

html.uc-dark .glamzn-footer-title,
html.dark .glamzn-footer-title,
body.dark .glamzn-footer-title,
html[data-theme="dark"] .glamzn-footer-title,
.dark .glamzn-footer-title,
html[data-bs-theme="dark"] .glamzn-footer-title {
    color: #ffffff !important;
}

html.uc-dark .glamzn-footer-subtitle,
html.dark .glamzn-footer-subtitle,
body.dark .glamzn-footer-subtitle,
html[data-theme="dark"] .glamzn-footer-subtitle,
.dark .glamzn-footer-subtitle,
html[data-bs-theme="dark"] .glamzn-footer-subtitle {
    color: #ffffff !important;
}

/* Social Links - ULTRA VISIBLE */
html.uc-dark .glamzn-social-link,
html.dark .glamzn-social-link,
body.dark .glamzn-social-link,
html[data-theme="dark"] .glamzn-social-link,
.dark .glamzn-social-link,
html[data-bs-theme="dark"] .glamzn-social-link {
    background: #262626 !important;
    color: #ffffff !important;
    border: 1px solid #404040 !important;
    font-size: 20px !important;
}

html.uc-dark .glamzn-social-link:hover,
html.dark .glamzn-social-link:hover,
body.dark .glamzn-social-link:hover,
html[data-theme="dark"] .glamzn-social-link:hover,
.dark .glamzn-social-link:hover,
html[data-bs-theme="dark"] .glamzn-social-link:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.6) !important;
}

/* Footer Links */
html.uc-dark .glamzn-footer-link,
html.dark .glamzn-footer-link,
body.dark .glamzn-footer-link,
html[data-theme="dark"] .glamzn-footer-link,
.dark .glamzn-footer-link,
html[data-bs-theme="dark"] .glamzn-footer-link {
    color: #9ca3af !important;
}

html.uc-dark .glamzn-footer-link:hover,
html.dark .glamzn-footer-link:hover,
body.dark .glamzn-footer-link:hover,
html[data-theme="dark"] .glamzn-footer-link:hover,
.dark .glamzn-footer-link:hover,
html[data-bs-theme="dark"] .glamzn-footer-link:hover {
    color: #818cf8 !important;
}

/* Footer Posts */
html.uc-dark .glamzn-footer-post,
html.dark .glamzn-footer-post,
body.dark .glamzn-footer-post,
html[data-theme="dark"] .glamzn-footer-post,
.dark .glamzn-footer-post,
html[data-bs-theme="dark"] .glamzn-footer-post {
    background: #1a1a1a !important;
    border: 1px solid #404040 !important;
}

html.uc-dark .glamzn-footer-post-image,
html.dark .glamzn-footer-post-image,
body.dark .glamzn-footer-post-image,
html[data-theme="dark"] .glamzn-footer-post-image,
.dark .glamzn-footer-post-image,
html[data-bs-theme="dark"] .glamzn-footer-post-image {
    background: #2a2a2a !important;
}

html.uc-dark .glamzn-footer-post-title,
html.dark .glamzn-footer-post-title,
body.dark .glamzn-footer-post-title,
html[data-theme="dark"] .glamzn-footer-post-title,
.dark .glamzn-footer-post-title,
html[data-bs-theme="dark"] .glamzn-footer-post-title {
    color: #f9fafb !important;
}

html.uc-dark .glamzn-footer-post-meta,
html.dark .glamzn-footer-post-meta,
body.dark .glamzn-footer-post-meta,
html[data-theme="dark"] .glamzn-footer-post-meta,
.dark .glamzn-footer-post-meta,
html[data-bs-theme="dark"] .glamzn-footer-post-meta {
    color: #9ca3af !important;
}

html.uc-dark .glamzn-footer-post-category,
html.dark .glamzn-footer-post-category,
body.dark .glamzn-footer-post-category,
html[data-theme="dark"] .glamzn-footer-post-category,
.dark .glamzn-footer-post-category,
html[data-bs-theme="dark"] .glamzn-footer-post-category {
    background: #312e81 !important;
    color: #a5b4fc !important;
}

/* Copyright & Legal */
html.uc-dark .glamzn-footer-copyright p,
html.dark .glamzn-footer-copyright p,
body.dark .glamzn-footer-copyright p,
html[data-theme="dark"] .glamzn-footer-copyright p,
.dark .glamzn-footer-copyright p,
html[data-bs-theme="dark"] .glamzn-footer-copyright p {
    color: #9ca3af !important;
}

html.uc-dark .glamzn-footer-copyright-link,
html.dark .glamzn-footer-copyright-link,
body.dark .glamzn-footer-copyright-link,
html[data-theme="dark"] .glamzn-footer-copyright-link,
.dark .glamzn-footer-copyright-link,
html[data-bs-theme="dark"] .glamzn-footer-copyright-link {
    color: #818cf8 !important;
}

html.uc-dark .glamzn-footer-legal-link,
html.dark .glamzn-footer-legal-link,
body.dark .glamzn-footer-legal-link,
html[data-theme="dark"] .glamzn-footer-legal-link,
.dark .glamzn-footer-legal-link,
html[data-bs-theme="dark"] .glamzn-footer-legal-link {
    color: #9ca3af !important;
}

html.uc-dark .glamzn-footer-legal-link:hover,
html.dark .glamzn-footer-legal-link:hover,
body.dark .glamzn-footer-legal-link:hover,
html[data-theme="dark"] .glamzn-footer-legal-link:hover,
.dark .glamzn-footer-legal-link:hover,
html[data-bs-theme="dark"] .glamzn-footer-legal-link:hover {
    color: #818cf8 !important;
}

html.uc-dark .glamzn-footer-separator,
html.dark .glamzn-footer-separator,
body.dark .glamzn-footer-separator,
html[data-theme="dark"] .glamzn-footer-separator,
.dark .glamzn-footer-separator,
html[data-bs-theme="dark"] .glamzn-footer-separator {
    color: #4b5563 !important;
}
