/* NAVIGATION POSITION OVERRIDES - Load after main.css */

/* Ensure preheader is always visible at the top */
.preheader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10001 !important;
    height: 56px !important;
}

/* Position main navigation below preheader - more specific selector */
nav.navbar, #navbar, header nav:not(.breadcrumb) {
    position: fixed !important;
    top: 56px !important;
    z-index: 9999 !important;
    height: 100px !important;
}

/* Ensure breadcrumb navigation stays in normal flow */
nav.breadcrumb {
    position: static !important;
    z-index: auto !important;
    height: auto !important;
}

/* Adjust body padding to account for both bars */
body {
    padding-top: 126px !important; /* 56px preheader + 70px nav */
}

/* Hero section adjustment */
#hero {
    margin-top: 0 !important;
    padding-top: 60px !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .preheader {
        height: 50px !important;
    }
    
    nav, #navbar {
        top: 50px !important;
        height: 70px !important;
    }
    
    body {
        padding-top: 120px !important; /* 50px + 70px */
    }
}

@media (max-width: 480px) {
    .preheader {
        height: 44px !important;
    }
    
    nav, #navbar {
        top: 44px !important;
        height: 65px !important;
    }
    
    body {
        padding-top: 109px !important; /* 44px + 65px */
    }
}

/* Ensure mega menus appear at correct z-index */
.mega-menu {
    z-index: 9998 !important;
}

/* Fix any scroll behavior issues */
html {
    scroll-padding-top: 126px !important;
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 120px !important;
    }
}

@media (max-width: 480px) {
    html {
        scroll-padding-top: 109px !important;
    }
}

/* Ensure smooth scrolling to sections accounts for both headers */
[id] {
    scroll-margin-top: 126px !important;
}

@media (max-width: 768px) {
    [id] {
        scroll-margin-top: 120px !important;
    }
}

@media (max-width: 480px) {
    [id] {
        scroll-margin-top: 109px !important;
    }
}

/* FORCE DASHBOARD BUTTON HEIGHT - CRITICAL OVERRIDE */
.preheader .dashboard-cta-preheader {
    height: 36px !important;
    max-height: 36px !important;
    min-height: 36px !important;
    line-height: 1 !important;
    padding: 8px 16px !important; /* Padding ajusté sans icône */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    gap: 8px !important; /* Gap réduit */
}

.preheader .dashboard-cta-preheader * {
    line-height: 1 !important;
    height: auto !important;
    max-height: none !important;
}

/* SIMPLIFIED DASHBOARD BUTTON WITHOUT ICON */
.preheader .dashboard-cta-preheader .dashboard-content {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: white !important;
    margin: 0 !important;
    padding: 0 !important;
}

.preheader .dashboard-cta-preheader .dashboard-arrow {
    font-size: 10px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 !important;
    padding: 0 !important;
}
