/* Améliorations du header pour éviter les problèmes d'affichage */

/* Desktop header adjustments */
.header {
    min-height: 80px;
    position: relative;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-inner {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

/* Ensure auth buttons are properly visible - Override all conflicts */
.auth-buttons {
    display: flex !important;
    gap: 12px;
    align-items: center;
    height: 100%;
}

.btn-login,
.btn-register {
    padding: 10px 20px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    font-size: 0.9rem !important;
    position: relative;
    z-index: 10;
    box-shadow: none !important;
}

/* Fix pour le bouton Connexion */
.btn-login {
    color: #D4AF37 !important;
    border: 2px solid #D4AF37 !important;
    background: transparent !important;
}

.btn-login:hover {
    background: #D4AF37 !important;
    color: white !important;
    border-color: #D4AF37 !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Fix pour le bouton Inscription */
.btn-register {
    background: #D4AF37 !important;
    color: white !important;
    border: 2px solid #D4AF37 !important;
}

.btn-register:hover {
    background: #B8941F !important;
    color: white !important;
    border-color: #B8941F !important;
    box-shadow: 0 4px 12px rgba(184, 148, 31, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* S'assurer que les boutons ne sont pas masqués par d'autres éléments */
.nav-desktop {
    position: relative;
    z-index: 5;
}

.auth-buttons {
    position: relative;
    z-index: 10;
}

/* User dropdown improvements */
.user-menu {
    position: relative;
    z-index: 15;
}

.user-menu .dropdown-menu {
    min-width: 240px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: white !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 8px !important;
    z-index: 1000 !important;
}

/* Fix pour le dropdown qui ne s'affiche pas complètement */
.dropdown-menu {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
}

.user-menu:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Mobile specific improvements */
@media (max-width: 990px) {
    .header {
        min-height: 70px;
        padding: 5px 0;
    }
    
    .header-inner {
        min-height: 60px;
        padding: 5px 0;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
    
    /* Ensure mobile menu trigger is properly positioned */
    .mobile-menu-trigger {
        min-width: 44px;
        min-height: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* Breadcrumb improvements */
.breadcrumb-container {
    background: #f8f9fa;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #6c757d;
    margin: 0 8px;
    font-weight: normal;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #D4AF37;
    text-decoration: underline;
}

.breadcrumb-item.active span {
    color: #495057;
    font-weight: 500;
}

@media (max-width: 768px) {
    .breadcrumb-container {
        font-size: 0.8rem;
        padding: 8px 0;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 4px;
    }
}

/* Main content spacing adjustments */
main {
    min-height: calc(100vh - 200px);
}

/* Page-specific adjustments */
body.home main {
    padding-top: 0;
}

/* Override conflicting styles from other CSS files */
.btn-login:focus,
.btn-register:focus {
    outline: 2px solid #D4AF37 !important;
    outline-offset: 2px !important;
}

/* Ensure buttons text is always readable */
.btn-login,
.btn-login:visited {
    color: #D4AF37 !important;
}

.btn-login:hover,
.btn-login:active {
    color: white !important;
    background: #D4AF37 !important;
}

.btn-register,
.btn-register:visited {
    color: white !important;
    background: #D4AF37 !important;
}

.btn-register:hover,
.btn-register:active {
    color: white !important;
    background: #B8941F !important;
}

/* Fix potential z-index issues */
.header {
    position: relative !important;
    z-index: 100 !important;
}

.header-inner {
    position: relative;
    z-index: 101;
}

/* Ensure proper spacing for all pages */
@media (max-width: 768px) {
    main {
        padding-top: 20px;
    }
    
    body.home main {
        padding-top: 0;
    }
    
    /* Mobile auth buttons fixes */
    .auth-buttons {
        display: none !important;
    }
}