/**
 * BWA Insider Integration - Styles
 */
#left-column #amazzing_filter {
  display: none;
}
/* Variables */
:root {
    /*--insider-primary: #2563eb;*/
    --insider-primary: #7f7f7f;
    --insider-primary-hover: #0a354e;
    --insider-text: #1e293b;
    --insider-text-light: #626262;
    --insider-border: #232323;
    --insider-bg: #f8fafc;
    --insider-bg-hover: #f1f5f9;
    --insider-danger: #ef4444;
    --insider-success: #10b981;
    --insider-radius: 8px;
    --insider-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --insider-shadow-lg: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --insider-shadow-xl: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --insider-second-typo: 'Raleway', sans-serif;
}

/* ================================
   AUTOCOMPLETE / SUGGESTIONS
   ================================ */

/* Cacher JoliSearch/jQuery UI Autocomplete quand Insider est actif */
/*

body .ui-autocomplete.ui-front,
body .jolisearch-modal,
body .jolisearch-overlay,
body .ui-autocomplete,
body .jolisearch-autocomplete {
    display: none !important;
}

 */

/* Input de recherche Insider */
.insider-search-input {
    /* Conserver le style existant */
}

/* Container des suggestions - positionné en fixed sur le body */
.insider-suggestions {
    position: fixed;
    background: white;
    border: 1px solid var(--insider-border);
    border-radius: var(--insider-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 999999;
    max-height: 70vh;
    overflow-y: auto;
    min-width: 350px;
}

.insider-suggestions-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--insider-border);
}

.insider-suggestions-section:last-of-type {
    border-bottom: none;
}

.insider-suggestions-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--insider-text-light);
    padding: 0.5rem 1rem;
}

/* Item de suggestion */
.insider-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--insider-text);
    transition: background 0.15s ease;
    cursor: pointer;
}

.insider-suggestion-item:hover,
.insider-suggestion-item.highlighted {
    background: var(--insider-bg-hover);
}

.insider-suggestion-item svg {
    flex-shrink: 0;
    color: var(--insider-text-light);
}

.insider-suggestion-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insider-suggestion-item strong {
    color: var(--insider-primary);
    font-weight: 600;
}

/* Produits dans suggestions */
.insider-suggestions-products .insider-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.insider-suggestion-product {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    border-radius: var(--insider-radius);
    border: 1px solid transparent;
}

.insider-suggestion-product:hover {
    border-color: var(--insider-border);
    background: white;
    box-shadow: var(--insider-shadow);
}

.insider-suggestion-product .insider-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    background: var(--insider-bg);
    margin-bottom: 0.5rem;
}

.insider-suggestion-product .insider-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.insider-suggestion-product .insider-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--insider-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
}

.insider-suggestion-product .insider-product-info {
    flex: 1;
}

.insider-suggestion-product .insider-product-name {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.insider-suggestion-product .insider-product-price {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.insider-suggestion-product .insider-price-old {
    font-size: 0.7rem;
    color: var(--insider-text-light);
    text-decoration: line-through;
}

.insider-suggestion-product .insider-price-current {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--insider-primary);
}

/* Footer suggestions */
.insider-suggestions-footer {
    padding: 0.75rem 1rem;
    background: var(--insider-bg);
    border-top: 1px solid var(--insider-border);
}

.insider-see-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--insider-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.insider-see-all:hover {
    color: var(--insider-primary-hover);
}

/* Responsive autocomplete */
@media (max-width: 768px) {
    .insider-suggestions {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 70vh;
        border-radius: var(--insider-radius) var(--insider-radius) 0 0;
        margin-top: 0;
    }

    .insider-suggestions-products .insider-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .insider-suggestions-products .insider-products-grid {
        grid-template-columns: 1fr 1fr;
    }

    .insider-suggestion-product .insider-product-name {
        font-size: 0.75rem;
    }
}

/* ================================
   FACETTES / FILTRES
   ================================ */
.insider-facets-container {
    background: white;
    /*border: 1px solid var(--insider-border);*/
    /*border-radius: var(--insider-radius);*/
    padding: 0.5rem;
    margin: 40px 0 1rem 0;
    width: 100%;
}

.insider-facets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*margin-bottom: 1rem;*/
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--insider-border);
}

.insider-facets-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--insider-text);
}

.insider-clear-all {
    font-size: 0.8rem;
    color: var(--insider-primary);
    text-decoration: none;
    transition: color 0.15s;
}

.insider-clear-all:hover {
    color: var(--insider-primary-hover);
    text-decoration: underline;
}

/* Filtres actifs */
/*.insider-active-filters {*/
/*    background: var(--insider-bg);*/
/*    border-radius: 6px;*/
/*    padding: 0.75rem;*/
/*    margin-bottom: 1rem;*/
/*}*/

.insider-active-filters-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--insider-text-light);
    margin-bottom: 0.5rem;
}

.insider-active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.insider-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--insider-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.15s;
}

.insider-active-filter:hover {
    background: var(--insider-primary-hover);
    color: white;
}

.insider-filter-remove {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.8;
}

/* Facette individuelle */
.insider-facet {
    border-bottom: 1px solid #e6e6e6;
    /*padding-bottom: 0.75rem;*/
    /*margin-bottom: 0.75rem;*/
}

.insider-facet:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.insider-facet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
    user-select: none;
}

.insider-facet-header:hover .insider-facet-title {
    color: var(--insider-primary);
}

.insider-facet-title {
    font-size: 14px;
    font-weight: 500;
    font-family: var(--insider-second-typo), sans-serif;
    color: #0E2533;
    transition: color 0.15s;
    text-transform: uppercase;
    line-height: 54px;
    padding: 0 5.5% 0 2%;
}

.insider-facet-toggle {
    transition: transform 0.2s;
}

.insider-facet.collapsed .insider-facet-toggle {
    transform: rotate(-90deg);
}

.insider-facet .insider-facet-content {
  padding: 9px 9px 20px 9px;
}

.insider-facet.collapsed .insider-facet-content {
    display: none;
}

/* Liste des valeurs */
.insider-facet-values {
    list-style: none;
    margin: 0;
    padding: 0;
    /*max-height: 200px;*/
    /*overflow-y: auto;*/

}

.insider-facet-values.expanded {
    max-height: none;
}

/* Par défaut : on n'affiche que les 5 premiers items, sans scroll */
.insider-facet-values li:nth-child(n+6) {
  display: none;
}

/* Mode expanded : tous les items visibles */
.insider-facet-values.expanded li:nth-child(n+6) {
  display: list-item;
}

/* Limite quand même la hauteur en mode expanded pour les listes très longues */
.insider-facet-values.expanded {
  max-height: 350px;
  overflow-y: auto;
  padding-right: 12px;        /* place pour scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.insider-facet-values.expanded::-webkit-scrollbar {
  width: 6px;
}
.insider-facet-values.expanded::-webkit-scrollbar-track {
  background: transparent;
}
.insider-facet-values.expanded::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.insider-facet-values.expanded::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.insider-facet-value {
    margin-bottom: 0.25rem;
}

.insider-filter-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    color: var(--insider-text);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.insider-filter-link:hover {
    color: var(--insider-primary);
}

.insider-filter-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid var(--insider-border);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.insider-facet-value.active .insider-filter-checkbox {
    background: var(--insider-primary);
    border-color: var(--insider-primary);
    color: white;
}

.insider-filter-name {
    flex: 1;
    font-family: var(--insider-second-typo), serif;
}

.insider-filter-count {
    color: var(--insider-text-light);
    font-size: 0.8rem;
}

.insider-show-more {
    background: none;
    border: none;
    color: var(--insider-primary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0;
    width: 100%;
    text-align: left;
}

.insider-show-more:hover {
    text-decoration: underline;
}

/* Slider de prix */
.insider-facet-range {
    padding: 0.5rem 0;
}

.insider-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.insider-range-min,
.insider-range-max {
    width: 80px;
    padding: 0.4rem;
    border: 1px solid var(--insider-border);
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
}

.insider-range-separator {
    color: var(--insider-text-light);
}

.insider-range-unit {
    color: var(--insider-text-light);
    font-size: 0.85rem;
}

.insider-range-slider {
    position: relative;
    height: 20px;
    margin-bottom: 1rem;
}

.insider-range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 5px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
}

.insider-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #E7E7E7;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    border: 1px solid #AAA;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Firefox — équivalent de ::-webkit-slider-thumb */
.insider-range-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #E7E7E7;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  border: 1px solid #AAA;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.insider-range-slider input[type="range"]::-moz-range-track {
  background: transparent;
  border: none;
  height: 5px;
}

/* Firefox ajoute une bordure par défaut sur les inputs range */
.insider-range-slider input[type="range"] {
  border: none;
}

.insider-range-apply {
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--insider-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.insider-range-apply:hover {
    background: var(--insider-primary-hover);
}

/* slider values */
.af_filter .slider {
  margin-bottom: 10px;
}
.af_filter .slider-bar {
  margin: 5px 0 14px;
  padding: 0 7px;
  clear: both;
}
.slider .slider_value {
  display:inline-block;
  float: left;
  margin-bottom: 5px;
  border: 1px solid transparent;
  padding: 1px 3px;
  cursor: pointer;
  position: relative;
}
.af_filter:hover .slider_value,
.slider .slider_value.edit {
  border-color: #DDD;
}
.slider .slider_value.to_display {
  float: right;
}
.slider .slider_value .input-text,
.slider .slider_value.edit > span {
  display: none;
}
.slider .slider_value.edit .input-text {
  display: inline-block;
  border: 0;
  padding: 0;
  max-width: 50px;
  outline: none;
  line-height: 1em;
}

/* Responsive facettes */
@media (max-width: 992px) {
    .insider-facets-container {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        z-index: 99999;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    .insider-facets-container.open {
        left: 0;
    }

    .insider-facets-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99998;
        display: none;
    }

    .insider-facets-overlay.visible {
        display: block;
    }
}

/* ================================
   Section Recommandations
   ================================ */
.insider-recommendations-section {
    padding: 2rem 0;
    position: relative;
}

.insider-reco-container {
    position: relative;
}

.insider-reco-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--insider-text);
}

/* Loader */
.insider-reco-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--insider-text-light);
}

.insider-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--insider-border);
    border-top-color: var(--insider-primary);
    border-radius: 50%;
    animation: insider-spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes insider-spin {
    to { transform: rotate(360deg); }
}

/* Container produits - Carousel */
.ins-web-smart-recommender-body,
.insider-reco-products {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0;
    scrollbar-width: thin;
}

/* Navigation carousel */
.insider-reco-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: white;
    box-shadow: var(--insider-shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--insider-text);
    transition: all 0.2s ease;
    z-index: 10;
}

.insider-reco-nav:hover {
    background: var(--insider-primary);
    color: white;
}

.insider-reco-prev {
    left: -20px;
}

.insider-reco-next {
    right: -20px;
}

/* ================================
   Carte Produit
   ================================ */
.ins-web-smart-recommender-box-item {
    flex: 0 0 220px;
    background: white;
    border-radius: var(--insider-radius);
    overflow: hidden;
    box-shadow: var(--insider-shadow);
    transition: all 0.2s ease;
}

.ins-web-smart-recommender-box-item:hover {
    box-shadow: var(--insider-shadow-lg);
    transform: translateY(-2px);
}

.insider-product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--insider-bg);
}

.insider-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ins-web-smart-recommender-box-item:hover .insider-product-image img {
    transform: scale(1.05);
}

/* Badge réduction */
.insider-discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background: var(--insider-danger);
    color: white;
    z-index: 2;
}

/* Info produit */
.insider-product-info {
    padding: 1rem;
}

.insider-product-name {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.insider-product-name a {
    color: var(--insider-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insider-product-name a:hover {
    color: var(--insider-primary);
}

/* Prix */
.insider-product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.insider-price-old {
    color: var(--insider-text-light);
    text-decoration: line-through;
    font-size: 0.9rem;
}

.insider-price-current {
    color: var(--insider-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Bouton ajout panier */
.ins-add-to-cart-wrapper {
    padding: 0 1rem 1rem;
}

.insider-add-to-cart {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--insider-radius);
    background: var(--insider-primary);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.insider-add-to-cart:hover {
    background: var(--insider-primary-hover);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .insider-reco-nav {
        display: none;
    }

    .ins-web-smart-recommender-box-item {
        flex: 0 0 160px;
    }

    .insider-product-info {
        padding: 0.75rem;
    }

    .insider-product-name {
        font-size: 0.85rem;
    }

    .insider-price-current {
        font-size: 1rem;
    }
}

/* =========================================================================
   jRange — slider à deux pointeurs
   Adapté de https://github.com/nitinhayaran/jRange
   ========================================================================= */

.insider-facet-range .slider-container {
  height: 5px;
  margin: 25px auto 0;
  position: relative;
}

.insider-facet-range .slider-container .back-bar {
  height: 6px;
  width: 100%;
  position: relative;
  border-radius: 3px;
  background: #e0e0e0;
}

.insider-facet-range .slider-container .back-bar .pointer {
  position: absolute;
  top: -6px;
  width: 18px;
  height: 18px;
  background-color: #fff;
  border: 2px solid var(--insider-primary, #2c5aa0);
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.insider-facet-range .slider-container .back-bar .pointer.last-active {
  z-index: 3;
}

.insider-facet-range .slider-container .back-bar .pointer-label {
  position: absolute;
  top: -30px;
  color: #333;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  font-family: var(--insider-second-typo), sans-serif;
  font-size: 15px;
}

.insider-facet-range .slider-container .pointer-label.low {
  left: 0 !important;
  right: auto;
}

.insider-facet-range .slider-container .pointer-label.high {
  left: auto !important;
  right: 0;
}

.insider-facet-range .slider-container .back-bar .focused {
  z-index: 4;
  color: var(--insider-primary, #2c5aa0);
  font-weight: 600;
}

.insider-facet-range .slider-container .clickable-dummy {
  cursor: pointer;
  position: absolute;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
}

.insider-facet-range .slider-container .selected-bar {
  position: absolute;
  height: 100%;
  background: var(--insider-primary, #2c5aa0);
  border-radius: 3px;
}

.insider-facet-range .slider-container .scale {
  top: 6px;
  position: relative;
}

.insider-facet-range .slider-container .scale span {
  position: absolute;
  height: 5px;
  border-left: 1px solid #999;
  font-size: 0;
}

.insider-facet-range .slider-container .scale ins {
  font-size: 11px;
  text-decoration: none;
  position: absolute;
  left: 0;
  top: 8px;
  color: #999;
  line-height: 1;
}

/* État disabled */
.insider-facet-range .slider-container.slider-readonly {
  opacity: 0.5;
  pointer-events: none;
}

/* ---- Thèmes (uniquement la couleur primaire change) ---- */

.theme-green .back-bar .pointer { border-color: #8ca122; }
.theme-green .back-bar .selected-bar,
.theme-green .selected-bar { background: #8ca122; }

.theme-blue .back-bar .pointer { border-color: #4a8fc4; }
.theme-blue .back-bar .selected-bar,
.theme-blue .selected-bar { background: #4a8fc4; }

.theme-black .back-bar .pointer { border-color: #333; }
.theme-black .back-bar .selected-bar,
.theme-black .selected-bar { background: #333; }

.theme-red .back-bar .pointer { border-color: #c0392b; }
.theme-red .back-bar .selected-bar,
.theme-red .selected-bar { background: #c0392b; }

/* ---- Intégration dans la facette Insider ---- */

.insider-facet-range .slider-container {
  margin-top: 30px;     /* place pour les labels au-dessus */
  margin-bottom: 10px;
}

/* =========================================================================
   Mobile : panel off-canvas
   ========================================================================= */

/* Le bouton trigger n'est visible que sur mobile */
.insider-facets-mobile-trigger {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--insider-primary, #2c5aa0);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
}

.insider-facets-mobile-trigger svg {
  flex-shrink: 0;
}

/* Le header mobile à l'intérieur du panel est caché par défaut */
.insider-facets-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--insider-primary, #2c5aa0);
  color: white;
}

.insider-facets-mobile-header .insider-facets-mobile-title {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
}

.insider-facets-mobile-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* Overlay sombre derrière le panel */
.insider-facets-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.insider-facets-overlay-visible {
  opacity: 1;
  visibility: visible;
}

/* Empêcher le scroll de la page derrière */
body.insider-facets-body-locked {
  overflow: hidden;
}

/* Breakpoint mobile / tablette */
@media (max-width: 992px) {
  /* Afficher le bouton trigger */
  .insider-facets-mobile-trigger {
    display: inline-flex;
  }
}
/* =========================================================================
   Mobile : off-canvas du panel facets
   ========================================================================= */

@media (max-width: 992px) {
  /* Le panel : caché à droite par défaut, slide-in quand ouvert */
  body > #insider-facets {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 90% !important;
    max-width: 380px !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #fff;
    overflow-y: auto;
    margin: 0 !important;
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  }

  body > #insider-facets.insider-facets-open {
    transform: translateX(0);
  }

  /* Header mobile visible uniquement dans le panel off-canvas */
  body > #insider-facets .insider-facets-mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--insider-primary, #2c5aa0);
    color: #fff;
  }

  body > #insider-facets .insider-facets-mobile-header .insider-facets-mobile-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
  }

  body > #insider-facets .insider-facets-mobile-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
  }

  /* Header desktop caché sur mobile */
  body > #insider-facets .insider-facets-header {
    display: none !important;
  }

  /* Padding interne pour ne pas coller aux bords */
  body > #insider-facets .insider-facets-list,
  body > #insider-facets .insider-active-filters {
    padding: 0 1.25rem;
  }

  body > #insider-facets .insider-active-filters {
    padding-top: 1rem;
  }
}

/* Quand le panel n'est PAS dans body (desktop), masquer le header mobile */
.left-column #insider-facets .insider-facets-mobile-header,
.left_column #insider-facets .insider-facets-mobile-header,
#content-wrapper #insider-facets .insider-facets-mobile-header {
  display: none;
}

/* Overlay */
.insider-facets-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.insider-facets-overlay.insider-facets-overlay-visible {
  opacity: 1;
  visibility: visible;
}

body.insider-facets-body-locked {
  overflow: hidden;
}

/* Footer du panel facets : visible uniquement en off-canvas mobile */
.insider-facets-footer {
  display: none;
}

.insider-facets-see-results {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--insider-primary, #2c5aa0);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.insider-facets-see-results .insider-facets-results-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  min-width: 28px;
  text-align: center;
}

/* Sticky en bas du panel mobile */
@media (max-width: 992px) {
  body > #insider-facets .insider-facets-footer {
    display: block;
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem 1.25rem;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
    z-index: 10;
  }
}
