/* =========================================================
   INFOSEC - Catalogue / Filtres
   Fichier : catalog-filters.css
   Périmètre :
   - Filter Everything
   - Sidebar catalogue
   - Sticky
   - Responsive
   Ne pas utiliser pour :
   - Header
   - Menu
   - Cartes produits
   ========================================================= */


/* =========================================================
   1. Carte principale Filter Everything
   ========================================================= */

.wpc-filters-widget-wrapper {
    background: #ffffff;
    border: 1px solid #e6e8ec;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(20, 32, 50, 0.06);
}


/* =========================================================
   2. Sections de filtres
   ========================================================= */

.wpc-filters-section {
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid #edf0f3;
}

.wpc-filters-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}


/* =========================================================
   3. Titres des filtres
   ========================================================= */

.wpc-filter-header {
    margin-bottom: 10px;
}

.wpc-filter-title,
.widget-title.wpc-filter-title {
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    color: #202733;
    margin: 0;
}


/* =========================================================
   4. Contenus de filtres
   ========================================================= */

.wpc-filter-content {
    font-size: 14px;
    line-height: 1.45;
    color: #3d4653;
}

.wpc-filters-ul-list {
    margin: 0;
    padding: 0;
}

.wpc-filters-ul-list li {
    margin-bottom: 8px;
}

.wpc-filters-ul-list li:last-child {
    margin-bottom: 0;
}


/* =========================================================
   5. Suppression des hauteurs forcées FE
   Objectif : éviter les petits scrolls internes inutiles
   ========================================================= */

.wpc-filter-full-height,
.wpc-filter-full-height .wpc-filter-content,
.wpc-filter-full-height .wpc-filters-ul-list {
    max-height: none;
    height: auto;
    overflow: visible;
}


/* =========================================================
   6. Libellé Filtres avancés
   ========================================================= */

.ifs-advanced-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 22px;
    padding: 13px 15px;
    background: #f5f6f8;
    border: 1px solid #e3e6eb;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    color: #202733;
}

.ifs-advanced-label::after {
    content: "▾";
    font-size: 13px;
    color: #f37021;
}


/* =========================================================
   7. Filtres avancés
   ========================================================= */

.ifs-advanced-filter {
    margin-top: 0;
}


/* =========================================================
   8. Sticky desktop
   À appliquer si la colonne gauche Divi contient le widget FE
   ========================================================= */
/* ====
@media (min-width: 981px) {
    .ifs-catalog-sidebar {
        position: sticky !important;
        top: 140px;
        align-self: flex-start;
        height: fit-content;
        z-index: 2;
    }
}

/* Déblocage sticky dans la zone catalogue Divi */
.ifs-catalog-sticky-row,
.ifs-catalog-sticky-row .et_pb_column,
.ifs-catalog-sticky-row .et_pb_module,
.ifs-catalog-sticky-row .et_pb_code,
.ifs-catalog-sticky-row .et_pb_code_inner {
    overflow: visible !important;
}

/* Sticky colonne filtres */
@media (min-width: 981px) {
    .ifs-catalog-sidebar {
        position: sticky !important;
        top: 140px;
        align-self: flex-start;
        height: fit-content;
        z-index: 5;
    }
}

	======== */

/* Sticky désactivé temporairement : bloqué par structure Divi */
.ifs-catalog-sidebar {
    position: relative;
}


/* =========================================================
   9. Bloc aide catalogue
   À utiliser sous le widget FE si besoin
   ========================================================= */

.ifs-catalog-help {
    margin-top: 18px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e6e8ec;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(20, 32, 50, 0.05);
}

.ifs-catalog-help__title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    color: #202733;
}

.ifs-catalog-help__text {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #5a6472;
}

.ifs-catalog-help__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 999px;
    background: #f37021;
    color: #ffffff;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none;
}

.ifs-catalog-help__button:hover {
    background: #dc5f14;
    color: #ffffff;
}


/* =========================================================
   10. Responsive
   ========================================================= */

@media (max-width: 980px) {
    .wpc-filters-widget-wrapper {
        padding: 20px;
        border-radius: 12px;
    }

    .wpc-filters-section {
        margin-bottom: 20px;
        padding-bottom: 18px;
    }

    .ifs-catalog-sidebar {
        position: static;
    }
}

@media (max-width: 767px) {
    .wpc-filters-widget-wrapper {
        padding: 18px;
        box-shadow: 0 6px 18px rgba(20, 32, 50, 0.05);
    }

    .wpc-filter-title,
    .widget-title.wpc-filter-title {
        font-size: 13px;
    }

    .wpc-filter-content {
        font-size: 13px;
    }

    .ifs-advanced-label {
        padding: 12px 14px;
        font-size: 13px;
    }
}

/* =========================================================
   Correctif FE : suppression des scrollbars internes
   ========================================================= */

.wpc-filters-widget-wrapper .wpc-filter-full-height,
.wpc-filters-widget-wrapper .wpc-filter-full-height .wpc-filter-content,
.wpc-filters-widget-wrapper .wpc-filter-full-height .wpc-filters-ul-list {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

.wpc-filters-widget-wrapper .wpc-filter-content,
.wpc-filters-widget-wrapper .wpc-filters-ul-list {
    overflow: visible !important;
}

/* =========================================================
   SPRINT 2 - Checkboxes
   ========================================================= */

.wpc-checkbox-item {
    margin-bottom: 10px;
}

.wpc-checkbox-item label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.4;
}

.wpc-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    border-radius: 4px;
    cursor: pointer;
}

.wpc-checkbox-item .wpc-filter-link {
    color: #4a5565;
    text-decoration: none;
    transition: color .2s ease;
}

.wpc-checkbox-item:hover .wpc-filter-link {
    color: #0f2743;
}

.wpc-checkbox-item input[type="checkbox"]:checked + label .wpc-filter-link {
    color: #0f2743;
    font-weight: 600;
}


/* =========================================================
   Dropdowns
   ========================================================= */

.select2-container--default .select2-selection--single {
    height: 56px !important;
    border: 1px solid #d9dee5 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: #c5ccd6 !important;
}

.select2-container--default .select2-selection__rendered {
    line-height: 54px !important;
    color: #334155 !important;
    padding-left: 16px !important;
    font-size: 14px;
}

.select2-container--default .select2-selection__arrow {
    height: 54px !important;
    right: 12px !important;
}

.select2-dropdown {
    border: 1px solid #d9dee5 !important;
    border-radius: 10px !important;
    overflow: hidden;
}

.select2-results__option {
    padding: 10px 14px !important;
    font-size: 14px;
}

.select2-results__option--highlighted {
    background: #f37021 !important;
    color: #fff !important;
}

/* =========================================================
   Titre du panneau de filtres
   ========================================================= */

.ifs-filters-heading {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f37021;
    font-size: 20px;
    font-weight: 700;
    color: #0F2743;
    line-height: 1.2;
}


/* =========================================================
   Titres de filtres
   ========================================================= */

.wpc-filter-title,
.widget-title.wpc-filter-title {
    font-size: 16px;
    font-weight: 700;
    color: #0F2743;
    margin-bottom: 12px;
}


/* =========================================================
   Liens et libellés FE
   ========================================================= */

.wpc-filter-link {
    color: #334155 !important;
    text-decoration: none;
}

.wpc-filter-link:hover {
    color: #0F2743 !important;
}


/* =========================================================
   Espacement des groupes
   ========================================================= */

.wpc-filters-section {
    margin-bottom: 28px;
    padding-bottom: 0;
    border-bottom: none;
}

/* =========================================================
   SPRINT 2.1 - Listes déroulantes FE / Select2
   Objectif : champ moins haut, texte mieux centré
   ========================================================= */

.wpc-filters-widget-wrapper .select2-container {
    width: 100% !important;
}

.wpc-filters-widget-wrapper .select2-container--default .select2-selection--single {
    height: 46px !important;
    min-height: 46px !important;
    border: 1px solid #d7dde6 !important;
    border-radius: 9px !important;
    background: #ffffff !important;
}

.wpc-filters-widget-wrapper .select2-container--default .select2-selection__rendered {
    height: 44px !important;
    line-height: 44px !important;
    padding-left: 14px !important;
    padding-right: 36px !important;
    font-size: 14px !important;
    color: #1f2937 !important;
}

.wpc-filters-widget-wrapper .select2-container--default .select2-selection__arrow {
    height: 44px !important;
    right: 10px !important;
}

.wpc-filters-widget-wrapper .select2-container--default .select2-selection__arrow b {
    border-color: #9aa4b2 transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
}

.wpc-filters-widget-wrapper .select2-container--default .select2-selection--single:hover {
    border-color: #b8c1ce !important;
}


/* =========================================================
   SPRINT 2.2 - Sliders FE / Range
   ========================================================= */

/* Sliders FE - version large */

.wpc-filters-widget-wrapper .wpc-filters-range-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 18px;
}

.wpc-filters-widget-wrapper .wpc-filters-range-column {
    min-width: 0;
}

.wpc-filters-widget-wrapper .wpc-filters-range-column::before {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #7a8594;
}

.wpc-filters-widget-wrapper .wpc-filters-range-min-column::before {
    content: "Min";
}

.wpc-filters-widget-wrapper .wpc-filters-range-max-column::before {
    content: "Max";
}

.wpc-filters-widget-wrapper input.wpc-filters-range-min,
.wpc-filters-widget-wrapper input.wpc-filters-range-max {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    padding: 10px 14px !important;
    border: 1px solid #d7dde6 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #111827 !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

.wpc-filters-widget-wrapper .wpc-filters-range-slider-wrapper {
    width: 100%;
    padding: 8px 11px 0;
    box-sizing: border-box;
}

.wpc-filters-widget-wrapper .wpc-filters-range-slider-control.ui-slider {
    height: 7px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #e3e8ef !important;
}

.wpc-filters-widget-wrapper .wpc-filters-range-slider-control .ui-slider-range {
    background: #f37021 !important;
    border-radius: 999px !important;
}

.wpc-filters-widget-wrapper .wpc-filters-range-slider-control .ui-slider-handle {
    top: -8px !important;
    width: 23px !important;
    height: 23px !important;
    border: 3px solid #ffffff !important;
    border-radius: 50% !important;
    background: #f37021 !important;
    box-shadow: 0 3px 8px rgba(15, 39, 67, 0.25) !important;
}

.wpc-filters-widget-wrapper .wpc-filters-range-column {
    width: auto !important;
    flex: initial !important;
}


/* =========================================================
   FIX PRIORITAIRE - Dropdowns + champs range FE
   À placer tout en bas du fichier
   ========================================================= */


/* Dropdown Select2 : largeur pleine + flèche non masquée */

.wpc-filters-widget-wrapper .select2,
.wpc-filters-widget-wrapper .select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

.wpc-filters-widget-wrapper .select2-selection--single {
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    overflow: visible !important;
}

.wpc-filters-widget-wrapper .select2-selection__rendered {
    height: 44px !important;
    line-height: 44px !important;
    padding-left: 14px !important;
    padding-right: 42px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.wpc-filters-widget-wrapper .select2-selection__arrow {
    width: 38px !important;
    height: 44px !important;
    right: 4px !important;
    top: 0 !important;
}

.wpc-filters-widget-wrapper .select2-selection__arrow b {
    margin-left: -4px !important;
    margin-top: -2px !important;
}


/* Range : neutralisation des largeurs FE */

.wpc-filters-widget-wrapper .wpc-filters-range-wrapper {
    display: flex !important;
    gap: 14px !important;
    width: 100% !important;
    margin-bottom: 18px !important;
}

.wpc-filters-widget-wrapper .wpc-filters-range-column {
    flex: 1 1 0 !important;
    width: 50% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.wpc-filters-widget-wrapper input.wpc-filters-range-min,
.wpc-filters-widget-wrapper input.wpc-filters-range-max {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 48px !important;
    padding: 10px 14px !important;
    box-sizing: border-box !important;
    text-align: left !important;
    line-height: 1.2 !important;
}

.wpc-filters-widget-wrapper .wpc-filters-range-slider-wrapper {
    width: 100% !important;
    padding: 8px 12px 0 !important;
    box-sizing: border-box !important;
}

/* =========================================================
   Fix flèche Select2
   ========================================================= */

.wpc-filters-widget-wrapper .select2-selection__arrow {
    width: 40px !important;
    height: 100% !important;
    right: 0 !important;
    top: 0 !important;
}

.wpc-filters-widget-wrapper .select2-selection__arrow b {
    border-width: 6px 5px 0 5px !important;
    border-color: #98a2b3 transparent transparent transparent !important;
    margin-left: -5px !important;
    margin-top: -3px !important;
}


/* =========================================================
   Fix définitif flèche Select2
   Remplace le triangle natif par une flèche CSS stable
   ========================================================= */

.wpc-filters-widget-wrapper .select2-selection--single {
    position: relative !important;
}

.wpc-filters-widget-wrapper .select2-selection__rendered {
    padding-right: 48px !important;
}

.wpc-filters-widget-wrapper .select2-selection__arrow {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 44px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wpc-filters-widget-wrapper .select2-selection__arrow b {
    display: none !important;
}

.wpc-filters-widget-wrapper .select2-selection__arrow::before {
    content: "⌄";
    font-size: 17px;
    line-height: 1;
    color: #98a2b3;
    transform: translate(-7px, -8px);
}


.ifs-advanced-label {
    background: #f4f6f8;
    border: 1px solid #dfe5ec;
    border-radius: 10px;
    min-height: 52px;

    color: #0F2743;
    font-size: 15px;
    font-weight: 700;

    transition: all .2s ease;
}

.ifs-advanced-label:hover {
    border-color: #f37021;
}

.ifs-advanced-filter:first-of-type {
    padding-top: 10px;
}

