﻿:root {
  --bg: #f6f7fb;
  --card: rgba(255, 255, 255, 0.92);
  --card2: rgba(255, 255, 255, 0.82);
  --ink: #0f172a;
  --muted: rgba(15, 23, 42, 0.62);
  --line: rgba(15, 23, 42, 0.1);
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
  --shadow2: 0 10px 22px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius2: 14px;
  --tap: 44px;

  --s-jamais: #64748b;
  --s-arevoir: #f59e0b;
  --s-visite: #3b82f6;
  --s-mandat: #22c55e;
  --s-exclu: #0f172a;
  --s-flyer: #7c3aed;

  --o-owner: #4f46e5;
  --o-tenant: #06b6d4;
  --o-vacant: #94a3b8;
  --o-unk: #cbd5e1;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  background: var(--bg);
  overflow: hidden;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
}
#map {
  position: absolute;
  inset: 0;
}

/* HUD */
#hud {
  position: absolute;
  z-index: 20;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--shadow2);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#hud .btn {
  width: var(--tap);
  padding: 0;
}

.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: transparent;
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.72);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-weight: 900;
  box-shadow: var(--shadow2);
}

/* Panel top (secteurs) */
.panel {
  position: absolute;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.panel--top {
  top: 12px;
  right: 12px;
  width: min(420px, calc(100% - 24px));
  padding: 10px;
}
.panel__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel__row label {
  font-weight: 800;
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}
.panel__row input {
  flex: 1 1 auto;
  min-width: 120px;
  height: var(--tap);
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 10px;
  font-weight: 800;
}

/* Sheet */
.hidden {
  display: none !important;
}

.sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 30;
  background: var(--card);

  /* ⬇️ IMPORTANT : on "ouvre" le coin haut droit pour l’encoche */
  border-radius: var(--radius) 0 var(--radius) var(--radius);

  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sheet__handle {
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.2);
  margin: 10px auto 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(15, 23, 42, 0.92);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  box-shadow: var(--shadow2);
}

/* ==================================================
   EDIT ADRESSE — crayon détouré (SANS carré blanc)
   Cible: élément #edit-address (utilisé par fiche.ui.js)
   ================================================== */
#edit-address {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;

  width: auto !important;
  height: auto !important;
  padding: 0 !important;

  min-width: 32px;
  min-height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* on masque ce qu'il y avait dedans (ton ancien crayon/icone) */
#edit-address > * {
  display: none !important;
}

#edit-address {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;

  min-width: 32px;
  min-height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 22px; /* crayon plus grand */
  line-height: 1;
  transform: scaleX(-1); /* miroir */
}

/* Encoche / créneau du bouton fermer */
.sheet__notch {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
  width: 58px;
  height: 54px;
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid rgba(15, 23, 42, 0.1);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  border-bottom-left-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Top content */
.sheet__top {
  padding: 12px 12px 10px;
  padding-top: 16px;
}

.sheet__statusbar {
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;

  /* ⬅️ CLÉ DU PROBLÈME : on aligne TOUT À GAUCHE */
  justify-content: flex-start;

  gap: 10px;
  color: #fff;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}
.status-label {
  font-weight: 900;
  font-size: 15px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-sub {
  margin-left: 6px;
  font-weight: 900;
  opacity: 0.9;
  font-size: 13px;
  white-space: nowrap;
}

/* Couleurs bandeau */
.status-JAMAIS {
  background: var(--s-jamais);
}
.status-A_REVOIR {
  background: var(--s-arevoir);
  color: rgba(15, 23, 42, 0.92);
}
.status-A_REVOIR .status-dot {
  background: rgba(15, 23, 42, 0.92);
}
.status-VISITE {
  background: var(--s-visite);
}
.status-MANDAT {
  background: var(--s-mandat);
}
.status-EXCLU {
  background: var(--s-exclu);
}
.status-FLYER_DISTRIBUÉ {
  background: var(--s-flyer);
}

/* Dropdown statut */
.status-dd {
  position: relative;
  flex: 0 0 auto;
}
.status-dd-btn {
  height: 34px;
  min-width: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.status-dd-menu {
  position: absolute;
  left: 0;
  right: auto;
  top: 42px;

  width: 260px;

  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: none;
  z-index: 9999;
}

.status-dd-menu.open {
  display: block;
}
.status-dd-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  background: #fff;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.92);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-dd-item:hover {
  background: #f1f5f9;
}
.sw {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.sw.s-j {
  background: var(--s-jamais);
}
.sw.s-a {
  background: var(--s-arevoir);
}
.sw.s-v {
  background: var(--s-visite);
}
.sw.s-m {
  background: var(--s-mandat);
}
.sw.s-e {
  background: var(--s-exclu);
}

.sheet__headline {
  padding: 10px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.h-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-sub {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.occ-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  width: fit-content;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.82);
}
#occ-txt {
  white-space: nowrap; /* ✅ jamais sur 2 lignes */
  overflow: hidden; /* ✅ coupe proprement */
  text-overflow: ellipsis; /* ✅ "…" si trop long */
  max-width: 220px; /* ✅ largeur stable, libère la place dessous */
}

/* Tabs verticales style intercalaires */
.tabs-vertical {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  min-height: 0;
  flex: 1 1 auto;
}

/* ✅ NOUVEAU : on masque la colonne d’onglets (elle bouffait l’écran) */
.v-tabs {
  display: none !important;
}

.v-panels {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
}

.tab-panel.hidden {
  display: none;
}

/* ✅ NOUVEAU : floating side tabs (style classeur / intercalaires) */
.floating-tabs {
  position: absolute;
  left: -2px;
  top: 210px;
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}
.floating-tabs .ft {
  width: 26px;

  /* ⬇️ PLUS D’AIR POUR LE TEXTE */
  padding: 14px 8px 14px 10px;

  border: 0;
  cursor: pointer;
  font-weight: 900;

  background: rgba(255, 255, 255, 0.96);
  color: rgba(15, 23, 42, 0.88);

  border-radius: 0 14px 14px 0;
  box-shadow: 2px 6px 16px rgba(0, 0, 0, 0.18);

  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.floating-tabs .ft.active {
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  box-shadow: 3px 10px 24px rgba(0, 0, 0, 0.26);
}

/* Cards / forms */
.card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
  margin-bottom: 12px;

  /* ⬅️ Décalage vers la droite pour aérer côté intercalaires */
  margin-left: 14px;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.card__title {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: rgba(15, 23, 42, 0.88);
  text-transform: uppercase;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 900;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.7);
}
.hint {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.6);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 520px) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }
}
.label {
  font-size: 12px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.68);
  margin-bottom: 6px;
}
.text {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  color: rgba(15, 23, 42, 0.92);
}
.readonly {
  background: rgba(255, 255, 255, 0.6);
  color: rgba(15, 23, 42, 0.7);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
}
.sep {
  height: 1px;
  background: rgba(15, 23, 42, 0.1);
  margin: 10px 0;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.segbtn {
  height: var(--tap);
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.75);
  font-weight: 900;
  color: rgba(15, 23, 42, 0.78);
  cursor: pointer;
  user-select: none;
}
.segbtn.active {
  background: var(--ink);
  color: #fff;
  border-color: transparent;
}

/* Modal */
.modal {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal.hidden {
  display: none;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}
.modal__card {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(15, 23, 42, 0.1);
}
.modal__head {
  padding: 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}
.modal__title {
  font-weight: 900;
  color: rgba(15, 23, 42, 0.9);
}
.modal__body {
  padding: 12px;
  max-height: 55vh;
  overflow: auto;
}
.modal__foot {
  padding: 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

/* Toast */
.status {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

/* Desktop */
@media (min-width: 900px) {
  #hud {
    top: 14px;
    left: 14px;
  }
  .panel--top {
    width: 420px;
  }
  .sheet {
    left: auto;
    right: 12px;
    top: 12px;
    bottom: 12px;
    width: 520px;
    max-height: none;
  }
  .sheet__handle {
    display: none;
  }
  .modal {
    align-items: center;
  }
  .modal__card {
    border-radius: 18px;
    margin: 0 12px;
  }

  /* Sur desktop on peut laisser les floating tabs, elles restent fines */
}

/* ==================================================
   FIX STABILITÉ FICHE (ONGLETS VIDES / COURTS)
   AJOUTÉ LE 2025-12-19_16-07-44
   ================================================== */

/* FIX-C: fiche propriété TOUJOURS au-dessus des autres panneaux */
#feature-panel.sheet {
  z-index: 40;
}

/* Verrouillage hauteur fiche : le bandeau ne bouge jamais */
#feature-panel.sheet {
  height: 78vh;
  max-height: 78vh;
}

/* Le scroll est UNIQUEMENT dans le contenu des onglets */
#feature-panel .v-panels {
  min-height: 0;
  overflow-y: auto;
}

/* Ne jamais bloquer le scroll via le parent */
#feature-panel.sheet {
  overflow: visible;
}

/* Même fix pour #prospection-panel — overflow:hidden coupe les touch events
   WebKit sur .sheet__notch (position:absolute au bord du parent) */
#prospection-panel.sheet {
  overflow: visible;
}

#prospection-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==================================================
   MENU DÉROULANT OCCUPATION
   ================================================== */

.occ-pill {
  position: relative;
  cursor: pointer;
  padding-right: 28px;
}

.occ-pill::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  opacity: 0.6;
}

.occ-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(15, 23, 42, 0.12);
  z-index: 9999;
  display: none;
  overflow: hidden;
}

.occ-menu.open {
  display: block;
}

.occ-item {
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
}

.occ-item:hover {
  background: #f1f5f9;
}

/* ==================================================
   MENU OCCUPATION — UX MODERNE
   ================================================== */

.occ-pill {
  position: relative;
  cursor: pointer;
}

.occ-pill::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  opacity: 0.6;
}

.occ-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(15, 23, 42, 0.12);
  z-index: 9999;
  display: none;
  overflow: hidden;
}

.occ-dd-menu.open {
  display: block;
}

.occ-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
}

.occ-dd-item:hover {
  background: #f1f5f9;
}

/* ==================================================
   MENU STATUT — BANDEAUX COULEUR (TEXTE FINAL)
   ================================================== */

.status-dd-menu {
  min-width: 260px;
}

.status-dd-item {
  display: block;
  padding: 12px;
  font-weight: 900;
  color: #fff;
  border-radius: 0;
}

.status-dd-item[data-s="JAMAIS"] {
  background: var(--s-jamais);
}
.status-dd-item[data-s="A_REVOIR"] {
  background: #f59e0b;
  color: #0f172a;
}
.status-dd-item[data-s="VISITE"] {
  background: #3b82f6;
}
.status-dd-item[data-s="MANDAT"] {
  background: #22c55e;
}
.status-dd-item[data-s="EXCLU"] {
  background: #0f172a;
}
.status-dd-item[data-s="FLYER_DISTRIBUÉ"] {
  background: #7c3aed;
}

.status-dd-item:hover {
  filter: brightness(1.05);
}

/* ==================================================
   REVOIR_MODAL_PREMIUM — style mobile premium (CSS only)
   Cible : #revoir-modal créé par fiche.ui.js
   ================================================== */

#revoir-modal,
#visite-modal {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 0 !important;
}

/* Carte / sheet */
#revoir-modal > div,
#visite-modal > div {
  width: 100% !important;
  max-width: 560px !important;
  border-radius: 18px 18px 0 0 !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  padding: 16px !important;
  padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  margin: 0 !important;
  position: relative !important;
}

/* poignée en haut façon bottom-sheet */
#revoir-modal > div::before,
#visite-modal > div::before {
  content: "";
  display: block;
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.2);
  margin: 2px auto 14px;
}

/* titre */
#revoir-modal h3,
#visite-modal h3 {
  margin: 0 0 12px !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  color: rgba(15, 23, 42, 0.92) !important;
}

/* select / input: gros, tap friendly */
#revoir-modal select,
#revoir-modal input[type="date"],
#visite-modal input[type="date"] {
  width: 100% !important;
  height: 56px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  padding: 0 12px !important;
  font-weight: 900 !important;
  font-size: 16px !important;
  outline: none !important;
}

/* espace */
#revoir-modal select {
  margin-bottom: 12px !important;
}
#revoir-modal input[type="date"] {
  margin-bottom: 12px !important;
}

/* zone boutons : plein largeur, gros */
#revoir-modal button {
  height: 56px !important;
  border-radius: 14px !important;
  border: 0 !important;
  font-weight: 900 !important;
  font-size: 16px !important;
  cursor: pointer !important;
}

/* Le bouton "Valider" (seul bouton dans ton HTML actuel) */
#revoir-ok {
  width: 100% !important;
  background: #22c55e !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.25) !important;
}

/* feedback tactile */
#revoir-ok:active {
  transform: translateY(1px);
}

/* Mobile: un peu plus compact */
@media (max-width: 420px) {
  #revoir-modal > div {
    padding: 14px !important;
  }
  #revoir-modal select,
  #revoir-modal input[type="date"],
  #revoir-modal button {
    height: 54px !important;
    font-size: 15px !important;
  }
}

/* ==================================================
   FIX_REVOIR_DATE_FINAL
   ================================================== */

/* Date parfaitement centrée */
#revoir-modal input[type="date"] {
  text-align: center !important;
  font-size: 18px !important;
}

#revoir-modal input[type="date"]::-webkit-date-and-time-value {
  text-align: center;
}

/* Bouton Valider orange (A_REVOIR) */
#revoir-ok,
#pa2-revoir-ok {
  background: #f59e0b !important;
  color: #ffffff !important;
  font-weight: 900;
}

/* ==================================================
   FIX_DATE_PRECISE_WEBKIT
   ================================================== */

/* Bouton valider orange */
#revoir-ok {
  background: #f59e0b !important;
  color: #1f2937 !important;
  font-weight: 900 !important;
}

/* Centrage date iOS (safe) */
#revoir-modal input[type="date"] {
  font-size: 18px !important;
}
#revoir-modal input[type="date"]::-webkit-date-and-time-value {
  text-align: center;
}
.flatpickr-input {
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}
/* ==================================================
   FIX UX — ONGLET PROSPECTION
   Empêche le pan libre (gauche / droite / diagonale)
   Autorise UNIQUEMENT le scroll vertical
   ================================================== */

#tab-prospection {
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
}

/* checkbox liste À revoir */
.revoir-item__cb {
  accent-color: #f59e0b;
}
/* ==================================================
   STATUT — FLÈCHE À GAUCHE (ORDRE PROPRE)
   ================================================== */

.sheet__statusbar .status-dd {
  order: 0;
  margin-right: 10px; /* espace entre flèche et texte */
}

.sheet__statusbar .status-left {
  order: 1;
  text-align: left;

  /* ⬇️ clé : on force le texte à démarrer à gauche */
  justify-content: flex-start;
}
/* ==================================================
   HEADER FICHE — COULEUR SELON OCCUPATION (PASTEL)
   Cible : <header class="sheet__top ..." id="sheet-top">
   ================================================== */

#sheet-top {
  transition: background-color 160ms ease;
}

/* Propriétaire occupant → bleu pastel */
#sheet-top.occ-owner {
  background: rgba(96, 165, 250, 0.22);
}

/* Locataire → vert d’eau pastel */
#sheet-top.occ-tenant {
  background: rgba(94, 234, 212, 0.22);
}

/* Vacant → saumon pastel */
#sheet-top.occ-vacant {
  background: rgba(251, 191, 36, 0.2);
}

/* Occupation inconnue → violet pastel */
#sheet-top.occ-unknown {
  background: rgba(139, 92, 246, 0.16);
}
/* ==================================================
   VISITE — bouton Valider bleu
   ================================================== */

#visite-ok {
  width: 100% !important;
  height: 56px !important;
  border-radius: 14px !important;
  background: rgba(59, 130, 246, 0.95) !important;
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 16px !important;
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35) !important;
}

#visite-ok:active {
  transform: translateY(1px);
}

/* VISITE — ancien style (désactivé) */
#revoir-ok.visite-ok {
}
#revoir-ok.visite-ok:active {
}
/* ==================================================
   FLYER SWITCH (premium, ✔ / ✖, sans texte)
   ================================================== */

.occ-row {
  display: flex;
  flex-direction: column; /* ✅ FIXE : Flyer passe TOUJOURS dessous */
  align-items: flex-start;
  gap: 10px;
}

.flyer-ctl {
  display: flex;
  flex-direction: column;
  gap: 6px;

  margin-left: 0;

  /* ✅ titre centré par rapport au bouton */
  align-items: center;

  /* ✅ position à DROITE (fixe) */
  align-self: flex-end;
}

.flyer-ttl {
  font-size: 12px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.68);
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.occ-block {
  display: flex; /* ✅ rend le conteneur "vertical" */
  flex-direction: column; /* ✅ Quick-links passent sous le menu */
  align-items: flex-start;
  gap: 8px; /* ✅ espace propre entre Occupation et icônes */
}

.flyer-sw {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.flyer-sw input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.flyer-track {
  width: 88px; /* ⬅️ plus compact */
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(225, 29, 72, 0.35);

  /* 🔴 OFF : rouge très clair / pâle */
  background: rgba(225, 29, 72, 0.18);

  box-shadow: var(--shadow2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px; /* ⬅️ padding réduit */
  transition:
    background 160ms ease,
    filter 160ms ease;
}

.flyer-x,
.flyer-v {
  font-weight: 900;
  font-size: 14px;
  opacity: 0.85;
}

.flyer-x {
  color: rgba(15, 23, 42, 0.7);
}

.flyer-v {
  color: rgba(15, 23, 42, 0.35);
}

.flyer-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
  transition: transform 170ms ease;
}

#flyer-sw:checked + .flyer-track {
  /* 🟣 ON : violet, cohérent avec FLYER_DISTRIBUÉ */
  background: var(--s-flyer);
}

#flyer-sw:checked + .flyer-track .flyer-x {
  color: rgba(15, 23, 42, 0.35);
}

#flyer-sw:checked + .flyer-track .flyer-v {
  color: rgba(255, 255, 255, 0.95);
}

#flyer-sw:checked + .flyer-track .flyer-knob {
  transform: translateX(52px); /* ⬅️ cohérent avec la nouvelle largeur */
}

/* ==================================================
   BOUTON "VALIDER LE BOÎTAGE" — BAS CENTRÉ
   ================================================== */

#boitage-validate {
  position: absolute;
  right: 12px; /* aligné bord droit */
  bottom: 12px; /* même hauteur que Mode boîtage */
  z-index: 30;

  transform: none; /* plus de centrage */
}

.boitage-btn {
  height: 38px; /* même hauteur que Mode boîtage */
  padding: 0 14px; /* largeur réduite */
  border-radius: 999px;
  border: 0;

  background: var(--s-flyer); /* violet identique */
  color: #fff;

  font-weight: 700; /* moins épais */
  font-size: 12px; /* texte plus petit */
  letter-spacing: 0.2px;

  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.45);
  cursor: pointer;
}

.boitage-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* ==================================================
   MODE BOÎTAGE — SWITCH PILL (DÉTOURÉ, PRO)
   ================================================== */

#dvf-ui {
  position: absolute;
  left: 12px;
  bottom: 58px;
  z-index: 29; /* ✅ sous la fiche (sheet = 30) */
  display: inline-flex;
}

#pro-ui {
  position: absolute;
  left: 12px;
  bottom: 104px;
  z-index: 29; /* ✅ sous la fiche (sheet = 30) */
  display: inline-flex;
}

#boitage-ui {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 29; /* ✅ sous la fiche (sheet = 30) */
  display: inline-flex;
}

.switch-holder {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  /* 🎯 Padding réduit = hauteur ADEME */
  padding: 6px 10px;

  border-radius: 999px;
  cursor: pointer;
  user-select: none;

  background: rgba(255, 255, 255, 0.18);

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.switch-label {
  padding: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

/* ✅ MENU DRAWER : texte NOIR pour DVF / PRO */
#drawer-navigation .switch-label {
  color: #0f172a !important;
  text-shadow: none !important;
}

.switch-toggle {
  height: 30px;
}

.switch-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  z-index: -2;
}

.switch-toggle input[type="checkbox"] + label {
  position: relative;
  display: inline-block;
  width: 74px;
  height: 30px;
  border-radius: 999px;
  margin: 0;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset -6px -6px 12px rgba(255, 255, 255, 0.25),
    inset 6px 6px 12px rgba(0, 0, 0, 0.22);
}

.switch-toggle input[type="checkbox"] + label::before {
  position: absolute;
  content: "OFF";
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  line-height: 22px;
  top: 4px;
  left: 4px;
  width: 34px;
  height: 22px;
  border-radius: 999px;

  background-color: rgba(255, 255, 255, 0.9);
  color: #111;

  box-shadow:
    -2px -2px 4px rgba(255, 255, 255, 0.35),
    2px 2px 6px rgba(0, 0, 0, 0.28);
  transition: 0.25s ease-in-out;
}

#boitage-ui .switch-toggle input[type="checkbox"]:checked + label::before {
  left: 36px;
  content: "ON";
  color: #fff;
  background-color: var(--s-flyer);
  box-shadow:
    -2px -2px 4px rgba(255, 255, 255, 0.22),
    2px 2px 8px rgba(124, 58, 237, 0.55);
}

#dvf-ui .switch-toggle input[type="checkbox"]:checked + label::before {
  left: 36px;
  content: "ON";
  color: #fff;
  background-color: #06b6d4;
  box-shadow:
    -2px -2px 4px rgba(255, 255, 255, 0.22),
    2px 2px 8px rgba(6, 182, 212, 0.55);
}

#pro-ui .switch-toggle input[type="checkbox"]:checked + label::before {
  left: 36px;
  content: "ON";
  color: #fff;
  background-color: #15803d;
  box-shadow:
    -2px -2px 4px rgba(255, 255, 255, 0.22),
    2px 2px 8px rgba(21, 128, 61, 0.55);
}

/* ==================================================
   ADEME — SWITCH (INTÉGRÉ COMME DVF / PRO)
   OFF = bouton blanc
   ON  = bouton rouge
   Rail = rouge très clair
   ================================================== */

/* ⚪ Rail ADEME — IDENTIQUE DVF / PRO (ombrage creusé) */
#ademe-ui .switch-toggle input[type="checkbox"] + label {
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset -6px -6px 12px rgba(255, 255, 255, 0.25),
    inset 6px 6px 12px rgba(0, 0, 0, 0.22);
}

/* ⚪ Bouton OFF (BLANC, comme DVF / PRO) */
#ademe-ui .switch-toggle input[type="checkbox"] + label::before {
  background-color: rgba(255, 255, 255, 0.95);
  color: #111;
  box-shadow:
    -2px -2px 4px rgba(255, 255, 255, 0.35),
    2px 2px 6px rgba(0, 0, 0, 0.28);
}

/* 🔴 Bouton ON (ROUGE) */
#ademe-ui .switch-toggle input[type="checkbox"]:checked + label::before {
  left: 36px;
  content: "ON";
  color: #fff;
  background-color: #ef4444;
  box-shadow:
    -2px -2px 4px rgba(255, 255, 255, 0.22),
    2px 2px 8px rgba(239, 68, 68, 0.55);
}

/* 🩷 Bouton ON (FUCHSIA) */
#sale-ui .switch-toggle input[type="checkbox"]:checked + label::before {
  left: 36px;
  content: "ON";
  color: #fff;
  background-color: #d946ef;
  box-shadow:
    -2px -2px 4px rgba(255, 255, 255, 0.22),
    2px 2px 8px rgba(217, 70, 239, 0.55);
}

/* 🩵 Bouton ON (CYAN) */
#rental-ui .switch-toggle input[type="checkbox"]:checked + label::before {
  left: 36px;
  content: "ON";
  color: #fff;
  background-color: #06b6d4;
  box-shadow:
    -2px -2px 4px rgba(255, 255, 255, 0.22),
    2px 2px 8px rgba(6, 182, 212, 0.55);
}

/* 🚫 SUPPRESSION de l’effet "pill flottante" dans le menu */
/* ==================================================
   MENU DRAWER — SWITCHES DONNÉES
   Tous STRICTEMENT à la même hauteur
   ================================================== */

#drawer-navigation #dvf-ui.switch-holder,
#drawer-navigation #pro-ui.switch-holder,
#drawer-navigation #ademe-ui.switch-holder,
#drawer-navigation #sale-ui.switch-holder,
#drawer-navigation #rental-ui.switch-holder {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.switch-holder:has(input[type="checkbox"]:checked) {
  background: rgba(6, 182, 212, 0.18);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(6, 182, 212, 0.2) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Spécialisation PRO — vert pastel plus franc */
#pro-ui.switch-holder:has(input[type="checkbox"]:checked) {
  background: rgba(21, 128, 61, 0.18);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(21, 128, 61, 0.2) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Spécialisation ADEME — rouge pastel */
#ademe-ui.switch-holder:has(input[type="checkbox"]:checked) {
  background: rgba(239, 68, 68, 0.18);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(239, 68, 68, 0.2) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Spécialisation BOÎTAGE — violet pastel (était cyan via règle générale) */
#boitage-ui.switch-holder:has(input[type="checkbox"]:checked) {
  background: rgba(124, 58, 237, 0.18);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(124, 58, 237, 0.2) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Spécialisation SALE — fuchsia pétant */
#sale-ui.switch-holder:has(input[type="checkbox"]:checked) {
  background: rgba(217, 70, 239, 0.18);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(217, 70, 239, 0.2) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Spécialisation RENTAL — bleu cyan */
#rental-ui.switch-holder:has(input[type="checkbox"]:checked) {
  background: rgba(6, 182, 212, 0.18);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(6, 182, 212, 0.2) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ==================================================
   BOÎTAGE — MODAL : bouton "Confirmer" en violet
   ================================================== */

#boitage-confirm.btn.primary {
  background: var(--s-flyer) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.45) !important;
}
/* ==================================================
   OCCUPATION — LIGNE ACTIONS (ICÔNES + FLYER)
   ================================================== */

.occ-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;

  /* ✅ vrai retrait visuel (≈ 1 cm) pour ne plus toucher les onglets */
  padding-left: 40px;
}

/* Dans la ligne actions, quick-links ne doit PAS prendre 100% */
.occ-actions-row #quick-links {
  display: flex;
  align-items: center;

  /* ✅ icônes plus aérées et mieux réparties */
  gap: 18px;

  /* base du groupe */
  padding-left: 10px;

  width: auto;
  margin-top: 0;
}

/* 🎯 Réglage fin asymétrique pour équilibre visuel */
.occ-actions-row #quick-links .ql:first-child {
  margin-left: -19px; /* ← 0,5 cm vers la gauche */
}

.occ-actions-row #quick-links .ql:last-child {
  margin-right: 19px; /* → 0,5 cm vers la droite */
}

/* Le flyer reste à droite (et garde son centrage interne) */
.occ-actions-row .flyer-ctl {
  margin-left: auto;
}

/* ==================================================
   QUICK LINKS — Street / GPS / Pages Jaunes
   (fiche > Prospection)
   ================================================== */

#quick-links {
  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%; /* ✅ prend toute la ligne sous Occupation */
  margin-top: 8px; /* espace sous le menu Occupation */
}

/* lien cliquable */
#quick-links .ql {
  width: 40px; /* ✅ taille du "carré" actuel */
  height: 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0; /* ❌ plus de padding */
  border-radius: 0; /* ❌ plus de forme */
  background: none; /* ❌ plus de carré blanc */
  border: none; /* ❌ plus de bordure */
  box-shadow: none; /* ❌ plus d’ombre */

  color: #0f172a;
  text-decoration: none;

  transition: transform 120ms ease;
}

/* icône */
#quick-links .ql-ico {
  font-size: 44px; /* ✅ le logo remplit la zone */
  font-weight: 900;
  line-height: 1;
}

#quick-links img {
  width: 44px; /* ✅ même impact visuel que font-size: 44px */
  height: 44px;
  display: block;
}
#quick-links .ql-pj img {
  transform: translateY(1px);
  margin-left: 28px; /* ≈ 0,75 cm vers la droite */
}

/* feedback interaction */
#quick-links .ql:active {
  transform: translateY(1px);
}

#quick-links .ql:hover {
  background: rgba(255, 255, 255, 0.92);
}
/* ==================================================
   ONGLET — INDICATEUR DONNÉES DISPONIBLES
   ================================================== */

.v-tab.has-data,
.ft.has-data,
.acc__sum.has-data > span:first-child {
  color: #c81e1e;
}

/* ==================================================
   DVF / PRO — NE PLUS ÊTRE DES BOUTONS FLOTTANTS
   Règle : quand ils sont dans le menu (drawer),
   ils doivent rester dans le flux normal.
   ================================================== */

/* Neutralisation complète des styles "overlay carte" */
#drawer-navigation #dvf-ui,
#drawer-navigation #pro-ui {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;

  z-index: auto !important;
  box-shadow: none !important;
  margin: 0 !important;
}

/* Sécurité : s’assurer qu’ils ne se repositionnent pas
   comme des pills carte par héritage */
#drawer-navigation .switch-holder {
  transform: none !important;
}

/* ==================================================
   MODULES DONNÉES (DVF / PRO / ADEME) — style pro pastel
   - DVF : basé sur le bleu carte (#06b6d4) en pastel
   - PRO : basé sur le vert carte (#16a34a) en pastel
   - ADEME : rouge pastel (futur)
   ================================================== */

.data-module {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 10px 10px;
}

.data-module__head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  /* 🎯 Alignement parfait des switches */
  gap: 12px;
}

/* ==================================================
   MENU DRAWER — ALIGNEMENT DES SWITCHES
   On fixe la largeur du libellé
   ADEME sert de référence
   ================================================== */

#drawer-navigation .switch-label {
  display: inline-block;

  /* ⬅️ largeur calée sur "DONNÉES ADEME" */
  width: 120px;

  text-align: left;
  white-space: nowrap;
}

.data-module__filters-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 32px;
  width: 32px;

  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.85);

  font-weight: 900;
  font-size: 14px;
  color: #0f172a;

  cursor: pointer;
  user-select: none;
}

.data-module__filters-btn:active {
  transform: translateY(1px);
}

.data-module__chev {
  font-size: 16px;
  line-height: 1;
  color: #0f172a;
}

.data-module__body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

/* Pastels par source */
.data-module--dvf {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.28);
}

.data-module--pro {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.26);
}

/* ==================================================
   PRO — BOUTON "TYPES DE PROPRIÉTAIRES"
   Fond BLANC pour contraste et clarté d’action
   ================================================== */
.data-module--pro #dropdownProTypeButton {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}

.data-module--pro #dropdownProTypeButton:hover {
  background: #f9fafb !important;
}

/* ==================================================
   PRO — SUPPRESSION DU BLOC DE RECHERCHE (LOUPE + INPUT)
   Inutile (peu d’options), gain de place mobile
   ================================================== */
#dropdownProType .px-2.pt-2 {
  display: none !important;
}

/* ==================================================
   FIX MOBILE — DROPDOWN PRO RESPONSIVE
   Empêche tout débordement à droite dans le drawer
   ================================================== */
@media (max-width: 640px) {
  #dropdownProType {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }
}

/* Futur ADEME */
.data-module--ademe {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.26);
}

/* ==================================================
   ADEME — SUPPRESSION DU TEXTE "TOUS" À DROITE
   (résumé non interactif devenu inutile)
   ================================================== */
.data-module--ademe .ademe-bubble-summary {
  display: none !important;
}

/* ==================================================
   ADEME — BOUTONS DE FILTRES (CLASSE / ANNÉE / ÉNERGIE / CHAUFFAGE)
   Fond BLANC pour contraste et lisibilité
   ================================================== */
.data-module--ademe .ademe-bubble-btn {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}

.data-module--ademe .ademe-bubble-btn:hover {
  background: #f9fafb !important;
}

/* ==================================================
   SLIDER DVF — couleur barre alignée avec le switch DVF
   (handles restent blancs = pas de règle .noUi-handle)
   ================================================== */
.data-module--dvf .noUi-connect {
  background: #06b6d4;
}

.data-module--ademe .noUi-connect {
  background: #ef4444;
}

/* Biens en vente */
.data-module--sale {
  background: rgba(217, 70, 239, 0.1);
  border-color: rgba(217, 70, 239, 0.26);
}

.data-module--sale .switch-label {
  color: #d946ef !important;
}

.data-module--sale .ademe-bubble-btn {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}
.data-module--sale .ademe-bubble-btn:hover {
  background: #f9fafb !important;
}

/* Biens en location */
.data-module--rental {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.26);
}

.data-module--rental .switch-label {
  color: #06b6d4 !important;
}

.data-module--rental .switch-toggle input:checked + label {
  background: #06b6d4 !important;
}

.data-module--rental .ademe-bubble-btn {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}
.data-module--rental .ademe-bubble-btn:hover {
  background: #f9fafb !important;
}

/* ==================================================
   ADEME — SLIDER SURFACE
   Proportions STRICTEMENT identiques au slider DVF
   ================================================== */

#ademe-surface-slider {
  margin: 10px 0 6px;
  padding: 0 6px;
}

/* ==================================================
   ADEME — "BULLES" multi-choix (glassmorphism)
   ================================================== */

.ademe-bubble-wrap {
  position: relative;
  margin-top: 10px;
}

.ademe-bubble-btn:active {
  transform: translateY(1px);
}

.ademe-bubble-summary {
  font-size: 12px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.6);
}

.ademe-bubble {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  z-index: 9000;

  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;

  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  overflow: hidden;

  transform-origin: top left;
  animation: ademeBubbleIn 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes ademeBubbleIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==================================================
   ADEME — BULLE : OUVERTURE INTELLIGENTE VERS LE HAUT
   (classe ajoutée par filters.panel.js)
   ================================================== */
.ademe-bubble.ademe-bubble--up {
  top: auto;
  bottom: calc(100% + 6px);
  transform-origin: bottom left;
  animation: ademeBubbleInUp 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes ademeBubbleInUp {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==================================================
   ADEME — BULLE : BOUTON FERMER (✕)
   ================================================== */
.ademe-bubble-head {
  display: flex;
  justify-content: flex-end;
  padding: 6px 6px 0 6px;
}

.ademe-bubble-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(15, 23, 42, 0.92);
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ademe-bubble-close:active {
  transform: translateY(1px);
}

.ademe-bubble-list {
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  margin: 0;
  list-style: none;
}

.ademe-bubble-item {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 10px;

  border-radius: 12px;
  cursor: pointer;
  user-select: none;

  font-weight: 500;
  color: rgba(15, 23, 42, 0.92);
}

.ademe-bubble-item:hover {
  background: rgba(15, 23, 42, 0.06);
}

.ademe-bubble-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.ademe-bubble-item label {
  flex: 1;
  cursor: pointer;
}

/* ==================================================
   ALLER À UNE ADRESSE — résultats BAN (tap friendly)
   ================================================== */
#goaddr-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.goaddr-item {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow2);
  cursor: pointer;
  user-select: none;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.92);
  text-align: left;
}

.goaddr-item:active {
  transform: translateY(1px);
}

.goaddr-item small {
  display: block;
  margin-top: 4px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.62);
}

/* === UI: suppression onglet Marché === */
#feature-tabs .v-tab[data-tab="marche"],
#floating-tabs .ft[data-tab="marche"],
.tab-panel[data-panel="marche"] {
  display: none !important;
}

/* === Modals: stabilité mobile (pas de scroll horizontal) === */
.modal__card {
  overflow-x: hidden;
}
.modal__body {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.modal__body .card {
  margin-left: 0;
}
.modal__body .grid2 > * {
  min-width: 0;
}
.modal__body .readonly {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* === Coordonnées: couleurs + toggle Pro === */
#contact-modal .pro-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-weight: 900;
  white-space: nowrap;
  margin-left: auto;
}
#contact-modal .pro-toggle input {
  width: 18px;
  height: 18px;
}

#contact-modal .contact-card.contact-card--owner {
  background: rgba(96, 165, 250, 0.22);
}
#contact-modal .contact-card.contact-card--tenant {
  background: rgba(94, 234, 212, 0.22);
}
#contact-modal .contact-card.contact-card--owner.is-pro {
  background: rgba(251, 191, 36, 0.18);
}
#contact-modal .contact-card.contact-card--tenant.is-pro {
  background: rgba(251, 146, 60, 0.18);
}

#account-modal .modal__card {
  display: flex;
  flex-direction: column;
  height: 78vh;
  max-height: 78vh;
  height: 78svh;
  max-height: 78svh;
  overflow: hidden;
}

#account-modal .modal__body {
  padding: 10px;
  flex: 1 1 auto;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#account-modal .sep {
  margin: 8px 0;
}

#account-modal #commune-results {
  display: none;
  overflow-x: hidden;
}

#account-modal .account-form {
  flex: 0 0 auto;
}

#account-modal .account-hint {
  margin-top: 6px;
}

#account-modal .account-selected {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#account-modal .commune-picker {
  position: relative;
}

#account-modal #commune-results[data-mode="message"] {
  display: block;
  margin-top: 8px;
}

#account-modal #commune-results[data-mode="list"] {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
  max-height: min(38vh, 320px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#account-modal #commune-results[data-mode="list"] .goaddr-item {
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 14px;
}

#account-modal #commune-results[data-mode="list"] .readonly {
  background: transparent;
  border: 0;
  padding: 8px 4px;
}

#account-modal #commune-selected {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.card.card-owner {
  background: rgba(96, 165, 250, 0.22);
}

.card.card-tenant {
  background: rgba(134, 239, 172, 0.22);
}

.card.card-owner.is-pro {
  background: rgba(251, 191, 36, 0.18);
}

.card.card-tenant.is-pro {
  background: rgba(251, 146, 60, 0.18);
}

/* ==================================================
   MA PROSPECTION — PANEL (MOBILE FIRST)
   - Hub "Ma prospection" avec onglets internes
   - V1 : onglet "À revoir" pleinement fonctionnel
   - UX : mini-barre compacte en haut lors du focus carte
   ================================================== */

/* Stabilité hauteur (même philosophie que #feature-panel) */
#prospection-panel.sheet {
  height: 78vh;
  max-height: 78vh;
}

/* Top (bandeau orange léger) */
#prospection-panel .prospection__top {
  padding: 14px 12px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(245, 158, 11, 0.14); /* orange A_REVOIR (pastel) */
}

#prospection-panel .prospection__toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#prospection-panel .prospection__ttl {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#prospection-panel .prospection__h1 {
  margin: 0;
  font-weight: 950;
  font-size: 16px;
  color: rgba(15, 23, 42, 0.92);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#prospection-panel .prospection__h2 {
  margin: 0;
  font-weight: 900;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Onglets internes (on réutilise .seg/.segbtn) */
#prospection-panel .prospection__tabs {
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* Corps scrollable */
#prospection-panel .prospection__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
}

/* Footer sticky (tournée) */
#prospection-panel .prospection__foot {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#prospection-panel #tournee-btn {
  width: 100%;
}

/* ======= FLYERS PANEL (violet #7c3aed) ======= */
#flyers-panel {
  height: 78vh;
  max-height: 78vh;
}
#flyers-top {
  padding-bottom: 0;
}
#flyers-top .flyers__bar {
  padding: 10px 12px 10px;
}
#flyers-top .flyers__title {
  font-weight: 700;
  font-size: 16px;
  color: #7c3aed;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#flyers-panel #flyers-close {
  color: rgba(15, 23, 42, 0.92);
}
#flyers-panel .flyers__body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
}

/* KPI compact : "X adresses" */
.pro-kpi {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.pro-kpi__left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pro-kpi__num {
  font-weight: 950;
  font-size: 22px;
  color: rgba(15, 23, 42, 0.92);
  line-height: 1;
}

.pro-kpi__lbl {
  font-weight: 900;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.6);
}

.pro-kpi__accent {
  font-weight: 950;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.14);
  color: rgba(15, 23, 42, 0.82);
}

/* Sections "À revoir" */
.revoir-section {
  margin-bottom: 14px;
}

.revoir-section__title {
  font-weight: 950;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.62);
  margin: 12px 4px 8px;
}

/* Ligne adresse */
.revoir-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  margin-bottom: 10px;
}

.revoir-item__cb {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  accent-color: #f59e0b !important;
}

.revoir-item__main {
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
}

.revoir-item__addr {
  font-weight: 950;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.revoir-item__city {
  margin-top: 2px;
  font-weight: 900;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.revoir-item__right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.revoir-item__date {
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.12);
  color: rgba(15, 23, 42, 0.86);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 950;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.revoir-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.revoir-item__btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.revoir-item__btn:active {
  transform: translateY(1px);
}

/* Confirmation inline (suppression relance) */
.revoir-confirm {
  margin-top: -6px;
  margin-bottom: 10px;
  padding: 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(239, 68, 68, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.revoir-confirm__txt {
  font-weight: 950;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.78);
}

.revoir-confirm__actions {
  display: flex;
  gap: 8px;
}

.revoir-confirm__actions .btn {
  min-height: 40px;
}

.revoir-confirm__actions .btn.primary {
  background: #ef4444 !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* ==================================================
   MODE CARTE — MINI-BARRE COMPACTE
   ================================================== */

/* Bar prospection (titre + action) */
#prospection-panel #prospection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#prospection-panel #prospection-title {
  min-width: 0;
  font-weight: 950;
  font-size: 16px;
  color: rgba(15, 23, 42, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#prospection-panel.compact {
  height: auto;
  max-height: none;
  bottom: auto;
  top: calc(12px + env(safe-area-inset-top, 0px));

  /* On laisse le bouton burger respirer à gauche */
  left: calc(12px + 52px);
  right: 12px;

  border-radius: 16px;
  z-index: 35;
}

#prospection-panel.compact .sheet__handle {
  display: none;
}

/* ✅ En compact on GARDE la croix (sheet__notch) — déplacée à gauche (évite overlap geoloc) */
#prospection-panel.compact .sheet__notch {
  display: flex;
  left: 0;
  right: auto;
  border-left: none;
  border-right: 1px solid rgba(15,23,42,0.1);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 16px;
}

#prospection-panel.compact .prospection__tabs,
#prospection-panel.compact .prospection__body,
#prospection-panel.compact .prospection__footer,
#prospection-panel.compact .prospection__foot {
  display: none;
}

/* ✅ header plus compact */
#prospection-panel.compact .sheet__top {
  padding: 10px 12px 10px;
  padding-top: 14px;
}

/* ✅ évite que "Revenir à la liste" passe sous la notch (croix) */
#prospection-panel.compact #prospection-bar {
  padding-right: 62px;
}

#prospection-panel .prospection__mini-btn {
  display: none;
}

#prospection-panel.compact .prospection__mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 950;
  color: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  user-select: none;
}

#prospection-panel.compact .prospection__mini-btn:active {
  transform: translateY(1px);
}
/* ==================================================
   PROSPECTION COMPACT — VERSION MOBILE AMÉLIORÉE
   ================================================== */

#prospection-panel.compact .prospection__top {
  background: #f59e0b;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* titre */
#prospection-panel.compact .prospection__title {
  font-size: 16px;
  font-weight: 950;
  color: #ffffff;
  text-align: left;
}

/* bouton retour */
#prospection-panel.compact .prospection__mini-btn {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: #ffffff;
  color: #0f172a;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* =========================================================
   MODE COMPACT — fenêtre "Revenir à la liste"
   ========================================================= */

#prospection-panel.compact #prospection-title {
  display: none !important;
}

#prospection-panel.compact #prospection-tabs {
  display: none !important;
}

#prospection-panel.compact #prospection-bar {
  background: transparent;
  border-bottom: none;
  padding: 10px;
  display: flex;
  justify-content: center;
}

#prospection-panel.compact #prospection-mini-expand {
  background: #f59e0b;
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
}

/* ==================================================
   GÉOLOCALISATION — Bouton toggle + Marqueur premium
   ================================================== */

/* Conteneur positionné coin supérieur droit */
#geoloc-container {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 25;
}

/* Bouton toggle type touche clavier */
.geoloc-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: rgba(15, 23, 42, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 2px 0 0 rgba(15, 23, 42, 0.18),
    0 4px 12px rgba(15, 23, 42, 0.14);
  transition:
    background 150ms ease,
    box-shadow 100ms ease,
    transform 80ms ease,
    color 150ms ease;
}

.geoloc-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 0 rgba(15, 23, 42, 0.18),
    0 2px 6px rgba(15, 23, 42, 0.1);
}

/* État ON (géoloc active) */
.geoloc-btn[aria-pressed="true"] {
  background: #1E88E5;
  color: #fff;
  border-color: transparent;
  box-shadow:
    0 2px 0 0 rgba(14, 80, 160, 0.6),
    0 4px 14px rgba(30, 136, 229, 0.4);
}

.geoloc-btn[aria-pressed="true"]:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 0 rgba(14, 80, 160, 0.6),
    0 2px 6px rgba(30, 136, 229, 0.3);
}

/* Marqueur HTML premium — cercle + halo pulsant */
.geoloc-marker-wrap {
  position: relative;
  width: 22px;
  height: 22px;
}

/* Halo pulsant */
.geoloc-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(30, 136, 229, 0.22);
  animation: geolocPulse 2s ease-out infinite;
  pointer-events: none;
}

/* Cercle central */
.geoloc-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #1E88E5;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.55);
  z-index: 1;
}

/* Prêt pour future flèche directionnelle */
.geoloc-arrow {
  display: none; /* activé si deviceorientation disponible */
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 12px solid #1E88E5;
  margin: -18px 0 0 -5px;
  transform-origin: 50% 100%;
  z-index: 2;
}

@keyframes geolocPulse {
  0%   { transform: scale(0.6); opacity: 0.8; }
  60%  { transform: scale(1.6); opacity: 0.15; }
  100% { transform: scale(2.0); opacity: 0; }
}

/* Desktop : aligner sous les contrôles MapLibre si panel--top présent */
@media (min-width: 900px) {
  #geoloc-container {
    top: 14px;
    right: 14px;
  }
}

/* ===== À VENDRE (forsale.ui.js) ===== */
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.forsale-row {
  padding: 4px 0 0;
}

.forsale-pill:hover {
  filter: brightness(0.97);
}

.forsale-pill:active {
  transform: scale(0.98);
}
