/*
 * Entre Ciel et Terre — Méga Menu Boutique
 * Le composant est volontairement désactivé sous 981 px afin de conserver
 * intégralement le menu mobile déjà présent sur le site.
 */

.ectmm-root {
    display: none;
}

@media (min-width: 981px) {
    body.ectmm-open {
        overflow-x: hidden;
    }

    .ectmm-root,
    .ectmm-root * {
        box-sizing: border-box;
    }

    .ectmm-root {
        --ectmm-top: 150px;
        --ectmm-bridge-left: 0px;
        --ectmm-bridge-width: 120px;
        --ectmm-bridge-top: 100px;
        --ectmm-bridge-height: 24px;
        position: fixed;
        inset: 0;
        z-index: 999998;
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease, visibility 180ms ease;
        font-family: 'Roboto', sans-serif;
    }

    .ectmm-root.is-open {
        visibility: visible;
        opacity: 1;
        pointer-events: none;
    }

    .ectmm-backdrop {
        position: absolute;
        z-index: 1;
        pointer-events: auto;
        inset: var(--ectmm-top) 0 0;
        background: rgba(0, 30, 14, 0.24);
        backdrop-filter: blur(2px);
    }


    .ectmm-hover-bridge {
        position: absolute;
        z-index: 4;
        top: var(--ectmm-bridge-top);
        left: var(--ectmm-bridge-left);
        width: var(--ectmm-bridge-width);
        height: var(--ectmm-bridge-height);
        display: block;
        background: transparent;
        pointer-events: auto;
    }

    .ectmm-panel {
        position: absolute;
        z-index: 3;
        pointer-events: auto;
        top: var(--ectmm-top);
        left: 50%;
        width: min(1440px, calc(100vw - 40px));
        max-height: calc(100vh - var(--ectmm-top) - 18px);
        overflow: auto;
        transform: translate(-50%, -10px);
        border: 1px solid rgba(0, 80, 33, 0.12);
        border-radius: 0 0 22px 22px;
        background: #fdfaf0;
        box-shadow: 0 30px 80px rgba(0, 35, 14, 0.24);
        color: #1a1a1a;
        opacity: 0;
        transition: transform 220ms ease, opacity 180ms ease;
        overscroll-behavior: contain;
    }

    .ectmm-root.is-open .ectmm-panel {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    .ectmm-accent {
        height: 3px;
        background: linear-gradient(90deg, #005021, #5d9032, #c3da8b);
    }

    .ectmm-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
        padding: 22px 26px 18px;
        border-bottom: 1px solid rgba(0, 80, 33, 0.10);
        background: rgba(255, 255, 255, 0.55);
    }

    .ectmm-eyebrow,
    .ectmm-group-kicker {
        margin: 0 0 4px;
        color: #5d9032;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.11em;
        text-transform: uppercase;
    }

    .ectmm-header h2,
    .ectmm-group-heading h3,
    .ectmm-card h4 {
        font-family: 'Libre Baskerville', serif;
        color: #005021;
    }

    .ectmm-header h2 {
        margin: 0;
        font-size: 25px;
        line-height: 1.2;
    }

    .ectmm-intro {
        margin: 6px 0 0;
        color: #5f685b;
        font-size: 14px;
    }

    .ectmm-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        min-height: 44px;
    }

    .ectmm-status {
        min-width: 90px;
        margin: 0;
        color: #005021;
        font-size: 13px;
        font-weight: 700;
        text-align: right;
    }

    .ectmm-status.is-error {
        color: #ad3f2f;
    }

    .ectmm-shop-link {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        padding: 0 18px;
        border-radius: 999px;
        background: #005021;
        color: #fff !important;
        font-size: 13px;
        font-weight: 800;
        text-decoration: none !important;
        box-shadow: 0 9px 22px rgba(0, 80, 33, 0.16);
        transition: transform 180ms ease, background 180ms ease;
    }

    .ectmm-shop-link:hover,
    .ectmm-shop-link:focus {
        background: #5d9032;
        color: #fff !important;
        transform: translateY(-1px);
    }

    .ectmm-close {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(0, 80, 33, 0.12);
        border-radius: 50%;
        background: #fff;
        color: #005021;
        cursor: pointer;
        transition: transform 180ms ease, background 180ms ease;
    }

    .ectmm-close:hover,
    .ectmm-close:focus {
        background: #eef5e4;
        transform: rotate(7deg);
    }

    .ectmm-body {
        display: grid;
        grid-template-columns: 235px minmax(0, 1fr);
        min-height: 360px;
    }

    .ectmm-categories {
        padding: 18px 14px;
        border-right: 1px solid rgba(0, 80, 33, 0.10);
        background: linear-gradient(180deg, rgba(238, 245, 228, 0.72), rgba(253, 250, 240, 0.75));
    }

    .ectmm-category {
        width: 100%;
        min-height: 54px;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) 14px;
        align-items: center;
        gap: 10px;
        margin: 0 0 5px;
        padding: 8px 10px;
        border: 0;
        border-radius: 13px;
        background: transparent;
        color: #005021;
        text-align: left;
        cursor: pointer;
        transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
    }

    .ectmm-category:hover,
    .ectmm-category:focus,
    .ectmm-category.is-active {
        background: #fff;
        box-shadow: 0 7px 18px rgba(0, 80, 33, 0.08);
        transform: translateX(2px);
        outline: none;
    }

    .ectmm-category.is-active {
        background: #005021;
        color: #fff;
    }

    .ectmm-category-icon {
        width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(195, 218, 139, 0.42);
        color: #005021;
        font-size: 14px;
    }

    .ectmm-category.is-active .ectmm-category-icon {
        background: rgba(255, 255, 255, 0.16);
        color: #d9ef9d;
    }

    .ectmm-category strong,
    .ectmm-category small {
        display: block;
        color: inherit;
    }

    .ectmm-category strong {
        font-size: 13px;
        line-height: 1.2;
    }

    .ectmm-category small {
        margin-top: 3px;
        font-size: 10px;
        opacity: 0.70;
    }

    .ectmm-category-arrow {
        font-size: 10px;
        opacity: 0.55;
    }

    .ectmm-products-area {
        min-width: 0;
        padding: 20px 22px 22px;
        background: #fdfaf0;
    }

    .ectmm-group[hidden] {
        display: none !important;
    }

    .ectmm-group-heading {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 18px;
        margin-bottom: 15px;
    }

    .ectmm-group-heading h3 {
        margin: 0;
        font-size: 21px;
        line-height: 1.2;
    }

    .ectmm-category-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #005021 !important;
        font-size: 12px;
        font-weight: 800;
        text-decoration: none !important;
        white-space: nowrap;
    }

    .ectmm-category-link:hover,
    .ectmm-category-link:focus {
        color: #5d9032 !important;
    }

    .ectmm-grid {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-auto-rows: 318px;
        align-items: stretch;
        gap: 10px;
    }

    /* Gabarit uniforme : toutes les cartes ont exactement la même hauteur.
       Les cartes sans format récupèrent l'espace via une image plus haute ;
       les cartes avec format disposent d'une zone de contenu suffisante, sans coupe. */
    .ectmm-card {
        min-width: 0;
        width: 100%;
        height: 318px;
        min-height: 318px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid rgba(0, 80, 33, 0.08);
        border-radius: 15px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 5px 16px rgba(0, 80, 33, 0.055);
        transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    }

    .ectmm-card:hover {
        transform: translateY(-3px);
        border-color: rgba(93, 144, 50, 0.38);
        box-shadow: 0 11px 24px rgba(0, 80, 33, 0.10);
    }

    .ectmm-card-image-wrap {
        position: relative;
        overflow: hidden;
        background: #fff;
        transition: flex-basis 180ms ease, height 180ms ease;
    }

    .ectmm-card.has-format .ectmm-card-image-wrap {
        flex: 0 0 140px;
        height: 140px;
    }

    .ectmm-card.no-format .ectmm-card-image-wrap {
        flex: 0 0 202px;
        height: 202px;
    }

    .ectmm-card-image-link {
        width: 100%;
        height: 100%;
        display: block;
    }

    .ectmm-card-image {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
        padding: 10px;
        transition: transform 240ms ease;
    }

    .ectmm-card:hover .ectmm-card-image {
        transform: scale(1.035);
    }

    .ectmm-card .product-badges-inline {
        pointer-events: none;
    }

    .ectmm-card-content {
        min-height: 0;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        padding: 10px 12px 12px;
    }

    .ectmm-card h4 {
        height: 36px;
        min-height: 36px;
        margin: 0 0 6px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: 14px;
        line-height: 1.25;
    }

    .ectmm-card h4 a {
        color: #005021 !important;
        text-decoration: none !important;
    }

    .ectmm-format-label {
        display: block;
        margin-top: 0;
        flex: 0 0 54px;
    }

    .ectmm-format-label > span {
        display: block;
        margin-bottom: 5px;
        color: #52604d;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .ectmm-format-select {
        width: 100%;
        height: 36px;
        padding: 0 30px 0 10px;
        border: 1px solid rgba(93, 144, 50, 0.25);
        border-radius: 10px;
        background-color: #f8fbf3;
        color: #005021;
        font: 700 11px/1 'Roboto', sans-serif;
        cursor: pointer;
        outline: none;
        text-overflow: ellipsis;
    }

    .ectmm-format-select:hover,
    .ectmm-format-select:focus {
        border-color: #5d9032;
        box-shadow: 0 0 0 2px rgba(93, 144, 50, 0.12);
    }

    .ectmm-card-footer {
        height: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: auto;
        padding-top: 0;
    }

    .ectmm-card.no-format .ectmm-card-footer {
        margin-top: auto;
    }

    /* Le format occupe une vraie zone utile, sans créer de réserve vide sur les autres cartes. */
    .ectmm-format-label + .ectmm-card-footer {
        margin-top: 8px;
    }

    .ectmm-price {
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        align-items: baseline;
        flex-wrap: nowrap;
        gap: 3px;
        overflow: hidden;
    }

    .ectmm-price,
    .ectmm-price * {
        color: #5d9032 !important;
        font-size: 15px;
        font-weight: 800;
        line-height: 1.25;
        white-space: nowrap;
    }

    .ectmm-price del,
    .ectmm-price del * {
        font-size: 11px !important;
        opacity: 0.55;
    }


    /* Les unités restent secondaires, mais assez grandes pour être lues d’un coup d’œil. */
    .ectmm-price small,
    .ectmm-price .woocommerce-price-suffix,
    .ectmm-price .price-unit,
    .ectmm-price .product-unit,
    .ectmm-price .cc-unit,
    .ectmm-price [class*="unit"] {
        font-size: 12.5px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        opacity: 0.88;
    }

    .ectmm-add,
    .ectmm-choose {
        width: 38px;
        height: 38px;
        min-width: 38px;
        flex: 0 0 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 13px;
        text-decoration: none !important;
        transition: transform 160ms ease, background 160ms ease, color 160ms ease, opacity 160ms ease;
    }

    .ectmm-add {
        padding: 0;
        border: 0;
        background: #c3da8b;
        color: #005021;
        cursor: pointer;
        box-shadow: 0 5px 12px rgba(0, 80, 33, 0.08);
    }

    .ectmm-add:hover,
    .ectmm-add:focus {
        background: #005021;
        color: #fff;
        transform: translateY(-1px) scale(1.04);
    }

    .ectmm-add.is-loading,
    .ectmm-add:disabled {
        opacity: 0.58;
        pointer-events: none;
    }

    .ectmm-add.is-added {
        background: #5d9032;
        color: #fff;
    }

    .ectmm-choose {
        border: 1px solid rgba(0, 80, 33, 0.20);
        color: #005021 !important;
        background: #f8fbf3;
    }

    .ectmm-choose:hover,
    .ectmm-choose:focus {
        background: #005021;
        color: #fff !important;
        transform: translateY(-1px) scale(1.04);
    }

    /* Le statut global dans l'en-tête suffit : le message interne ne doit jamais
       modifier la hauteur de la carte ni couper son pied. */
    .ectmm-card-message {
        display: none !important;
    }

    .ectmm-card-message.is-error {
        color: #ad3f2f;
    }

    .ectmm-visually-hidden {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .ectmm-empty {
        min-height: 215px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        padding: 28px;
        border: 1px dashed rgba(93, 144, 50, 0.28);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.65);
        color: #52604d;
        text-align: left;
    }

    .ectmm-empty > i {
        color: #5d9032;
        font-size: 25px;
    }

    .ectmm-empty strong {
        display: block;
        margin-bottom: 4px;
        color: #005021;
        font-family: 'Libre Baskerville', serif;
        font-size: 16px;
    }

    .ectmm-empty p {
        max-width: 520px;
        margin: 0;
        color: #687063;
        font-size: 13px;
        line-height: 1.5;
    }

    @media (max-width: 1380px) {
        .ectmm-panel {
            width: calc(100vw - 28px);
        }

        .ectmm-grid {
            grid-template-columns: repeat(5, minmax(0, 1fr));
        }
    }

    @media (max-width: 1180px) {
        .ectmm-body {
            grid-template-columns: 210px minmax(0, 1fr);
        }

        .ectmm-grid {
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
        }

    }
}

@media (max-width: 980px) {
    .ectmm-root,
    .ectmm-panel,
    .ectmm-backdrop,
    .ectmm-hover-bridge {
        display: none !important;
    }
}

/* V1.3.8 — Jusqu’à 12 produits par catégorie.
 * La grille existante conserve 6 colonnes sur les grands écrans :
 * les 12 produits se répartissent donc naturellement sur deux rangées.
 * Le panneau reste défilable lorsque la hauteur disponible est plus faible.
 */

/* V1.3.9 — Uniformisation définitive des fiches et correction des cartes à format. */
@media (min-width: 981px) {
    .ectmm-grid {
        grid-auto-rows: 318px;
        align-items: stretch;
    }

    .ectmm-card {
        height: 318px;
        min-height: 318px;
        max-height: 318px;
    }

    .ectmm-card.has-format .ectmm-card-image-wrap {
        flex: 0 0 140px;
        height: 140px;
    }

    .ectmm-card.no-format .ectmm-card-image-wrap {
        flex: 0 0 202px;
        height: 202px;
    }

    .ectmm-card-content {
        min-height: 0;
        padding: 10px 12px 12px;
    }

    .ectmm-card h4 {
        height: 36px;
        min-height: 36px;
        margin: 0 0 6px;
    }

    .ectmm-format-label {
        flex: 0 0 54px;
        margin: 0;
    }

    .ectmm-format-select {
        height: 36px;
    }

    .ectmm-card-footer,
    .ectmm-card.no-format .ectmm-card-footer {
        height: 40px;
        min-height: 40px;
        margin-top: auto;
        flex: 0 0 40px;
    }

    .ectmm-format-label + .ectmm-card-footer {
        height: 40px;
        min-height: 40px;
        margin-top: 8px;
        flex: 0 0 40px;
    }

    .ectmm-card-message {
        display: none !important;
    }
}

/* ==========================================================
 * V1.4.0 — Méga menu compact + fiches produits simplifiées
 * Objectif : conserver jusqu'à 12 produits sans transformer
 * le menu en page boutique plein écran.
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-panel {
        width: min(1180px, calc(100vw - 56px));
        max-height: calc(100vh - var(--ectmm-top) - 14px);
        border-radius: 0 0 18px 18px;
        box-shadow: 0 24px 60px rgba(0, 35, 14, 0.22);
    }

    .ectmm-accent {
        height: 2px;
    }

    .ectmm-header {
        align-items: center;
        gap: 18px;
        padding: 13px 18px 12px;
    }

    .ectmm-eyebrow {
        margin-bottom: 2px;
        font-size: 9px;
    }

    .ectmm-header h2 {
        font-size: 21px;
        line-height: 1.1;
    }

    .ectmm-intro {
        margin-top: 4px;
        font-size: 12px;
        line-height: 1.35;
    }

    .ectmm-header-actions {
        gap: 9px;
        min-height: 36px;
    }

    .ectmm-status {
        min-width: 0;
        font-size: 11px;
    }

    .ectmm-shop-link {
        min-height: 36px;
        padding: 0 15px;
        font-size: 11.5px;
        gap: 7px;
    }

    .ectmm-close {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .ectmm-body {
        grid-template-columns: 195px minmax(0, 1fr);
        min-height: 0;
    }

    .ectmm-categories {
        padding: 10px 9px;
    }

    .ectmm-category {
        min-height: 42px;
        grid-template-columns: 28px minmax(0, 1fr) 10px;
        gap: 8px;
        margin-bottom: 3px;
        padding: 6px 8px;
        border-radius: 11px;
    }

    .ectmm-category-icon {
        width: 28px;
        height: 28px;
        border-radius: 9px;
        font-size: 12px;
    }

    .ectmm-category strong {
        font-size: 11.5px;
    }

    .ectmm-category small {
        display: none;
    }

    .ectmm-category-arrow {
        font-size: 8px;
    }

    .ectmm-products-area {
        padding: 12px 14px 14px;
    }

    .ectmm-group-heading {
        align-items: center;
        margin-bottom: 9px;
        gap: 12px;
    }

    .ectmm-group-kicker {
        margin-bottom: 2px;
        font-size: 9px;
    }

    .ectmm-group-heading h3 {
        font-size: 18px;
        line-height: 1.1;
    }

    .ectmm-category-link {
        font-size: 10.5px;
        gap: 6px;
    }

    .ectmm-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: 112px;
        gap: 9px;
        align-items: stretch;
    }

    /* Carte horizontale compacte : image à gauche, informations à droite. */
    .ectmm-card,
    .ectmm-card.has-format,
    .ectmm-card.no-format {
        width: 100%;
        height: 112px;
        min-height: 112px;
        max-height: 112px;
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        grid-template-rows: 112px;
        border-radius: 13px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 80, 33, 0.05);
    }

    .ectmm-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0, 80, 33, 0.09);
    }

    .ectmm-card-image-wrap,
    .ectmm-card.has-format .ectmm-card-image-wrap,
    .ectmm-card.no-format .ectmm-card-image-wrap {
        grid-column: 1;
        grid-row: 1;
        width: 76px;
        height: 112px;
        min-height: 112px;
        flex: none;
        border-right: 1px solid rgba(0, 80, 33, 0.06);
        background: #fff;
    }

    .ectmm-card-image {
        padding: 8px;
    }

    .ectmm-card-content {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        min-height: 0;
        height: 112px;
        padding: 8px 9px;
        display: flex;
        flex-direction: column;
    }

    .ectmm-card h4,
    .ectmm-card.has-format h4,
    .ectmm-card.no-format h4 {
        height: 29px;
        min-height: 29px;
        margin: 0 0 3px;
        font-size: 12.5px;
        line-height: 1.18;
        -webkit-line-clamp: 2;
    }

    .ectmm-format-label {
        flex: 0 0 27px;
        height: 27px;
        min-height: 27px;
        margin: 0;
    }

    .ectmm-format-label > span {
        display: none;
    }

    .ectmm-format-select {
        height: 27px;
        min-height: 27px;
        padding: 0 25px 0 8px;
        border-radius: 8px;
        font-size: 10px;
        line-height: 1;
    }

    .ectmm-card-footer,
    .ectmm-card.no-format .ectmm-card-footer,
    .ectmm-format-label + .ectmm-card-footer {
        height: 30px;
        min-height: 30px;
        flex: 0 0 30px;
        margin-top: auto;
        padding-top: 0;
        gap: 5px;
    }

    .ectmm-card.has-format .ectmm-card-footer {
        margin-top: 3px;
    }

    .ectmm-price,
    .ectmm-price * {
        font-size: 13px;
        line-height: 1.1;
    }

    .ectmm-price del,
    .ectmm-price del * {
        font-size: 9px !important;
    }

    .ectmm-price small,
    .ectmm-price .woocommerce-price-suffix,
    .ectmm-price .price-unit,
    .ectmm-price .product-unit,
    .ectmm-price .cc-unit,
    .ectmm-price [class*="unit"] {
        font-size: 10px !important;
        line-height: 1.1 !important;
    }

    .ectmm-add,
    .ectmm-choose {
        width: 29px;
        height: 29px;
        min-width: 29px;
        flex-basis: 29px;
        font-size: 10.5px;
        box-shadow: none;
    }

    .ectmm-empty {
        min-height: 150px;
        padding: 20px;
    }
}

@media (min-width: 981px) and (max-width: 1240px) {
    .ectmm-panel {
        width: calc(100vw - 32px);
    }

    .ectmm-body {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .ectmm-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* ==========================================================
 * V1.4.1 — Header ultra-fin + dernière tuile vers la boutique
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-header {
        min-height: 50px;
        padding: 7px 14px 7px 16px;
        align-items: center;
    }

    .ectmm-header > div:first-child {
        min-width: 0;
        display: flex;
        align-items: center;
    }

    .ectmm-eyebrow,
    .ectmm-intro {
        display: none;
    }

    .ectmm-header h2 {
        margin: 0;
        font-size: 18px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .ectmm-header-actions {
        min-height: 32px;
        gap: 7px;
    }

    .ectmm-shop-link {
        min-height: 32px;
        padding: 0 13px;
        font-size: 10.5px;
    }

    .ectmm-close {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    .ectmm-group-heading {
        justify-content: flex-start;
    }

    .ectmm-shop-card {
        min-width: 0;
        color: #005021 !important;
        text-decoration: none !important;
        border: 1px dashed rgba(93, 144, 50, 0.42);
        background: linear-gradient(135deg, rgba(195, 218, 139, 0.22), rgba(255, 255, 255, 0.96));
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 10px;
        text-align: center;
    }

    .ectmm-shop-card:hover {
        border-color: #5d9032;
        background: linear-gradient(135deg, rgba(195, 218, 139, 0.38), #fff);
    }

    .ectmm-shop-card-icon {
        width: 30px;
        height: 30px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #005021;
        color: #fff !important;
        font-size: 11px;
        transition: transform 180ms ease, background 180ms ease;
    }

    .ectmm-shop-card:hover .ectmm-shop-card-icon {
        transform: translateX(3px);
        background: #5d9032;
    }

    .ectmm-shop-card-label {
        color: #005021 !important;
        font-family: 'Libre Baskerville', serif;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.2;
    }

    .ectmm-shop-card-subtitle {
        color: #5d7d4d !important;
        font-size: 9.5px;
        font-weight: 600;
        line-height: 1.2;
    }
}

/* ==========================================================
 * V1.4.2 — Produits indisponibles dans « Autres produits »
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-card.is-out-of-stock {
        background: rgba(247, 247, 242, 0.98);
        border-color: rgba(0, 80, 33, 0.07);
    }

    .ectmm-card.is-out-of-stock:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 80, 33, 0.05);
    }

    .ectmm-card.is-out-of-stock .ectmm-card-image {
        filter: grayscale(65%);
        opacity: 0.68;
    }

    .ectmm-card.is-out-of-stock h4 a,
    .ectmm-card.is-out-of-stock .ectmm-price,
    .ectmm-card.is-out-of-stock .ectmm-price * {
        color: #7a8175 !important;
    }

    .ectmm-stock-badge {
        position: absolute;
        top: 7px;
        left: 7px;
        z-index: 4;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 4px 7px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(92, 99, 88, 0.18);
        color: #686e64 !important;
        font-size: 8.5px;
        font-weight: 800;
        line-height: 1;
        text-transform: uppercase;
        letter-spacing: 0.035em;
        box-shadow: 0 3px 9px rgba(0, 0, 0, 0.07);
    }
}

/* ==========================================================
 * V1.4.4 — Finitions : header plus parlant, hauteur dynamique,
 * titres homogènes et produits indisponibles propres.
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-panel {
        overflow-x: hidden;
        overflow-y: auto;
    }

    /* Header plus identifiable sans redevenir massif. */
    .ectmm-header {
        min-height: 68px;
        padding: 9px 14px 9px 16px;
        align-items: center;
        gap: 16px;
        background: linear-gradient(100deg, rgba(255, 255, 255, 0.92), rgba(245, 250, 236, 0.86));
    }

    .ectmm-header > div:first-child,
    .ectmm-header-main {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 11px;
    }

    .ectmm-header-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 13px;
        background: linear-gradient(145deg, #005021, #5d9032);
        color: #fff;
        font-size: 15px;
        box-shadow: 0 8px 18px rgba(0, 80, 33, 0.16);
    }

    .ectmm-header-copy {
        min-width: 0;
    }

    .ectmm-eyebrow {
        display: block;
        margin: 0 0 1px;
        color: #5d9032;
        font-size: 8.5px;
        line-height: 1.1;
        letter-spacing: 0.105em;
    }

    .ectmm-header h2 {
        margin: 0;
        font-size: 19px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .ectmm-intro {
        display: block;
        margin: 3px 0 0;
        color: #667061;
        font-size: 10.5px;
        line-height: 1.25;
        white-space: nowrap;
    }

    .ectmm-header-actions {
        min-height: 42px;
        gap: 9px;
    }

    .ectmm-shop-link {
        min-height: 42px;
        padding: 0 18px;
        gap: 8px;
        font-size: 12px;
        box-shadow: 0 10px 24px rgba(0, 80, 33, 0.18);
    }

    .ectmm-shop-link i {
        transition: transform 180ms ease;
    }

    .ectmm-shop-link:hover i,
    .ectmm-shop-link:focus i {
        transform: translateX(3px);
    }

    .ectmm-close {
        width: 38px;
        height: 38px;
        font-size: 12px;
    }

    /* La hauteur suit le rayon actif au lieu de conserver un grand panneau vide. */
    .ectmm-body {
        min-height: 0;
        overflow: hidden;
        align-items: stretch;
        transition: height 240ms ease;
    }

    .ectmm-categories {
        align-self: stretch;
        overflow: hidden;
        padding: 8px 8px 7px;
    }

    .ectmm-category {
        min-height: 38px;
        grid-template-columns: 26px minmax(0, 1fr) 10px;
        gap: 7px;
        margin: 0 0 2px;
        padding: 5px 7px;
        border-radius: 10px;
    }

    .ectmm-category-icon {
        width: 26px;
        height: 26px;
        border-radius: 8px;
        font-size: 11px;
    }

    .ectmm-category strong {
        font-size: 11px;
    }

    .ectmm-products-area {
        align-self: stretch;
        overflow: hidden;
        padding: 12px 14px 14px;
    }

    .ectmm-group {
        min-height: 0;
    }

    /* Deux lignes réelles pour chaque titre, puis ellipse uniquement au-delà. */
    .ectmm-card h4,
    .ectmm-card.has-format h4,
    .ectmm-card.no-format h4 {
        height: 32px;
        min-height: 32px;
        margin: 0 0 2px;
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 12.25px;
        line-height: 1.28;
        overflow-wrap: break-word;
        word-break: normal;
    }

    /* Les badges de la page boutique sont trop larges pour ces cartes compactes. */
    .ectmm-card .product-badges-inline,
    .ectmm-card .ectmm-stock-badge {
        display: none !important;
    }

    .ectmm-stock-state {
        width: fit-content;
        max-width: 100%;
        min-height: 18px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin: 0 0 2px;
        padding: 3px 7px;
        border-radius: 999px;
        background: rgba(107, 114, 102, 0.10);
        border: 1px solid rgba(107, 114, 102, 0.13);
        color: #6d7469 !important;
        font-size: 8.5px;
        font-weight: 800;
        line-height: 1;
        white-space: nowrap;
    }

    .ectmm-stock-state i {
        font-size: 8px;
    }

    .ectmm-card.is-out-of-stock .ectmm-card-content {
        justify-content: flex-start;
    }

    .ectmm-card.is-out-of-stock .ectmm-card-footer {
        margin-top: auto;
    }
}

@media (min-width: 981px) and (max-width: 1160px) {
    .ectmm-intro {
        display: none;
    }

    .ectmm-shop-link {
        padding: 0 14px;
        font-size: 11px;
    }
}


/* ==========================================================
 * V1.4.5 — Header simplifié et plus direct
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-header {
        min-height: 58px;
        padding: 8px 14px 8px 16px;
        gap: 14px;
    }

    .ectmm-header-main {
        gap: 10px;
    }

    .ectmm-header-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 11px;
        font-size: 13px;
        box-shadow: 0 6px 14px rgba(0, 80, 33, 0.14);
    }

    .ectmm-header h2 {
        font-size: 20px;
        line-height: 1.15;
        white-space: nowrap;
    }

    .ectmm-eyebrow,
    .ectmm-intro {
        display: none !important;
    }

    .ectmm-header-actions {
        min-height: 42px;
    }

    .ectmm-shop-link {
        min-height: 42px;
        padding: 0 20px;
        font-size: 12px;
        font-weight: 800;
    }
}

@media (min-width: 981px) and (max-width: 1120px) {
    .ectmm-header h2 {
        font-size: 18px;
    }

    .ectmm-shop-link {
        padding: 0 15px;
        font-size: 11px;
    }
}


/* ==========================================================
 * V1.4.6 — Header épuré et panneau ancré sous « Boutique »
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-root {
        --ectmm-panel-left: 24px;
    }

    /* Le panneau part maintenant du lien Boutique au lieu d'être centré
       arbitrairement dans la fenêtre. */
    .ectmm-panel {
        left: var(--ectmm-panel-left) !important;
        transform: translateY(-8px) !important;
        transform-origin: top left;
    }

    .ectmm-root.is-open .ectmm-panel {
        transform: translateY(0) !important;
    }

    .ectmm-header {
        min-height: 58px;
        align-items: center;
        padding: 8px 16px;
        gap: 18px;
    }

    .ectmm-header-main {
        min-width: 0;
        min-height: 42px;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        padding-left: 2px;
    }

    .ectmm-header-icon {
        display: none !important;
    }

    .ectmm-header-copy {
        min-width: 0;
        display: flex;
        align-items: center;
    }

    .ectmm-header h2 {
        margin: 0;
        font-size: 20px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .ectmm-header-actions {
        flex: 0 0 auto;
        min-height: 42px;
        gap: 0;
    }

    .ectmm-shop-link {
        min-height: 42px;
        padding: 0 21px;
    }

    .ectmm-close {
        display: none !important;
    }
}

@media (min-width: 981px) and (max-width: 1120px) {
    .ectmm-header h2 {
        font-size: 18px;
    }

    .ectmm-shop-link {
        padding: 0 16px;
    }
}

/* ==========================================================
 * V1.4.7 — Centrage vertical optique du titre du header
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-header-main {
        align-self: stretch;
        min-height: 42px;
        justify-content: center;
    }

    .ectmm-header-copy {
        align-self: stretch;
        display: flex;
        align-items: center;
    }

    .ectmm-header h2 {
        display: flex;
        align-items: center;
        min-height: 42px;
        transform: translateY(4px);
    }
}


/* ==========================================================
 * V1.4.8 — Titre à gauche, parfaitement aligné avec le bouton
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-header {
        min-height: 66px;
        align-items: center;
        padding: 10px 18px 10px 24px;
    }

    .ectmm-header-main {
        align-self: auto;
        min-height: 46px;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding-left: 0;
    }

    .ectmm-header-copy {
        align-self: auto;
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .ectmm-header h2 {
        min-height: 0;
        margin: 0;
        display: block;
        line-height: 1.2;
        transform: none;
    }

    .ectmm-header-actions {
        min-height: 46px;
        display: flex;
        align-items: center;
    }

    .ectmm-shop-link {
        min-height: 46px;
    }
}

/* ==========================================================
 * V1.4.9 — Alignement vertical des cartes sans sélecteur
 * Le titre descend légèrement pour équilibrer les marges
 * sans déplacer le prix ni modifier les cartes avec format.
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-card.no-format:not(.is-out-of-stock) .ectmm-card-content {
        padding-top: 18px;
        padding-bottom: 8px;
    }
}

/* ==========================================================
 * V1.5.0 — Cartes et titres de rayon entièrement cliquables
 * ========================================================== */
@media (min-width: 981px) {
    .ectmm-card[data-product-url] {
        cursor: pointer;
    }

    .ectmm-card[data-product-url]:focus-visible {
        outline: 3px solid rgba(93, 144, 50, 0.42);
        outline-offset: 2px;
        border-color: #5d9032;
        box-shadow: 0 12px 26px rgba(0, 80, 33, 0.13);
    }

    /* Les zones réellement interactives conservent leur curseur naturel. */
    .ectmm-card[data-product-url] a,
    .ectmm-card[data-product-url] button,
    .ectmm-card[data-product-url] select,
    .ectmm-card[data-product-url] label {
        cursor: pointer;
    }

    .ectmm-group-title-link {
        display: inline-block;
        color: #005021 !important;
        text-decoration: none !important;
        transition: color 160ms ease, transform 160ms ease;
    }

    .ectmm-group-title-link:hover,
    .ectmm-group-title-link:focus-visible {
        color: #5d9032 !important;
        transform: translateX(2px);
        outline: none;
    }
}
