:root {
  /* Direction « Carré » en clair : blanc, contours discrets, lilas pour l'action. Police : Hanken Grotesk. */
  --bg0: #f3f2f6;         /* fond de page et de carte */
  --surface: #ffffff;     /* panneaux */
  --raised: #ffffff;      /* champs, boutons */
  --line: #e5e3ea;        /* contours discrets */
  --line-2: #cbc8d4;      /* contours au survol */
  --ink: #17151c;
  --ink-2: #53505d;
  --ink-3: #85828f;
  --plaque: #9b82fb;      /* lilas : action principale */
  --plaque-2: #8c70f7;    /* survol */
  --on-plaque: #120e1f;   /* texte posé sur le lilas */
  --rose-text: #5f43d1;   /* liens */
  --rose-tint: #f6f4fb;   /* survol discret */
  --lilas: #f0ebff;       /* sélection douce */
  --lilas-line: #a891fb;
  --lilas-ink: #4630a8;
  --field: #ffffff;
  --field-line: #e2e0e8;
  --vert: #2b9a66;        /* Nord-Est, favoris */
  --metro: #f5c518;       /* nouveauté */
  --rouge: #e5484d;
  --glass: #ffffff;
  --glass-strong: #ffffff;
  --glass-line: #e5e3ea;
  --hair: #e5e3ea;
  --shadow: 0 0 0 1px #e5e3ea, 0 12px 32px -18px rgb(30 20 60 / .22);
  --alert-bg: #f8f6ff; --alert-line: #e7e0fd; --seg-on: #ffffff; --card: #ffffff; --ph: #ecebf0; --tag-bg: #f1f0f4;
  --pin-seen: #f1f0f4; --cluster-bg: rgb(255 255 255 / .96); --on-vert: #ffffff; --on-rouge: #ffffff; --float-bg: rgb(255 255 255 / .92);
  --track: #d6d4dd; --attr-bg: rgb(255 255 255 / .8); --scrim: rgb(20 16 35 / .4); --accent-wash: rgb(155 130 251 / .14); --danger: #d13c3c;
  --pv-close: rgb(0 0 0 / .05); --float-shadow: 0 16px 40px -14px rgb(30 20 60 / .3); --arr-label: rgb(95 67 209 / .55); --arr-label-pref: rgb(43 154 102 / .8);
  --pref-soft: rgb(43 154 102 / .45); --accent-ring: rgb(155 130 251 / .16); --unseen-ink: #8a6a00;
  --r-panel: 10px;
  --r-card: 8px;
  --r-ctl: 6px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #dfe5ec; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--rose-text); outline-offset: 2px; }
h1, h2 { margin: 0; }

/* Carte en fond plein écran */
.map { position: fixed; inset: 0; z-index: 0; }

/* Verre */
.glass {
  position: fixed; z-index: 10;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  backdrop-filter: blur(22px) saturate(1.8);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
}

/* Barre du haut */
.topbar {
  top: 14px; left: 14px; right: 14px; height: 62px; border-radius: 18px;
  display: flex; align-items: center; gap: 18px; padding: 0 12px 0 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-plaque {
  font-family: 'Archivo', sans-serif; font-variation-settings: 'wdth' 70; font-weight: 800; font-size: 15px;
  color: var(--on-plaque); background: var(--plaque); border-radius: 8px; padding: 6px 8px 5px;
  box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1.5px var(--vert);
}
.brand h1 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.count { margin: 0; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sources { display: flex; gap: 6px; margin-left: auto; }
.src-status {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px;
  background: rgb(255 255 255 / .55); border: 1px solid var(--hair); font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.src-status i { width: 7px; height: 7px; border-radius: 50%; background: #34b46e; box-shadow: 0 0 0 3px rgb(52 180 110 / .18); }
.src-status i.bad { background: var(--metro); box-shadow: 0 0 0 3px rgb(245 197 24 / .25); }
.src-status i.none { background: #a0a8b4; box-shadow: none; }
.btn-primary {
  border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: 13.5px; color: var(--on-plaque);
  background: linear-gradient(180deg, var(--plaque-2), var(--plaque));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 6px 16px -6px rgb(90 60 194 / .6);
  transition: transform .15s var(--ease), filter .15s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(.97); }
.btn-primary[disabled] { opacity: .65; cursor: progress; }

/* Panneaux */
.panel { top: 90px; bottom: 14px; border-radius: var(--r-panel); overflow: hidden; display: flex; flex-direction: column; }
.filters { left: 14px; width: 292px; overflow-y: auto; padding: 6px 18px 18px; scrollbar-width: thin; }
.results { right: 14px; width: min(470px, 40vw); }

.block { padding: 14px 0; border-bottom: 1px solid var(--hair); }
.block:last-child { border-bottom: 0; }
.block h2 { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 12px 0 8px; }
.block > h2:first-child { margin-top: 2px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 8px; }
.block-head h2 { margin: 0; }
.block-head + .range { margin-bottom: 14px; }
.big-value { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.quick { display: flex; gap: 6px; align-items: center; margin: -4px 0 8px; }
.hint { font-size: 12px; color: var(--ink-3); margin-left: 2px; }
.pill-btn { white-space: nowrap;
  border: 1px solid var(--hair); background: rgb(255 255 255 / .6); border-radius: 99px; padding: 3px 10px;
  font-size: 12px; font-weight: 500; transition: background .15s;
}
.pill-btn:hover { background: #fff; }

/* Grille d'arrondissements en mini-plaques */
.arr-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 12px; }
.arr-grid button {
  height: 34px; border-radius: 9px; border: 1px solid var(--hair); background: rgb(255 255 255 / .55);
  font-family: 'Archivo', sans-serif; font-variation-settings: 'wdth' 72; font-weight: 700; font-size: 14px; color: var(--ink-2);
  transition: background .15s, color .15s, box-shadow .15s, transform .12s var(--ease);
}
.arr-grid button sup { font-size: 9px; }
.arr-grid button:hover { background: #fff; color: var(--ink); }
.arr-grid button:active { transform: scale(.94); }
.arr-grid button.pref { box-shadow: inset 0 -2px 0 var(--vert); }
.arr-grid button[aria-pressed=true] { background: var(--plaque); color: var(--on-plaque); border-color: var(--plaque); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .9); }
.arr-grid button.pref[aria-pressed=true] { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .9), 0 0 0 2px var(--vert); }

/* Curseurs */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; }
.range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--plaque) var(--fill, 100%), rgb(17 26 40 / .1) var(--fill, 100%));
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; margin-top: -8px; background: #fff;
  border: 0; box-shadow: 0 0 0 .5px rgb(0 0 0 / .1), 0 3px 8px rgb(0 0 0 / .18);
}
.range::-moz-range-track { height: 6px; border-radius: 99px; background: rgb(17 26 40 / .1); }
.range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--plaque); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 3px 8px rgb(0 0 0 / .18); }

/* Contrôles segmentés */
.seg { display: flex; padding: 3px; gap: 2px; border-radius: var(--r-ctl); background: rgb(17 26 40 / .06); }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 6px 0; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: background .18s var(--ease), color .18s, box-shadow .18s;
}
.seg button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .1), 0 0 0 .5px rgb(0 0 0 / .04); font-weight: 600; }

/* Interrupteurs */
.switch { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); padding: 5px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { flex: none; width: 34px; height: 20px; border-radius: 99px; background: rgb(17 26 40 / .14); position: relative; transition: background .2s var(--ease); }
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s var(--ease);
}
.switch input:checked + .track { background: var(--plaque); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--rose-text); outline-offset: 2px; }

/* Contact en un clic */
.contact-btn { width: 100%; padding: 13px; font-size: 15px; border-radius: 14px; }
.wide-btn { width: 100%; padding: 10px; font-size: 13px; }
#compose { position: fixed; inset: 0; z-index: 70; }
#compose[hidden] { display: none; }
.compose-backdrop { position: absolute; inset: 0; background: rgb(15 25 40 / .3); }
.compose {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  overflow-y: auto; border-radius: 22px; padding: 18px 20px 16px; background: rgb(255 255 255 / .92); display: flex; flex-direction: column; gap: 10px;
}
.compose-head { display: flex; align-items: center; justify-content: space-between; }
.compose-head h2 { font-size: 18px; font-weight: 700; }
.compose-x { position: static; }
.compose-site, .compose-info { margin: 0; font-size: 13px; color: var(--ink-2); }
.compose-info code { font-size: 12px; background: rgb(108 79 214 / .1); padding: 1px 5px; border-radius: 5px; }
.compose textarea { width: 100%; font-size: 14px; line-height: 1.5; border: 1px solid var(--hair); border-radius: 12px; padding: 12px; background: #fff; resize: vertical; }
.compose-foot { display: flex; align-items: center; gap: 8px; }
.compose-status { flex: 1; font-size: 13px; color: var(--ink-2); }
.compose .btn-primary[disabled] { opacity: .45; cursor: not-allowed; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.set-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.set-grid .wide { grid-column: 1 / -1; }
.set-grid input { font-size: 15px; padding: 9px 11px; border: 1px solid var(--hair); border-radius: 10px; background: #fff; }
@media (max-width: 820px) {
  .compose { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; padding-bottom: calc(var(--safe-bottom) + 14px); }
  .set-grid { grid-template-columns: 1fr; }
}

/* Puces de caractéristiques */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  border: 1px solid var(--hair); background: rgb(255 255 255 / .6); border-radius: 99px; padding: 6px 11px; font-size: 12.5px; font-weight: 500;
  color: var(--ink-2); transition: background .15s, color .15s;
}
.chips button[aria-pressed=true] { background: var(--plaque); border-color: var(--plaque); color: var(--on-plaque); font-weight: 600; }
.hint-block { margin: -4px 0 8px; font-size: 12px; color: var(--ink-3); }
.feat { padding: 3px 8px; border-radius: 99px; background: rgb(108 79 214 / .1); color: var(--rose-text); font-weight: 500; font-size: 12px; }
.feat.bad { background: rgb(194 65 47 / .1); color: var(--rouge); }
.feats { display: flex; flex-wrap: wrap; gap: 5px; }

/* Puces de sites */
.src-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.src-chips label { cursor: pointer; }
.src-chips input { position: absolute; opacity: 0; }
.src-chips span {
  display: inline-block; padding: 6px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--hair); background: rgb(255 255 255 / .4); color: var(--ink-3); text-decoration: line-through; transition: all .15s;
}
.src-chips input:checked + span { background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.src-chips input:focus-visible + span { outline: 2px solid var(--rose-text); outline-offset: 2px; }

/* Liste */
.results-head { padding: 12px 12px 10px; border-bottom: 1px solid var(--hair); background: rgb(255 255 255 / .35); }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgb(17 26 40 / .06); overflow-x: auto; scrollbar-width: none; }
.tabs button {
  flex: 1 0 auto; border: 0; background: transparent; border-radius: 9px; padding: 6px 7px; font-size: 12px; font-weight: 500; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; transition: background .18s var(--ease);
}
.tabs button small { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tabs button[aria-pressed=true] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgb(0 0 0 / .1); }
.sortrow { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 0 2px; }
.shown { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sortrow select {
  border: 1px solid var(--hair); background: rgb(255 255 255 / .7); border-radius: 9px; padding: 5px 8px; font-size: 12.5px; font-weight: 500;
}

.list { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.list > li { flex: none; }
.more { text-align: center; padding: 4px 0 10px; }
.more button { border: 1px solid var(--hair); background: #fff; border-radius: 99px; padding: 10px 18px; font-weight: 600; font-size: 13px; color: var(--rose-text); }
.empty { padding: 50px 20px; text-align: center; color: var(--ink-2); max-width: 36ch; margin: 0 auto; }

/* Carte d'annonce */
.ad {
  background: var(--glass-strong); border-radius: var(--r-card); overflow: hidden; border: 1px solid rgb(255 255 255 / .9);
  box-shadow: 0 1px 2px rgb(20 35 60 / .06), 0 8px 24px -14px rgb(20 35 60 / .25);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.ad:hover { box-shadow: 0 1px 2px rgb(20 35 60 / .06), 0 14px 32px -14px rgb(20 35 60 / .38); }
.ad.hl { box-shadow: 0 0 0 2px var(--rose-text), 0 14px 32px -14px rgb(20 35 60 / .38); }
.ad.ecarte { opacity: .5; }

.photo { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #d5dce5, #c4ccd7); overflow: hidden; isolation: isolate; }
.snap {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.snap::-webkit-scrollbar { display: none; }
.snap img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; display: block; scroll-snap-align: center; scroll-snap-stop: always; user-select: none; -webkit-user-drag: none; }
.g-main .snap img { object-fit: contain; }
.photo::after { content: ''; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgb(0 0 0 / .45)); pointer-events: none; }
.photo .over { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; color: #fff; }
.photo .price { font-size: 25px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px rgb(0 0 0 / .35); line-height: 1; }
.photo .price small { font-size: 13px; font-weight: 500; opacity: .85; margin-left: 2px; }
.photo .count { color: #fff; font-size: 11.5px; padding: 3px 8px; border-radius: 99px; background: rgb(0 0 0 / .35); backdrop-filter: blur(8px); }
.photo .nav { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 8px; opacity: 0; transition: opacity .2s; z-index: 1; pointer-events: none; }
.ad:hover .photo .nav, .photo .nav:focus-within { opacity: 1; }
.photo .nav button {
  pointer-events: auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .6);
  background: rgb(255 255 255 / .7); backdrop-filter: blur(10px); font-size: 17px; line-height: 1; font-weight: 600; display: grid; place-items: center;
}
.badge-new {
  position: absolute; top: 10px; left: 10px; z-index: 1; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650;
  background: var(--metro); color: var(--ink); box-shadow: 0 2px 8px rgb(0 0 0 / .2);
}

/* Plaque d'arrondissement */
.plaque {
  position: absolute; top: 10px; right: 10px; z-index: 1; min-width: 44px; text-align: center; border-radius: 7px; padding: 3px 6px 2px;
  background: var(--plaque); color: var(--on-plaque); line-height: 1; font-family: 'Archivo', sans-serif;
  box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1.5px var(--plaque), 0 4px 10px rgb(0 0 0 / .25);
}
.plaque.pref { box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 2.5px var(--vert), 0 4px 10px rgb(0 0 0 / .25); }
.plaque b { display: block; font-size: 20px; font-weight: 800; font-variation-settings: 'wdth' 62; }
.plaque b sup { font-size: 10px; }
.plaque small { display: block; font-size: 8px; font-weight: 700; font-variation-settings: 'wdth' 70; letter-spacing: .05em; opacity: .85; margin-top: 1px; }
.plaque.nc { background: #6b7685; box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1.5px #6b7685; }

.body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.facts strong { color: var(--ink); font-weight: 600; }
.title { margin: 0; font-weight: 600; font-size: 14.5px; letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desc { margin: 0; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.desc.open { -webkit-line-clamp: unset; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.meta .sep { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: rgb(90 60 194 / .08); color: var(--rose-text); text-decoration: none; transition: background .15s, color .15s;
}
.chip:hover { background: var(--plaque); color: var(--on-plaque); }
.chip svg { width: 10px; height: 10px; }
.tag { padding: 3px 8px; border-radius: 99px; background: rgb(17 26 40 / .06); color: var(--ink-2); font-weight: 500; }

.actions { display: flex; gap: 6px; margin-top: 3px; }
.actions button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--hair);
  background: rgb(255 255 255 / .7); border-radius: 10px; padding: 7px 4px; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  transition: background .15s, color .15s, transform .12s var(--ease);
}
.actions button:hover { background: #fff; color: var(--ink); }
.actions button:active { transform: scale(.96); }
.actions button svg { width: 14px; height: 14px; }
.actions button[aria-pressed=true] { background: var(--plaque); border-color: var(--plaque); color: var(--on-plaque); }
.actions button[data-status=favori][aria-pressed=true] { background: var(--vert); border-color: var(--vert); }
.actions button[data-status=ecarte][aria-pressed=true] { background: var(--rouge); border-color: var(--rouge); }
.actions button.ghost { flex: 0 0 auto; padding: 7px 10px; }
.notes {
  width: 100%; font-size: 13px; border: 1px solid var(--hair); border-radius: 10px; padding: 8px 10px; resize: vertical; min-height: 38px;
  background: rgb(255 255 255 / .7); color: var(--ink);
}

/* Carte : tuiles, contours, marqueurs */
.leaflet-container { background: #e7ebef; font-family: 'Geist', system-ui, sans-serif; }
.leaflet-control-zoom { border: 0 !important; margin-left: 320px !important; margin-top: 92px !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-control-zoom a { background: var(--glass) !important; backdrop-filter: blur(16px); color: var(--ink) !important; border-color: var(--hair) !important; }
.leaflet-control-attribution { background: rgb(255 255 255 / .5) !important; backdrop-filter: blur(8px); border-radius: 8px 0 0 0; margin-right: calc(min(470px, 40vw) + 28px) !important; }
.arr-label { font-family: 'Archivo', sans-serif; font-variation-settings: 'wdth' 70; font-weight: 800; font-size: 13px; color: rgb(90 60 194 / .55); text-align: center; pointer-events: none; }
.arr-label.pref { color: rgb(46 138 90 / .8); }

.price-pin {
  transform: translate(-50%, -100%); display: inline-block; white-space: nowrap; padding: 4px 8px; border-radius: 99px;
  background: #fff; color: var(--ink); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1px rgb(17 26 40 / .1), 0 4px 10px -2px rgb(20 35 60 / .3);
  transition: transform .18s var(--ease), background .15s, color .15s; position: relative;
}
.price-pin::after { content: ''; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; background: inherit; transform: translateX(-50%) rotate(45deg); box-shadow: 1px 1px 0 rgb(17 26 40 / .08); }
.price-pin.pref { box-shadow: 0 0 0 1.5px var(--vert), 0 4px 10px -2px rgb(20 35 60 / .3); }
.price-pin.new::before { content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--metro); border: 1.5px solid #fff; }
.price-pin.fav { background: var(--vert); color: #fff; }
.price-pin.seen { background: #eef1f4; color: var(--ink-3); }
.price-pin.hl { background: var(--plaque); color: var(--on-plaque); transform: translate(-50%, -100%) scale(1.15); z-index: 1000; }
.leaflet-marker-icon.pin-wrap { width: auto !important; height: auto !important; background: none; border: 0; }

.cluster {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-weight: 650; font-size: 13px; color: var(--rose-text);
  background: rgb(255 255 255 / .82); backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgb(90 60 194 / .14), 0 0 0 5px rgb(108 79 214 / .12), 0 6px 14px -6px rgb(20 35 60 / .45);
  font-variant-numeric: tabular-nums; transition: transform .15s var(--ease);
}
.cluster:hover { transform: scale(1.08); }
.cluster.lg { width: 48px; height: 48px; font-size: 14px; background: var(--plaque); color: var(--on-plaque); box-shadow: 0 0 0 5px rgb(108 79 214 / .18), 0 6px 14px -6px rgb(20 35 60 / .5); }
.leaflet-marker-icon.cluster-wrap { background: none; border: 0; }

.leaflet-popup-content-wrapper {
  background: var(--glass-strong); backdrop-filter: blur(20px) saturate(1.6); border-radius: 16px; padding: 0; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--glass-line);
}
.leaflet-popup-content { margin: 0; width: 240px !important; }
.leaflet-popup-tip { background: var(--glass-strong); }
.pop img { width: 100%; height: 130px; object-fit: cover; display: block; }
.pop .pb { padding: 10px 12px 12px; }
.pop .pp { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.pop .pf { font-size: 12.5px; color: var(--ink-2); margin: 2px 0 8px; }
.pop a { font-size: 12.5px; font-weight: 600; color: var(--rose-text); }

/* Fiche annonce */
#detail { position: fixed; inset: 0; z-index: 50; }
@media (max-width: 820px) { #detail { bottom: calc(-1 * var(--gap, 0px)); } }
.detail-backdrop { position: absolute; inset: 0; background: rgb(15 25 40 / .28); backdrop-filter: blur(3px); }
.detail-backdrop.opening { animation: fade .25s var(--ease); }
.detail {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(1120px, calc(100vw - 40px)); height: min(760px, calc(100vh - 40px));
  border-radius: 26px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); overflow: hidden;
  background: rgb(255 255 255 / .72);
}
.detail.opening { animation: pop .32s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.detail-close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--glass-line);
  background: rgb(255 255 255 / .8); backdrop-filter: blur(10px); display: grid; place-items: center; box-shadow: 0 4px 12px rgb(0 0 0 / .12);
}
.detail-close svg { width: 17px; height: 17px; }
.gallery { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #0f1724; }
.g-main { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.g-empty { color: #8b97a8; }
.g-main .plaque { top: 16px; left: 16px; right: auto; }
.g-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .35);
  background: rgb(255 255 255 / .18); backdrop-filter: blur(12px); color: #fff; font-size: 24px; line-height: 1; display: grid; place-items: center;
  transition: background .15s;
}
.g-nav:hover { background: rgb(255 255 255 / .32); }
.g-nav.prev { left: 14px; } .g-nav.next { right: 14px; }
.g-count { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgb(0 0 0 / .4); backdrop-filter: blur(8px); font-variant-numeric: tabular-nums; }
.g-thumbs { display: flex; gap: 6px; padding: 10px; overflow-x: auto; scrollbar-width: thin; background: rgb(0 0 0 / .25); }
.g-thumbs button { flex: none; width: 74px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; opacity: .6; background: #222; transition: opacity .15s, border-color .15s; }
.g-thumbs button:hover { opacity: .9; }
.g-thumbs button[aria-current=true] { opacity: 1; border-color: #fff; }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-info { min-width: 0; overflow-y: auto; padding: 26px 26px 30px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.d-price { font-size: 34px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.d-price small { font-size: 15px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.d-facts { font-size: 14px; }
.d-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.tag.new { background: var(--metro); color: var(--ink); }
.tag.temp { background: rgb(194 65 47 / .12); color: var(--rouge); font-weight: 600; }
.d-info h3 { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.d-desc { padding-top: 6px; }
.d-desc p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--ink); max-width: 62ch; }
.d-desc p.muted { color: var(--ink-3); }
.d-links { display: flex; flex-direction: column; gap: 6px; }
.src-link {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; text-decoration: none; color: var(--ink);
  background: rgb(255 255 255 / .75); border: 1px solid var(--hair); font-weight: 600; transition: background .15s, transform .12s var(--ease);
}
.src-link:hover { background: #fff; }
.src-link:active { transform: scale(.99); }
.src-link b { margin-left: auto; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.src-link svg { width: 14px; height: 14px; color: var(--rose-text); }
.ad[data-open] { cursor: pointer; }

/* Barre du haut compacte */
.topbar { gap: 12px; }
.count, .src-status, .btn-primary, .btn-ghost { white-space: nowrap; }
.sources { gap: 4px; min-width: 0; overflow: hidden; }
.src-status { padding: 5px 9px; font-size: 12px; gap: 6px; }
@media (max-width: 1500px) { .src-status { font-size: 0; gap: 0; padding: 7px; } .src-status i { margin: 0; } .src-status::after { content: attr(data-short); font-size: 11.5px; margin-left: 5px; } }

/* Nouveautés et temps réel */
.fresh-row { margin-top: 8px; }
.seg.fresh button { padding: 5px 0; font-size: 12.5px; }
.mark-seen {
  display: block; width: 100%; margin-top: 8px; border: 0; border-radius: 10px; padding: 7px 10px; font-size: 12.5px; font-weight: 600;
  background: rgb(108 79 214 / .1); color: var(--rose-text);
}
.mark-seen:hover { background: rgb(108 79 214 / .18); }
.mark-seen[hidden] { display: none; }
.section { position: sticky; top: -12px; z-index: 2; padding: 4px 2px 0; }
.section h3 {
  display: inline-block; margin: 0; font-size: 12px; font-weight: 650; color: var(--ink-2); padding: 4px 10px; border-radius: 99px;
  background: rgb(255 255 255 / .85); backdrop-filter: blur(10px); box-shadow: 0 1px 3px rgb(0 0 0 / .08);
}
.ad.unseen { box-shadow: 0 0 0 2px var(--metro), 0 8px 24px -14px rgb(20 35 60 / .25); }
.ad.unseen .body::before {
  content: 'Non vue'; align-self: flex-start; font-size: 11px; font-weight: 650; color: #8a6a00; background: rgb(245 197 24 / .22); padding: 2px 8px; border-radius: 99px;
}
.badge-new.hot { background: #ff5a3c; color: #fff; }
.src-status i.live { background: var(--rose-text); box-shadow: 0 0 0 3px rgb(108 79 214 / .25); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgb(108 79 214 / .05); } }
.btn-ghost { border: 1px solid var(--hair); background: rgb(255 255 255 / .6); border-radius: 12px; padding: 9px 13px; font-size: 13px; font-weight: 500; }
.btn-ghost:hover { background: #fff; }
.btn-ghost[hidden] { display: none; }
.toasts { position: fixed; z-index: 60; top: 88px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  position: relative; pointer-events: auto; cursor: pointer; padding: 12px 18px; border-radius: 16px; font-size: 13.5px; line-height: 1.4; min-width: 280px;
  background: rgb(255 255 255 / .85); animation: drop .35s var(--ease); transition: opacity .5s, transform .5s var(--ease); border-left: 4px solid var(--metro);
}
.toast b { font-weight: 650; }
.toast span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } }

@media (max-width: 1150px) {
  .filters { width: 250px; }
  .results { width: min(420px, 46vw); }
  .leaflet-control-zoom { margin-left: 278px !important; }
}
/* Barre d'onglets : téléphone uniquement */
.tabbar { display: none; }

/* Éléments réservés au téléphone */
.sheet-head, .sheet-foot, .preview { display: none; }

/* ---------- Téléphone : inspiré des apps immobilières (en-tête fixe, liste pleine largeur,
   barre d'onglets collée en bas, filtres en plein écran, aperçu en bas de la carte) ---------- */
@media (max-width: 820px) {
  :root { --safe-top: env(safe-area-inset-top); --safe-bottom: env(safe-area-inset-bottom); --head: calc(var(--safe-top) + 56px); --tabs: calc(var(--safe-bottom) + 58px);
    /* --gap : bande manquante en bas sur iOS en mode app (mesurée en JS) ; --tabs-top : haut de la barre d'onglets */
    --tabs-top: calc(var(--tabs) - var(--gap, 0px)); }
  html, body { height: 100%; background: var(--rose-tint); }
  body { overscroll-behavior: none; }
  .map { position: fixed; top: 0; bottom: calc(-1 * var(--gap, 0px)); left: 0; right: 0; height: auto; }

  /* En-tête collé en haut, sous la barre d'état */
  .topbar {
    top: 0; left: 0; right: 0; height: var(--head); padding: var(--safe-top) 14px 0; border-radius: 0; gap: 10px;
    border-width: 0 0 1px; background: rgb(255 255 255 / .86); box-shadow: 0 1px 0 var(--hair);
  }
  .brand { gap: 10px; min-width: 0; }
  .brand-plaque { font-size: 13px; padding: 5px 7px 4px; }
  .brand h1 { font-size: 16px; }
  .count { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
  .sources, #notifs, #scrape { display: none; }

  /* Barre d'onglets collée en bas, au-dessus de la barre d'accueil */
  .tabbar {
    display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: calc(-1 * var(--gap, 0px)); height: var(--tabs); padding: 6px 8px var(--safe-bottom);
    border-radius: 0; border-width: 1px 0 0; background: rgb(255 255 255 / .9); box-shadow: 0 -1px 0 var(--hair);
  }
  .tabbar button {
    position: relative; flex: 1; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar button[aria-pressed=true] { color: var(--rose-text); }
  .tabbar i {
    position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
    background: #ff5a3c; color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
  }
  .tabbar i[hidden] { display: none; }

  /* Vues : une seule à la fois entre l'en-tête et les onglets */
  .panel {
    top: var(--head); bottom: var(--tabs-top); left: 0; right: 0; width: auto; border-radius: 0; border: 0; box-shadow: none;
    background: var(--rose-tint); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .filters, .results { display: none; }
  body[data-view="list"] .results { display: flex; }
  body[data-view="filters"] .filters { display: flex; flex-direction: column; }

  /* Moins d'effets de flou sur téléphone : ils coûtent cher en mémoire graphique avec une longue liste */
  .section h3, .photo .count, .photo .nav button, .g-count, .g-nav, .detail-close { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .photo .count, .g-count { background: rgb(0 0 0 / .45); }
  .detail-backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }

  /* Liste */
  .results-head { padding: 10px 12px 8px; background: var(--rose-tint); border-bottom: 1px solid var(--hair); }
  .tabs, .seg.fresh { background: transparent; padding: 0; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar, .seg.fresh::-webkit-scrollbar { display: none; }
  .tabs button, .seg.fresh button {
    flex: 0 0 auto; border: 1px solid var(--hair); background: #fff; border-radius: 99px; padding: 7px 13px; font-size: 13px; box-shadow: none;
  }
  .tabs button[aria-pressed=true], .seg.fresh button[aria-pressed=true] { background: var(--plaque); border-color: var(--plaque); color: var(--on-plaque); box-shadow: none; }
  .fresh-row { margin-top: 8px; }
  .sortrow { margin-top: 8px; }
  .shown { font-size: 12px; }
  .sortrow select { font-size: 12.5px; max-width: 58%; }
  .list { padding: 12px; gap: 14px; -webkit-overflow-scrolling: touch; }
  .section { top: -12px; }
  .ad { border-radius: 14px; background: #fff; border: 0; box-shadow: 0 1px 2px rgb(60 40 120 / .06), 0 6px 18px -10px rgb(60 40 120 / .25); }
  .ad:hover { box-shadow: 0 1px 2px rgb(60 40 120 / .06), 0 6px 18px -10px rgb(60 40 120 / .25); }
  .photo { aspect-ratio: 4 / 3; }
  .photo .nav { display: none; }   /* on balaie au doigt */
  .photo .price { font-size: 24px; }
  .body { padding: 12px 14px 14px; }
  .actions button span { display: none; }
  .actions button { padding: 10px 4px; }

  /* Filtres en plein écran, avec un bouton en bas */
  .filters { padding: 0; overflow: hidden; }
  .filters > .block { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--hair); background: #fff; }
  .filters > .block:nth-of-type(n+2) { border-top: 8px solid var(--rose-tint); }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #fff; border-bottom: 1px solid var(--hair); }
  .sheet-head h2 { font-size: 17px; font-weight: 700; }
  .sheet-reset { border: 0; background: none; color: var(--rose-text); font-weight: 600; font-size: 14px; padding: 4px 0; }
  .filters { overflow-y: auto; }
  .sheet-foot { display: block; position: sticky; bottom: 0; margin-top: auto; padding: 12px 18px; background: rgb(255 255 255 / .95); border-top: 1px solid var(--hair); }
  .sheet-foot .btn-primary { width: 100%; padding: 14px; font-size: 15px; border-radius: 14px; }
  .arr-grid button { height: 40px; }
  .seg button { padding: 9px 0; }

  /* Carte : pas de bulle, une carte d'aperçu en bas */
  .leaflet-control-zoom { display: none; }
  .leaflet-control-attribution { margin: 0 !important; margin-bottom: calc(var(--tabs) + 2px) !important; font-size: 9px; }
  .leaflet-popup { display: none; }
  .preview {
    position: fixed; z-index: 35; left: 10px; right: 10px; bottom: calc(var(--tabs-top) + 10px); display: grid; grid-template-columns: 118px 1fr;
    background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px -8px rgb(60 40 120 / .35); animation: rise .25s var(--ease);
  }
  .preview[hidden] { display: none; }
  body:not([data-view="map"]) .preview { display: none; }
  .preview img { width: 118px; height: 100%; min-height: 104px; object-fit: cover; display: block; background: #eee; }
  .preview .pv-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .preview .pv-price { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
  .preview .pv-facts { font-size: 13px; color: var(--ink-2); }
  .preview .pv-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .preview .pv-go { margin-top: auto; font-size: 13px; font-weight: 650; color: var(--rose-text); }
  .preview .pv-close { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .05); display: grid; place-items: center; }
  .preview .pv-close svg { width: 14px; height: 14px; }

  .toasts { top: calc(var(--head) + 8px); width: calc(100% - 24px); }
  .toast { min-width: 0; }

  /* Fiche plein écran */
  .detail { grid-template-columns: minmax(0, 1fr); grid-template-rows: 42vh minmax(0, 1fr); width: 100vw; height: 100%; border-radius: 0; top: 0; left: 0; transform: none; animation: none; border: 0; background: #fff; }
  .detail.opening { animation: rise .3s var(--ease); }
  .detail-close { top: calc(var(--safe-top) + 10px); }
  .g-main .plaque { top: calc(var(--safe-top) + 12px); }
  .g-nav { display: none; }
  .d-info { padding: 18px 18px calc(var(--safe-bottom) + 24px); }
  .d-price { font-size: 30px; }
}

/* ---------- Page de connexion ---------- */
.login-page { display: grid; place-items: center; min-height: 100dvh; background: radial-gradient(circle at 30% 10%, #eef2f6, #d3dbe5 60%, #c2ccd8); padding: 20px; }
.login-card { position: relative; width: min(380px, 100%); border-radius: 26px; padding: 30px 26px 26px; text-align: center; }
.login-icon { border-radius: 18px; box-shadow: 0 8px 20px -8px rgb(20 35 60 / .45); }
.login-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 14px; }
.login-card > p { color: var(--ink-2); margin: 6px 0 22px; }
.login-card form { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.login-card label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.login-card input {
  font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hair); background: rgb(255 255 255 / .85); color: var(--ink);
}
.login-card input:focus { outline: 2px solid var(--rose-text); outline-offset: 1px; }
.login-card .btn-primary { margin-top: 8px; padding: 13px; font-size: 15px; }
.login-error { margin: 0; color: var(--rouge); font-size: 13px; }
.login-error[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ---------- Loyer et surface : min / max ---------- */
.minmax { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 0 0 12px; }
.minmax label { position: relative; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--hair); border-radius: 12px; background: rgb(255 255 255 / .7); }
.minmax label:focus-within { outline: 2px solid var(--rose-text); outline-offset: 1px; }
.minmax span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.minmax input { flex: 1; width: 0; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); padding: 0; outline: none; -moz-appearance: textfield; }
.minmax input::-webkit-outer-spin-button, .minmax input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.minmax input::placeholder { color: var(--ink-3); font-weight: 500; }
.minmax i { font-style: normal; font-size: 13px; color: var(--ink-3); }

/* ---------- Mon alerte ---------- */
.alert-block { background: rgb(108 79 214 / .07); border-radius: 16px; padding: 12px 12px 10px; }
.alert-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.alert-head h2 { margin: 0; }
.alert-head .switch { padding: 0; font-size: 12.5px; }
.alert-sum { margin: 6px 0 10px; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
#saveAlert:disabled { opacity: .65; cursor: default; }
.who { font-weight: 500; color: var(--ink-3); margin-left: 4px; }
body:not(.is-main) .main-only { display: none !important; }

/* ---------- Comptes ---------- */
.users { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.users li { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--hair); border-radius: 12px; background: rgb(255 255 255 / .6); }
.users li b { flex: 1; }
.users li small { font-size: 11.5px; color: var(--ink-3); margin-right: auto; }
.users .danger { color: #a33a3a; }
.new-user { display: flex; gap: 8px; }
.new-user input { flex: 1; font-size: 15px; padding: 9px 11px; border: 1px solid var(--hair); border-radius: 10px; background: #fff; }
.my-link { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.my-link span { flex: 1; }
.login-hint { margin: 0; font-size: 12px; color: var(--ink-3); }
.login-alt { margin-top: 4px; background: none; border: 0; padding: 8px; font: inherit; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.login-card > .login-alt { margin-top: 10px; }
.login-card form[hidden], .login-card [hidden] { display: none; }
#code { font-size: 22px; letter-spacing: .2em; text-align: center; }
.account-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.account-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-switches { display: flex; gap: 14px; }
.alert-head { flex-wrap: wrap; }
.users li small.mail { font-size: 11.5px; color: var(--ink-3); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.users li { flex-wrap: wrap; }
#nameField:not([hidden]) { display: flex; flex-direction: column; gap: 8px; }


/* ================= Refonte : panneau de filtres et boutons, plus sobre ================= */
.btn-primary {
  background: var(--plaque); border-radius: 10px; font-weight: 600;
  box-shadow: 0 1px 0 rgb(255 255 255 / .15) inset, 0 1px 2px rgb(40 20 110 / .25), 0 4px 12px -4px rgb(90 60 194 / .45);
}
.btn-primary:hover { filter: none; background: var(--plaque-2); }
.btn-ghost { border-color: var(--field-line); background: var(--field); border-radius: 10px; font-weight: 550; }
.btn-ghost:hover { background: var(--rose-tint); border-color: var(--lilas-line); }
.brand-plaque { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .9); border-radius: 9px; }

/* Titres de rubrique */
.block h2 { font-size: 13px; font-weight: 650; color: var(--ink); letter-spacing: -.005em; margin: 16px 0 8px; }
.block > h2:first-child { margin-top: 0; }
.hint, .hint-block { color: var(--ink-3); }

/* Options : puces, segments, arrondissements, sites */
.chips { gap: 6px; }
.chips button, .src-chips span {
  height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--field-line); background: var(--field);
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .15s, color .15s;
}
.chips button:hover, .src-chips label:hover span { border-color: var(--lilas-line); color: var(--ink); }
.chips button[aria-pressed=true], .src-chips input:checked + span {
  background: var(--lilas); border-color: var(--lilas-line); color: var(--lilas-ink); font-weight: 600; box-shadow: none; text-decoration: none;
}
.chips button[aria-pressed=true]::before, .src-chips input:checked + span::before {
  content: ''; width: 9px; height: 5px; margin: -2px 1px 0 -1px; border: solid currentColor; border-width: 0 0 1.8px 1.8px; transform: rotate(-45deg);
}
.src-chips span { text-decoration: none; color: var(--ink-3); }
.seg { background: #efedf4; border-radius: 10px; padding: 3px; }
.seg button { border-radius: 7px; font-size: 12.5px; padding: 7px 0; }
.seg button[aria-pressed=true] { color: var(--lilas-ink); box-shadow: 0 1px 2px rgb(30 20 70 / .12), 0 0 0 .5px rgb(30 20 70 / .06); }
.arr-grid { gap: 6px; }
.arr-grid button { height: 36px; border-radius: 8px; border-color: var(--field-line); background: var(--field); color: var(--ink-2); }
.arr-grid button:hover { border-color: var(--lilas-line); background: var(--field); }
.arr-grid button[aria-pressed=true] { background: var(--plaque); border-color: var(--plaque); color: #fff; box-shadow: none; }
.arr-grid button.pref[aria-pressed=true] { box-shadow: inset 0 -3px 0 #5fd39a; }
.pill-btn { height: 28px; padding: 0 10px; border-radius: 7px; border-color: var(--field-line); background: var(--field); font-weight: 550; color: var(--ink-2); }
.pill-btn:hover { background: var(--rose-tint); border-color: var(--lilas-line); color: var(--ink); }
.quick { margin: 0 0 10px; }

/* Champs min / max */
.minmax { gap: 8px; }
.minmax label { height: 40px; padding: 0 11px; border-radius: 9px; border-color: var(--field-line); background: var(--field); }
.minmax label:hover { border-color: var(--lilas-line); }
.minmax label:focus-within { outline: none; border-color: var(--plaque); box-shadow: 0 0 0 3px rgb(108 79 214 / .15); }
.minmax span { font-weight: 550; }
.minmax input { font-size: 15px; font-weight: 600; }

/* Interrupteurs */
.switch { color: var(--ink); }
.switch .track { background: #d9d6e2; }

/* Mon alerte */
.alert-block { background: var(--rose-tint); border: 1px solid #e3dcf8; border-radius: 12px; padding: 14px; }
.alert-head h2 { font-size: 13px; color: var(--ink); }
.alert-sum { color: var(--ink-2); font-size: 12.5px; margin: 8px 0 12px; }
.alert-block .wide-btn { height: 36px; border-radius: 9px; background: var(--field); border: 1px solid var(--lilas-line); color: var(--lilas-ink); font-weight: 600; font-size: 12.5px; }
.alert-block .wide-btn:hover:not(:disabled) { background: var(--lilas); }
.alert-block .wide-btn:disabled { border-color: var(--field-line); color: var(--ink-3); font-weight: 500; cursor: default; }

/* Mon compte : liste de réglages */
.menu { display: flex; flex-direction: column; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); overflow: hidden; }
.menu button {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 11px 12px; border: 0;
  background: none; font-size: 13px; font-weight: 500; color: var(--ink); border-top: 1px solid var(--field-line); border-radius: 0;
}
.menu button:first-child { border-top: 0; }
.menu button:hover { background: var(--rose-tint); }
.menu button::after { content: ''; width: 6px; height: 6px; border: solid var(--ink-3); border-width: 1.6px 1.6px 0 0; transform: rotate(45deg); flex: none; }
.menu button.danger { color: #a33a3a; }
.menu button.danger::after { display: none; }
.menu[hidden], .menu button[hidden] { display: none; }
.account-row { margin: 0 0 10px; }
.account-row .btn-ghost { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }

/* Ordinateur : panneau opaque, en-tête fixe avec « Réinitialiser » */
@media (min-width: 821px) {
  .filters { width: 304px; padding: 0; background: rgb(255 255 255 / .9); }
  .filters > .block { padding: 18px 20px; border-bottom: 1px solid #eceaf1; }
  .filters > .alert-block { margin: 14px 14px 4px; padding: 14px; border-bottom: 1px solid #e3dcf8; }
  .sheet-head {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2;
    padding: 14px 20px 12px; background: rgb(255 255 255 / .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid #eceaf1;
  }
  .sheet-head h2 { font-size: 15px; font-weight: 700; }
  .sheet-reset { border: 0; background: none; padding: 4px 6px; margin-right: -6px; border-radius: 6px; color: var(--rose-text); font-weight: 600; font-size: 12.5px; }
  .sheet-reset:hover { background: var(--rose-tint); }
}
@media (min-width: 821px) and (max-width: 1150px) { .filters { width: 268px; } }
@media (max-width: 820px) {
  .filters > .alert-block { border: 0; border-radius: 0; background: var(--rose-tint); }
  .alert-block .wide-btn { background: var(--field); }
}


/* ================= Carré : couche finale (thème clair) ================= */
html, body { background: var(--bg0); }
:focus-visible { outline-color: var(--plaque); }
.glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--line); box-shadow: var(--shadow); }
.topbar { border-radius: 10px; }
.brand-plaque { font-family: inherit; font-variation-settings: normal; font-weight: 700; font-size: 13px; background: var(--plaque); color: var(--on-plaque); border-radius: 6px; box-shadow: none; padding: 6px 7px; }
.brand h1 { font-weight: 700; letter-spacing: -.015em; }
.btn-primary { background: var(--plaque); color: var(--on-plaque); border-radius: 6px; box-shadow: none; font-weight: 600; }
.btn-primary:hover { background: var(--plaque-2); }
.btn-ghost { background: var(--raised); border: 1px solid var(--line); color: var(--ink); border-radius: 6px; }
.btn-ghost:hover { background: var(--raised); border-color: var(--line-2); }
.src-status { background: var(--raised); border-color: var(--line); color: var(--ink-2); border-radius: 6px; }

/* Filtres */
.block h2, .sheet-head h2 { color: var(--ink); font-weight: 600; }
.chips button, .src-chips span, .arr-grid button, .pill-btn, .minmax label { border-radius: 5px; }
.arr-grid button { font-family: inherit; font-variation-settings: normal; font-weight: 500; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.arr-grid button sup { font-size: 8px; }
.arr-grid button:hover { border-color: var(--line-2); }
.arr-grid button[aria-pressed=true] { background: var(--lilas); border-color: var(--lilas-line); color: var(--lilas-ink); font-weight: 600; }
.arr-grid button.pref { box-shadow: inset 0 -2px 0 var(--pref-soft); }
.arr-grid button.pref[aria-pressed=true] { box-shadow: inset 0 -2px 0 var(--vert); }
.chips button:hover, .src-chips label:hover span, .pill-btn:hover, .minmax label:hover { border-color: var(--line-2); background: var(--field); }
.seg { background: var(--raised); border-radius: 6px; }
.seg button { border-radius: 4px; color: var(--ink-2); }
.seg button[aria-pressed=true] { background: var(--seg-on); color: var(--ink); box-shadow: none; }
.minmax label:focus-within { border-color: var(--plaque); box-shadow: 0 0 0 1px var(--plaque); }
.switch .track { background: var(--track); }
.switch .track::after { box-shadow: none; }
.alert-block { background: var(--alert-bg); border: 1px solid var(--alert-line); border-radius: 8px; }
.alert-block .wide-btn { background: var(--raised); border-color: var(--lilas-line); color: var(--lilas-ink); border-radius: 5px; }
.alert-block .wide-btn:hover:not(:disabled) { background: var(--lilas); }
.alert-block .wide-btn:disabled { border-color: var(--line); color: var(--ink-3); }
.menu { border-color: var(--line); border-radius: 6px; }
.menu button { border-top-color: var(--line); }
.menu button.danger, .users .danger { color: var(--danger); }
.feat { background: var(--accent-wash); color: var(--lilas-ink); border-radius: 4px; }
@media (min-width: 821px) {
  .filters { background: var(--surface); }
  .filters > .block { border-bottom-color: var(--line); }
  .filters > .alert-block { border-bottom-color: var(--alert-line); }
  .sheet-head { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--line); }
}

/* Liste */
.results-head { background: var(--surface); border-bottom-color: var(--line); }
.tabs { background: var(--raised); border-radius: 6px; }
.tabs button { border-radius: 4px; }
.tabs button[aria-pressed=true] { background: var(--seg-on); color: var(--ink); box-shadow: none; }
.sortrow select { background: var(--raised); border-color: var(--line); color: var(--ink); border-radius: 5px; }
.more button { background: var(--raised); border-color: var(--line); border-radius: 6px; }
.section h3 { background: var(--raised); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 5px; }
.ad { background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.ad:hover { box-shadow: none; border-color: var(--line-2); }
.ad.hl { box-shadow: 0 0 0 1px var(--plaque); border-color: var(--plaque); }
.ad.unseen { box-shadow: 0 0 0 1px var(--metro); }
.ad.unseen .body::before { color: var(--unseen-ink); background: rgb(245 197 24 / .12); border-radius: 4px; }
.photo { background: var(--ph); }
.photo .nav button { background: var(--float-bg); border-color: var(--line-2); color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
.badge-new { box-shadow: none; border-radius: 4px; }
.plaque { font-family: inherit; background: rgb(14 13 18 / .82); color: var(--ink); border-radius: 5px; box-shadow: 0 0 0 1px rgb(255 255 255 / .14); padding: 4px 7px 3px; }
.plaque b { font-variation-settings: normal; font-weight: 700; font-size: 17px; }
.plaque small { font-variation-settings: normal; font-weight: 500; font-size: 8.5px; letter-spacing: 0; }
.plaque.pref { box-shadow: 0 0 0 1px var(--vert); }
.plaque.nc { background: rgb(14 13 18 / .82); box-shadow: 0 0 0 1px rgb(255 255 255 / .14); }
.chip { background: var(--accent-wash); color: var(--rose-text); border-radius: 4px; }
.chip:hover { background: var(--plaque); color: var(--on-plaque); }
.tag { background: var(--tag-bg); color: var(--ink-2); border-radius: 4px; }
.actions button { background: var(--raised); border-color: var(--line); color: var(--ink-2); border-radius: 5px; }
.actions button:hover { background: var(--raised); border-color: var(--line-2); color: var(--ink); }
.actions button[aria-pressed=true] { background: var(--plaque); border-color: var(--plaque); color: var(--on-plaque); }
.actions button[data-status=favori][aria-pressed=true] { background: var(--vert); border-color: var(--vert); color: var(--on-vert); }
.actions button[data-status=ecarte][aria-pressed=true] { background: var(--rouge); border-color: var(--rouge); color: var(--on-rouge); }
.notes { background: var(--raised); border-color: var(--line); color: var(--ink); border-radius: 5px; }
.mark-seen { border-radius: 5px; }

/* Carte */
.leaflet-container { background: var(--bg0); font-family: 'Hanken Grotesk', system-ui, sans-serif; }
.leaflet-control-zoom { border-radius: 6px !important; box-shadow: 0 0 0 1px var(--line) !important; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.leaflet-control-attribution { background: var(--attr-bg) !important; color: var(--ink-3) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.arr-label { font-family: inherit; font-variation-settings: normal; font-weight: 600; font-size: 12px; color: var(--arr-label); }
.arr-label.pref { color: var(--arr-label-pref); }
.price-pin { background: var(--raised); color: var(--ink); border-radius: 5px; box-shadow: 0 0 0 1px var(--line-2); font-weight: 600; }
.price-pin::after { box-shadow: 1px 1px 0 var(--line-2); }
.price-pin.pref { box-shadow: 0 0 0 1px var(--vert); }
.price-pin.new::before { border-color: var(--raised); }
.price-pin.fav { background: var(--vert); color: var(--on-vert); }
.price-pin.seen { background: var(--pin-seen); color: var(--ink-3); }
.price-pin.hl { background: var(--plaque); color: var(--on-plaque); }
.cluster { background: var(--cluster-bg); color: var(--lilas-ink); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 0 0 1px var(--line-2), 0 0 0 5px var(--accent-ring); }
.cluster.lg { background: var(--plaque); color: var(--on-plaque); box-shadow: 0 0 0 5px var(--accent-ring); }
.leaflet-popup-content-wrapper { background: var(--surface); color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--line); border-radius: 8px; }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-2); }

/* Fiche, fenêtres, messages */
.detail-backdrop { background: var(--scrim); -webkit-backdrop-filter: none; backdrop-filter: none; }
.detail { background: var(--surface); border-radius: 12px; }
.detail-close { background: var(--raised); border: 1px solid var(--line-2); color: var(--ink); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.gallery { background: #09080b; }
.g-thumbs button { border-radius: 4px; }
.g-thumbs button[aria-current=true] { border-color: var(--plaque); }
.src-link { background: var(--raised); border-color: var(--line); border-radius: 6px; }
.src-link:hover { background: var(--raised); border-color: var(--line-2); }
.compose-backdrop { background: var(--scrim); }
.compose { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.compose textarea, .set-grid input, .new-user input, .login-card input { background: var(--raised); border: 1px solid var(--line); color: var(--ink); border-radius: 6px; }
.compose-info code { background: var(--accent-wash); color: var(--lilas-ink); }
.users li { background: var(--raised); border-color: var(--line); border-radius: 6px; }
.toast { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--plaque); border-radius: 8px; box-shadow: var(--float-shadow); }
.login-page { background: var(--bg0); }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.login-icon { border-radius: 14px; box-shadow: none; }
.login-card input:focus { outline: 1px solid var(--plaque); outline-offset: 0; border-color: var(--plaque); }
.login-card .btn-primary { border-radius: 6px; }

/* Téléphone */
@media (max-width: 820px) {
  html, body { background: var(--bg0); }
  .topbar { background: var(--surface); border-radius: 0; box-shadow: 0 1px 0 var(--line); border-width: 0; }
  .tabbar { background: var(--surface); box-shadow: 0 -1px 0 var(--line); border-width: 0; }
  .tabbar button[aria-pressed=true] { color: var(--rose-text); }
  .panel { background: var(--bg0); box-shadow: none; border: 0; }
  .results-head { background: var(--surface); }
  .tabs, .seg.fresh { background: transparent; }
  .tabs button, .seg.fresh button { background: var(--raised); border-color: var(--line); border-radius: 5px; color: var(--ink-2); }
  .tabs button[aria-pressed=true], .seg.fresh button[aria-pressed=true] { background: var(--plaque); border-color: var(--plaque); color: var(--on-plaque); }
  .ad { background: var(--card); border: 1px solid var(--line); box-shadow: none; border-radius: 8px; }
  .ad:hover { box-shadow: none; }
  .filters > .block { background: var(--surface); border-bottom-color: var(--line); }
  .filters > .block:nth-of-type(n+2) { border-top-color: var(--bg0); }
  .filters > .alert-block { background: var(--alert-bg); }
  .sheet-head { background: var(--surface); border-bottom-color: var(--line); }
  .sheet-foot { background: var(--surface); border-top-color: var(--line); }
  .sheet-foot .btn-primary { border-radius: 6px; }
  .preview { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--float-shadow); }
  .preview img { background: var(--ph); }
  .preview .pv-close { background: var(--pv-close); color: var(--ink); }
  .detail { background: var(--surface); border-radius: 0; }
  .detail-close { background: var(--float-bg); }
}

.seg button[aria-pressed=true], .tabs button[aria-pressed=true] { box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(30 20 60 / .08); }
.seg { background: #f0eff3; } .tabs { background: #f0eff3; }
.plaque, .plaque.nc { background: rgb(255 255 255 / .94); color: var(--ink); box-shadow: 0 0 0 1px rgb(0 0 0 / .06); }
.photo .nav button { color: var(--ink); }
@media (max-width: 820px) {
  .tabs button[aria-pressed=true], .seg.fresh button[aria-pressed=true] { box-shadow: none; }
  .filters > .block:nth-of-type(n+2) { border-top-color: var(--bg0); }
}

/* Compte : bouton et menu en haut à droite */
.account { position: relative; flex: none; }
.account-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border: 1px solid var(--line); background: var(--raised); border-radius: 6px; color: var(--ink); font-weight: 600; font-size: 13px; }
.account-btn:hover, .account-btn[aria-expanded=true] { border-color: var(--line-2); }
.account-btn .avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; background: var(--lilas); color: var(--lilas-ink); font-weight: 700; font-size: 13px; }
.account-btn .who { margin: 0; color: var(--ink); font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; width: 300px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--float-shadow); }
.account-menu[hidden] { display: none; }
.account-menu .account-row { margin: 0 0 10px; font-size: 13px; }
@media (max-width: 820px) {
  .account { margin-left: auto; }
  .account-btn { height: 34px; padding: 0 3px; border: 0; background: none; }
  .account-btn .who { display: none; }
  .account-menu { position: fixed; top: calc(var(--head) + 6px); right: 10px; left: 10px; width: auto; }
}
.topbar { z-index: 30; }
/* Carte : le fond gris et calme, ravivé (Seine en bleu, parcs en vert) sans ajouter de détails */
.leaflet-tile-pane { filter: saturate(2.4) brightness(1.02); }

/* Arrondissements : plus de soulignement vert pour le Nord-Est */
.arr-grid button.pref, .arr-grid button.pref[aria-pressed=true] { box-shadow: none; }

/* Logo (N-toit) */
.brand-logo { width: 32px; height: 32px; flex: none; color: var(--ink); }
@media (max-width: 820px) { .brand-logo { width: 28px; height: 28px; } }
/* Prix sélectionné sur la carte et « Collecter maintenant » : même lilas transparent que les sites cochés */
.price-pin.hl { background: var(--lilas); color: var(--lilas-ink); box-shadow: 0 0 0 1px var(--lilas-line); }
.price-pin.hl::after { box-shadow: 1px 1px 0 var(--lilas-line); }
#scrape { background: var(--lilas); color: var(--lilas-ink); box-shadow: inset 0 0 0 1px var(--lilas-line); }
#scrape:hover { background: #e6defe; }

/* ---------- Tri des annonces : onglets soulignés, période en petites puces ---------- */
.results-head { padding: 0 14px 12px; }
.tabs, .tabs[class] { display: flex; gap: 2px; padding: 0; margin: 0 -14px 12px; padding: 0 8px; background: none; border-radius: 0; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs button[aria-pressed=true] {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 10px; border: 0; border-radius: 0;
  background: none; box-shadow: none; color: var(--ink-3); font-size: 13.5px; font-weight: 500; position: relative;
}
.tabs button:hover { color: var(--ink); }
.tabs button small { min-width: 20px; height: 19px; padding: 0 6px; border-radius: 4px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 600; background: #f0eff3; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tabs button[aria-pressed=true] { color: var(--ink); font-weight: 600; }
.tabs button[aria-pressed=true]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: var(--plaque); border-radius: 2px 2px 0 0; }
.tabs button[aria-pressed=true] small { background: var(--lilas); color: var(--lilas-ink); }
.fresh-row { display: flex; align-items: center; gap: 10px; margin: 0; }
.fresh-label { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.seg.fresh, .seg.fresh[class] { display: flex; gap: 4px; padding: 0; background: none; overflow-x: auto; scrollbar-width: none; }
.seg.fresh::-webkit-scrollbar { display: none; }
.seg.fresh button, .seg.fresh button[aria-pressed=true] {
  flex: 0 0 auto; height: 28px; padding: 0 10px; border-radius: 5px; border: 1px solid var(--line); background: var(--raised);
  color: var(--ink-2); font-size: 12.5px; font-weight: 500; box-shadow: none;
}
.seg.fresh button:hover { border-color: var(--line-2); color: var(--ink); }
.seg.fresh button[aria-pressed=true] { background: var(--lilas); border-color: var(--lilas-line); color: var(--lilas-ink); font-weight: 600; }
.sortrow { margin-top: 12px; }
@media (max-width: 820px) {
  .results-head { padding: 0 12px 10px; }
  .tabs, .tabs[class] { margin: 0 -12px 10px; padding: 0 6px; }
  .tabs button, .tabs button[aria-pressed=true] { background: none; border: 0; border-radius: 0; height: 46px; padding: 0 9px; font-size: 14px; color: var(--ink-3); }
  .tabs button[aria-pressed=true] { color: var(--ink); }
  .seg.fresh button, .seg.fresh button[aria-pressed=true] { padding: 0 11px; height: 32px; font-size: 13px; border-radius: 5px; }
  .seg.fresh button[aria-pressed=true] { background: var(--lilas); border-color: var(--lilas-line); color: var(--lilas-ink); }
}
.tabs button, .tabs button[aria-pressed=true] { padding: 0 7px; gap: 5px; font-size: 13px; }
.tabs button small { min-width: 18px; padding: 0 5px; font-size: 11px; }
.tabs button[aria-pressed=true]::after { left: 5px; right: 5px; }
@media (max-width: 820px) { .fresh-label { display: none; } .tabs button, .tabs button[aria-pressed=true] { padding: 0 8px; font-size: 14px; } }

/* ---------- Menu Notifications ---------- */
.notif { position: relative; flex: none; }
.notif-btn { display: inline-flex; align-items: center; gap: 7px; }
.notif-btn svg { width: 16px; height: 16px; }
.notif-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 4px; background: var(--lilas); color: var(--lilas-ink); font-style: normal; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.notif-count[hidden] { display: none; }
.notif-menu { width: 340px; padding: 0; overflow: hidden; }
.nm-head { padding: 14px 16px 12px; display: grid; gap: 3px; border-bottom: 1px solid var(--line); }
.nm-head b { font-size: 14px; }
.nm-head span { font-size: 12.5px; color: var(--ink-3); }
.nm-rows { display: grid; }
.nm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.nm-row > div { display: grid; gap: 2px; min-width: 0; }
.nm-row b { font-size: 13.5px; font-weight: 600; }
.nm-row span { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-row .switch { padding: 0; }
.nm-on { font-style: normal; font-size: 12px; font-weight: 600; color: var(--lilas-ink); background: var(--lilas); padding: 3px 8px; border-radius: 4px; }
.nm-sub { padding: 12px 16px 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.nm-devices { list-style: none; margin: 0; padding: 0 16px 6px; display: grid; gap: 6px; }
.nm-devices li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.nm-devices li > span { display: grid; gap: 1px; font-size: 13px; }
.nm-devices small { font-size: 11px; font-weight: 600; color: var(--lilas-ink); }
.nm-devices em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.nm-devices .btn-ghost { padding: 5px 9px; font-size: 12px; }
.nm-empty, .nm-foot { margin: 0; padding: 4px 16px 12px; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.nm-foot { padding-top: 8px; border-top: 1px solid var(--line); margin-top: 6px; }
@media (max-width: 820px) {
  .notif { display: block; }
  #notifs { display: inline-flex; }
  .notif-label { display: none; }
  .notif-btn { height: 34px; padding: 0 8px; border: 0; background: none; }
  .notif-btn svg { width: 20px; height: 20px; }
  .account { margin-left: 0; }
  .notif { margin-left: auto; }
}

/* Fond de carte vectoriel : les couleurs sont réglées dans le style, plus de filtre */
.leaflet-tile-pane { filter: none; }
.leaflet-gl-layer { pointer-events: none; }
