/* Accueil : l'app carte + liste plein écran. */

body.is-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.app {
  --peek: 96px;
  --safe: env(safe-area-inset-bottom, 0px);
  --quick-h: 126px;
  --panel-w: 420px;
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--panel-w) minmax(0, 1fr);
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 2px solid var(--encre);
  background: var(--papier);
}

.mapwrap {
  position: relative;
  min-width: 0;
}
#map {
  position: absolute;
  inset: 0;
}

/* ---------- Filtres rapides ---------- */

.quick {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px 12px;
  background: var(--brume);
}
.quick__row {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.search > .ico {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  color: var(--encre-2);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 46px;
  min-width: 0;
  padding: 0 10px 0 40px;
  border: 2px solid var(--encre);
  border-radius: var(--r-12);
  background: var(--blanc);
  font-size: var(--t-17);
  text-overflow: ellipsis;
}
.search input::placeholder {
  color: var(--encre-2);
  opacity: 1;
  text-overflow: ellipsis;
}
.search input:focus-visible {
  outline-offset: 1px;
}

.near {
  flex: none;
  min-height: 46px;
  padding: 0 11px;
  gap: 6px;
  box-shadow: none;
}
.near:active {
  transform: none;
  box-shadow: none;
}
.near[aria-pressed="true"] {
  box-shadow: none;
  transform: none;
}
.near.is-busy .ico {
  animation: tourne 1s linear infinite;
}
@keyframes tourne {
  to {
    transform: rotate(360deg);
  }
}

.klabel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: -4px;
  font: 600 var(--t-15) / 1.2 var(--f-titre);
}
.klabel .lien-bouton {
  font-weight: 400;
}
.klabel .ico {
  width: 16px;
  height: 16px;
}
.khelp-m {
  display: none;
}

.quick__scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.kbar {
  display: flex;
  gap: 8px;
}
/* Inactive : puce blanche avec un point de couleur. Active : pleine, dans la couleur de la difficulté. */
.kbtn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  height: 42px;
  padding: 0 4px;
  border: 1.5px solid var(--bord);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--encre);
  font: 600 var(--t-15) / 1 var(--f-titre);
  white-space: nowrap;
  transition:
    transform 140ms var(--ease),
    background-color 140ms,
    border-color 140ms;
}
.kbtn i {
  flex: none;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--encre);
  border-radius: 50%;
  background: var(--k);
}
.kbtn:hover {
  border-color: var(--encre);
  background: var(--jaune-clair);
  transform: translateY(-2px);
}
.kbtn[aria-pressed="true"] {
  border: 2px solid var(--encre);
  background: var(--k);
  color: var(--k-txt);
}
.kbtn[aria-pressed="true"] i {
  display: none;
}

.chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}
.chips--wrap {
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 10px;
  border: 1.5px solid var(--bord);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--encre);
  font: 500 var(--t-15) / 1 var(--f-titre);
  white-space: nowrap;
  transition:
    background-color 120ms,
    border-color 120ms;
}
.chip .ico {
  width: 18px;
  height: 18px;
}
.chip:hover {
  border-color: var(--encre);
  background: var(--jaune-clair);
}
.chip[aria-pressed="true"] {
  border-color: var(--encre);
  background: var(--encre);
  color: #fff;
}
.chip--m {
  display: none;
}
.chip--more {
  position: relative;
  margin-left: auto;
  border-color: var(--encre);
  border-width: 2px;
}
.chip--more .badge {
  position: absolute;
  top: -9px;
  right: -8px;
  border: 2px solid var(--brume);
  min-width: 24px;
  height: 24px;
}
.chip--more[aria-expanded="true"] {
  background: var(--jaune);
}
.morebtn--m {
  display: none;
  position: relative;
}
.morebtn--m .badge {
  position: absolute;
  top: -8px;
  right: -8px;
  border: 2px solid var(--blanc);
  min-width: 24px;
  height: 24px;
}

/* ---------- Plus de filtres : un volet posé sur la carte, la liste reste visible ---------- */

.more {
  position: absolute;
  z-index: 900;
  top: 12px;
  left: calc(var(--panel-w) + 12px);
  display: grid;
  gap: 18px;
  width: 384px;
  max-height: calc(100% - 24px);
  padding: 0 18px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
  background: var(--papier);
  box-shadow: var(--flotte);
}
.more__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -18px;
  padding: 6px 6px 6px 18px;
  border-bottom: 2px solid var(--encre);
  background: var(--jaune);
}
.more__head h2 {
  font-size: var(--t-20);
}
.more__foot {
  display: none;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field > label,
.field > legend {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0;
  font: 600 var(--t-15) / 1.2 var(--f-titre);
}
.field > legend {
  margin-bottom: 8px;
}
.field output {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--jaune);
  font: 500 var(--t-15) var(--f-titre);
}
.hint {
  color: var(--encre-2);
  font-size: var(--t-13);
  line-height: 1.4;
}

.range {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: none;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 10px;
  border: 2px solid var(--encre);
  border-radius: 999px;
  background: linear-gradient(to right, var(--jaune) var(--fill, 100%), var(--blanc) var(--fill, 100%));
}
.range::-moz-range-track {
  height: 6px;
  border: 2px solid var(--encre);
  border-radius: 999px;
  background: linear-gradient(to right, var(--jaune) var(--fill, 100%), var(--blanc) var(--fill, 100%));
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border: 2px solid var(--encre);
  border-radius: 50%;
  background: var(--blanc);
  box-shadow: 0 2px 0 var(--encre);
}
.range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 2px solid var(--encre);
  border-radius: 50%;
  background: var(--blanc);
  box-shadow: 0 2px 0 var(--encre);
}

.seg {
  display: flex;
  border: 2px solid var(--encre);
  border-radius: var(--r-12);
  background: var(--blanc);
  overflow: hidden;
}
.seg button {
  flex: 1;
  min-height: 42px;
  padding: 0 8px;
  border: 0;
  border-left: 1.5px solid var(--encre);
  background: none;
  font: 500 var(--t-15) var(--f-titre);
}
.seg button:first-child {
  border-left: 0;
}
.seg button:hover {
  background: var(--jaune-clair);
}
.seg button[aria-checked="true"] {
  background: var(--encre);
  color: #fff;
}
.seg button:focus-visible {
  outline-offset: -4px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font: 500 var(--t-15) var(--f-titre);
  cursor: pointer;
}
.check input {
  position: absolute;
  opacity: 0;
  width: 26px;
  height: 26px;
  margin: 0;
}
.check__box {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 2px solid var(--encre);
  border-radius: 8px;
  background: var(--blanc);
  color: transparent;
}
.check__box .ico {
  width: 18px;
  height: 18px;
  stroke-width: 3;
}
.check input:checked + .check__box {
  background: var(--encre);
  color: #fff;
}
.check input:focus-visible + .check__box {
  outline: 3px solid var(--bleu);
  outline-offset: 2px;
}

/* ---------- Barre de résultats ---------- */

.sheet {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border-top: 2px solid var(--encre);
}
.sheet__handle {
  display: none;
}

.resultbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--filet);
}
.count {
  display: grid;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
}
#count {
  overflow: hidden;
  font: 600 var(--t-20) / 1.15 var(--f-titre);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sort {
  flex: 0 1 auto;
  min-width: 0;
}
.sort .select {
  max-width: 100%;
}
.count__sub {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  color: var(--encre-2);
  font-size: var(--t-15);
  line-height: 1.2;
  white-space: nowrap;
}
.count__sub:not(:has(#count-of:not(:empty), .reset:not([hidden]))) {
  display: none;
}
#count-of:empty {
  display: none;
}
/* Lien court, mais zone tactile de 44 px grâce au pseudo-élément. */
.reset {
  position: relative;
  min-height: 24px;
  font-size: var(--t-15);
}
.reset::after {
  content: "";
  position: absolute;
  inset: -11px -8px;
}

.nearmsg {
  padding: 8px 16px;
  border-bottom: 1px solid var(--filet);
  background: var(--lac);
  font-size: var(--t-13);
  line-height: 1.4;
}
.nearmsg--fam {
  background: var(--foret);
}

.scroller {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* ---------- Liste ---------- */

.list {
  margin: 0;
  padding: 6px 0;
  list-style: none;
  outline: none;
}

.row {
  position: relative;
  border-bottom: 1px solid var(--filet);
}
.row:last-child {
  border-bottom: 0;
}

/* La plaque jaune : deux formes pointues superposées, l'encre (socle) sous le jaune. */
.row::before,
.row::after {
  content: "";
  position: absolute;
  inset: 5px 6px 8px 8px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
  border-radius: 8px 0 0 8px;
  opacity: 0;
  transition:
    opacity 120ms,
    transform 180ms var(--ease);
  pointer-events: none;
}
.row::before {
  background: var(--encre);
  transform: translateY(3px);
}
.row::after {
  background: var(--jaune);
}
.row:hover::before,
.row:hover::after,
.row.is-hot::before,
.row.is-hot::after,
.row:focus-within::before,
.row:focus-within::after {
  opacity: 1;
}
.row:hover::after,
.row.is-hot::after,
.row:focus-within::after {
  transform: translateX(4px);
}
.row:hover::before,
.row.is-hot::before,
.row:focus-within::before {
  transform: translate(4px, 3px);
}

.row__link {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 64px 14px 18px;
  color: var(--encre);
  text-decoration: none;
  transition: transform 180ms var(--ease);
}
.row:hover .row__link,
.row.is-hot .row__link,
.row:focus-within .row__link {
  transform: translateX(4px);
}
/* L'anneau de focus se dessine sur le lien lui-même : sur la plaque, la pointe le rognerait. */
.row__link:focus-visible {
  outline: 3px solid var(--bleu);
  outline-offset: -7px;
  border-radius: 14px;
}

.row__img {
  position: relative;
  width: 84px;
  height: 84px;
  border: 2px solid var(--encre);
  border-radius: var(--r-12);
  background: var(--foret);
}
.row__img img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}
.row__img .k {
  position: absolute;
  left: -8px;
  top: -8px;
}
.row__state {
  position: absolute;
  right: -7px;
  bottom: -7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--encre);
  border-radius: 50%;
  background: var(--jaune);
}
.row__state .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.6;
}
.row__state[data-state="done"] {
  background: var(--vert);
  color: #fff;
}
.row.is-closed .row__img img {
  filter: grayscale(1) contrast(0.9);
}

.row__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.row__name {
  font: 600 var(--t-17) / 1.3 var(--f-titre);
  text-wrap: balance;
}
.row__place {
  color: var(--encre-2);
  font-size: var(--t-15);
  line-height: 1.3;
}
/* Sur la plaque jaune, tout le texte passe à l'encre pour garder le contraste. */
.row:hover .row__place,
.row.is-hot .row__place,
.row:focus-within .row__place,
.row:hover .row__dist,
.row.is-hot .row__dist,
.row:focus-within .row__dist,
.row:hover .row__facts .ico,
.row.is-hot .row__facts .ico,
.row:focus-within .row__facts .ico {
  color: var(--encre);
}
.row__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 12px;
  margin-top: 3px;
  font: 500 var(--t-15) / 1.3 var(--f-titre);
}
.row__facts > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.row__facts .ico {
  width: 16px;
  height: 16px;
  color: var(--encre-2);
}
.row__dist,
.row__facts .row__dist .ico {
  color: var(--lien);
}
.row__max {
  padding: 1px 8px;
  border: 1.5px solid var(--bord);
  border-radius: 999px;
  font-size: var(--t-13);
}
.row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 4px;
}
.row:hover .tag--famille,
.row.is-hot .tag--famille,
.row:focus-within .tag--famille,
.row:hover .tag--info,
.row.is-hot .tag--info,
.row:focus-within .tag--info {
  background: var(--blanc);
}

.row__pin {
  position: absolute;
  z-index: 2;
  right: 26px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -21px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--encre-2);
  transition: transform 180ms var(--ease);
}
.row:hover .row__pin,
.row.is-hot .row__pin,
.row:focus-within .row__pin {
  transform: translateX(4px);
  color: var(--encre);
}
.row__pin:hover,
.row__pin:focus-visible {
  border-color: var(--encre);
  background: var(--blanc);
  color: var(--encre);
}
.row__pin .ico {
  width: 22px;
  height: 22px;
}

.skel {
  height: 110px;
  border-bottom: 1px solid var(--filet);
  background:
    linear-gradient(var(--brume), var(--brume)) 18px 13px / 84px 84px no-repeat,
    linear-gradient(var(--brume), var(--brume)) 116px 24px / 55% 16px no-repeat,
    linear-gradient(var(--brume), var(--brume)) 116px 50px / 35% 12px no-repeat,
    linear-gradient(var(--brume), var(--brume)) 116px 74px / 42% 12px no-repeat;
}

.panel__foot {
  padding: 18px 16px 22px;
  border-top: 1px solid var(--filet);
  color: var(--encre-2);
  font-size: var(--t-13);
}
.panel__foot a {
  color: var(--encre);
  font-weight: 700;
}

.fab {
  display: none;
}

/* ---------- L'échelle K expliquée ---------- */

.khelp {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
  background: var(--papier);
  color: var(--encre);
  box-shadow: var(--flotte);
}
.khelp::backdrop {
  background: rgb(18 28 24 / 0.55);
}
.khelp__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 6px 6px 20px;
  border-bottom: 2px solid var(--encre);
  background: var(--jaune);
}
.khelp__head h2 {
  font-size: var(--t-20);
}
.khelp__body {
  display: grid;
  gap: 14px;
  padding: 18px 20px 22px;
  font-size: var(--t-15);
  line-height: 1.45;
}
.khelp ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--filet);
}
.khelp li {
  display: grid;
  grid-template-columns: 58px auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--filet);
}
.khelp__illu svg {
  display: block;
  width: 58px;
  height: auto;
}
.khelp__txt {
  display: grid;
  gap: 1px;
  line-height: 1.3;
}
.khelp__txt b {
  font: 600 var(--t-17) / 1.2 var(--f-titre);
}
.khelp__txt b::first-letter {
  text-transform: uppercase;
}
.khelp__n {
  color: var(--encre-2);
  font: 500 var(--t-13) var(--f-titre);
  white-space: nowrap;
}
@media (max-width: 460px) {
  .khelp li {
    grid-template-columns: 44px auto minmax(0, 1fr);
    gap: 10px;
  }
  .khelp__illu svg {
    width: 44px;
  }
  .khelp__n {
    grid-column: 3;
  }
}

/* Contrôles Leaflet : marge par rapport aux bords */
.leaflet-top.leaflet-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 14px 0 0;
}
.leaflet-top.leaflet-right .leaflet-control {
  margin: 0;
}

/* ---------- Tablette et mobile : carte plein écran + tiroir ---------- */

@media (max-width: 860px) {
  .app {
    display: block;
    overflow: hidden;
  }
  .panel {
    display: contents;
  }
  /* La carte s'arrête sous le bord arrondi du tiroir replié : son centre est bien celui de la zone visible. */
  .mapwrap {
    position: absolute;
    inset: 0 0 calc(var(--peek) + var(--safe) - 20px);
    z-index: 0;
    isolation: isolate;
  }

  .quick {
    position: absolute;
    z-index: 700;
    top: 0;
    left: 0;
    right: 0;
    gap: 8px;
    padding: 10px 10px 8px;
    background: none;
    pointer-events: none;
    transition: background-color 160ms;
  }
  .quick > * {
    pointer-events: auto;
  }
  .app[data-sheet="full"] .quick {
    background: var(--brume);
  }
  .search input,
  .near,
  .morebtn--m {
    box-shadow: var(--flotte);
  }
  .app[data-sheet="full"] .search input,
  .app[data-sheet="full"] .near,
  .app[data-sheet="full"] .morebtn--m {
    box-shadow: none;
  }
  .near {
    width: 46px;
    padding: 0;
  }
  .near__txt {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .near .ico,
  .morebtn--m .ico {
    width: 22px;
    height: 22px;
  }
  .morebtn--m {
    display: inline-flex;
    width: 46px;
    min-height: 46px;
    padding: 0;
  }
  .morebtn--m:active {
    transform: none;
  }
  .morebtn--d {
    display: none;
  }

  /* Une seule rangée qui défile ; le fondu de bord dit qu'il en reste. */
  .quick__scroll {
    --fl: 0px;
    --fr: 0px;
    display: flex;
    gap: 8px;
    min-width: 0;
    margin: 0 -10px;
    padding: 4px 10px 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  }
  .quick__scroll.fade-l {
    --fl: 36px;
  }
  .quick__scroll.fade-r {
    --fr: 36px;
  }
  .quick__scroll > * {
    flex: none;
  }
  .quick__scroll::-webkit-scrollbar {
    display: none;
  }
  .kbar {
    gap: 5px;
  }
  .klabel {
    display: none;
  }
  .khelp-m {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border: 2px solid var(--encre);
    border-radius: 50%;
    background: var(--blanc);
    color: var(--encre);
    box-shadow: 0 2px 6px rgb(27 42 36 / 0.25);
  }
  .khelp-m .ico {
    width: 24px;
    height: 24px;
  }
  .app[data-sheet="full"] .khelp-m {
    box-shadow: none;
  }
  .chips {
    flex-wrap: nowrap;
  }
  .chips--wrap {
    flex-wrap: wrap;
  }
  .chip--m {
    display: inline-flex;
  }
  .kbtn {
    flex: none;
    gap: 3px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-color: var(--encre);
    box-shadow: 0 2px 6px rgb(27 42 36 / 0.25);
  }
  .kbtn i {
    width: 9px;
    height: 9px;
  }
  .kbtn:hover {
    transform: none;
  }
  .chip {
    min-height: 44px;
    border-color: var(--encre);
    box-shadow: 0 2px 6px rgb(27 42 36 / 0.25);
  }
  .app[data-sheet="full"] .chip,
  .app[data-sheet="full"] .kbtn {
    box-shadow: none;
  }

  /* Filtres complets : plein écran */
  .more {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    width: auto;
    max-height: none;
    padding: 0 16px 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .more__head {
    margin: 0 -16px;
    padding: 8px 8px 8px 16px;
  }
  .more__foot {
    position: sticky;
    bottom: 0;
    margin-top: auto !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -16px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 2px solid var(--encre);
    background: var(--blanc);
  }
  .more__foot .lien-bouton {
    min-height: 44px;
  }
  .range {
    height: 44px;
  }
  .select--petit {
    min-height: 44px;
  }
  .chips--wrap .chip {
    box-shadow: none;
    border-color: var(--bord);
  }
  .chips--wrap .chip[aria-pressed="true"] {
    border-color: var(--encre);
  }

  /* Le tiroir */
  .sheet {
    --visible: calc(var(--peek) + var(--safe));
    position: absolute;
    z-index: 800;
    top: var(--quick-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex: none;
    border: 2px solid var(--encre);
    border-bottom: 0;
    border-radius: var(--r-18) var(--r-18) 0 0;
    background: var(--papier);
    box-shadow: 0 -4px 18px rgb(27 42 36 / 0.18);
    transform: translateY(calc(100% - var(--visible)));
    transition: transform 240ms var(--ease);
    will-change: transform;
  }
  .sheet[data-state="half"] {
    --visible: 54%;
  }
  .sheet[data-state="full"] {
    --visible: 100%;
    box-shadow: none;
  }
  .sheet.is-drag {
    transition: none;
  }
  .sheet[data-state="peek"] .scroller {
    overflow: hidden;
  }
  .sheet__handle {
    display: grid;
    place-items: center;
    width: 100%;
    height: 28px;
    flex: none;
    border: 0;
    border-radius: var(--r-18) var(--r-18) 0 0;
    background: none;
    touch-action: none;
    cursor: grab;
  }
  .sheet__handle span {
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: var(--encre);
    opacity: 0.55;
  }
  .resultbar {
    min-height: 56px;
    padding: 0 14px 10px;
  }
  .scroller {
    scrollbar-gutter: auto;
  }

  .row__link {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 58px 14px 20px;
  }
  .row__img {
    width: 76px;
    height: 76px;
  }
  .row__pin {
    right: 18px;
    width: 44px;
    height: 44px;
  }
  .row::before,
  .row::after {
    inset: 5px 4px 8px 8px;
  }

  .fab {
    position: absolute;
    z-index: 850;
    left: 50%;
    bottom: calc(var(--peek) + var(--safe) + 28px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 2px solid #000;
    border-radius: 999px;
    background: var(--encre);
    color: #fff;
    box-shadow: var(--flotte);
    font: 500 var(--t-17) var(--f-titre);
    transform: translateX(-50%);
    transition: bottom 240ms var(--ease);
  }
  .app[data-sheet="half"] .fab {
    bottom: calc((100% - var(--quick-h)) * 0.54 + 14px);
  }
  .app[data-sheet="full"] .fab {
    bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .leaflet-top.leaflet-right {
    padding: calc(var(--quick-h) + 8px) 10px 0 0;
  }
  .vf-zoom {
    display: none;
  }
  /* Bas de la carte : 20 px passent sous le bord arrondi du tiroir. */
  .leaflet-bottom {
    bottom: 20px;
  }
  .app[data-sheet="half"] .leaflet-bottom,
  .app[data-sheet="full"] .leaflet-bottom {
    display: none;
  }
  /* « Légende » et « Liste » sur une même ligne, l'attribution de la carte seule en dessous. */
  .leaflet-bottom.leaflet-left .leaflet-control {
    margin: 0 0 28px 10px;
  }
  .app.is-legend .fab {
    display: none;
  }
  .vf-legend__panel {
    max-height: calc(100dvh - var(--top-h) - var(--quick-h) - var(--peek) - var(--safe) - 44px);
    overflow-y: auto;
  }
  .vf-base__menu {
    width: 196px;
  }
}

@media (min-width: 861px) and (max-width: 1100px) {
  .app {
    --panel-w: 380px;
  }
}
