/* ========================================
   HEADER RESPONSIVE - FLEXBOX MOBILE FIRST
   ======================================== */

:root {
    --header-bg: #ffffff;
    --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --primary-color: #d4af37;
    --primary-light: #e8c547;
    --text-color: #2c3e50;
    --text-light: #666;
    --border-color: #e0e0e0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* HEADER - BASE STYLES */
header {
    width: 100%;
    background: var(--header-bg);
    box-shadow: var(--header-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0.8rem 1rem;
    gap: 0.8rem;
}

/* LOGO */
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.1rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.header-logo:hover {
    opacity: 0.85;
}

.header-logo img {
    height: 38px;
    width: auto;
    display: block;
}

.header-logo-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* NAVIGATION - DESKTOP */
.header-nav {
    display: none;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.header-nav li {
    border-right: 1px solid rgba(0, 85, 164, 0.1);
}

.header-nav li:last-child {
    border-right: none;
}

.header-nav a {
    display: block;
    padding: 0.8rem 1.4rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.header-nav a:hover {
    color: var(--primary-color);
    background: rgba(0, 85, 164, 0.05);
}

.header-nav a.active {
    color: var(--primary-light);
    background: rgba(0, 85, 164, 0.08);
    border-bottom: 3px solid var(--primary-color);
}

/* DROPDOWN MENU */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.nav-dropdown > a::after {
    content: '▼';
    font-size: 0.6rem;
    margin-left: 0.3rem;
    transition: var(--transition);
    display: inline-block;
}

/* Dropdown caché par défaut */
.dropdown-menu {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-menu li {
    border: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
}

.dropdown-menu a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
    padding-left: 2rem;
}

/* Afficher le dropdown au survol sur DESKTOP */
@media (min-width: 768px) {
    .nav-dropdown:hover > a::after {
        transform: rotate(180deg);
    }
    
    .dropdown-menu {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        list-style: none;
        padding: 0;
        margin: 0;
        border-radius: 6px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
        min-width: 220px;
        z-index: 1001;
        animation: dropdownSlide 0.3s ease-out;
    }
    
    .nav-dropdown:hover .dropdown-menu {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
        padding: 0.5rem 0;
    }
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Afficher le dropdown au clic sur MOBILE */
@media (max-width: 767px) {
    .dropdown-menu {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: static;
        background: rgba(212, 175, 55, 0.05);
        box-shadow: none;
        border-radius: 0;
        min-width: auto;
        padding: 0;
        margin: 0;
        animation: none;
    }
    
    .nav-dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
        padding: 0.5rem 0;
    }
}

/* CTA BUTTON - DESKTOP */
.header-cta {
    display: none;
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    color: white;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.15);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.25);
}

/* HAMBURGER MENU - MOBILE */
.header-hamburger {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
    flex-shrink: 0;
    z-index: 1002;
    transition: var(--transition);
}

.header-hamburger:focus {
    outline: none;
    opacity: 0.7;
}

.header-hamburger span {
    width: 24px;
    height: 3px;
    background: #d4af37;
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.header-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.header-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.header-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* MOBILE MENU */
.header-mobile-menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-mobile-menu.active {
    display: flex;
}

.header-mobile-menu li {
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.header-mobile-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.header-mobile-menu a:active {
    background: rgba(0, 85, 164, 0.08);
    color: var(--primary-color);
}

.header-mobile-menu .header-cta-mobile {
    margin: 0.8rem;
    padding: 0.85rem 1.5rem;
    text-align: center;
    border-radius: 6px;
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 0.85rem;
}

/* Mobile menu dropdown */
.nav-dropdown-mobile {
    position: relative;
}

.nav-dropdown-mobile .dropdown-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-dropdown-mobile .dropdown-toggle-mobile::after {
    content: '▼';
    font-size: 0.6rem;
    transition: var(--transition);
    display: inline-block;
    margin-left: auto;
}

.nav-dropdown-mobile.active .dropdown-toggle-mobile::after {
    transform: rotate(180deg);
}

.dropdown-menu-mobile {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(212, 175, 55, 0.05);
}

.nav-dropdown-mobile.active .dropdown-menu-mobile {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
}

.dropdown-menu-mobile li {
    border: none;
}

.dropdown-menu-mobile a {
    display: block;
    padding: 0.8rem 1.5rem 0.8rem 2.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    background: rgba(212, 175, 55, 0.02);
    border-left: 3px solid transparent;
}

.dropdown-menu-mobile a:active {
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
    border-left-color: #d4af37;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* TABLET (768px and up) */
@media (min-width: 768px) {
    .header-container {
        padding: 0.8rem 2rem;
        gap: 1.5rem;
    }

    .header-logo {
        font-size: 1.2rem;
        gap: 0.7rem;
    }

    .header-logo img {
        height: 42px;
    }

    .header-logo-text {
        display: block;
    }

    /* Show desktop navigation */
    .header-nav {
        display: flex;
    }

    .header-nav a {
        padding: 0.8rem 1.5rem;
        font-size: 0.92rem;
    }

    /* Show CTA button */
    .header-cta {
        display: block;
    }

    /* Hide hamburger menu */
    .header-hamburger {
        display: none !important;
    }

    /* Hide mobile menu */
    .header-mobile-menu {
        display: none !important;
    }
}

/* DESKTOP (1024px and up) */
@media (min-width: 1024px) {
    .header-container {
        padding: 0.8rem 3rem;
        max-width: 1400px;
        margin: 0 auto;
        gap: 2rem;
    }

    .header-logo {
        font-size: 1.3rem;
        gap: 0.8rem;
        flex-shrink: 1;
    }

    .header-logo img {
        height: 45px;
    }

    .header-nav {
        gap: 0;
    }

    .header-nav a {
        padding: 0.85rem 1.8rem;
        font-size: 0.95rem;
    }

    .header-cta {
        padding: 0.75rem 2rem;
        font-size: 0.88rem;
    }
}

/* ========================================
   SCROLL EFFECT
   ======================================== */

header.header-scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 12%);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.header-transparent {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}
