/* SUN LOCATION V2 – PAGE DE RECHERCHE (search.php)
   Mobile d'abord : liste en pleine largeur, carte en plein écran derrière un bouton ; 960px et plus : liste à gauche, carte à droite. */

:root { --h-barre: 120px; --haut-carte: 170px; --noir-carte: #1B2733; }
html.vue-carte { overflow: hidden; }

/* ---------- EN-TÊTE DE RECHERCHE : logo, moteur compact, liens ; filtres rapides en dessous (bande bleue) ----------
   Mobile : le tout est collant et se replie quand on descend dans la liste. */
.rch-haut {
  position: sticky; top: 0; z-index: 40; background: var(--bleu); transition: top .22s ease;
  &.repliee { top: calc(-1 * var(--h-barre)); }
}
.entete-recherche .entete-int { flex-wrap: wrap; height: auto; min-height: 56px; padding-bottom: 0; }
.entete-recherche .logo, .entete-recherche .entete-nav { min-height: 56px; }   /* même ligne du logo et des icônes que l'accueil (56 px) */
.entete-recherche .logo { display: flex; align-items: center; }
.entete-recherche .recherche-compacte { order: 3; flex: 1 1 100%; margin: 0 calc(var(--marge) - 4px) 10px 0; padding-right: 0; }   /* l'en-tête n'a que 4 px de marge à droite (icônes) : on rend les 12 px manquants */

.rch-barre { background: var(--bleu); }
.rch-barre-int { max-width: 1800px; margin: 0 auto; padding: 0 var(--marge); }
.rch-outils { display: flex; align-items: center; gap: 10px; padding: 0 0 10px; }
.rch-puces {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none;
  margin: 0 0 0 calc(-1 * var(--marge)); padding: 2px 4px 2px var(--marge);
  &::-webkit-scrollbar { display: none; }
  li { flex: none; }
}
/* Boutons sur la bande bleue : contour et texte blancs ; actif = plein blanc */
.rch-puce {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border: 1.5px solid rgba(255, 255, 255, .65); border-radius: 999px;
  background: none; color: var(--blanc); font-size: 14px; font-weight: 500; white-space: nowrap;   /* sans fond : contraste du texte blanc sur le bleu */
  &:hover { background: rgba(255, 255, 255, .24); border-color: var(--blanc); }
  &[aria-pressed="true"] { border-color: var(--blanc); background: var(--blanc); color: var(--bleu-fonce); font-weight: 700; }
  .ico { width: 18px; height: 18px; }
}
.rch-puce-nb {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--jaune); color: #3D3300;
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.rch-tri { position: relative; flex: none; }
.rch-tri-liste {
  position: absolute; z-index: 50; top: calc(100% + 8px); right: 0; min-width: 210px; padding: 6px; border-radius: 16px; background: var(--blanc); color: var(--texte); box-shadow: var(--ombre);
  &[hidden] { display: none; }
  button {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none;
    font: inherit; font-size: 15px; color: var(--texte); text-align: left;
    .ico { width: 18px; height: 18px; stroke-width: 2.8; color: var(--bleu); visibility: hidden; }
    &:hover, &:focus-visible { background: var(--fond-clair); outline: none; }
    &[aria-selected="true"] { font-weight: 700; .ico { visibility: visible; } }
  }
}

/* ---------- LISTE ---------- */
.rch-liste { padding: 14px var(--marge) 96px; }
.rch-tete { margin-bottom: 12px; }
.rch-titre { font-size: 20px; line-height: 1.25; font-weight: 900; letter-spacing: -.01em; }
.rch-sous-titre { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--texte-3); }
.rch-precedentes { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.rch-suivantes { margin-left: auto; }   /* liste paginée : à droite, même sans lien « précédentes » (page 1) */
/* Liste paginée : « ← Page 1 » et « Page 3 → » en petites pastilles, comme les numéros du bas */
.rch-page-lien {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--bord); border-radius: 10px;
  background: var(--blanc); color: var(--texte); font-size: 14px; font-weight: 700; text-decoration: none;
  &:hover { border-color: var(--bleu); color: var(--bleu-fonce); }
}
#rch-resultats { &.charge { pointer-events: none; > :not(.rch-attente) { opacity: .45; transition: opacity .15s; } } }

[data-cartes] { display: grid; gap: 16px; grid-template-columns: 1fr; }
.carte-rch { position: relative; transition: box-shadow .15s, border-color .15s; &.en-vue { border-color: var(--bleu); box-shadow: 0 0 0 2px var(--bleu), var(--ombre-carte); } }
.carte-rch .carte-titre { -webkit-line-clamp: 2; }
.carte-rch .carte-photo { aspect-ratio: 16 / 10; overflow: hidden; }
/* Photo toujours en position absolue : la hauteur vient du rapport 16/10, jamais de la photo (sinon elle varie avec la taille de chaque image jusqu'au diaporama) */
.carte-rch .carte-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carte-rch .carte-lieu { text-transform: none; }
.rch-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; span { padding: 2px 8px; border-radius: 6px; background: var(--fond-clair); font-size: 12px; color: var(--texte-2); } }
.rch-distance { display: block; margin-top: 2px; font-size: 13px; color: var(--texte-2); }
.rch-vert { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 13px; font-weight: 500; color: #1D6B3E; .ico { width: 15px; height: 15px; stroke-width: 2.6; } }
.rch-prix { text-align: right; line-height: 1.25; s { color: var(--texte-3); font-size: 13px; } small { display: block; font-size: 12px; color: var(--texte-3); } }

.rch-suite { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 22px 0 0; }
.bouton-suite {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 28px; border: 1.5px solid var(--texte); border-radius: var(--rayon-s);
  color: var(--texte); font-weight: 700; text-decoration: none;
  &:hover { background: var(--fond-clair); }
  &[aria-busy="true"] { opacity: .5; }
}
.rch-suite-info { font-size: 13px; color: var(--texte-3); }
.rch-attente { position: sticky; top: 8px; z-index: 2; width: fit-content; margin: 0 auto 12px; padding: 8px 16px; border-radius: 999px; background: var(--bleu); color: var(--blanc); font-size: 14px; font-weight: 700; box-shadow: var(--ombre-carte); animation: rch-pulse 1.2s ease-in-out infinite; }
@keyframes rch-pulse { 50% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) { .rch-attente { animation: none; } }
.rch-erreur { margin-bottom: 12px; padding: 12px 14px; border-radius: var(--rayon-s); background: #FDE8E8; color: #8E1B26; }

.rch-vide { padding: 28px 0 40px; display: grid; gap: 12px; }
.rch-propositions { display: flex; flex-wrap: wrap; gap: 8px; li a {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tactile); padding: 0 16px; border: 1.5px solid var(--bord); border-radius: 999px;
  color: var(--texte); text-decoration: none; font-weight: 500;
  span { font-size: 13px; color: var(--texte-3); font-weight: 400; }
  &:hover { border-color: var(--bleu); }
} }

/* ---------- DIAPORAMA DES CARTES ---------- */
.carte-photo .badge { z-index: 2; }
.diapo {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; background: #DCE7F1;
  &::-webkit-scrollbar { display: none; }
  &.glisse { scroll-snap-type: none; cursor: grabbing; }
  img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; scroll-snap-stop: always; user-select: none; background: #DCE7F1; -webkit-user-drag: none; }
}
.diapo-points {
  position: absolute; z-index: 2; left: 50%; bottom: 9px; transform: translateX(-50%); display: flex; gap: 5px; pointer-events: none;
  i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 3px rgba(0, 0, 0, .45); transition: transform .15s, background .15s; }
  i.actif { background: var(--blanc); transform: scale(1.35); }
}
.diapo-fleche {
  position: absolute; z-index: 2; top: 50%; display: none; align-items: center; justify-content: center; width: 34px; height: 34px; margin-top: -17px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--texte); box-shadow: 0 1px 6px rgba(0, 0, 0, .3); opacity: 0; transition: opacity .15s;
  &[hidden] { display: none !important; }
  .ico { width: 18px; height: 18px; }
}
.diapo-prec { left: 8px; }
.diapo-suiv { right: 8px; }
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  .diapo-fleche { display: inline-flex; }
  .carte-rch:hover .diapo-fleche, .carte-rch:focus-within .diapo-fleche { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .diapo-points i, .diapo-fleche { transition: none; } }

/* Aucun résultat avec dates : dates proches */
.rch-dates-proches { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); li a {
  display: flex; flex-direction: column; gap: 1px; min-height: var(--tactile); padding: 10px 16px; border: 1.5px solid var(--bleu-fonce); border-radius: var(--rayon-s);
  background: var(--bleu-pale); color: var(--texte); text-decoration: none;
  b { color: var(--bleu-fonce); }
  span { font-size: 13px; color: var(--texte-2); }
  &:hover { background: #D8E8F6; }
} }

/* ---------- CARTE ---------- */
.rch-carte { display: none; position: relative; isolation: isolate; background: #E6EDF3; }
.rch-carte-zone { position: absolute; inset: 0; }
.rch-carte-outils {
  position: absolute; z-index: 500; top: 10px; left: 10px; right: 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  > * { pointer-events: auto; }
}
.rch-suivre {
  display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--blanc); box-shadow: 0 2px 10px rgba(8, 36, 66, .25);
  font-size: 14px; font-weight: 500; cursor: pointer;
  input { width: 18px; height: 18px; accent-color: var(--bleu-fonce); }
}
.rch-zone-btn {
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--noir-carte); color: var(--blanc); box-shadow: 0 4px 14px rgba(8, 36, 66, .35);
  font-size: 15px; font-weight: 700;
  &:hover { background: #000; }
}
.rch-carte-etat {
  position: absolute; z-index: 500; left: 10px; bottom: 10px; max-width: calc(100% - 80px); padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, .92);
  font-size: 12px; color: var(--texte-2); box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.rch-apercu {
  position: absolute; z-index: 600; left: 10px; right: 10px; bottom: 10px; border-radius: var(--rayon); background: var(--blanc); box-shadow: 0 8px 30px rgba(8, 36, 66, .35); overflow: hidden;
  &[hidden] { display: none; }
}
.apercu-lien { display: flex; color: inherit; text-decoration: none; }
.apercu-photo { flex: none; width: 120px; background: #DCE7F1; img { width: 100%; height: 100%; object-fit: cover; } }
.apercu-corps { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; padding: 10px 12px; }
.apercu-corps .carte-titre { font-size: 15px; }
.apercu-bas { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }

/* Aperçu ancré au prix cliqué (ordinateur) */
.apercu-popup {
  .leaflet-popup-content-wrapper { padding: 0; border-radius: var(--rayon); overflow: hidden; box-shadow: 0 8px 30px rgba(8, 36, 66, .35); }
  .leaflet-popup-content { position: relative; width: 290px !important; margin: 0; }
  .apercu-lien { flex-direction: column; }
  .apercu-photo { width: 100%; height: 150px; }
  .apercu-corps { padding: 10px 14px 12px; }
  .leaflet-popup-close-button { display: none; }
  .favori { top: 6px; right: 6px; width: 36px; height: 36px; }
}

/* Marqueurs Leaflet */
.mk { background: none; border: 0; }
.mk-prix, .mk-groupe { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-family: inherit; font-weight: 700; }
.mk-prix {
  padding: 5px 10px; border-radius: 999px; background: var(--blanc); color: var(--texte); font-size: 14px; border: 1px solid rgba(8, 36, 66, .22); box-shadow: 0 2px 6px rgba(8, 36, 66, .25);
  &.actif { background: var(--noir-carte); color: var(--blanc); border-color: var(--noir-carte); transform: translate(-50%, -50%) scale(1.1); }
}
.mk-prix.favori::before { content: "♥"; margin-right: 5px; color: var(--rouge); }
.mk-prix.favori.actif::before { color: #FF8A94; }
.rch-apercu .favori { top: 6px; right: 6px; width: 38px; height: 38px; }
.leaflet-marker-icon.mk:hover .mk-prix { background: var(--noir-carte); color: var(--blanc); }
.mk-groupe {
  display: flex; align-items: center; justify-content: center; width: var(--t, 42px); height: var(--t, 42px); border-radius: 50%;
  background: var(--bleu-fonce); color: var(--blanc); font-size: 14px; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 2px 8px rgba(8, 36, 66, .4);
}
.leaflet-container { font-family: inherit; background: #E6EDF3; }
.leaflet-container a { color: var(--bleu-fonce); }

/* ---------- BOUTON CARTE / LISTE (mobile) : dans la barre du haut, à côté de Filtres (même style que les puces) ---------- */
.rch-bascule .ico[hidden], .rch-bascule-bas .ico[hidden] { display: none; }
/* Carte / Liste : même style que Filtres et Trier dans les deux états (pas de bouton « plein » quand on est sur la carte) */
.rch-bascule[aria-pressed="true"] { border-color: rgba(255, 255, 255, .65); background: rgba(255, 255, 255, .12); color: var(--blanc); font-weight: 500; }
.rch-bascule[aria-pressed="true"]:hover { background: rgba(255, 255, 255, .24); border-color: var(--blanc); }
/* Raccourci en bas de l'écran : n'apparaît que lorsque la barre du haut est repliée (on a fait défiler la liste vers le bas) */
.rch-bascule-bas {
  position: fixed; z-index: 45; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 24px);
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--noir-carte); color: var(--blanc); font-size: 14px; font-weight: 700; box-shadow: 0 6px 20px rgba(8, 36, 66, .4);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  .ico { width: 18px; height: 18px; }
}
body:has(.rch-haut.repliee) .rch-bascule-bas { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* Mobile et tablette : Filtres, Carte et Trier au même format, plus petits */
@media (max-width: 959px) {
  .rch-puces { flex: 0 1 auto; margin: 0; padding: 2px 0; gap: 6px; }
  .rch-outils { gap: 6px; }
  .rch-puce { min-height: 32px; gap: 5px; padding: 0 11px; font-size: 13px; .ico { width: 16px; height: 16px; } }
}

/* Mobile, vue carte : en-tête ultra compact sur une seule ligne : logo, bouton Filtres, et une croix à droite qui ferme la carte (retour à la liste) */
.rch-bascule [data-ico-fermer] { display: none; }
@media (max-width: 959px) {
  html.vue-carte .rch-haut { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 14px; padding: 0 var(--marge); }
  html.vue-carte .entete-recherche, html.vue-carte .entete-recherche .entete-int { display: contents; }
  html.vue-carte .entete-recherche .entete-nav { display: none; }
  html.vue-carte .entete-recherche .logo { grid-area: 1 / 1; min-height: 56px; }
  html.vue-carte .rch-barre, html.vue-carte .rch-barre-int, html.vue-carte .rch-outils, html.vue-carte .rch-puces { display: contents; }
  html.vue-carte .rch-puces li:has(.rch-puce-filtres) { grid-column: 2; grid-row: 1; justify-self: start; }
  html.vue-carte .rch-li-carte { grid-column: 3; grid-row: 1; }
  html.vue-carte .rch-bascule { width: 32px; min-height: 32px; padding: 0; justify-content: center; border-radius: 50%; }
  html.vue-carte .rch-bascule [data-bascule-texte] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  html.vue-carte .rch-bascule [data-ico-carte], html.vue-carte .rch-bascule [data-ico-liste] { display: none; }
  html.vue-carte .rch-bascule [data-ico-fermer] { display: block; width: 18px; height: 18px; stroke-width: 2.6; }
  html.vue-carte .rch-bascule [data-ico-fermer][hidden] { display: none; }
}

/* Mobile, vue carte : le moteur de recherche disparaît de l'en-tête (il revient avec la liste) pour laisser la place à la carte */
@media (max-width: 959px) { html.vue-carte .entete-recherche .recherche-compacte, html.vue-carte .rch-tri { display: none; } }   /* vue carte : ni moteur ni tri (le tri ne sert qu'à la liste) */

/* Mobile : la carte occupe tout l'écran sous la barre */
.rch[data-vue="carte"] {
  .rch-liste { display: none; }
  .rch-carte { display: block; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; top: var(--haut-carte); }
  .rch-apercu { bottom: 16px; }
  .rch-carte-etat { bottom: 16px; left: 10px; }
}

/* ---------- PANNEAU FILTRES ---------- */
.filtres {
  width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--blanc); color: var(--texte);
  &::backdrop { background: rgba(8, 36, 66, .5); }
  &[open] { display: block; }
}
#filtres-form { display: flex; flex-direction: column; height: 100%; }
.filtres-tete { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 8px 8px 8px var(--marge); border-bottom: 1px solid var(--bord); }
.filtres-corps { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px var(--marge) 20px; }
.filtres-pied {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--marge) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--bord);
  .bouton-valider { flex: 0 1 auto; }
}
.filtre {
  margin: 0; padding: 20px 0; border: 0; border-bottom: 1px solid var(--bord);
  legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-size: 17px; font-weight: 700; }
  legend + * { clear: both; }
}
.filtre-valeur { font-size: 15px; color: var(--texte-2); margin-bottom: 6px; }
.filtre-aide { margin-top: 8px; font-size: 13px; color: var(--texte-3); }
.filtre input[type="range"] { width: 100%; height: 36px; accent-color: var(--bleu-fonce); }
.filtre-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.filtre-choix input { position: absolute; opacity: 0; pointer-events: none; }
.filtre-choix label {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 48px; padding: 0 16px; border: 1.5px solid #C5D2DE; border-radius: 999px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  &:hover { border-color: var(--texte); }
}
.filtre-choix input:checked + label { border-color: var(--bleu-fonce); background: var(--bleu-pale); color: var(--bleu-fonce); font-weight: 700; }
.filtre-choix input:focus-visible + label { outline: 3px solid var(--jaune); outline-offset: 2px; }
.filtre-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.case { display: flex; align-items: center; gap: 12px; min-height: 46px; cursor: pointer; input { width: 22px; height: 22px; flex: none; accent-color: var(--bleu-fonce); } }
.filtre-selects { display: grid; gap: 12px; label { display: grid; gap: 4px; font-size: 14px; color: var(--texte-2); } }
.filtre-selects select {
  min-height: 48px; padding: 0 12px; border: 1.5px solid #C5D2DE; border-radius: var(--rayon-s); background: var(--blanc); font: inherit; font-size: 16px; color: var(--texte);
}

/* =========================================================
   TABLETTE (600px et plus)
   ========================================================= */
@media (min-width: 600px) {
  .rch-liste { padding-left: var(--marge); padding-right: var(--marge); }
  [data-cartes] { grid-template-columns: 1fr 1fr; }
  .rch-titre { font-size: 24px; }
  .filtres {
    inset: 5vh 50% auto auto; transform: translateX(50%); width: min(640px, 94vw); height: auto; max-height: 90vh; border-radius: var(--rayon-l); overflow: hidden;
    &[open] { display: flex; flex-direction: column; }
  }
  .filtres #filtres-form { max-height: 90vh; }
  .filtre-selects { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   ORDINATEUR (960px et plus) : liste à gauche, carte à droite, chacune défile seule
   ========================================================= */
@media (min-width: 960px) {
  body.page-recherche { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .page-recherche main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .rch-haut { position: relative; flex: none; }

  /* En-tête sur une ligne (grille) : logo, moteur compact (même carte blanche que sur mobile), Filtres et Trier, liens */
  .rch-haut { display: grid; grid-template-columns: auto minmax(0, 640px) auto minmax(0, 1fr) auto; column-gap: 24px; padding: 0 24px; }
  .entete-recherche, .entete-recherche .entete-int { display: contents; }
  .entete-recherche .logo { grid-area: 1 / 1; display: flex; align-items: center; min-height: 68px; }
  .entete-recherche .entete-nav { grid-area: 1 / 5; justify-self: end; min-height: 68px; }
  .entete-recherche .entete-lien { white-space: nowrap; }
  .entete-recherche .recherche-compacte { grid-area: 1 / 2; align-self: center; min-width: 0; margin: 0; padding: 0; }
  .rch-barre { grid-area: 1 / 3; align-self: center; min-width: 0; margin-left: -12px; }
  .rch-barre-int { max-width: none; margin: 0; padding: 0; }
  .rch-outils { padding: 0; justify-content: flex-start; gap: 8px; }
  .rch-puces { flex: 0 1 auto; margin: 0; padding: 2px 0; flex-wrap: wrap; gap: 6px; overflow: visible; }
  .rch-puce { min-height: 36px; }

  .rch { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 44%); }
  .rch-liste { overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 40px; scrollbar-gutter: stable; }
  .rch-carte { display: block; position: relative; }
  .rch-suivre { display: inline-flex; }
  .rch-carte-outils { top: 14px; flex-direction: row; justify-content: center; }
  .rch-apercu { left: 14px; right: auto; bottom: 24px; width: 380px; }
  .rch-carte-etat { left: 14px; bottom: 14px; }
  .rch-apercu:not([hidden]) ~ .rch-carte-etat { display: none; }
  .rch-puces li:has(.rch-bascule) { display: none; }
  .rch-bascule-bas { display: none; }
  .rch-titre { font-size: 26px; }

  /* Cartes : 2 par ligne, 3 à partir de 1400 px */
  [data-cartes] { grid-template-columns: 1fr 1fr; gap: 18px; }
  .carte-rch .carte-bas { flex-wrap: wrap; row-gap: 2px; }
  .rch[data-vue="carte"] .rch-liste { display: block; }
}
/* Jusqu'à 1599 px : liens de l'en-tête réduits à leur icône pour laisser la place au moteur, aux filtres et au tri */
@media (min-width: 960px) and (max-width: 1599px) {
  .entete-recherche .entete-libelle { display: none; }
  .entete-recherche .entete-nav { gap: 4px; }
  .rch-haut { column-gap: 16px; }
}
/* 960 à 1099 px : bouton Filtres réduit à son icône (son libellé reste lu par les lecteurs d'écran), pour laisser la place aux dates du moteur */
@media (min-width: 960px) and (max-width: 1099px) {
  .rch-puce-filtres .rch-puce-libelle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* 960 à 1199 px : tri réduit à son icône */
@media (min-width: 960px) and (max-width: 1199px) {
  .rch-tri-bouton { width: 38px; padding: 0; justify-content: center; [data-tri-libelle] { display: none; } }
  .rch-tri-liste { right: 0; left: auto; }
}
@media (min-width: 1400px) {
  .rch { grid-template-columns: minmax(0, 1fr) minmax(480px, 40%); }
  [data-cartes] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .rch-haut, #rch-resultats, .carte-rch { transition: none; }
}
