/* ============================================================
   FS_ Filtres Personnalisés
   ============================================================ */

.fs-filtres {
    position: relative;
    font-family: inherit;
    margin-bottom: 24px;
}

/* ── Accessibilité ── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.fs-hidden { display: none !important; }

/* ── Filtres actifs ── */
.fs-active-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.fs-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.4; background-color:#eaeaea;
    cursor: default;
}

.fs-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size:15px;
    line-height:8px;
    color: inherit;
}

.fs-tag-remove:hover { opacity: .6; }

.fs-clear-all {
    font-size: 13px;
    color:#A59E9E !important;
    text-decoration: none;
    white-space: nowrap;
}

.fs-clear-all:hover { text-decoration:none; }

/* ── Barre de filtres ── */
.fs-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fs-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Boutons */
.fs-btn {
    padding:7px 20px;
    border-radius: 999px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    border: 1.5px solid #000;
    background: #fff;
    color: #000;
    white-space: nowrap;
    transition: background .15s, color .15s;
    line-height: 1.3;
}

.fs-btn--primary {
    background: #000;
    color: #fff;
}

.fs-btn.is-open,
.fs-btn:hover {
    background: #000 !important;
    color: #fff !important;
}

/* Indicateur de filtre actif sur le bouton */
/*
.fs-btn--has-active:not(.fs-btn--primary)::after {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #000;
    margin-left: 6px;
    vertical-align: middle;
}

.fs-btn--primary.fs-btn--has-active::after {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    margin-left: 6px;
    vertical-align: middle;
}
*/

/* ── Droite de la barre ── */
.fs-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.fs-search-input {
    border: none;
    border-bottom: 1px solid #000 !important;
    padding:0px 0px !important;
    font-size: 14px;
    font-family: inherit;
    width: 160px !important;
    background: transparent;
    outline: none;
    color: #000;
}

.fs-search-input::placeholder { color: #aaa; }

/* Toggle vue */
.fs-view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fs-view-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #000;
    display: flex;
    align-items: center;
    opacity: 0.3;
    transition: opacity .15s;
}

.fs-view-btn.active,
.fs-view-btn:hover { opacity: 1; }

/* ── Conteneur des panneaux ── */
.fs-panels {
    position: relative;
}

/* ── Panneau déroulant ── */
.fs-panel {
    display: none;
    position: absolute;
    top: 8px;
    left: 0;
    background: #fff;
    border:1px solid #000000; border-radius:20px;
    z-index: 9999;
    min-width: 260px;
    max-height: 80vh;
    overflow-y: auto;
}

.fs-panel.is-open { display: block; }

.fs-panel {
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 transparent;
}

.fs-panel::-webkit-scrollbar {
    width: 4px;
}

.fs-panel::-webkit-scrollbar-track {
    background: transparent;
}

.fs-panel::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 999px;
}

.fs-panel::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.fs-panel-inner {
    padding: 20px 24px;
}

/* ── Groupe radio (Échantillons / Tapis en stock) ── */
.fs-group--radio {
    margin-bottom: 22px
}

.fs-radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 0; color:#000 !important;
    font-size: 14px;
    user-select: none;
}

.fs-radio-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #000 !important;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, box-shadow .15s;
}

.fs-radio-item input[type="checkbox"]:checked,
.fs-radio-item.is-active input[type="checkbox"] {
    background: #000 !important;
    box-shadow: inset 0 0 0 4px #fff !important;
}

.fs-radio-item.is-active { font-weight: 700; }

/* ── Groupe attribut ── */
.fs-group {
    margin-bottom: 22px;
}

.fs-group:last-child { margin-bottom: 0; }

.fs-group-title {
    font-size: 14px;
    font-weight: 700;
    margin:0px;
    padding: 0;
    line-height: 1.3;
}

/* ── Liste de termes ── */
.fs-term-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fs-term-item label {
    display: flex;
    align-items: baseline;
    gap: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    user-select: none;
}

.fs-term-item label:hover .fs-term-name { text-decoration: underline; }

.fs-term-name {
    flex:1; color:#000000 !important;
}

.fs-term-count {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.fs-term-item.is-active .fs-term-name,
.fs-term-item.is-active .fs-term-count {
    font-weight: 700;
}

/* ── Pagination ── */
.fs-pagination {
    display: block;
}

.fs-pagination ul.page-numbers {
    align-items: center;
    list-style: none;
    margin: 0 !important;
    padding:10px !important;
    border: 1.5px solid #000 !important;
    border-radius: 999px;
    gap: 2px;
}

.fs-pagination ul.page-numbers li {
    display: flex;
    align-items: center;
    justify-content: center; border:0px !important;
}

.fs-pagination ul.page-numbers li .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 14px;
    color: #000;
    text-decoration: none;
    padding: 0;
    background: none;
    border: none;
    transition: background .15s;
}

.fs-pagination ul.page-numbers li span.current {
    background: #000 !important;
    color: #fff !important;
    font-weight: 600;
}

.fs-pagination ul.page-numbers li a.page-numbers:hover {
    text-decoration:underline; background-color:#fff !important;
}

.fs-pagination ul.page-numbers li a.prev,
.fs-pagination ul.page-numbers li a.next {
    border-radius: 999px;
    min-width: auto;
    padding: 0 12px;
}

.fs-pagination ul.page-numbers li span.dots {
    min-width: 24px;
    cursor: default;
}

/* ── Message aucun résultat ── */
.elementor-location-archive.product:has(.elementor-products-nothing-found) .fs-no-results{display:none;}
.fs-no-results {
    width: 100%;
    text-align: center;
    padding: 40px 0;
    margin: 0;
}

/* ── Zone produits AJAX ── */

/* Grille produits AJAX */
ul.products.fs-products-grid {
    display: grid;
    margin: 0;
    grid-column-gap: 20px;
    grid-row-gap: 40px;
}

ul.products.fs-products-grid li.product {
    float: none;
    margin: 0;
}

ul.products.fs-products-grid::before {
    display: none;
}

@media (min-width: 1025px) {
    #fs-products-area ul.products.fs-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    #fs-products-area.fs-view-small ul.products.fs-products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    #fs-products-area.fs-view-small ul.products.fs-products-grid li.product > a{height:calc((((100vw - 32px - 200px - 60px) / 6) * 1.2749) + 55px);}
    #fs-products-area.fs-view-small ul.products.fs-products-grid li.product > a .fs_images{height:calc(((100vw - 32px - 200px - 60px) / 6) * 1.2749);}
}

#fs-products-area {
    position: relative;
    transition: opacity .25s ease;
}

#fs-products-area.fs-loading {
    opacity: .4;
    pointer-events: none;
}

#fs-products-area.fs-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: wait;
    z-index: 10;
}

/* Spinner centré au-dessus des produits pendant le chargement */
#fs-products-area.fs-loading::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 28px;
    border: 2.5px solid #e0e0e0;
    border-top-color: #000;
    border-radius: 50%;
    animation: fs-spin .7s linear infinite;
    z-index: 11;
}

@keyframes fs-spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

/* ── Responsive desktop ── */
@media (max-width: 768px) {
    .fs-filtres { display: none; }

    .fs-bar { flex-wrap: wrap; }

    .fs-right {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }

    .fs-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,.15);
    }
}

/* ── Bouton Filtrer (mobile) ── */
.fs-filtres-mobile-wrap {
    display: none;
}

@media (max-width: 768px) {
    .fs-filtres-mobile-wrap {
        display: flex;
        justify-content: center;
        margin-bottom: 24px;
    }
}

.fs-mobile-filter-btn {
    width: 100%;
    padding: 10px 28px;
    border-radius: 999px;
    border: 1.5px solid #000;
    background: #fff;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.3;
}

/* ── Popup filtres mobile ── */
.dialog-type-lightbox:has(.fs-popup-content) {
    position: absolute !important;
}

.fs-popup-content {
    position: relative;
    display: flex;
    flex-direction: column;
}

.fs-popup-filters {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.3) transparent;
    /* La hauteur est calculée dynamiquement par JS */
}

.fs-popup-filters::-webkit-scrollbar {
    width: 3px;
}

.fs-popup-filters::-webkit-scrollbar-track {
    background: transparent;
}

.fs-popup-filters::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.3);
    border-radius: 999px;
}

.fs-popup-group[data-group="technique"]{
    padding-top:30px;
}

.fs-popup-term-list:has([data-group="couleur"]){
    padding-bottom:70px;
}

.fs-popup-group {
    margin-bottom: 28px;
}

.fs-popup-group:last-child {
    margin-bottom: 0;
}

.fs-popup-group-title {
    font-size: 15px;
    font-weight: 700 !important;
    margin:0px 0px 3px 0px;
    padding: 0;
    color:#FFFFFF !important;
}

.fs-popup-term-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fs-popup-term-item {
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    color: #FFFFFF !important;
}

.fs-popup-term-item.is-active {
    text-decoration: underline;
}

.fs-popup-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 12px;
}

.fs-popup-clear,
.fs-popup-close {
    flex: 1;
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    border: 1.5px solid #FFFFFF;
    background:#191919 !important;
    color:#FFFFFF !important;
    white-space: nowrap;
    text-align: center;
}

.fs-popup-clear:hover,
.fs-popup-close:hover,
.fs-popup-clear:focus,
.fs-popup-close:focus{
    border: 1.5px solid #FFFFFF;
    color:#191919 !important;
}

.filtres_mobile_btn_ctn {
    z-index: 99; background-color:#FFFFFF;
}

.filtres_mobile_btn_ctn.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99;
}

.filtres_mobile_btn_ctn--placeholder {
    visibility: hidden;
    pointer-events: none;
}