/* ============================================================
   ZMORDA · SEARCH SIDE CRITERIA  —  "Le réglage"
   Re-imagined rail. Scoped under .zmf-search-sidebar.
   Hard rules honored:
   · no box-shadow anywhere
   · hover = colour only (never transform)
   · focus rings via outline (not shadow)
   · inline stroke SVG icons
   · Sora / Inter / Space Mono / JetBrains Mono
   · prefers-reduced-motion respected
   ============================================================ */

.zmf-search-sidebar {
    --orange:      #ff671f;   /* CTAs only            */
    --orange-ink:  #d8500f;   /* CTA hover (darker)   */
    --blue-light:  #81c4ff;
    --blue-dark:   #2455ea;
    --navy:        #0d2c6e;
    --navy-2:      #143a8a;   /* navy gradient pair   */
    --ink:         #1b2440;
    --gray:        #6b7785;
    --paper:       #f6f9fd;
    --paper-2:     #eef3fb;
    --line:        #e4ebf7;
    --good:        #138a5e;

    --font-display: 'Sora', system-ui, -apple-system, sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:    'Space Mono', ui-monospace, 'SFMono-Regular', monospace;
    --font-data:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

    font-family: var(--font-body);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.zmf-search-sidebar,
.zmf-search-sidebar *,
.zmf-search-sidebar *::before,
.zmf-search-sidebar *::after { box-sizing: border-box; }

.zmf-search-sidebar .zmf-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================================
   NATIVE SELECT  (no bootstrap-select plugin)
   ============================================================ */
.zmf-search-sidebar select.zmf-select {
    display: block;
    width: 100%;
    min-height: 46px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 11px 38px 11px 14px;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%232455ea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease;
}

.zmf-search-sidebar select.zmf-select:hover { border-color: var(--blue-light); }

.zmf-search-sidebar select.zmf-select:focus,
.zmf-search-sidebar select.zmf-select:focus-visible {
    outline: 2px solid var(--blue-dark);
    outline-offset: 1px;
    border-color: var(--blue-dark);
}

/* ============================================================
   SHARED BUTTONS  (orange = action, flat, no shadow)
   ============================================================ */
.zmf-search-sidebar .zm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .01em;
    padding: 13px 22px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.zmf-search-sidebar .zm-btn svg { flex-shrink: 0; }

.zmf-search-sidebar .zm-btn--primary {
    background: var(--orange);
    color: #fff;
}
.zmf-search-sidebar .zm-btn--primary:hover,
.zmf-search-sidebar .zm-btn--primary:focus { background: var(--orange-ink); color: #fff; }
.zmf-search-sidebar .zm-btn--primary:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -5px;
}

.zmf-search-sidebar .zm-btn--block { width: 100%; }

/* ============================================================
   MAIN PANEL  (collapsible — pure CSS checkbox)
   ============================================================ */
.zmf-search-sidebar .zmf-panel {
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
}

.zmf-search-sidebar .zmf-collapse-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* --- header --- */
.zmf-search-sidebar .zmf-panel__head {
    padding: 16px 18px;
    border-bottom: 1.5px solid var(--line);
    background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}

.zmf-search-sidebar .zmf-head-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.zmf-search-sidebar .zmf-panel__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--ink);
    line-height: 1.2;
}

.zmf-search-sidebar .zmf-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    background: var(--paper-2);
    border: 1.5px solid var(--line);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease;
}
.zmf-search-sidebar .zmf-icon-btn:hover {
    color: var(--blue-dark);
    border-color: var(--blue-light);
}
.zmf-search-sidebar .zmf-icon-btn svg { transition: transform .3s ease; }
.zmf-search-sidebar .zmf-collapse-btn:focus-visible {
    outline: 3px solid var(--blue-light);
    outline-offset: 2px;
}
.zmf-search-sidebar .zmf-collapse-toggle:checked ~ .zmf-panel__head .zmf-collapse-btn svg {
    transform: rotate(180deg);
}
.zmf-search-sidebar .zmf-collapse-toggle:checked ~ .zmf-panel__body {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

/* --- signature: segmented filter gauge --- */
.zmf-search-sidebar .zmf-meter { margin-top: 13px; }

.zmf-search-sidebar .zmf-gauge {
    position: relative;
    height: 9px;
    border-radius: 999px;
    background: var(--paper-2);
    overflow: hidden;
}
.zmf-search-sidebar .zmf-gauge__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue-light) 0%, var(--blue-dark) 58%, var(--orange) 100%);
    transition: width .45s cubic-bezier(.4, 0, .2, 1);
}
/* 7 hairline separators → 8 readable segments */
.zmf-search-sidebar .zmf-gauge__ticks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
            90deg,
            transparent 0 calc(12.5% - 2px),
            #fff calc(12.5% - 2px) 12.5%
    );
}

.zmf-search-sidebar .zmf-meter__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
}

.zmf-search-sidebar .zmf-meter__txt {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: -.01em;
    color: var(--gray);
}
.zmf-search-sidebar .zmf-meter__txt b {
    font-family: var(--font-data);
    font-weight: 700;
    font-size: 13px;
    color: var(--blue-dark);
}
.zmf-search-sidebar .zmf-meter__den { color: var(--blue-light); font-weight: 700; }
.zmf-search-sidebar .zmf-meter__count {
    font-family: var(--font-data);
    font-weight: 600;
    color: var(--ink);
}

.zmf-search-sidebar .zmf-clear {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    min-height: 32px;
    padding: 5px 9px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: color .18s ease, background-color .18s ease;
}
.zmf-search-sidebar .zmf-clear:hover {
    color: var(--orange);
    background: rgba(255, 103, 31, .08);
}
.zmf-search-sidebar .zmf-clear:focus-visible {
    outline: 3px solid var(--blue-light);
    outline-offset: 2px;
}

/* --- body --- */
.zmf-search-sidebar .zmf-panel__body {
    padding: 6px 18px 18px;
    max-height: 4000px;
    opacity: 1;
    transition: max-height .4s ease, opacity .3s ease, padding .4s ease;
}

/* free-text search */
.zmf-search-sidebar .zmf-search-input {
    position: relative;
    margin: 12px 0 4px;
}
.zmf-search-sidebar .zmf-search-input svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
}
.zmf-search-sidebar .zmf-search-input input {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px 12px 38px;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    background: var(--paper);
    transition: border-color .18s ease, background-color .18s ease;
}
.zmf-search-sidebar .zmf-search-input input::placeholder { color: var(--gray); }
.zmf-search-sidebar .zmf-search-input input:focus {
    outline: 2px solid var(--blue-dark);
    outline-offset: 1px;
    border-color: var(--blue-dark);
    background: #fff;
}

/* ============================================================
   FILTER GROUPS  (always visible — no accordion)
   ============================================================ */
.zmf-search-sidebar .zmf-group {
    border-top: 1px solid var(--line);
}
.zmf-search-sidebar .zmf-group:first-of-type { border-top: none; }

/* summary = clickable mono eyebrow with instrument tick + chevron */
.zmf-search-sidebar .zmf-group__label {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 14px 2px;
    user-select: none;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--gray);
    transition: color .18s ease;
}
.zmf-search-sidebar .zmf-group__label::-webkit-details-marker { display: none; }
.zmf-search-sidebar .zmf-group__label:hover { color: var(--ink); }
.zmf-search-sidebar .zmf-group__label::before {
    content: "";
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--orange);
    flex-shrink: 0;
}
.zmf-search-sidebar .zmf-group__label:focus-visible {
    outline: 3px solid var(--blue-light);
    outline-offset: -2px;
    border-radius: 6px;
}

.zmf-search-sidebar .zmf-group__chev {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--gray);
    transition: transform .3s ease, color .18s ease;
}
.zmf-search-sidebar .zmf-group[open] > .zmf-group__label { color: var(--ink); }
.zmf-search-sidebar .zmf-group[open] > .zmf-group__label .zmf-group__chev {
    transform: rotate(180deg);
    color: var(--blue-dark);
}

.zmf-search-sidebar .zmf-group__body {
    padding: 0 2px 16px;
    animation: zmfReveal .28s ease;
}
@keyframes zmfReveal {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* two-up grid */
.zmf-search-sidebar .zmf-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 420px) {
    .zmf-search-sidebar .zmf-grid-2 { grid-template-columns: 1fr; }
}

/* trending tags */
.zmf-search-sidebar .zmf-quick-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px;
}
.zmf-search-sidebar .zmf-quick-tags__label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray);
}
.zmf-search-sidebar .zmf-quick-tags__label svg { color: var(--orange); }

.zmf-search-sidebar .zmf-tag {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-dark);
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(36, 85, 234, .07);
    border: 1px solid rgba(36, 85, 234, .14);
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.zmf-search-sidebar .zmf-tag:hover {
    background: var(--blue-dark);
    color: #fff;
    border-color: var(--blue-dark);
}

/* ============================================================
   CHIP TOGGLES  (carrosserie — multi-select)
   ============================================================ */
.zmf-search-sidebar .zmf-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}
.zmf-search-sidebar .zmf-chip { position: relative; display: block; cursor: pointer; }
.zmf-search-sidebar .zmf-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.zmf-search-sidebar .zmf-chip__face {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 11px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.zmf-search-sidebar .zmf-chip:hover .zmf-chip__face { border-color: var(--blue-light); }
.zmf-search-sidebar .zmf-chip input:checked + .zmf-chip__face {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}
.zmf-search-sidebar .zmf-chip input:focus-visible + .zmf-chip__face {
    outline: 3px solid var(--blue-light);
    outline-offset: 2px;
}

/* ============================================================
   SEGMENTED PAIR  (boîte — auto / manuelle)
   ============================================================ */
.zmf-search-sidebar .zmf-seg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}
.zmf-search-sidebar .zmf-seg { position: relative; display: block; cursor: pointer; }
.zmf-search-sidebar .zmf-seg input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.zmf-search-sidebar .zmf-seg__face {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 12px;
    border-radius: 11px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.zmf-search-sidebar .zmf-seg:hover .zmf-seg__face { border-color: var(--blue-light); }
.zmf-search-sidebar .zmf-seg input:checked + .zmf-seg__face {
    background: rgba(36, 85, 234, .08);
    border-color: var(--blue-dark);
    color: var(--blue-dark);
}
.zmf-search-sidebar .zmf-seg input:focus-visible + .zmf-seg__face {
    outline: 3px solid var(--blue-light);
    outline-offset: 2px;
}

/* ============================================================
   CTA + footer note
   ============================================================ */
.zmf-search-sidebar .zmf-cta-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.zmf-search-sidebar .zmf-cta-note {
    margin: 11px 0 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: -.01em;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.zmf-search-sidebar .zmf-cta-note svg { color: var(--good); flex-shrink: 0; }

/* ============================================================
   SELL CARD  (navy block — keeps orange for the action only)
   ============================================================ */
.zmf-search-sidebar .zmf-sell-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 22px;
    color: #fff;
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 100%);
}
.zmf-search-sidebar .zmf-sell-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 70px);
    pointer-events: none;
}
.zmf-search-sidebar .zmf-sell-card__inner { position: relative; z-index: 1; }

.zmf-search-sidebar .zmf-sell-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    background: rgba(129, 196, 255, .18);
    color: var(--blue-light);
    padding: 5px 11px;
    border-radius: 999px;
    margin-bottom: 13px;
}
.zmf-search-sidebar .zmf-sell-card h4 {
    color: #fff;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 6px;
}
.zmf-search-sidebar .zmf-sell-card p {
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 16px;
}

/* ============================================================
   TRUST STRIP
   ============================================================ */
.zmf-search-sidebar .zmf-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 16px;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: -.01em;
    color: var(--gray);
    padding: 0;
    margin: 0;
}
.zmf-search-sidebar .zmf-trust-row li {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}
.zmf-search-sidebar .zmf-trust-row svg { color: var(--blue-dark); flex-shrink: 0; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .zmf-search-sidebar *,
    .zmf-search-sidebar *::before,
    .zmf-search-sidebar *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================
   TOGGLE SWITCH  (première main)
   ============================================================ */
.zmf-search-sidebar .zmf-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    cursor: pointer;
}
.zmf-search-sidebar .zmf-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.zmf-search-sidebar .zmf-switch__track {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: var(--line);
    transition: background-color .2s ease;
}
.zmf-search-sidebar .zmf-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}
.zmf-search-sidebar .zmf-switch input:checked + .zmf-switch__track {
    background: var(--orange);
}
.zmf-search-sidebar .zmf-switch input:checked + .zmf-switch__track::after {
    transform: translateX(20px);
}
.zmf-search-sidebar .zmf-switch input:focus-visible + .zmf-switch__track {
    outline: 3px solid var(--blue-light);
    outline-offset: 2px;
}
.zmf-search-sidebar .zmf-switch__label {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}