/* ==============================
   Bloc "Affinez votre recherche"
   ============================== */
#Doofinderfacets {
    display: block;
    margin-bottom: 30px;
}

.df-facets-box {
    background: #fff;
}

.df-facets-box-header {
    background: #d3d5d2;
    padding: 6px 6px 6px 14px;
    font-size: 1.17em;
    font-weight: 700;
    color: #15140F;
}

.df-facets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
    background: #F6F7F6;
}

/* Une boîte de facette : 6 par ligne */
.df-facet-box {
    position: relative;
    flex: 0 0 calc((100% - 5 * 16px) / 6);
    max-width: calc((100% - 5 * 16px) / 6);
}

/* Toggle de la boîte (label + "+") */
.df-facet-box .custom-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fff;
    font-size: .875rem;
    color: #15140F;
    border-radius: 0;
    border: 1px solid #D2D5D2;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

.df-facet-box.open .custom-dropdown-toggle {
    border-color: #D2D5D2;
    box-shadow: none;
}

.df-facet-box .custom-dropdown-text {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
    font-size: 14px;
    color: #15140F;
}

/* Indicateur "+" qui devient "−" à l'ouverture */
.df-facet-plus {
    position: relative;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}
.df-facet-plus::before,
.df-facet-plus::after {
    content: '';
    position: absolute;
    background: #15140F;
    transition: opacity 0.2s, transform 0.2s;
}
.df-facet-plus::before { /* barre horizontale */
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    transform: translateY(-50%);
}
.df-facet-plus::after { /* barre verticale */
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    transform: translateX(-50%);
}
.df-facet-box.open .df-facet-plus::after {
    opacity: 0; /* "+" -> "−" */
}
.df-facet-box.open .df-facet-plus::before {
    background: #15140F;
}

/* Compteur de filtres actifs */
.custom-dropdown-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #FF6B35;
    border-radius: 9px;
    padding: 0 5px;
    font-style: normal;
}

/* ==============================
   Barre des filtres actifs (sous les filtres)
   ============================== */
.df-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 14px 20px;
    background: #F6F7F6;
    border-top: 1px solid #e3e5e2;
    font-size: 14px;
}
.df-active-label {
    font-weight: 700;
    font-size: .875rem;
    color: #15140F;
    line-height: 1.6;
    font-style: italic;
    font-family: "Open Sans", sans-serif !important;
}
.df-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-style: italic;
    font-size: 14px;
    color: #15140F;
}
.df-active-chip .df-active-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    font-size: 23px;
    font-style: normal;
    line-height: 1;
    color: #a1a2a1;
    transition: color 0.2s, border-color 0.2s;
}
.df-active-reset {
    margin-left: auto;
    font-style: italic;
    font-size: .875rem;
    color: #107C10;
    text-decoration: none;
}
.df-active-reset:hover {
    text-decoration: underline;
}

.nq-i-information_agri{
    position: absolute;
    top: -17px;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
    fill: #15140F;
    transition: fill 0.2s;
}
.nq-i-information_agri:focus{
    border: 0px;
    outline: none;
}

/* ==============================
   Popover image d'aide (au-dessus de la boîte)
   ============================== */
.df-info-pop {
    position: absolute;
    bottom: calc(100% + 20px);
    left: 0;
    z-index: 60;
    width: 218px;
    max-width: 80vw;
    background: #fff;
    border: 1px solid #D2D5D2;
    border-radius: 0;
    padding: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    animation: dfPopIn 0.15s ease;
}
@keyframes dfPopIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.df-info-pop img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}
.df-info-pop-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border: 1px solid #D2D5D2;
    border-radius: 50%;
    background: #fff;
    font-size: 16px;
    line-height: 1;
    color: #555;
    cursor: pointer;
    display: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: color 0.2s, border-color 0.2s;
}
.df-info-pop-close:hover {
    color: #FF6B35;
    border-color: #FF6B35;
}

/* ==============================
   Menu déroulant (liste de cases à cocher)
   ============================== */
.df-facet-box .custom-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid #D2D5D2;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    max-height: 260px;
    overflow-y: auto;
    list-style: none;
    padding: 4px;
    margin: 0;
}
.df-facet-box.open .custom-dropdown-menu {
    display: block;
}

.df-facet-box .custom-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: start;
    padding: 0;
    border-radius: 6px;
    transition: background 0.15s;
}
.df-facet-box .custom-dropdown-item.active{
    background: #FFFFFF;
}

.df-facet-box .custom-dropdown-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    padding: 8px 10px;
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    color: #555;
}
.df-facet-box .custom-dropdown-item input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid #D2D5D2;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s;
}
.df-facet-box .custom-dropdown-item input[type="checkbox"]:checked {
    border-color: #107C10;
}
.df-facet-box .custom-dropdown-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #107C10;
}
.df-facet-box .custom-dropdown-item small {
    font-size: 11px;
    color: #15140F;
    padding-right: 10px;
    flex-shrink: 0;
}

/* ==============================
   Responsive
   ============================== */
@media (max-width: 767px) {
    .df-facets-grid {
        gap: 12px;
        padding: 14px;
    }
    .df-facet-box {
        flex: 1 1 140px;
        min-width: 140px;
        max-width: none;
    }
}

.page-loader .spinner-border{
    color: #107C10 !important;
}