/* CLIK.ma round 119: the ONE « Filtres » window of the marketplace and the search page (__clik_flt_win.tpl,
   clik-search-page.js builds the same markup; js/core/clik-filters.js) - a native <dialog> centred on the screen
   (a sheet from the bottom on phones), its sections one under the other with a hairline between them, every choice a
   chip that shares its row (the rows end level), 16 px inside on a computer, 12 on phones, day and night, right to left */
.clik-flt{--flt-bg:#fff;--flt-fg:#1c1e21;--flt-mute:#65676b;--flt-line:#e4e6eb;--flt-field:#f5f6f8;--flt-fline:#d4d8de;--flt-chip:#fff;--flt-chipline:#d4d8de;--flt-on:#0866FF;--flt-onbg:#eef4ff;--flt-x:#e4e6eb;--flt-xfg:#4b4f56;
  width:min(720px,calc(100vw - 32px));max-width:none;max-height:min(88vh,860px);margin:auto;padding:0;border:0;border-radius:20px;background:transparent;color:var(--flt-fg);overflow:visible}
body.night-mode .clik-flt{--flt-bg:#242526;--flt-fg:#e4e6eb;--flt-mute:#b0b3b8;--flt-line:#3a3b3c;--flt-field:#3a3b3c;--flt-fline:#4e5052;--flt-chip:#2d2e30;--flt-chipline:#4e5052;--flt-on:#4C9AFF;--flt-onbg:#233a5e;--flt-x:#3a3b3c;--flt-xfg:#e4e6eb}
.clik-flt[open]{display:block}
/* the page under it does not scroll while it is open (js: html.clik-flt-lock) */
html.clik-flt-lock{overflow:hidden}
.clik-flt::backdrop{background:rgba(9,14,24,.52);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.clik-flt-card{display:flex;flex-direction:column;max-height:min(88vh,860px);border-radius:20px;background:var(--flt-bg);color:var(--flt-fg);box-shadow:0 24px 64px rgba(0,0,0,.28);overflow:hidden}
.clik-flt[open] .clik-flt-card{animation:clik-flt-in .24s cubic-bezier(.2,.8,.2,1) both}
@keyframes clik-flt-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}

/* the head: « Filtres [cube]CLIK.ma », the count of filters on, the round × */
.clik-flt-head{flex:none;display:flex;align-items:center;gap:8px;padding:16px 16px 12px;border-bottom:1px solid var(--flt-line)}
.clik-flt-t{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:10px;flex-wrap:nowrap;margin:0;font-size:20px;font-weight:800;line-height:1.2;color:inherit}
.clik-flt-t > span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.clik-flt-t .clik-brand.is-inline{flex:none;margin:0}
.clik-flt-n{flex:none;display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:999px;background:var(--flt-field);color:var(--flt-mute);font-size:12.5px;font-weight:700;white-space:nowrap}
.clik-flt-n.is-on{background:var(--flt-onbg);color:var(--flt-on)}
.clik-flt-n:empty{display:none}
.clik-flt-x{flex:none;display:inline-grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:var(--flt-x);color:var(--flt-xfg);cursor:pointer;transition:transform .2s,background .15s}
.clik-flt-x:hover{transform:rotate(90deg)}
.clik-flt-x:focus-visible{outline:2px solid var(--flt-on);outline-offset:2px}

/* the body: sections one under the other, its own scroll (no bar shown) */
.clik-flt-body{flex:1 1 auto;min-height:0;padding:0 16px;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
.clik-flt-body::-webkit-scrollbar{display:none}
.clik-flt-sec{display:grid;gap:12px;margin:0;padding:16px 0;border-bottom:1px solid var(--flt-line)}
.clik-flt-sec:last-child{border-bottom:0}
.clik-flt-sec[hidden],.clik-flt [data-k][hidden],.clik-flt-g[hidden]{display:none}
.clik-flt[open] .clik-flt-sec.is-new{animation:clik-flt-sec .32s ease both}
@keyframes clik-flt-sec{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.clik-flt-st{display:flex;align-items:center;gap:10px;margin:0;font-size:15.5px;font-weight:700;line-height:1.25;color:inherit}
.clik-flt-st > span{min-width:0}
.clik-flt-ic{flex:none;display:inline-grid;place-items:center;width:30px;height:30px;border-radius:9px;font-style:normal}
.clik-flt-ic svg{width:17px;height:17px}
.clik-flt-ic.is-blue{background:#e7f0ff;color:#0866FF}
.clik-flt-ic.is-violet{background:#f0e9ff;color:#7C3AED}
.clik-flt-ic.is-green{background:#e3f6ea;color:#16A34A}
.clik-flt-ic.is-teal{background:#e0f5f2;color:#0d9488}
.clik-flt-ic.is-red{background:#fdeaee;color:#E41E3F}
.clik-flt-ic.is-amber{background:#fff3dc;color:#D97706}
.clik-flt-ic.is-indigo{background:#ecebff;color:#4F46E5}
.clik-flt-ic.is-slate{background:#eef0f3;color:#4b5563}
.clik-flt-ic.is-pink{background:#ffe8f3;color:#DB2777}
body.night-mode .clik-flt-ic.is-blue{background:#1d3357;color:#6aa8ff}
body.night-mode .clik-flt-ic.is-violet{background:#33264f;color:#b794ff}
body.night-mode .clik-flt-ic.is-green{background:#1d3a28;color:#4ade80}
body.night-mode .clik-flt-ic.is-teal{background:#163a37;color:#2dd4bf}
body.night-mode .clik-flt-ic.is-red{background:#45212a;color:#ff6b84}
body.night-mode .clik-flt-ic.is-amber{background:#43341a;color:#fbbf24}
body.night-mode .clik-flt-ic.is-indigo{background:#2a2a52;color:#a5b4fc}
body.night-mode .clik-flt-ic.is-slate{background:#34373b;color:#cbd5e1}
body.night-mode .clik-flt-ic.is-pink{background:#46213a;color:#f9a8d4}
.clik-flt-out{margin-inline-start:auto;font-size:14px;font-weight:600;color:var(--flt-mute)}
.clik-flt-out b{color:var(--flt-on)}

/* fields: 44 px, 12 px corners; two a row (one on a narrow phone) */
.clik-flt-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.clik-flt-f{display:grid;gap:6px;min-width:0;margin:0;font-size:13px;font-weight:600;color:var(--flt-mute)}
.clik-flt-f input,.clik-flt-f select{box-sizing:border-box;width:100%;height:44px;padding:0 14px;border:1px solid var(--flt-fline);border-radius:12px;background:var(--flt-field);color:var(--flt-fg);font:inherit;font-size:15px;font-weight:500}
.clik-flt-f select{padding-inline-end:36px;-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2365676b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:18px;background-position:right 12px center}
[dir=rtl] .clik-flt-f select,.clik-flt[dir=rtl] .clik-flt-f select{background-position:left 12px center}
.clik-flt-f input:focus,.clik-flt-f select:focus{outline:0;border-color:var(--flt-on);box-shadow:0 0 0 3px rgba(8,102,255,.18);background-color:var(--flt-bg)}
.clik-flt-f :disabled{opacity:.55;cursor:not-allowed}
.clik-flt-f input::placeholder{color:#8a8d91;opacity:1}
.clik-flt-g{display:grid;gap:8px;min-width:0}
.clik-flt-gl{font-size:13px;font-weight:600;color:var(--flt-mute)}

/* chips: a radio, a checkbox or a button - they share each row, so every row ends level */
.clik-flt-chips{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
.clik-flt-chip{position:relative;flex:1 1 auto;display:flex;min-width:0;margin:0;padding:0;border:0;background:none;font:inherit;cursor:pointer}
.clik-flt-chip input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.clik-flt-chip > span{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-width:0;box-sizing:border-box;min-height:38px;padding:7px 14px;border:1px solid var(--flt-chipline);border-radius:999px;background:var(--flt-chip);color:var(--flt-fg);font-size:14px;font-weight:600;line-height:1.2;text-align:center;white-space:nowrap;transition:background .15s,border-color .15s,color .15s,transform .12s}
.clik-flt-chip:hover > span{border-color:var(--flt-on);color:var(--flt-on)}
.clik-flt-chip:active > span{transform:scale(.97)}
.clik-flt-chip input:checked + span,.clik-flt-chip[aria-pressed="true"] > span{border-color:var(--flt-on);background:var(--flt-on);color:#fff}
.clik-flt-chip input:focus-visible + span,.clik-flt-chip.is-btn:focus-visible > span{outline:2px solid var(--flt-on);outline-offset:2px}
.clik-flt-chip:focus-visible{outline:0}
.clik-flt-chip input:disabled + span{opacity:.5;cursor:not-allowed}
/* a checkbox chip: its tick appears once chosen */
.clik-flt-tick{display:none;flex:none;width:14px;height:14px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat}
.clik-flt-chip input:checked + span .clik-flt-tick{display:block}
.clik-flt-note{margin:0;font-size:12.5px;line-height:1.45;color:var(--flt-mute)}

/* the distance */
.clik-flt-range{width:100%;height:28px;margin:0;accent-color:var(--flt-on);cursor:pointer}

/* the foot: Réinitialiser, then « Voir les annonces » */
.clik-flt-foot{flex:none;display:flex;align-items:center;gap:12px;padding:12px 16px 16px;border-top:1px solid var(--flt-line);background:var(--flt-bg)}
.clik-flt-reset{flex:none;height:44px;padding:0 6px;border:0;background:none;color:var(--flt-fg);font-size:15px;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.clik-flt-reset:disabled{opacity:.4;cursor:default;text-decoration:none}
.clik-flt-alert{flex:none;display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 16px;border:1.5px solid var(--flt-line);border-radius:999px;background:var(--flt-bg);color:var(--flt-fg);font-size:15px;font-weight:700;cursor:pointer;transition:border-color .15s,color .15s,background .15s}
.clik-flt-alert svg{flex:none;display:block;color:#f59e0b}
.clik-flt-alert:hover{border-color:#f59e0b;background:color-mix(in srgb,#f59e0b 10%,var(--flt-bg))}
.clik-flt-alert:focus-visible{outline:2px solid var(--flt-on);outline-offset:2px}
.clik-flt-reset:focus-visible,.clik-flt-go:focus-visible{outline:2px solid var(--flt-on);outline-offset:2px}
.clik-flt-go{flex:1 1 auto;max-width:320px;margin-inline-start:auto;height:48px;padding:0 22px;border:0;border-radius:999px;background:linear-gradient(135deg,#2f7bff,#0a4dff);color:#fff;font-size:16px;font-weight:800;box-shadow:0 6px 18px rgba(10,77,255,.28);cursor:pointer;transition:transform .12s,box-shadow .15s}
.clik-flt-go:hover{box-shadow:0 8px 24px rgba(10,77,255,.36)}
.clik-flt-go:active{transform:scale(.98)}
body.night-mode .clik-flt-go{background:linear-gradient(135deg,#3b82ff,#1e5bff)}

/* round 122: « Vos dernières recherches » - the last filter sets of this browser, each a link and its × */
.clik-flt-rc{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
.clik-flt-rchip{display:inline-flex;align-items:center;max-width:100%;min-width:0;height:36px;padding-inline:14px 4px;border:1px solid var(--flt-chipline);border-radius:999px;background:var(--flt-chip);transition:border-color .15s,background .15s}
.clik-flt-rchip:hover{border-color:var(--flt-on);background:var(--flt-onbg)}
.clik-flt-rchip a{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--flt-fg);font-size:13.5px;font-weight:600;text-decoration:none}
.clik-flt-rchip a:focus-visible,.clik-flt-rchip button:focus-visible{outline:2px solid var(--flt-on);outline-offset:2px;border-radius:999px}
.clik-flt-rchip button{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin-inline-start:6px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--flt-mute);cursor:pointer}
.clik-flt-rchip button:hover{background:var(--flt-x);color:var(--flt-xfg)}
.clik-flt-rchip button svg{display:block}

/* phones: a sheet from the bottom, above the bottom bar, a grab line on top */
@media (max-width:575.98px){
  .clik-flt{width:100%;max-width:100%;max-height:calc(100dvh - 16px);margin:auto 0 0;border-radius:20px 20px 0 0}
  .clik-flt-card{max-height:calc(100dvh - 16px);border-radius:20px 20px 0 0;padding-bottom:env(safe-area-inset-bottom)}
  .clik-flt[open] .clik-flt-card{animation:clik-flt-up .26s cubic-bezier(.2,.8,.2,1) both}
  .clik-flt-head{position:relative;padding:20px 12px 10px}
  .clik-flt-head::before{content:"";position:absolute;top:7px;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:var(--flt-fline)}
  .clik-flt-t{font-size:clamp(16px,4.8vw,20px)}
  .clik-flt-body{padding:0 12px}
  .clik-flt-foot{padding:10px 12px 12px}
  .clik-flt-go{max-width:none}
  .clik-flt-alert{width:44px;padding:0;justify-content:center}
  .clik-flt-alert span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .clik-flt-chip > span{padding:7px 12px;font-size:13.5px}
}
@media (max-width:359.98px){.clik-flt-two{grid-template-columns:minmax(0,1fr)}.clik-flt-n{display:none}}
@keyframes clik-flt-up{from{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){
  .clik-flt[open] .clik-flt-card,.clik-flt[open] .clik-flt-sec.is-new{animation:none}
  .clik-flt-x,.clik-flt-x:hover{transition:none;transform:none}
  .clik-flt-chip > span{transition:none}
}
.clik-flt .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.clik-flt-alert.is-busy{opacity:.6;pointer-events:none}
