/* Serve catalogue guide banners at the resolution needed by each viewport. */
.ee-catalogue-guide__hero[style*="--ee-page-hero-image"] {
    background-image: var(--ee-page-hero-image) !important;
}

@media (max-width: 760px) {
    .ee-catalogue-guide__hero[style*="--ee-page-hero-image"] {
        background-image: var(--ee-page-hero-image-mobile, var(--ee-page-hero-image)) !important;
    }
}

/* Keep quantity controls and their action inside compact catalogue cards. */
@media (min-width: 621px) {
    .ee-product-card__footer {
        min-width: 0;
        flex-wrap: wrap;
    }

    .ee-product-picker--card {
        display: grid;
        min-width: 0;
        flex: 1 1 auto;
        grid-template-columns: minmax(78px, 94px) minmax(0, 1fr);
        gap: 6px;
    }

    .ee-product-picker--card:has(.ee-quantity-stepper) {
        min-width: 160px;
        flex-basis: 160px;
    }

    .ee-front-page .ee-home-catalogue .ee-product-picker--card:has(.ee-quantity-stepper) {
        display: flex;
        min-width: 0;
        flex: 1 1 0;
    }

    .ee-front-page .ee-home-catalogue .ee-product-picker--card .ee-selection-add {
        width: auto;
    }

    .ee-product-picker--card.ee-product-picker--has-variants {
        grid-template-columns: 1fr;
    }

    .ee-product-picker--card .ee-quantity-stepper {
        width: 100%;
        min-width: 0;
        grid-template-columns: 26px minmax(24px, 1fr) 26px;
    }

    .ee-product-picker--card .ee-selection-add {
        width: 100%;
        min-width: 0;
        padding-right: 8px;
        padding-left: 8px;
        white-space: normal;
    }

    .ee-product-picker--card:not(:has(.ee-quantity-stepper)) .ee-selection-add,
    .ee-product-picker--card .ee-product-picker__feedback {
        grid-column: 1 / -1;
    }
}

/* Keep catalogue actions usable in the narrow text column of mobile cards. */
@media (max-width: 620px) {
    .ee-product-card__footer,
    .ee-product-picker--card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .ee-product-picker--card .ee-quantity-stepper {
        width: 100%;
        min-width: 0;
        height: 46px;
        grid-template-columns: minmax(32px, 1fr) minmax(36px, 1fr) minmax(32px, 1fr);
    }

    .ee-product-picker--card .ee-quantity-stepper button,
    .ee-product-picker--card .ee-quantity-stepper input {
        width: 100%;
        min-width: 0;
        height: 44px;
        padding: 0;
    }

    .ee-product-picker--card .ee-selection-add,
    .ee-product-card__configure {
        flex: 0 0 auto;
        width: 100%;
        min-height: 44px;
        padding: 10px 8px;
        overflow-wrap: anywhere;
    }

    .ee-product-card__excerpt p {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    main h1 {
        overflow-wrap: anywhere;
        hyphens: auto;
    }
}

@media (max-width: 360px) {
    body.ee-theme-v2 main h1 {
        font-size: 26px !important;
        line-height: 1.2;
    }
}

.ee-catalogue-jump {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 18px;
    padding: 10px 18px;
    background: #fff;
    color: #123e5d;
    border: 1px solid #fff;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
}

.ee-catalogue-jump:hover,
.ee-catalogue-jump:focus-visible {
    background: #e9f4f2;
    color: #123e5d;
}

.ee-guide-catalogue,
.ee-fort-packs {
    scroll-margin-top: 110px;
}

/* Audit de preproduction : catalogue, conversion mobile et consentement. */
.ee-catalogue-featured {
    margin: 14px 0 54px;
    padding: 32px;
    border: 1px solid #cbdcdf;
    border-top: 5px solid var(--ee-orange);
    border-radius: 6px;
    background: #f3f8f8;
}

.ee-catalogue-featured__heading {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(280px, 1fr);
    align-items: end;
    margin-bottom: 24px;
    gap: 28px;
}

.ee-catalogue-featured__heading h2,
.ee-catalogue-all-heading h2 {
    margin: 0;
    color: var(--ee-navy-dark);
}

.ee-catalogue-featured__heading > p {
    max-width: 590px;
    margin: 0;
    color: var(--ee-muted);
}

.ee-catalogue-featured__eyebrow {
    margin: 0 0 7px;
    color: var(--ee-teal-dark);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.ee-catalogue-featured .ee-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ee-catalogue-featured .ee-product-card__media {
    height: 184px;
}

.ee-catalogue-all-heading {
    margin: 0 0 22px;
}

.ee-product-mobile-action {
    display: none;
}

.ee-selection-toast {
    position: fixed;
    z-index: 9000;
    right: 18px;
    bottom: 18px;
    display: flex;
    max-width: min(420px, calc(100% - 36px));
    align-items: center;
    padding: 14px 16px;
    gap: 16px;
    color: #fff;
    border-left: 5px solid var(--ee-orange);
    border-radius: 5px;
    background: var(--ee-navy-dark);
    box-shadow: 0 12px 34px rgba(5, 31, 50, .28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity .18s ease, transform .18s ease;
}

.ee-selection-toast.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ee-selection-toast a {
    flex: 0 0 auto;
    color: #fff;
    font-weight: 800;
}

.ee-selection-float {
    display: none;
}

.ee-quote-hero__action {
    display: inline-flex;
    margin-top: 20px;
}

#ee-quote-form,
#ee-product-choice {
    scroll-margin-top: 118px;
}

@media (max-width: 760px) {
    .ee-catalogue-featured {
        margin-bottom: 38px;
        padding: 22px 16px;
    }

    .ee-catalogue-featured__heading {
        grid-template-columns: 1fr;
        margin-bottom: 18px;
        gap: 8px;
    }

    .ee-catalogue-featured .ee-product-grid {
        grid-template-columns: 1fr;
    }

    .ee-catalogue-featured .ee-product-card__media {
        width: 118px;
        height: 100%;
        min-height: 194px;
    }

    .single-ee_product .ee-product-page {
        padding-bottom: 80px;
    }

    .single-ee_product .ee-product-hero__media {
        min-height: 220px;
        aspect-ratio: 16 / 10;
    }

    .ee-product-mobile-action {
        position: fixed;
        z-index: 8500;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 10px;
        display: flex;
        min-height: 58px;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px;
        gap: 14px;
        color: #fff;
        border: 1px solid #072941;
        border-radius: 5px;
        background: var(--ee-navy-dark);
        box-shadow: 0 8px 28px rgba(5, 31, 50, .26);
        text-decoration: none;
    }

    .ee-product-mobile-action span {
        color: #cce1e0;
        font-size: 14px;
        font-weight: 750;
    }

    .ee-product-mobile-action strong {
        color: #fff;
        text-align: right;
    }

    .ee-selection-float {
        position: fixed;
        z-index: 8400;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        display: flex;
        max-width: calc(100vw - 20px);
        min-height: 48px;
        align-items: center;
        padding: 9px 11px 9px 14px;
        gap: 10px;
        color: #fff;
        border: 1px solid #0e504d;
        border-radius: 5px;
        background: #176763;
        box-shadow: 0 7px 24px rgba(5, 31, 50, .22);
        font-size: 14px;
        font-weight: 800;
        text-decoration: none;
        touch-action: manipulation;
    }

    .single-ee_product .ee-selection-float {
        bottom: calc(max(10px, env(safe-area-inset-bottom)) + 76px);
    }

    .ee-selection-float:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 2px;
    }

    .ee-selection-float[hidden] {
        display: none;
    }

    .ee-selection-float strong {
        display: grid;
        min-width: 28px;
        height: 28px;
        place-items: center;
        border-radius: 50%;
        color: var(--ee-navy-dark);
        background: #fff;
    }

    .ee-selection-toast {
        right: 10px;
        bottom: calc(max(10px, env(safe-area-inset-bottom)) + 60px);
        left: 10px;
        max-width: none;
    }

    .single-ee_product .ee-selection-toast {
        bottom: calc(max(10px, env(safe-area-inset-bottom)) + 128px);
    }

    #ee-audience-consent.ee-audience-consent {
        right: 8px;
        bottom: 8px;
        left: 8px;
        padding: 12px;
        gap: 9px;
    }

    #ee-audience-consent .ee-audience-consent__copy h2 {
        margin: 0 0 4px;
        font-size: 16px;
    }

    #ee-audience-consent .ee-audience-consent__copy p {
        margin: 0;
        font-size: 12px;
        line-height: 1.4;
    }

    #ee-audience-consent .ee-audience-consent__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    #ee-audience-consent .ee-audience-consent__actions button {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .ee-quote-page.is-selection-empty .ee-quote-sidebar .ee-quote-selection {
        order: 0;
    }
}
