.filters {

    background: linear-gradient(0deg,#eb9812 20%,rgba(235,152,18,.6));

    display: flex;
    /* gap: var(--pico-spacing); */

    & .filter-buttons {
        display: flex;
        /* gap: var(--pico-spacing); */
    }

    & .filter-wrapper {
        display: none;

        &.visible {
            display: block;

            & .filter-backdrop {
                position: fixed;
                inset: 0;
                background-color: #786f6db8;
                width: 100vw;
                height: 100vh;
                z-index: 1001;
            }

            & legend {
                font-weight: bold;
                font-size: 1.2rem;
                margin-bottom: 0px;
            }

            & .filter-form {
                position: fixed;
                top: 0;
                right: 0;
                background-color: white;
                z-index: 1002;
                width: 360px;
                height: 100vh;
                translate: 100%;
                animation: slide 0.5s ease-in-out forwards;
                display: flex;
                flex-direction: column;

                & .filter-content {
                    flex: 1;
                    overflow-y: auto;
                    padding-bottom: 10px;
                    background: #f0f0f0;
                }

                & fieldset {
                    padding: 20px;
                }

                & .filter-buttons-fixed {
                    position: sticky;
                    bottom: 0;
                    background-color: white;
                    padding: 10px 0 15px 0;
                    border-top: 1px solid #cacaca;
                    box-shadow: 0 -2px 7px rgba(0, 0, 0, 0.1);
                    z-index: 1003;
                    width: 100%;
                }
            }

            & .radio-wrapper {
                display: inline-flex;
                align-items: center;
                margin: 3px 1px;
            
                & .form-check {
                    padding-left: 0;
                    margin-bottom: 0;
        
                    & input[type="radio"] {
                        display: none;
            
                        & + label {
                            display: inline-block;
                            cursor: pointer;
                            padding: 4px 6px;
                            border: 1px solid #222;
                            white-space: nowrap;
                            font-size: .8rem;
                            background: white;
                        }
            
                        &:checked + label {
                            color: white;
                            background: linear-gradient(45deg, #ff9800, #ff5722);
                            border: none;
                            transition: all 0.3s ease;
                            padding: 5px;
                        }
                    }
                }
            }
        }
    }
}

/* Style pour le bouton de réinitialisation de la ville */
.reset-city-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 5px;
    margin-left: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reset-icon {
    font-weight: bold;
    font-size: 1.2rem;
}

& .search-distance {
    text-align: center;
    margin-top: 10px;
    
    .text-distance {
        margin: auto;
        /* display: flex;
        align-items: center;
        justify-content: space-between; */
    }
}

@keyframes slide {
    to {
        translate: 0;
        right: 0;
    }
}

/* Tom Select (barre de recherche) : hauteur stable focus / blur (aligné form-select ~38px) */
.search-bar .button-menu .ts-wrapper {
    min-height: 38px;
}

/* Masquer le caret dans la zone de saisie (sélection au clic / liste) */
.search-bar .ts-wrapper .ts-control input {
    caret-color: transparent;
}

/*
 * Tom Select retire « input-hidden » au focus et ajoute « input-active » : le champ
 * reprend de la place. On force le même rendu que .input-hidden dès qu’il y a une valeur.
 */
.search-bar .ts-wrapper.single.has-items .ts-control > input {
    opacity: 0 !important;
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    flex: 0 0 0 !important;
    min-width: 0 !important;
    max-width: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.search-bar .ts-wrapper.single.has-items .ts-control {
    flex-wrap: nowrap;
    cursor: pointer;
}

.search-bar .ts-wrapper.single.has-items.input-active .ts-control,
.search-bar .ts-wrapper.single.has-items.input-active .ts-control > input {
    cursor: pointer !important;
}

/* Tom Select (barre de recherche) : zone de contrôle + bouton effacer */
.search-bar .ts-wrapper .ts-control {
    position: relative;
    min-height: 38px;
    align-items: center;
    /* Laisser de la place pour la croix + le chevron du menu (form-select / Tom Select) */
    padding-right: 3.25rem;
}

.search-bar .ts-clear-btn {
    position: absolute;
    right: 1.85rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6c757d;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.search-bar .ts-clear-btn:hover {
    color: #212529;
    background: rgba(0, 0, 0, 0.06);
}

.search-bar .ts-dropdown .no-results {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #6c757d;
}