/* Header — BEM: .studio-header, .header--transparent | Breakpoints: 1024, 768 */
.studio-header a,
.main-navigation a {
    color: inherit;
    text-decoration: none;
    box-shadow: none;
}

.mobile-menu-overlay a {
    text-decoration: none;
    box-shadow: none;
}

body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none;
}

.studio-header.header--transparent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    width: 100%;
    height: var(--header-height-mobile);
    background: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
}

.studio-header.header--transparent.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    border-bottom-color: var(--carbon-100);
    box-shadow: var(--shadow-header);
}

body.no-scroll .studio-header.header--transparent {
    z-index: var(--z-hamburger);
}

/* Container */
.studio-header .header-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 32px;
    gap: 24px;
    position: relative;
}

.studio-header .logo-section {
    justify-self: start;
}

.studio-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
    transition: opacity var(--transition-normal);
}

.studio-header .logo:hover {
    opacity: 0.8;
}

.studio-header .logo img {
    height: 48px;
    width: auto;
}

.studio-header .main-navigation {
    justify-self: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.studio-header .nav {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.studio-header .nav__link,
.dropdown-link {
    position: relative;
    display: flex;
    align-items: center;
    font-weight: 500;
    text-decoration: none;
}

.studio-header .nav__link {
    padding: 0.75rem 12px;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--white);
    opacity: 0.85;
    white-space: nowrap;
    transition: color 0.4s ease, text-shadow 0.4s ease, opacity 0.4s ease;
}

.studio-header .nav__link:hover {
    color: var(--white);
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.studio-header .nav__link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.studio-header .header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.studio-header .cta-btn--header {
    padding: var(--spacing-sm) var(--spacing-lg);
}

.studio-header .mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    z-index: var(--z-hamburger);
    width: 48px;
    height: 48px;
    padding: 14px 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}


.mobile-menu-toggle .hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--white);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.studio-header .mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.dropdown {
    position: relative;
}

.dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    opacity: var(--opacity-badge-default);
    transition: transform 0.3s var(--ease-out-expo), opacity var(--transition-normal);
}

.dropdown-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: currentColor;
}

.dropdown:hover .dropdown-icon,
.dropdown:focus-within .dropdown-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: -10px;
    z-index: var(--z-header);
    transform-origin: top left;
    min-width: 260px;
    padding: var(--spacing-sm);
    padding-top: 8px;
    margin: 0;
    margin-top: -4px;
    list-style: none;
    background: rgba(15, 15, 15, 1);
    backdrop-filter: var(--blur-xl);
    border: 1px solid var(--color-white-08);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), var(--shadow-overlay);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transition: opacity var(--transition-normal), visibility var(--transition-normal), transform 0.3s var(--ease-out-expo);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 24px;
    z-index: -1;
    width: 12px;
    height: 12px;
    background: rgba(15, 15, 15, 0.95);
    border-top: 1px solid var(--color-white-08);
    border-left: 1px solid var(--color-white-08);
    transform: rotate(45deg);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-link {
    padding-top: 12px;
    padding-right: var(--spacing-md);
    padding-bottom: 12px;
    padding-left: var(--spacing-md);
    font-size: 1rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--gray-400);
    border-radius: var(--border-radius);
    text-shadow: none;
    transition: 
        background-color 0.35s ease,
        color 0.35s ease,
        padding-left 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dropdown-link:hover,
.dropdown-link:focus-visible {
    background: var(--color-white-02);
    color: var(--white);
    text-shadow: none;
}

.dropdown-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.dropdown-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: transform 0.3s var(--ease-out-expo), opacity 0.3s ease;
}

.dropdown-link:hover::after {
    transform: translateY(-50%) scaleY(1);
    opacity: 1;
}

/* ----------------------------------------
   MENU MOBILE OVERLAY (CLEAN REBUILD)
   ---------------------------------------- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-mobile-menu);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #050505;
    opacity: 0;
    visibility: hidden;
    /* Fermé : ne pas intercepter les clics (overlay couvre tout le viewport en fixed). */
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s;
    overflow: hidden;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 80%);
    opacity: 0.8;
    z-index: -1;
    pointer-events: none;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu-inner {
    width: 100%;
    max-width: 500px;
    padding: 0 24px;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-ul, 
.mobile-nav-ul ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Styles des liens parents (Niveau 1) */
.mobile-nav-ul > li {
    text-align: center;
    margin-bottom: 0;
    border: none;
}

.mobile-nav-ul > li > a {
    display: block;
    font-family: var(--font-display, serif);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 300;
    color: var(--white);
    text-decoration: none;
    padding: 24px 0;
    transition: color 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    position: relative;
}

/* Accessibilité clavier : focus visible pour navigation mobile au clavier */
.mobile-nav-ul > li > a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.mobile-nav-ul > li > a:hover {
    color: var(--white);
    opacity: 0.8;
}

.mobile-nav-ul .menu-item-has-children > a {
    display: block;
}

.mobile-nav-ul .menu-item-has-children > a::before,
.mobile-nav-ul .menu-item-has-children > a::after {
    content: none;
    display: none;
}

/* ----------------------------------------
   SOUS-MENUS (ACCORDÉON)
   ---------------------------------------- */
.mobile-nav-ul .sub-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    background: transparent;
}

.mobile-nav-ul .menu-item-has-children.submenu-open .sub-menu {
    max-height: 500px;
    opacity: 1;
    padding-bottom: 24px;
}

.mobile-nav-ul .sub-menu li {
    text-align: center;
}

.mobile-nav-ul .sub-menu a {
    display: block;
    font-family: var(--font-primary, sans-serif);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav-ul .sub-menu a:hover {
    color: var(--white);
}

.mobile-nav-ul .sub-menu a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.mobile-nav-ul .dropdown-icon {
    display: none;
}

.cta-btn--floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-sticky);
    display: none;
    text-decoration: none;
    color: var(--white);
    padding: 0;
    width: 56px;
    height: 56px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    gap: 0;
    line-height: 1;
}

.cta-btn--floating .cta-btn__content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: inherit;
    padding: 0;
    overflow: visible;
    box-shadow: none;
    transition: none;
}

.cta-btn--floating .cta-btn__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.cta-btn--floating .cta-btn__icon svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.cta-btn--floating .cta-btn__text {
    display: none; 
}

.cta-btn--floating .cta-btn__content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.cta-btn--floating:hover .cta-btn__content::before {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 1024px) {
    .studio-header .main-navigation,
    .studio-header .cta-btn--header {
        display: none;
    }

    .studio-header .mobile-menu-toggle {
        display: flex;
    }

    .cta-btn--floating {
        display: block;
    }
}
