/**
 * Ressource Facettes — Frontend layout (structurel, non dynamique)
 * Scope : body.tax-product_cat .rsrc-fct-wrap
 *
 * Les règles DYNAMIQUES (pastilles hex par slug) sont injectées inline via
 * Rsrc_Facettes_Css_Generator sur wp_head.
 */

/* H1 titre de la catégorie (Larken via --typotitre, fallback serif) */
body.tax-product_cat .rsrc-fct-h1 {
    color: #000;
    font-family: var(--typotitre, "Larken", "Awesome Serif", "ACaslonPro", serif);
    font-size: 60px;
    font-style: normal;
    font-weight: 100;
    line-height: 52px;
    letter-spacing: normal;
    margin: 40px 0;
    padding: 0;
    text-edge: cap;
    leading-trim: both;
}

body.tax-product_cat .rsrc-fct-category-header {
    margin: 0;
}

body.tax-product_cat .rsrc-fct-wrap {
    margin: 3.75rem 0 20px;
    font-family: inherit;
    color: #000;
}

/* Sur sous-catégories activées : masquer le cat-header WPBakery (contenu éditorial
   redondant avec les facettes) */
body.has-rsrc-facettes-subcat .row.cat-header {
    display: none !important;
}

/* Header "Filtre | Effacer les filtres" */
body.tax-product_cat .rsrc-fct-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 14px;
    border-bottom: 1px solid #000;
    margin-bottom: 18px;
}

body.tax-product_cat .rsrc-fct-header__title {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: #101010;
}

/* "Effacer les filtres" : rendu dans .rsrc-fct-body, positionné en absolute
   top-right → s'aligne avec la rangée des titres de filtres (1ʳᵉ ligne du
   body), sous la ligne du header. */
body.tax-product_cat .rsrc-fct-header__reset {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    font-size: 14px;
    color: #101010;
    text-decoration: none;
    transition: opacity 0.15s;
}

body.tax-product_cat .rsrc-fct-header__reset:hover {
    text-decoration: underline;
    color: #101010;
}

/* Bouton collapse du module filtre entier (chevron à droite de "Effacer les filtres") */
body.tax-product_cat .rsrc-fct-header__toggle {
    background: none;
    border: 0;
    padding: 0 0 0 14px;
    margin: 0;
    cursor: pointer;
    color: #101010;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

body.tax-product_cat .rsrc-fct-header__toggle .rsrc-fct-chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 1.5px solid #101010;
    border-bottom: 1.5px solid #101010;
    transform: rotate(-135deg);
    transition: transform 0.2s;
    margin-top: 4px;
}

body.tax-product_cat .rsrc-fct-wrap.rsrc-fct-collapsed .rsrc-fct-header__toggle .rsrc-fct-chevron {
    transform: rotate(45deg);
    margin-top: -4px;
}

body.tax-product_cat .rsrc-fct-wrap.rsrc-fct-collapsed .rsrc-fct-body {
    display: none;
}

/* Contexte de positionnement pour le bouton "Effacer les filtres" (absolute) */
body.tax-product_cat .rsrc-fct-wrap .rsrc-fct-body {
    position: relative;
}

/* "Filtres actifs" YITH masqués partout — le nombre de filtres actifs est
   indiqué par le "(N)" injecté en JS après le titre de chaque filtre. */
.yith-wcan-active-filters {
    display: none !important;
}

/* Masquer le wrapping inutile de YITH */
body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filters {
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
}

body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filters .filters-container {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 0 32px;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

/* display:contents : chaque .yith-wcan-filter disparaît du layout,
   ses enfants (.filter-title + .filter-content) deviennent enfants directs du form.
   → permet de grouper tous les titres sur une ligne (order:1) et
     d'afficher le contenu ouvert sur une ligne en-dessous (order:2). */
body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter {
    display: contents;
}

body.tax-product_cat .rsrc-fct-wrap .filter-title {
    order: 1;
}

body.tax-product_cat .rsrc-fct-wrap .filter-content {
    order: 2;
    flex-basis: 100%;
    width: 100%;
}

/* Titre du filtre = bouton accordion */
body.tax-product_cat .rsrc-fct-wrap .filter-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--typosans, sans-serif) !important;
    font-size: 14px;
    font-weight: 400;
    color: #101010;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
    margin: 0;
    border: 0;
    background: transparent;
    letter-spacing: 0.01em;
}

/* Chevron généré en CSS */
body.tax-product_cat .rsrc-fct-wrap .filter-title::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #101010;
    border-bottom: 1.5px solid #101010;
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-left: 4px;
    margin-top: -2px;
}

body.tax-product_cat .rsrc-fct-wrap .rsrc-fct-open .filter-title::after {
    transform: rotate(-135deg);
    margin-top: 2px;
}

/* Contenu du filtre : affiché uniquement si ouvert */
body.tax-product_cat .rsrc-fct-wrap .filter-content {
    display: none;
    flex-basis: 100%;
    width: 100%;
    padding: 14px 0 0;
}

body.tax-product_cat .rsrc-fct-wrap .rsrc-fct-open .filter-content {
    display: block;
}

body.tax-product_cat .rsrc-fct-wrap .filter-content fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

body.tax-product_cat .rsrc-fct-wrap .filter-content legend {
    position: absolute;
    clip: rect(0 0 0 0);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Liste des termes : horizontale flex wrap */
body.tax-product_cat .rsrc-fct-wrap .filter-content ul,
body.tax-product_cat .rsrc-fct-wrap .filter-content ol {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

body.tax-product_cat .rsrc-fct-wrap .filter-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.tax-product_cat .rsrc-fct-wrap .filter-item label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 0;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #101010;
}

/* PILLS — Couleurs + Destination (design `checkbox`, classe .filter-item.checkbox).
   Chaque terme devient un bouton arrondi bordé. Le <input> reste dans le DOM
   (sélection native) mais masqué visuellement. Fond beige #DEDCD2 si .active. */
body.tax-product_cat .rsrc-fct-wrap .filter-item.checkbox {
    display: inline-flex;
    align-items: center;
    border: 1px solid #DEDCD2;
    border-radius: 999px;
    padding: 8px 12px;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
}

body.tax-product_cat .rsrc-fct-wrap .filter-item.checkbox:hover {
    background: #F5F3EE;
}

body.tax-product_cat .rsrc-fct-wrap .filter-item.checkbox.active {
    background: #DEDCD2;
    border-color: #DEDCD2;
}

/* État INACTIF : terme indisponible dans la combinaison de filtres courante
   (0 produit). YITH ajoute la classe .disabled sur le .filter-item quand le
   count intersecté tombe à 0 en mode adoptive=or (cf. plugin YITH
   class-yith-wcan-filter-tax.php L172). La pill est estompée et non cliquable. */
body.tax-product_cat .rsrc-fct-wrap .filter-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}
body.tax-product_cat .rsrc-fct-wrap .filter-item.checkbox.disabled:hover {
    background: #fff;
}
/* Termes inactifs renvoyés en fin de liste (Couleurs + Destination, design
   checkbox) : le conteneur d'items est un flex → order:1 place les pills
   indisponibles après les disponibles (order:0 par défaut). Desktop + mobile. */
body.tax-product_cat .rsrc-fct-wrap .filter-item.checkbox.disabled {
    order: 1;
}

/* Design pills : la case à cocher / le radio natif est masqué pour TOUS les
   filtres checkbox (Couleurs + Destination). C'est la pill + son fond beige
   .active qui indiquent la sélection. L'input reste dans le DOM (sélection
   native, accessibilité) mais hors-écran. */
body.tax-product_cat .rsrc-fct-wrap .filter-item input[type="checkbox"],
body.tax-product_cat .rsrc-fct-wrap .filter-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}

/* Label du terme : texte UPPERCASE, l'état sélectionné est porté par le fond
   beige de la pill (plus de soulignement). */
body.tax-product_cat .rsrc-fct-wrap .filter-item .term-label {
    font-size: 12px;
    font-weight: 500;
    color: #101010;
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
}

/* Compteur "(N)" affiché par YITH après le label : couleur harmonisée
   + espace insécable avant les parenthèses pour ne pas couper la ligne. */
body.tax-product_cat .rsrc-fct-wrap .filter-item .term-label small.item-count {
    color: #101010;
    font-size: inherit;
    white-space: nowrap;
}
body.tax-product_cat .rsrc-fct-wrap .filter-item .term-label small.item-count::before {
    content: "\202F";
}

/* "(N)" injecté en JS après chaque titre de filtre = nombre de termes actifs
   + espace insécable avant les parenthèses. */
body.tax-product_cat .rsrc-fct-wrap .filter-title .rsrc-fct-active-count {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    white-space: nowrap;
}
body.tax-product_cat .rsrc-fct-wrap .filter-title .rsrc-fct-active-count::before {
    content: "\202F";
}

/* Masquer le "Trier par" WC sur les catégories avec facettes (le tri se fait
   via les filtres facettes). Le compteur de résultats reste visible. */
.woocommerce .woocommerce-ordering.collection-filter {
    display: none !important;
}

/* Compteur de résultats : le thème le positionne en absolute hors-écran
   (cf. woocommerce.css L2837) et le rend visible via la classe `.collection-filter`
   ajoutée par un JS legacy qui cible `.yit-wcan-container`. Ce conteneur
   n'existe plus avec le nouveau module facettes → on force le compteur
   visible sur toutes les pages `body.has-rsrc-facettes`.
   Note : le compteur est dans `.nectar-shop-header` (pas un wrapper `.woocommerce`),
   donc on scope uniquement via body.has-rsrc-facettes. */
body.has-rsrc-facettes .woocommerce-result-count {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    right: auto !important;
    left: 0 !important;
    margin: 0 0 12px !important;
    color: #000 !important;
    font-size: 14px !important;
    line-height: 1 !important;
}

/* Supprimer la ligne noire générée par le thème en :before de la grille produits
   (cf. style.css L3166 : background:#000;height:1px) — pas nécessaire avec le
   module facettes qui fournit déjà son propre séparateur visuel. */
.woocommerce ul.products[data-product-style=material]:before,
.woocommerce-page ul.products[data-product-style=material]:before {
    display: none !important;
}

/* Override de l'accent color YITH (#A7144C du thème) sur hover/active :
   on force #101010 pour rester neutre sur tous les filtres */
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item:hover,
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.active,
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.chosen,
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item:hover a,
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.active a,
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.chosen a,
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item:hover .term-label,
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.active .term-label,
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.chosen .term-label {
    color: #101010 !important;
}

/* Collections (vignettes images) — taxonomie pa_collection-*, design YITH `label`.
   PILLS horizontales : vignette circulaire + label UPPERCASE à côté, dans un
   bouton arrondi bordé. Fond beige #DEDCD2 si .active (override du noir YITH
   labels_style.background_active via !important + 5 niveaux de spécificité). */
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.label {
    box-shadow: none !important;
    background: #fff !important;
    border: 1px solid #DEDCD2 !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    display: inline-flex;
    transition: background 0.15s, border-color 0.15s;
}

.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.label > a {
    color: #101010 !important;
}

.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.label:not(.disabled):hover {
    box-shadow: none !important;
    background: #F5F3EE !important;
}

.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.label.active {
    box-shadow: none !important;
    background: #DEDCD2 !important;
    border-color: #DEDCD2 !important;
}

/* Supprimer la croix de suppression (close.svg) que YITH ajoute en `> a:after`
   sur les collections sélectionnées (.filter-item.label.active.with-image) —
   absente des autres filtres, on l'enlève pour cohérence. */
.rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.label.active.with-image > a:after {
    display: none !important;
    content: none !important;
}

body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-content ul {
    gap: 10px;
}

body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item {
    width: auto;
}

body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item a {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    color: #101010;
    gap: 10px;
}

body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item .term-image {
    width: 64px;
    height: 64px;
    display: block;
    overflow: hidden;
    border-radius: 50%;
    background: #f2f2f7;
    padding: 0;
    border: none;
    flex-shrink: 0;
}

body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item .term-image img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    display: block;
    padding: 0;
    border: none;
    max-width: none;
}

/* Placeholder pour collections sans image */
body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item.no-color a::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f2f2f7;
    flex-shrink: 0;
}

body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item .term-label {
    font-size: 12px;
    line-height: 1.3;
    color: #101010;
    display: inline-flex;
    align-items: center;
    text-align: left;
    text-transform: uppercase;
}

/* Flèches indicatrices de scroll Collections (injectées en JS) : masquées par
   défaut (desktop / hors overflow). Affichées uniquement en mobile, selon l'état
   de scroll (cf. @media + classes .rsrc-fct-can-scroll-*). */
.rsrc-fct-scroll-arrow {
    display: none;
}

/* Responsive */
@media (max-width: 782px) {
    body.tax-product_cat .rsrc-fct-wrap {
        margin-top: 1.25rem;
    }
    /* Mobile : "Effacer les filtres" en flux normal (les titres sont empilés
       verticalement, pas de rangée horizontale à laquelle s'aligner → l'absolute
       desktop chevaucherait le 1er filtre). Sa propre ligne, alignée à droite,
       au-dessus des filtres. */
    body.tax-product_cat .rsrc-fct-header__reset {
        position: static;
        display: block;
        text-align: right;
        margin-bottom: 12px;
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filters form {
        flex-direction: column;
        gap: 0;
    }
    /* Override le order:1/order:2 du desktop : on veut l'ordre DOM (titre →
       contenu → titre → contenu…) pour que le contenu d'un filtre ouvert
       apparaisse directement sous son titre, pas en bas du form. */
    body.tax-product_cat .rsrc-fct-wrap .filter-title,
    body.tax-product_cat .rsrc-fct-wrap .filter-content {
        order: 0;
    }
    /* On garde display:contents (desktop) → .filter-title + .filter-content
       deviennent enfants directs du form (column) → stack vertical naturel.
       Le séparateur horizontal Figma est porté par .filter-title (puisque
       .yith-wcan-filter n'a pas de box avec display:contents). */
    body.tax-product_cat .rsrc-fct-wrap .filter-title {
        width: 100%;
        justify-content: space-between;
        padding: 14px 0;
        border-bottom: 1px solid #DEDCD2;
    }
    /* Coller le "(N)" au titre (sinon space-between le centre) : il absorbe
       l'espace libre à sa droite → seul le chevron part à droite. */
    body.tax-product_cat .rsrc-fct-wrap .filter-title .rsrc-fct-active-count {
        margin-right: auto;
    }
    /* Pas de séparateur sous le dernier filtre */
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter:last-child .filter-title {
        border-bottom: 0;
    }
    /* Quand un filtre est ouvert : le filet reste sous le titre (pas sous le content) */
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter.rsrc-fct-open .filter-content {
        padding: 14px 0;
    }
    /* Liste des items : pills en flex-wrap (max de termes par ligne, gain de
       hauteur). Collections garde sa grille (override plus bas). */
    body.tax-product_cat .rsrc-fct-wrap .filter-content ul,
    body.tax-product_cat .rsrc-fct-wrap .filter-content ol {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    /* Mobile : pills plus compactes (padding 6px) + typo réduite (11px) */
    body.tax-product_cat .rsrc-fct-wrap .filter-item.checkbox {
        padding: 6px;
    }
    .rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.label {
        padding: 6px !important;
    }
    body.tax-product_cat .rsrc-fct-wrap .filter-item .term-label {
        font-size: 11px;
    }
    /* Collections en mobile : on reprend le style desktop (vignette ronde +
       label à droite dans la pill bordée, fond beige si .active), simplement
       réduit. Disposition sur UNE seule ligne avec scroll horizontal au doigt
       (scrollbar masquée). La pill-box, l'état actif beige et le retrait de la
       croix YITH sont hérités des règles desktop (hors @media). */
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-content ul,
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-content ol {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;            /* une seule ligne */
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;        /* Firefox */
        -ms-overflow-style: none;     /* Edge legacy */
        padding-bottom: 4px;
        min-width: 0;                 /* déclenche l'overflow dans le form en flex-column */
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-content ul::-webkit-scrollbar,
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-content ol::-webkit-scrollbar {
        display: none;
    }
    /* Flèches indicatrices de scroll : ancrées sur .filter-content (relative),
       superposées aux bords de la ligne. CLIQUABLES (boutons) → un tap fait
       défiler la ligne d'un cran et n'atteint donc PAS la pill du dessous
       (le bouton capte le clic). Affichées via les classes
       .rsrc-fct-can-scroll-left/right posées en JS. */
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-content {
        position: relative;
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .rsrc-fct-scroll-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        -webkit-appearance: none;
        appearance: none;
        cursor: pointer;
        pointer-events: auto;
        z-index: 2;
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .rsrc-fct-scroll-arrow::before {
        content: "";
        width: 7px;
        height: 7px;
        border-top: 2px solid #101010;
        border-right: 2px solid #101010;
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .rsrc-fct-scroll-arrow--left {
        left: 0;
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .rsrc-fct-scroll-arrow--left::before {
        transform: rotate(-135deg);
        margin-left: 3px;
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .rsrc-fct-scroll-arrow--right {
        right: 0;
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .rsrc-fct-scroll-arrow--right::before {
        transform: rotate(45deg);
        margin-right: 3px;
    }
    /* Visibilité selon l'état de scroll (classe posée sur .filter-content en JS) */
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-content.rsrc-fct-can-scroll-left .rsrc-fct-scroll-arrow--left,
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-content.rsrc-fct-can-scroll-right .rsrc-fct-scroll-arrow--right {
        display: inline-flex;
    }
    /* Pill resserrée : padding réduit, plus serré côté vignette (gauche).
       flex:0 0 auto → la pill garde sa largeur naturelle (pas de compression)
       → débordement → scroll horizontal. */
    .rsrc-fct-wrap .yith-wcan-filters .yith-wcan-filter[data-taxonomy*="collection"] .filter-items .filter-item.label {
        padding: 6px 12px 6px 6px !important;
        flex: 0 0 auto;
    }
    /* Sélection (quasi-unique) : la collection active passe en tête de ligne
       (flex order:-1) → visible d'emblée sans scroller. Au rebuild AJAX la liste
       repart à scrollLeft:0, donc la pill active (la plus à gauche) est affichée. */
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item.label.active {
        order: -1;
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item a {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    /* Vignette 64px (pills agrandies, comme desktop). Le reste — cercle,
       overflow, background, object-fit — est hérité du desktop. */
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item .term-image,
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item .term-image img {
        width: 64px;
        height: 64px;
    }
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item.no-color a::before {
        width: 64px;
        height: 64px;
    }
    /* Label à droite, un cran plus petit que desktop (12 → 11px). Titre COMPLET
       (jamais tronqué) : il se replie sur autant de lignes que nécessaire,
       contraint par max-width pour garder une largeur de pill raisonnable.
       Sa règle desktop (12px, inline-flex) est plus spécifique que la générique
       mobile → override (display:block pour un retour à la ligne propre). */
    body.tax-product_cat .rsrc-fct-wrap .yith-wcan-filter[data-taxonomy*="collection"] .filter-item .term-label {
        font-size: 11px;
        white-space: normal;
        max-width: 130px;
        line-height: 1.2;
        display: block;
    }
    /* Quand un hero_media du Page Builder cohabite avec un module facettes
       sur la même page : masquer le media (image / vidéo) pour libérer de
       l'espace au-dessus du module filtres. Le contenu (breadcrumb, h1,
       texte) reste affiché. */
    body.has-rsrc-facettes .page-builder .hero-media .hero-media__media {
        display: none;
    }
}
