/* ==========================================================================
   Filtres du catalogue — refonte 2026   (prefixes : ft-, fchip)
   ========================================================================== */

.catalog-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: fit-content;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Blocs sous les filtres (appli mobile, publicites) : masques dans le panneau mobile */
.fs-extra {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------- Carte de filtres ---------- */
.ft {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.ft-form {
    display: flex;
    flex-direction: column;
}

.ft-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px 12px;
}

.ft-head h3 {
    flex: 1;
    margin: 0;
    padding: 0;
    border: none;
    font-size: 17px;
    color: var(--secondary);
}

.ft-clear {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary-dark);
}

.ft-clear:hover {
    text-decoration: underline;
}

.ft-close {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-app);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.ft-body {
    padding: 4px 18px 6px;
}

.ft-field {
    margin-bottom: 16px;
}

.ft-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--secondary);
}

.ft-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-main);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

select.ft-input {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.ft-input::placeholder {
    color: var(--text-muted);
}

.ft-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(254, 120, 85, 0.14);
}

.ft-input::-webkit-search-cancel-button {
    display: none;
}

.ft-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 8px;
}

/* Jauge de budget (deux curseurs) */
.ft-range-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.ft-range-head output {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: right;
}

.ft-range {
    position: relative;
    height: 24px;
    margin: 0 9px;
}

.ft-range-track {
    position: absolute;
    left: -9px;
    right: -9px;
    top: 10px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
}

.ft-range-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--primary);
    border-radius: 4px;
}

.ft-range input[type="range"] {
    position: absolute;
    left: -9px;
    width: calc(100% + 18px);
    top: 0;
    height: 24px;
    margin: 0;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.ft-range input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    height: 24px;
}

.ft-range input[type="range"]::-moz-range-track {
    background: transparent;
}

.ft-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    cursor: grab;
    pointer-events: auto;
}

.ft-range input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    cursor: grab;
    pointer-events: auto;
}

.ft-range input[type="range"]:focus-visible::-webkit-slider-thumb {
    outline: 3px solid rgba(254, 120, 85, 0.45);
}

/* Pastilles de choix (radio) */
.ft-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ft-pills label {
    cursor: pointer;
}

.ft-pills input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ft-pills span {
    display: inline-block;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    transition: all 0.15s;
}

.ft-pills span:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.ft-pills input:checked + span {
    color: var(--primary-dark);
    background: var(--primary-light);
    border-color: var(--primary);
}

.ft-pills input:focus-visible + span {
    outline: 3px solid rgba(254, 120, 85, 0.45);
}

/* Plus de filtres */
.ft-more {
    margin: 0 -18px;
    padding: 0 18px 4px;
    border-top: 1px solid var(--border-light);
}

.ft-more summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--secondary);
    cursor: pointer;
    list-style: none;
}

.ft-more summary::-webkit-details-marker {
    display: none;
}

.ft-more summary svg {
    transition: transform 0.2s;
}

.ft-more[open] summary svg {
    transform: rotate(90deg);
}

/* Filtres qui ne s'appliquent pas a la rubrique choisie */
.ft-form:not([data-type="auto"]) [data-for="auto"],
.ft-form:not([data-type="part"]) [data-for="part"],
.ft-form[data-type="service"] [data-hide-service] {
    display: none;
}

.ft-foot {
    padding: 12px 18px 18px;
}

.ft-apply {
    width: 100%;
    height: 46px;
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(254, 120, 85, 0.28);
    cursor: pointer;
    transition: all 0.18s;
}

.ft-apply:hover {
    background: var(--primary-dark);
}

/* ---------- Pastilles de filtres actifs ---------- */
.fchips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.fchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--primary-light);
    border: 1px solid #fcc9bb;
    border-radius: var(--radius-full);
}

.fchip:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.fchips-clear {
    margin-left: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: underline;
}

/* ---------- Mobile / tablette : panneau plein ecran ---------- */
@media (max-width: 991px) {
    .catalog-aside.filter-sidebar {
        top: 0;
        left: -100%;
        width: 100vw;
        max-width: none;
        height: 100dvh !important;
        gap: 0;
        background: #fff;
        z-index: 8000;
        overflow: hidden;
        box-shadow: none;
    }

    .catalog-aside.filter-sidebar.mobile-open {
        left: 0;
    }

    .catalog-aside .fs-extra {
        display: none;
    }

    .ft {
        display: flex;
        flex-direction: column;
        height: 100%;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .ft-form {
        height: 100%;
        min-height: 0;
    }

    .ft-head {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border-light);
    }

    .ft-close {
        display: inline-flex;
    }

    .ft-body {
        flex: 1;
        min-height: 0;
        padding: 16px 16px 8px;
        overflow-y: auto;
    }

    .ft-more {
        margin: 0 -16px;
        padding: 0 16px 4px;
    }

    .ft-foot {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid var(--border-light);
    }

    .ft-input {
        height: 46px;
        font-size: 16px; /* evite le zoom automatique sur iOS */
    }

    .ft-apply {
        height: 50px;
    }
}

/* ---------- Barre « Filtres » (mobile) ---------- */
.fbar {
    display: none;
    margin-bottom: 14px;
}

.fbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--secondary);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
}

.fbar-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: var(--primary);
    border-radius: var(--radius-full);
}

@media (max-width: 991px) {
    .fbar {
        display: flex;
    }
}

/* ---------- Rubriques de la page Services ---------- */
.sv-tiles {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.sv-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 82px;
    padding: 10px 6px;
    text-align: center;
    color: var(--secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.sv-tile span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.sv-tile:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.sv-tile.is-active {
    color: var(--primary-dark);
    background: var(--primary-light);
    border-color: var(--primary);
}

@media (max-width: 991px) {
    .sv-tiles {
        display: flex;
        overflow-x: auto;
        margin-right: -16px;
        padding-right: 16px;
        scrollbar-width: none;
    }

    .sv-tiles::-webkit-scrollbar {
        display: none;
    }

    .sv-tile {
        flex: 0 0 104px;
    }
}

/* ---------- Cartes service et boutique ---------- */
.results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.results-head h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--secondary);
}

.gc {
    gap: 14px;
    padding: 20px 18px 18px;
    color: inherit;
}

.gc:hover {
    color: inherit;
}

.gc.is-premium {
    border-color: rgba(230, 164, 23, 0.6);
}

.gc-premium {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 800;
    color: #3a2a00;
    background: #fcd34d;
    border-radius: var(--radius-full);
}

.gc-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.gc-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    background: var(--secondary);
    border-radius: 18px;
}

.gc-logo img {
    width: 100%;
    height: 100%;
    padding: 6px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 18px;
}

.gc-name {
    max-width: 100%;
    overflow: hidden;
    font-size: 16px;
    font-weight: 800;
    color: var(--secondary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gc-tier {
    padding: 2px 9px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--secondary);
    border-radius: var(--radius-full);
}

.gc-city {
    margin-top: 0;
}

.gc-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 26px;
}

.gc-tag {
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--primary-light);
    border-radius: var(--radius-full);
}

.gc-tag-more {
    color: var(--text-secondary);
    background: var(--bg-app);
}

.gc-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    margin-top: auto;
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.results-empty {
    padding: 56px 20px;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.results-empty h3 {
    margin-bottom: 6px;
    color: var(--secondary);
}

.results-empty p {
    max-width: 440px;
    margin: 0 auto 18px;
    color: var(--text-secondary);
}

/* ---------- Page Location ---------- */
.rent-note {
    margin: 0;
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-secondary);
    background: var(--secondary-light, #eef2f8);
    border-radius: 12px;
}

.rent-note strong {
    color: var(--secondary);
}

/* ---------- Dates de location ---------- */
.ft-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ft-dates label {
    display: block;
}

/* Colonne laterale etroite : les deux dates l'une sous l'autre */
@media (min-width: 992px) {
    .ft-dates {
        grid-template-columns: 1fr;
    }
}

.ft-dates small {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.ft-dates .ft-input {
    padding: 0 8px;
    font-size: 13px;
}

.ft-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
}

.ft-hint.is-error {
    color: #dc2626;
    font-weight: 600;
}
