:root{
  --position-top-mega-menu:165px;
}

/* ===== NAV ===== */
.edm-nav {
    position: relative;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-item {
    padding: 0 1rem;
}
@media(max-width:1200px){
    .nav-item {
        padding: 0 0.5rem;
    }
}

.nav-link {
    color: #fff;
    font-family: "BarlowCondensed";
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 22px;
    position:relative;
}
.nav-item.has-submenu:hover::after {
    position: absolute;
    bottom: 16px;
    right: 50%;
    background-repeat: no-repeat;
    background-image: url(/wp-content/themes/edm/includes/images/mega-menu-black-arrow.svg);
    content: "";
    width: 14px;
    height: 10px;
    transform: translate(50%);
}


.transparent_header.is-transparent .nav-item.has-submenu:hover::after {
    background-image: url(/wp-content/themes/edm/includes/images/mega-menu-white-arrow.svg) !important;
}

.nav-item.has-submenu:hover .nav-arrow {
    transform: rotate(180deg);
}

/* ===== MEGA MENU ===== */
.mega-col.mega-col--content{
    padding-top:7px;
    padding-bottom:20px;
}


.mega-col--content-container{
    display:flex;
    flex-direction:row;
    align-self: flex-start;
}
.mega-menu {
    position: fixed !important;
    margin-top:40px;
    top:var(--position-top-mega-menu);
    background: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 999;
    border-bottom:9px solid #9F796E;
    transform: translate(calc(-50% + 50px),-6px);
}
.nav-item.has-submenu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    /*transform: translateY(0);*/
}

/*
@media(max-width:1260px){
    .mega-col--content-container{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .mega-menu {
        left: 10px;
        right: 10px;
    }
}
*/


@media(min-width:1261px){

    .mega-menu {
        /*width:1240px;
        left:calc((100vw - 1260px) / 2);*/
    }
    .mega-menu-inner {
        max-width: 1240px;
    }
}
.mega-menu-inner {
    display: flex;
    gap: 0;
    padding: 45px 48px;
    margin: 0 auto;
}

/* ===== COLONNES ===== */
@media(min-width:1260px){
    .mega-col--content + .mega-col--content {
        border-left: 1px solid #E1E1E1;
        padding-left: 42px;
        padding-right: 42px;
    }
}

.mega-col:first-child {
    padding-right: 19px !important;
}

.mega-col {
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.mega-col-title {
    color: #000;
    font-family: "BarlowCondensed";
    font-size: 17px;
    font-style: normal;
    font-weight: 700;
    line-height: 17px;
    padding-bottom:20px;
}

.mega-item {
    color: #828282 !important;
    font-family: Barlow;
    font-size: 13px !important;
    font-style: normal;
    font-weight: 500 !important;
    line-height: 17px !important;
}
.mega-item + .mega-cta, .mega-item + .mega-col-title{
    padding-top:25px;
}


.mega-item:hover {
    color: grey;
}

.mega-tag {
    background: #9F796E;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 0 0 5px 0;
    text-transform: uppercase;
    margin-left:3px;
}

.mega-cta {
    color: #9F796E !important;
    font-family: "BarlowCondensed";
    font-size: 14px !important;
    font-style: normal;
    font-weight: 500 !important;
    line-height: 13px !important;
    justify-content: space-between;

}

/* ===== IMAGES ===== */
.mega-col--images {
    flex-direction: row;
    gap: 0.8rem;
    margin-left: auto;
}

.mega-image-card {
    position: relative;
    display: block;
    width: 174px;
    height: 230px;
    border-radius: 30px;
    overflow: hidden;
    text-decoration: none;
    flex-shrink: 0;
}
.mega-image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.mega-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.mega-image-card:hover img {
    transform: scale(1.05);
}

.mega-image-label {
    position: absolute;
    top: 50%;
    transform:translateY(-50%);
    left: 0;
    right: 0;
    color: #FFF;
    text-align: center;
    font-family: "BarlowCondensed";
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: 37px;
    z-index: 99;
}


.wp-block-hf-navigation .black_top_header  .wp-block-habefast-advanced-group-inner {
    gap:37px;
}
.wp-block-hf-navigation .red_top_header  .wp-block-habefast-advanced-group-inner {
    gap:10px;
}
 
.wp-block-hf-navigation .wp-block-habefast-advanced-group-inner,
.wp-block-hf-navigation .wp-block-group{
    display: flex;
    flex-direction: row;
}

.wp-block-hf-navigation .wp-block-buttons,
.wp-block-hf-navigation .wp-block-habefast-advanced-group-inner p ,
.wp-block-hf-navigation .wp-block-habefast-advanced-group-inner .wp-block-group {
    margin-top: 0 !important;
}


.transparent_header .wp-block-group{
    justify-content: space-between;
    margin: 0 !important;
}



.transparent_header > div{
    max-width: min(1200px, calc(100vw - 60px));
    justify-content: space-between;
    min-width: min(1200px, calc(100vw - 60px));
}
.transparent_header{
    display: flex;
    justify-content: center !important;
}

.transparent_header .wp-block-buttons{
    margin-right: 0 !important;
}

@media(max-width:1120px){
    .transparent_header > .wp-block-group > .wp-block-group{
        gap:unset !important;
        max-width: 100%;
        min-width: 100%;
    }
    .transparent_header .wp-block-site-logo{
        margin-left:0 !important;
        margin-top:20px !important;
        margin-bottom:20px !important;
    }
}






.black_top_header .wp-block-habefast-advanced-layout-group{
    justify-content: center;
    max-width: min(1200px, calc(100vw - 60px));
    min-width: min(1200px, calc(100vw - 60px));
}

.black_top_header .wp-block-habefast-advanced-group-inner{
    justify-content: end;
}


/* ===================== MOBILE ONLY ===================== */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}
.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #FCFCFC;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1120;
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-overlay.visible { opacity: 1;z-index:998; }

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #1a1a1a;
    z-index: 1060;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.mobile-drawer.open { transform: translateX(0);z-index:999; }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.drawer-close {
    background: none;
    border: none;
    color: #FCFCFC;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.drawer-close:hover { opacity: 1; }

.drawer-nav {
    padding: 12px 0;
    flex: 1;
}
.drawer-item {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    color: #FCFCFC;
    font-family: "BarlowCondensed";
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.drawer-link:hover { background: rgba(255,255,255,0.05); }

.drawer-chevron {
    font-size: 12px;
    color: #9F796E;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.drawer-item.open .drawer-chevron { transform: rotate(90deg); }

.drawer-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
    background: rgba(0,0,0,0.25);
}
.drawer-item.open .drawer-submenu { max-height: 1000px; }

.drawer-section-title {
    padding: 14px 28px 6px;
    margin: 0;
    color: rgba(255,255,255,0.35);
    font-family: "BarlowCondensed";
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.drawer-sub-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    color: rgba(255,255,255,0.7);
    font-family: Barlow;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s, padding-left 0.15s;
}
.drawer-sub-link:hover {
    color: #FCFCFC;
    padding-left: 34px;
}
.drawer-tag {
    background: #9F796E;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 0 0 4px 0;
    text-transform: uppercase;
}
.drawer-sub-cta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px 16px;
    color: #9F796E;
    font-family: "BarlowCondensed";
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.drawer-sub-cta::after { content: ' →'; }

@media (max-width: 1120px) {
    .edm-nav        { display: none; }
    .hamburger          { display: flex; }
    .mobile-overlay     { display: block; }

    /* Masquer le black top header et les boutons du transparent header */
    .black_top_header   { display: none !important; }
    .transparent_header .wp-block-buttons { display: none !important; }
}

/* Contenu du black header dans le drawer — visible uniquement mobile */
.drawer-topbar {
    display: none;
}
@media (max-width:1120px) {
    .drawer-topbar {
        display: flex;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        padding: 8px 0;
    }
    .drawer-topbar-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 20px;
        color: rgba(255,255,255,0.7);
        font-family: "BarlowCondensed";
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        transition: color 0.15s, background 0.15s;
    }
    .drawer-topbar-link:hover {
        color: #FCFCFC;
        background: rgba(255,255,255,0.05);
    }
    .drawer-topbar-link img {
        width: 16px;
        height: 16px;
        object-fit: contain;
        opacity: 0.6;
        flex-shrink: 0;
    }

    /* Boutons en bas du drawer */
    .drawer-footer {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 20px;
        border-top: 1px solid rgba(255,255,255,0.08);
    }
    .drawer-footer-btn {
        display: block;
        width: 100%;
        padding: 13px;
        text-align: center;
        font-family: "BarlowCondensed";
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 1px;
        border-radius: 4px;
        transition: background 0.2s, color 0.2s;
    }
    .drawer-footer-btn--red {
        background: #9F796E;
        color: #fff;
    }
    .drawer-footer-btn--red:hover { background: #9a1117; }
    .drawer-footer-btn--outline {
        background: transparent;
        color: #FCFCFC;
        border: 1px solid rgba(255,255,255,0.25);
    }
    .drawer-footer-btn--outline:hover { background: rgba(255,255,255,0.07); }
}



.hamburger.open{
    display: none;
}


.mobile-overlay:not(.visible){
    display: none;
}



.transparent_header:not(.is-transparent) #hamburgerBtn span{
    background:black;
}







@media(min-width:1121px){
    .mega-cta{
        flex-wrap: nowrap;
        white-space: normal;
        display: flex;
    }
}



.mega-item span{
    white-space: nowrap;
}
.c-picto-panier img{
    margin-right: 5px !important;
}



.edm-nav .nav-item{
    padding-top: 40px;
    padding-bottom: 40px;
    position: relative;
}

@media (min-width: 1121px) {
  .mega-col .mega-item ~ a .mega-col-title {
    padding-top: 30px;
  }
}


.fleche-menu-picto{
    max-width:20px;
}