/* ============================================
   DC BEAUTY - HEADER MODERNE
   ============================================ */

/* Variables spécifiques au header */
:root {
    --header-height: 70px;
    --header-bg: #ffffff;
    --header-border: #e5e5e5;
    --header-shadow: 0 2px 10px rgba(0,0,0,0.05);
    --accent-gold: #c9a961;
    --text-dark: #1a1a1a;
    --text-light: #666666;
}

/* Header principal */
.header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--header-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

/* Navbar container */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0;
}

/* Logo */
.navbar-brand {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-dark);
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation principale */
.header .navbar-nav,
.navbar .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 5px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
}

/* Override Bootstrap si nécessaire */
.header .navbar-nav > *,
.navbar .navbar-nav > * {
    display: inline-block !important;
    margin: 0 !important;
}

.header .nav-link,
.navbar .nav-link {
    display: inline-block !important;
    padding: 8px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
    border-radius: 5px;
    margin: 0;
}

.header .nav-link::after,
.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.header .nav-link:hover,
.navbar .nav-link:hover {
    color: var(--accent-gold);
    background: rgba(201, 169, 97, 0.05);
}

.header .nav-link:hover::after,
.navbar .nav-link:hover::after {
    width: 80%;
}

/* Navigation active */
.header .nav-link.active,
.navbar .nav-link.active {
    color: var(--accent-gold) !important;
    font-weight: 600 !important;
}

.header .nav-link.active::after,
.navbar .nav-link.active::after {
    width: 80% !important;
    background: var(--accent-gold) !important;
    opacity: 1 !important;
}

/* Réinitialiser le style par défaut des liens non-actifs */
.header .navbar-nav .nav-link:not(.active),
.navbar .navbar-nav .nav-link:not(.active) {
    color: var(--text-dark) !important;
    font-weight: 500 !important;
}

.header .navbar-nav .nav-link:not(.active)::after,
.navbar .navbar-nav .nav-link:not(.active)::after {
    width: 0 !important;
}

/* Actions utilisateur */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Dropdown utilisateur */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--header-border);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--text-dark);
}

.user-dropdown-toggle:hover {
    background: var(--accent-gold);
    color: white;
    border-color: var(--accent-gold);
}

.user-dropdown-toggle i {
    font-size: 18px;
}

.user-dropdown-toggle .bi-chevron-down {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.user-dropdown.active .bi-chevron-down {
    transform: rotate(180deg);
}

.user-name {
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 250px;
    background: white;
    border: 1px solid var(--header-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

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

.dropdown-header {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-info strong {
    font-size: 14px;
    color: var(--text-dark);
}

.user-info small {
    font-size: 12px;
    color: var(--text-light);
}

.dropdown-divider {
    height: 1px;
    background: var(--header-border);
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--accent-gold);
    padding-left: 20px;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.admin-item {
    color: #007bff;
}

.admin-item:hover {
    background: rgba(0, 123, 255, 0.1);
    color: #0056b3;
}

.staff-item {
    color: #28a745;
}

.staff-item:hover {
    background: rgba(40, 167, 69, 0.1);
    color: #1e7e34;
}

.logout-item:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Bouton connexion */
.btn-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent-gold);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-auth:hover {
    background: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-auth i {
    font-size: 16px;
}

/* Bouton panier */
.cart-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.cart-button:hover {
    background: var(--accent-gold);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 169, 97, 0.3);
}

.cart-button i {
    font-size: 18px;
}

.cart-text {
    font-weight: 500;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #c9a961;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.4);
}

/* Menu mobile */
.mobile-menu-toggle {
    display: none;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--header-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--accent-gold);
    color: white;
    border-color: var(--accent-gold);
}

.mobile-menu-toggle i {
    font-size: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
    .navbar-nav {
        gap: 2px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .header {
        height: 60px;
    }
    
    .logo-text {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .cart-text,
    .user-name {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar-actions {
        gap: 10px;
    }
    
    .btn-auth span {
        display: none;
    }
    
    .cart-button {
        padding: 8px 12px;
        border-width: 1px;
    }
    
    .user-dropdown-toggle {
        padding: 8px;
        border-radius: 50%;
    }
    
    .user-dropdown-menu {
        right: -20px;
        width: 200px;
    }
}

/* ============================================
   MENU MOBILE
   ============================================ */

.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
	display:none;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 9999;
    overflow-y: auto;
    animation: slideIn 0.3s forwards;
	display:contents;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--header-border);
    background: var(--accent-gold);
    color: white;
}

.mobile-menu-title {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
}

.mobile-nav {
    padding: 10px 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent-gold);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(201, 169, 97, 0.1);
    padding-left: 25px;
    color: var(--accent-gold);
}

.mobile-nav-link:hover::after {
    transform: scaleY(1);
}

.mobile-nav-link.active {
    background: rgba(201, 169, 97, 0.1);
    color: var(--accent-gold);
    font-weight: 600;
}

.mobile-nav-link.active::after {
    transform: scaleY(1);
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.mobile-nav-link.admin-link {
    color: #007bff;
}

.mobile-nav-link.admin-link:hover {
    background: rgba(0, 123, 255, 0.1);
}

.mobile-nav-link.staff-link {
    color: #28a745;
}

.mobile-nav-link.staff-link:hover {
    background: rgba(40, 167, 69, 0.1);
}

.mobile-nav-link.logout-link {
    color: #dc3545;
}

.mobile-nav-link.logout-link:hover {
    background: rgba(220, 53, 69, 0.1);
}

.mobile-nav-divider {
    height: 1px;
    background: var(--header-border);
    margin: 10px 20px;
}

/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    to {
        right: 0;
    }
}

/* Suppression des anciens styles du header */
.header-top,
.nav-main,
.header-actions,
.user-welcome,
.account-link:not(.mobile-nav-link),
.admin-link:not(.mobile-nav-link),
.staff-link:not(.mobile-nav-link),
.logout-link:not(.mobile-nav-link),
.register-link,
.cart-link {
    display: none !important;
}
