/*
 * Mega-menu Sneakers KNICS
 *
 * Le module IQIT continue de gerer l'ouverture du menu et les autres onglets.
 * Cette feuille ne cible que le panneau desktop de l'onglet Sneakers enrichi
 * par assets/js/knics-megamenu.js.
 */

@keyframes knicsMenuIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 992px) {
    body.knics-sneakers-menu-open {
        overflow-x: hidden;
    }

    .knics-menu-backdrop {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 95;
        display: block;
        background: rgba(9, 9, 9, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .knics-menu-backdrop.is-visible {
        opacity: 1;
    }

    #desktop-header .knics-sneakers-tab > a::after {
        position: absolute;
        right: 0;
        bottom: -13px;
        left: 0;
        height: 3px;
        background: #05ca51;
        content: "";
        opacity: 0;
        transform: scaleX(0.35);
        transition: opacity 160ms ease, transform 160ms ease;
    }

    #desktop-header .knics-sneakers-tab.cbp-hropen > a::after,
    #desktop-header .knics-sneakers-tab > a:focus-visible::after {
        opacity: 1;
        transform: scaleX(1);
    }

    #desktop-header .knics-sneakers-tab.cbp-hropen .cbp-submenu-aindicator {
        color: #05ca51;
        transform: rotate(180deg);
    }

    #desktop-header .knics-sneakers-tab .cbp-submenu-aindicator {
        transition: color 160ms ease, transform 160ms ease;
    }

    #desktop-header .knics-sneakers-tab > .cbp-hrsub {
        right: auto !important;
        left: calc(-1 * var(--knics-menu-offset, 0px)) !important;
        width: 100vw !important;
        max-width: none !important;
    }

    #desktop-header .knics-sneakers-tab > .cbp-hrsub > .cbp-hrsub-inner {
        width: 100%;
        max-width: none;
        padding: 0 !important;
        border: 0;
        border-bottom: 4px solid #05ca51;
        background: #fff;
        box-shadow: 0 32px 64px -20px rgba(9, 9, 9, 0.35);
    }

    #desktop-header .knics-sneakers-tab > .cbp-hrsub.cbp-show > .cbp-hrsub-inner {
        animation: knicsMenuIn 180ms ease-out both;
    }

    #desktop-header .knics-sneakers-menu-host {
        width: 100%;
        max-width: none !important;
        margin: 0;
        padding: 0 !important;
    }

    #desktop-header .knics-sneakers-menu {
        display: grid;
        grid-template-columns: 214px minmax(0, 1fr);
        gap: 48px;
        box-sizing: border-box;
        width: 100%;
        min-height: 338px;
        padding: 38px 62px;
        color: #090909;
        font-family: var(--knics-font-text, "Inter Tight", "Helvetica Neue", Arial, sans-serif);
        text-align: left;
    }

    #desktop-header .knics-sneakers-menu *,
    #desktop-header .knics-sneakers-menu *::before,
    #desktop-header .knics-sneakers-menu *::after {
        box-sizing: border-box;
    }

    #desktop-header .knics-menu-eyebrow {
        display: block;
        margin: 0 0 12px;
        color: #9a9a96;
        font-size: 11px;
        font-weight: 800;
        line-height: 1.2;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    #desktop-header .knics-menu-explore-list {
        margin: 0;
        padding: 0;
        border-top: 1px solid #e6e6e2;
        list-style: none;
    }

    #desktop-header .knics-menu-explore-list li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid #e6e6e2;
    }

    #desktop-header .knics-menu-explore-list a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 42px;
        padding: 12px 0;
        color: #090909;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
        transition: color 150ms ease, padding 150ms ease;
    }

    #desktop-header .knics-menu-explore-list a::before {
        display: none;
    }

    #desktop-header .knics-menu-explore-list a:hover,
    #desktop-header .knics-menu-explore-list a:focus-visible,
    #desktop-header .knics-menu-explore-list a:hover span,
    #desktop-header .knics-menu-explore-list a:focus-visible span {
        padding-left: 6px;
        color: #05ca51 !important;
        outline: none;
    }

    #desktop-header .knics-menu-explore-list a:hover span,
    #desktop-header .knics-menu-explore-list a:focus-visible span {
        padding-left: 0;
    }

    #desktop-header .knics-menu-arrow {
        position: relative;
        display: inline-block;
        flex: 0 0 19px;
        width: 19px;
        height: 12px;
        font-size: 0;
        line-height: 0;
        vertical-align: middle;
    }

    #desktop-header .knics-menu-arrow::before {
        position: absolute;
        top: 50%;
        left: 0;
        width: 18px;
        height: 2px;
        background: currentColor;
        content: "";
        transform: translateY(-50%);
    }

    #desktop-header .knics-menu-arrow::after {
        position: absolute;
        top: 50%;
        right: 1px;
        width: 8px;
        height: 8px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        content: "";
        transform: translateY(-50%) rotate(45deg);
    }

    #desktop-header .knics-menu-budget {
        margin-top: 26px;
    }

    #desktop-header .knics-menu-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
    }

    #desktop-header .knics-menu-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 33px;
        padding: 0 13px;
        border: 1px solid #d8d8d4;
        border-radius: 999px;
        color: #090909;
        background: #fff;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
        transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
    }

    #desktop-header .knics-menu-chip:hover,
    #desktop-header .knics-menu-chip:focus-visible {
        border-color: #05ca51 !important;
        color: #08210f !important;
        background: #05ca51 !important;
        outline: none;
    }

    #desktop-header .knics-menu-models {
        min-width: 0;
    }

    #desktop-header .knics-menu-models-head,
    #desktop-header .knics-menu-brands {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
    }

    #desktop-header .knics-menu-models-head {
        align-items: flex-start;
    }

    #desktop-header .knics-menu-models-head .knics-menu-eyebrow,
    #desktop-header .knics-menu-brands .knics-menu-eyebrow {
        margin: 0;
    }

    #desktop-header .knics-menu-all-link {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        color: #090909;
        font-size: 12px;
        font-weight: 750;
        letter-spacing: 0.06em;
        text-decoration: none;
        text-transform: uppercase;
        white-space: nowrap;
    }

    #desktop-header .knics-menu-all-link:hover,
    #desktop-header .knics-menu-all-link:focus-visible,
    #desktop-header .knics-menu-all-link:hover span,
    #desktop-header .knics-menu-all-link:focus-visible span {
        color: #05ca51 !important;
        outline: none;
    }

    #desktop-header .knics-menu-products {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
        margin-top: 20px;
    }

    #desktop-header .knics-menu-product {
        --knics-model-y: 0px;
        min-width: 0;
        color: #090909;
        text-decoration: none;
    }

    #desktop-header .knics-menu-product:nth-child(3) {
        --knics-model-y: 10.4px;
    }

    #desktop-header .knics-menu-product:nth-child(4) {
        --knics-model-y: 4.6px;
    }

    #desktop-header .knics-menu-product:hover,
    #desktop-header .knics-menu-product:focus-visible {
        color: #090909;
        outline: none;
    }

    #desktop-header .knics-menu-product-image {
        position: relative;
        display: block;
        overflow: hidden;
        width: 100%;
        height: 138px;
        margin-bottom: 10px;
        background: #ededed;
    }

    #desktop-header .knics-menu-product img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        transform: translateY(var(--knics-model-y));
        transition: transform 260ms cubic-bezier(.2, .7, .2, 1);
    }

    #desktop-header .knics-menu-product:hover img,
    #desktop-header .knics-menu-product:focus-visible img {
        transform: translateY(var(--knics-model-y)) scale(1.035);
    }

    #desktop-header .knics-menu-product-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #desktop-header .knics-menu-product-name {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.25;
        transition: color 150ms ease;
    }

    #desktop-header .knics-menu-product:hover .knics-menu-product-name,
    #desktop-header .knics-menu-product:focus-visible .knics-menu-product-name {
        color: #05ca51 !important;
    }

    #desktop-header .knics-menu-brands {
        margin-top: 42px;
        padding-top: 18px;
        border-top: 1px solid #e6e6e2;
    }

    #desktop-header .knics-menu-brand-list {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 24px;
        min-width: 0;
        margin-right: auto;
        margin-left: 8px;
    }

    #desktop-header .knics-menu-brand-list a {
        color: #090909;
        font-size: clamp(15px, 1.25vw, 20px);
        font-weight: 800;
        line-height: 1;
        letter-spacing: -0.03em;
        text-decoration: none;
        text-transform: uppercase;
        white-space: nowrap;
    }

    #desktop-header .knics-menu-brand-list a:hover,
    #desktop-header .knics-menu-brand-list a:focus-visible {
        color: #05ca51 !important;
        outline: none;
    }

    #desktop-header .knics-menu-promo {
        position: relative;
        display: block;
        overflow: hidden;
        min-height: 262px;
        color: #fff;
        background: #242424;
        text-decoration: none;
        isolation: isolate;
    }

    #desktop-header .knics-menu-promo::after {
        position: absolute;
        inset: 0;
        z-index: -1;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 28%, rgba(0, 0, 0, 0.78) 100%);
        content: "";
    }

    #desktop-header .knics-menu-promo img {
        position: absolute;
        inset: 0;
        z-index: -2;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 320ms cubic-bezier(.2, .7, .2, 1);
    }

    #desktop-header .knics-menu-promo:hover img,
    #desktop-header .knics-menu-promo:focus-visible img {
        transform: scale(1.025);
    }

    #desktop-header .knics-menu-promo-badge {
        position: absolute;
        top: 14px;
        left: 14px;
        padding: 7px 10px 6px;
        color: #090909;
        background: #05ca51;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    #desktop-header .knics-menu-promo-copy {
        position: absolute;
        right: 15px;
        bottom: 17px;
        left: 15px;
    }

    #desktop-header .knics-menu-promo-title {
        display: block;
        max-width: 190px;
        color: #fff !important;
        font-family: var(--knics-font-display, "Arial Black", Impact, sans-serif);
        font-size: 24px;
        font-weight: 900;
        line-height: 0.94;
        letter-spacing: -0.045em;
        text-transform: uppercase;
    }

    #desktop-header .knics-menu-promo-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 13px;
        color: rgba(255, 255, 255, 0.88);
        font-size: 11px;
        font-weight: 500;
    }

    #desktop-header .knics-menu-promo-button {
        position: relative;
        display: block;
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        color: #090909 !important;
        background: #05ca51;
        font-size: 0;
        line-height: 0;
    }

    #desktop-header .knics-menu-promo-button::before {
        position: absolute;
        top: 7px;
        right: 7px;
        width: 13px;
        height: 13px;
        border-top: 3px solid currentColor;
        border-right: 3px solid currentColor;
        content: "";
    }

    #desktop-header .knics-menu-promo-button::after {
        position: absolute;
        top: 16px;
        left: 7px;
        width: 21px;
        height: 3px;
        background: currentColor;
        content: "";
        transform: rotate(-45deg);
        transform-origin: center;
    }
}

@media (min-width: 992px) and (max-width: 1240px) {
    #desktop-header .knics-sneakers-menu {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    #desktop-header .knics-menu-promo {
        display: none;
    }

    #desktop-header .knics-menu-product-name {
        font-size: 12px;
    }

    #desktop-header .knics-menu-brand-list {
        gap: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #desktop-header .knics-sneakers-menu *,
    .knics-menu-backdrop {
        transition: none !important;
    }
}
