/* =========================================================
   LANDORA MOBILE — Design system partagé
   Palette et typo reprises de Landora.css (site web) pour
   que l'app garde la même âme visuelle.
   ========================================================= */

/* Font Awesome : chargé par chaque page (<link> non bloquant), plus par @import. */

:root {
  --gold: #d4af37;
  --gold-dark: #c9a227;
  --gold-light: #d9a52b;
  --gold-alt: #d4a017;
  --bg: #0b0b0b;
  --bg-elevated: #111111;
  --bg-card: #151515;
  --bg-input: #1c1c1c;
  --border: #2a2a2a;
  --text: #ffffff;
  --text-dim: #b3b3b3;
  --text-faint: #8c8c8c; /* contraste suffisant sur fond sombre */
  --danger: #ff3d00;
  --success: #2ecc71;
  --info: #2563eb;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --header-h: 56px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

body {
  padding-top: calc(var(--header-h) + var(--safe-top));
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); color: inherit; background: none; border: none; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { display: none; }

.container { padding: 16px; }

/* ---------- Header ---------- */
.l-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 12px;
  padding-right: 12px;
  background: rgba(11,11,11,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 500;
}

.l-header__btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--text);
  border-radius: 50%;
  position: relative;
}
.l-header__btn:active { background: rgba(255,255,255,0.08); }
.l-header__btn i { font-size: 19px; }

.l-header__logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: bold; font-size: 18px; letter-spacing: 0.5px;
}
.l-header__logo img { width: 28px; height: 28px; object-fit: contain; }
.l-header__logo span { color: var(--gold); }

.l-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--gold); color: #111;
  font-size: 10px; font-weight: bold;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 2px solid var(--bg);
}
.l-tabbar__item .l-badge { top: -4px; right: -8px; }
.l-badge-hidden, .l-badge.hidden { display: none; }

/* ---------- Bottom tab bar ---------- */
.l-tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(11,11,11,0.98);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 500;
}
.l-tabbar__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: var(--text-faint);
  font-size: 11px;
  background: none; border: none;
}
.l-tabbar__item svg, .l-tabbar__item i { width: 22px; height: 22px; font-size: 20px; }
.l-tabbar__item.is-active { color: var(--gold); }
.l-tabbar__item--publish {
  position: relative;
}
.l-tabbar__item--publish .l-tabbar__fab {
  position: absolute;
  top: -18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(212,175,55,0.45);
}
.l-tabbar__item--publish .l-tabbar__fab svg, .l-tabbar__item--publish .l-tabbar__fab i { width: 22px; height: 22px; font-size: 20px; color: #111; }
.l-tabbar__item--publish span { margin-top: 26px; }

/* ---------- Side menu (☰) ---------- */
.l-menu-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 900;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.l-menu-overlay.is-open { opacity: 1; pointer-events: auto; }

.l-menu {
  position: fixed; top: 0; bottom: 0; left: 0;
  width: 82%; max-width: 340px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  transform: translateX(-105%);
  transition: transform .25s ease;
  z-index: 901;
  display: flex; flex-direction: column;
  padding-top: var(--safe-top);
}
.l-menu.is-open { transform: translateX(0); }

.l-menu__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.l-menu__head .l-header__logo { font-size: 20px; }
.l-menu__close { background: none; border: none; color: var(--text); width: 32px; height: 32px; }

.l-menu__list { list-style: none; margin: 0; padding: 8px 0; overflow-y: auto; }
.l-menu__list li a {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  color: var(--text);
  font-size: 15px;
}
.l-menu__list li a svg, .l-menu__list li a i { width: 20px; font-size: 17px; color: var(--gold); flex-shrink: 0; text-align: center; }
.l-menu__list li a:active { background: rgba(255,255,255,0.05); }
.l-menu__list .l-menu__divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ---------- Cards / buttons / forms (communs à toutes les pages) ---------- */
.l-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 46px; padding: 0 20px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: bold; font-size: 15px;
  background: var(--gold);
  color: #111;
}
.l-btn:active { filter: brightness(0.92); }
.l-btn--block { width: 100%; }
.l-btn--outline {
  background: transparent; color: var(--gold);
  border: 1.5px solid var(--gold);
}
.l-btn--ghost {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border);
}

.l-input {
  width: 100%; height: 46px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  font-family: var(--font);
}
.l-input::placeholder { color: var(--text-faint); }
.l-label { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; display: block; }

.l-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.l-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: bold;
  background: rgba(212,175,55,0.12); color: var(--gold);
  border: 1px solid rgba(212,175,55,0.35);
}
.l-chip--status-available { background: rgba(46,204,113,0.12); color: var(--success); border-color: rgba(46,204,113,0.35); }

.l-section-title {
  font-size: 17px; font-weight: bold; margin: 4px 0 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.l-section-title a { font-size: 12px; color: var(--gold); font-weight: normal; }

.l-skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, #1e1e1e 37%, var(--bg-card) 63%);
  background-size: 400% 100%;
  animation: l-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
/* Logo Landora au centre de la case, qui bat comme un cœur. */
.l-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../../Image/small/landora-logo-mark.webp") center / auto min(56px, 46%) no-repeat;
  animation: l-beat 1.3s ease-in-out infinite;
}
@keyframes l-beat {
  0%, 60%, 100% { transform: scale(1);    opacity: .85; }
  15%           { transform: scale(1.18); opacity: 1; }
  30%           { transform: scale(1); }
  45%           { transform: scale(1.1);  opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .l-skeleton, .l-skeleton::after { animation: none; } }
@keyframes l-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.l-empty {
  text-align: center; padding: 48px 20px; color: var(--text-dim);
}
.l-empty svg, .l-empty i { width: 48px; font-size: 40px; color: var(--text-faint); margin-bottom: 12px; display:block; }

/* ---------- Bottom sheet (filtres, catégories) ---------- */
.l-sheet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 950; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.l-sheet-overlay.is-open { opacity: 1; pointer-events: auto; }
.l-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-height: 85vh; overflow-y: auto;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(20px + var(--safe-bottom));
  transform: translateY(105%);
  transition: transform .25s ease;
  z-index: 951;
}
.l-sheet.is-open { transform: translateY(0); }
.l-sheet__handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 0 auto 14px;
}
.l-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.l-sheet__head h3 { margin: 0; font-size: 18px; }
.l-sheet__close { background: none; border: none; color: var(--text); width: 32px; height: 32px; }

/* ---------- Toast / loading ---------- */
.l-toast {
  position: fixed; left: 16px; right: 16px;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  background: #1c1c1c; border: 1px solid var(--border);
  color: var(--text); padding: 12px 16px; border-radius: var(--radius-md);
  font-size: 13px; text-align: center;
  z-index: 1200;
  opacity: 0; transform: translateY(10px);
  transition: all .25s ease;
  pointer-events: none;
}
.l-toast.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- EJNA floating widget ---------- */
.l-ejna-fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(212,175,55,0.4);
  z-index: 700;
  border: none;
}
.l-ejna-fab .ejna-icon { font-size: 22px; color: #111; }

.l-ejna-panel {
  position: fixed; inset: 0; background: var(--bg);
  z-index: 1000;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .25s ease;
  padding-top: var(--safe-top);
}
.l-ejna-panel.is-open { transform: translateY(0); }
.l-ejna-panel__head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.l-ejna-panel__head .l-ejna-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  display: flex; align-items: center; justify-content: center; color: #111; font-weight: bold;
}
.l-ejna-panel__head h4, .l-ejna-panel__head .l-ejna-title { margin: 0; font-size: 15px; font-weight: bold; display: block; }
.l-ejna-panel__head small { color: var(--text-faint); font-size: 11px; }
.l-ejna-panel__close { margin-left: auto; background: none; border: none; color: var(--text); width: 32px; height: 32px; font-size: 20px; }
.l-ejna-panel__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.l-ejna-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.l-ejna-msg--bot { align-self: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.l-ejna-msg--user { align-self: flex-end; background: var(--gold); color: #111; border-bottom-right-radius: 4px; }
.l-ejna-panel__input {
  display: flex; gap: 8px; padding: 12px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
}

.l-ejna-panel__input textarea {
  flex: 1;
  min-height: 42px;
  max-height: 100px;
  resize: none;
  overflow-y: auto;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  font: inherit;
  line-height: 1.4;
  box-sizing: border-box;
  scrollbar-width: thin;
}
.l-ejna-panel__input button {
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--gold); color: #111; display: flex; align-items: center; justify-content: center;
}

/* Réflexion EJNA : bulle discrète avec pulsation lumineuse */

.l-ejna-thinking{
   width:max-content;
   min-width:42px;
   height:auto;
   padding:10px 14px !important;
   border-radius:14px;
   opacity:.35;
   white-space:nowrap;
   animation:ejnaThinkingPulseMobile 1.8s ease-in-out infinite;
}

@keyframes ejnaThinkingPulseMobile{
   0%,100%{
      opacity:.30;
      box-shadow:0 0 0 rgba(218,165,32,0);
   }
   50%{
      opacity:1;
      box-shadow:0 0 14px rgba(218,165,32,.28);
   }
}


/* ---------- Property card (grille Accueil / Recherche) ---------- */
.l-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.l-property-card { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; cursor: pointer; }
.l-property-card__menu-btn { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,0.6); border: none; color: #fff; font-size: 13px; z-index: 5; display: flex; align-items: center; justify-content: center; }
.l-card-context-menu { position: fixed; background: #2a2a2a; border: 1px solid #444; border-radius: 10px; min-width: 200px; z-index: 900; display: none; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.l-card-context-menu.is-open { display: block; }
.l-card-context-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; background: none; border: none; color: #fff; font-size: 13px; }
.l-card-context-menu button i { color: var(--gold); width: 15px; text-align: center; }
.l-card-context-menu button:active { background: #383838; }
.l-card-context-menu button.danger { color: #ff5c5c; }
.l-card-context-menu button.danger i { color: #ff5c5c; }

.l-invoice-viewer { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 950; display: none; align-items: flex-start; justify-content: center; padding: 20px; overflow-y: auto; }
.l-invoice-viewer.is-open { display: flex; }
.l-invoice-box { position: relative; width: 100%; max-width: 480px; background: #0d0d0d; border: 1px solid #d4af37; border-radius: 14px; padding: 22px; margin: 20px 0; box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.l-invoice-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.08); border: none; color: var(--gold); font-size: 16px; }

/* Modale générique (profil : partager/bloquer/signaler/QR — wallet : offres) */
.landora-profile-modal { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 800; display: none; align-items: flex-start; justify-content: center; padding: 20px; overflow-y: auto; }
.landora-profile-modal.is-open { display: flex; }
.landora-profile-modal-box { width: 100%; max-width: 400px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 14px; padding: 20px; max-height: 90vh; overflow-y: auto; margin: auto 0; }
.landora-profile-modal-box h3 { margin: 0 0 14px; font-size: 16px; }
.l-property-card__desc { font-size: 11px; color: var(--text-dim); margin: 3px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.l-property-card__verif { font-size: 10px; color: var(--text-faint); margin-top: 4px; }
.l-property-card__verif.is-verified { color: var(--success); }
.l-property-card__availability { font-size: 10px; font-weight: bold; margin-top: 4px; padding: 3px 8px; border-radius: 6px; display: inline-block; }
.l-property-card__availability.is-available { color: var(--success); background: rgba(46,204,113,0.12); }
.l-property-card__availability.is-unavailable { color: var(--danger); background: rgba(255,61,0,0.12); }
.l-property-card__media { position: relative; aspect-ratio: 4/3; background: #1a1a1a; }
.l-property-card__media img { width: 100%; height: 100%; object-fit: cover; }
.l-property-card__badge { position: absolute; bottom: 8px; left: 8px; }
.l-property-card__fav {
  position: absolute; top: 12px; left: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 5; transition: transform 0.15s ease;
}
.l-property-card__fav:active { transform: scale(1.3); }
.l-property-card__fav.is-active { color: goldenrod; background: rgba(0,0,0,0.65); }
.l-property-card__fav svg, .l-property-card__fav i { width: 16px; font-size: 14px; }
.l-property-card__fav-count {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px;
  background: #fff; color: #111; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.5);
}
.l-property-card__fav-count.hidden { display: none; }
.l-property-card__views { position: absolute; bottom: 10px; right: 10px; display: flex; align-items: center; gap: 4px; font-size: 12px; color: #9ca3af; text-shadow: 0 1px 3px rgba(0,0,0,0.8); z-index: 4; }
.l-property-card__body { padding: 10px; }
.l-property-card__price { color: var(--gold); font-weight: bold; font-size: 14px;  white-space: nowrap;}
.l-property-card__title { font-size: 12.5px; margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-property-card__price sub {
  font-size: 0.55em;
  font-weight: 400;
  vertical-align: sub;
  white-space: nowrap;
}
.l-property-card__meta { display: flex; align-items: center; gap: 4px; color: var(--text-faint); font-size: 11px; }

/* Liste horizontale (résultats de recherche en mode liste, cf. maquette "Rechercher") */
.l-property-row {
  display: flex; gap: 12px; padding: 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.l-property-row__media { width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: #1a1a1a; }
.l-property-row__media img { width: 100%; height: 100%; object-fit: cover; }
.l-property-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.l-property-row__type { font-size: 10px; color: var(--text-faint); text-transform: uppercase; }
.l-property-row__title { font-size: 14px; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-property-row__meta { font-size: 11.5px; color: var(--text-dim); display: flex; align-items: center; gap: 4px; }
.l-property-row__price { font-size: 14px; color: var(--gold); font-weight: bold; }

/* ---------- Hero (Accueil) ---------- */
.l-hero {
  position: relative;
  min-height: 320px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px 16px 28px;
  background: linear-gradient(180deg, rgba(11,11,11,0.2) 0%, rgba(11,11,11,0.95) 92%),
              url('../../Image/Villa-Saliu_27.webp') center/cover no-repeat;
}
.l-hero h1 { font-size: 30px; line-height: 1.1; margin: 0 0 8px; }
.l-hero h1 .accent { color: var(--gold); }
.l-hero p { color: var(--text-dim); font-size: 13.5px; margin: 0 0 16px; }

/* Quick actions (Acheter / Louer / Types / Localisation / Rechercher) */
.l-quick-actions {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
}
.l-quick-actions::-webkit-scrollbar { display: none; }
.l-qa-btn {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 11px; color: var(--text);
  min-width: 74px;
}
.l-qa-btn svg, .l-qa-btn i { width: 20px; font-size: 18px; color: var(--gold); }
.l-qa-btn--primary { background: var(--gold); color: #111; border-color: var(--gold); }
.l-qa-btn--primary svg, .l-qa-btn--primary i { color: #111; }

/* Stats bar (+12K annonces, +5K utilisateurs...) */
.l-stats { display: flex; justify-content: space-between; padding: 18px 16px; }
.l-stats__item { text-align: center; }
.l-stats__num { color: var(--gold); font-weight: bold; font-size: 16px; }
.l-stats__label { font-size: 10px; color: var(--text-faint); }

/* Catégories (grille Types de biens, cf. maquette) */
.l-cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.l-cat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 13px; font-weight: bold;
}
.l-cat-item.is-selected { border-color: var(--gold); background: rgba(212,175,55,0.08); }
.l-cat-item__icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: #222; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.l-cat-item__icon svg, .l-cat-item__icon i { width: 18px; font-size: 16px; color: var(--gold); }
.l-cat-item__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* ---------- Recherche : barre + résultats ---------- */
.l-search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 0 12px; height: 46px;
}
.l-search-bar svg, .l-search-bar i { width: 18px; font-size: 16px; color: var(--text-faint); flex-shrink: 0; }
.l-search-bar input { flex: 1; background: none; border: none; color: var(--text); font-size: 14px; font-family: var(--font); height: 100%; }
.l-search-bar__filter-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--gold); border: none; color: #111;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.l-search-bar__filter-btn svg, .l-search-bar__filter-btn i { width: 16px; font-size: 14px; }

.l-results-count { font-size: 13px; color: var(--text-dim); margin: 14px 0 10px; }
.l-results-count b { color: var(--text); }
.l-results-list { display: flex; flex-direction: column; gap: 10px; }

.l-view-toggle { display: flex; gap: 6px; }
.l-view-toggle button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-faint); }
.l-view-toggle button.is-active { color: var(--gold); border-color: var(--gold); }

/* Formulaire filtres (bottom sheet) */
.l-filter-group { margin-bottom: 16px; }
.l-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.l-select { appearance: none; background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3b3b3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; }

/* ---------- Fiche bien (Détails) ---------- */
.l-gallery { position: relative; aspect-ratio: 1/1; background: #151515; }
.l-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 100%; }
.l-gallery__track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.l-gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.l-gallery__nav--prev { left: 10px; }
.l-gallery__nav--next { right: 10px; }
.l-gallery__thumbs { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; }
.l-gallery__thumbs img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; opacity: 0.6; border: 1px solid var(--border); }
.l-gallery__thumbs img.is-active { opacity: 1; border-color: var(--gold); }

.l-detail-head { padding: 16px; border-bottom: 1px solid var(--border); }
.l-detail-head__price { color: var(--gold); font-size: 22px; font-weight: bold; }
.l-detail-head__title { font-size: 17px; font-weight: bold; margin: 4px 0; }
.l-detail-head__stats { display: flex; gap: 14px; color: var(--text-faint); font-size: 12px; margin-top: 6px; }
.l-detail-head__stats span { display: flex; align-items: center; gap: 4px; }
.l-detail-head__stats svg, .l-detail-head__stats i { width: 14px; font-size: 12px; }

.l-info-table { width: 100%; border-collapse: collapse; }
.l-info-table tr { border-bottom: 1px solid var(--border); }
.l-info-table td { padding: 11px 0; font-size: 13.5px; }
.l-info-table td:first-child { color: var(--text-faint); }
.l-info-table td:last-child { text-align: right; font-weight: bold; }
.l-info-table td.is-danger { color: var(--danger); }
.l-info-table td.is-success { color: var(--success); }

.l-owner-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); }
.l-owner-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.l-owner-row__name { font-size: 13.5px; font-weight: bold; }
.l-owner-row__badge { font-size: 10px; color: var(--gold); }

.l-sticky-cta {
  position: fixed; left: 0; right: 0;
  bottom: 0;
  padding-bottom: var(--safe-bottom);
  display: flex; gap: 10px; padding-left: 16px; padding-right: 16px; padding-top: 10px;
  background: rgba(11,11,11,0.98); border-top: 1px solid var(--border);
  z-index: 400;
}
.l-sticky-cta .l-btn { flex: 1; margin-bottom: 10px; }

/* ---------- Messages ---------- */
.l-conv { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.l-conv__avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #1a1a1a; }
.l-conv__body { flex: 1; min-width: 0; }
.l-conv__top { display: flex; justify-content: space-between; align-items: center; }
.l-conv__name { font-size: 14px; font-weight: bold; }
.l-conv__time { font-size: 10.5px; color: var(--text-faint); }
.l-conv__preview { font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.l-conv__unread { background: var(--gold); color: #111; font-size: 10px; font-weight: bold; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* ---------- NNEJ Wallet ---------- */
.l-wallet-card {
  margin: 16px; padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #2a2210, #1a1a1a 60%);
  border: 1px solid rgba(212,175,55,0.35);
}
.l-wallet-card__label { font-size: 11px; color: var(--text-dim); }
.l-wallet-card__amount { font-size: 28px; font-weight: bold; color: var(--gold); margin: 4px 0 16px; display: flex; align-items: center; gap: 8px; }
.l-wallet-card__amount button { background: none; border: none; color: var(--text-faint); }
.l-wallet-card__actions { display: flex; gap: 10px; }
.l-wallet-card__actions .l-btn { flex: 1; height: 40px; font-size: 13px; padding: 0 10px; }

.l-tx-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.l-tx-row__icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.l-tx-row__icon.is-in { background: rgba(46,204,113,0.15); color: var(--success); }
.l-tx-row__icon.is-out { background: rgba(255,61,0,0.15); color: var(--danger); }
.l-tx-row__body { flex: 1; }
.l-tx-row__title { font-size: 13px; font-weight: bold; }
.l-tx-row__date { font-size: 10.5px; color: var(--text-faint); }
.l-tx-row__amount { font-size: 13px; font-weight: bold; }
.l-tx-row__amount.is-in { color: var(--success); }
.l-tx-row__amount.is-out { color: var(--danger); }

.hidden { display: none !important; }

/* ---------- Tablette (≥640px) : cartes agent/agence sur 3 colonnes, blogs sur 2, biens sur 3 ---------- */
@media (min-width: 640px) {
  #agentGrid, #agencyGrid, #pro-fav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-items: start;
  }
  #post-fav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
  }
  #agentGrid .pro-card, #agencyGrid .agency-card, #pro-fav-grid .pro-card, #pro-fav-grid .agency-card, #post-fav-grid .post-card {
    margin-bottom: 0;
  }
  .l-grid-2 { grid-template-columns: repeat(3, 1fr); }
}


/* EJNA mobile : le panneau suit le visualViewport quand le clavier est ouvert. */
.l-ejna-panel {
  top: var(--ejna-viewport-top, 0px);
  bottom: auto;
  height: var(--ejna-viewport-height, 100dvh);
  max-height: var(--ejna-viewport-height, 100dvh);
  overflow: hidden;
}
.l-ejna-panel__body {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 16px;
}
.l-ejna-panel__input {
  flex-shrink: 0;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: var(--bg);
}

* {
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Barres de défilement : masquées partout (règles ci-dessus) SAUF dans
   Messages et les conversations (<html class="l-scrollbars">, posé par
   js/app.js) : barre fine et dorée. Dans l'application Android, la barre
   native de la page suit la même règle (module LandoraApp). */
html.l-scrollbars,
html.l-scrollbars * {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, .55) transparent;
}
html.l-scrollbars ::-webkit-scrollbar,
html.l-scrollbars::-webkit-scrollbar {
  display: block;
  width: 4px;
  height: 0;
}
html.l-scrollbars ::-webkit-scrollbar-thumb,
html.l-scrollbars::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, .55);
  border-radius: 4px;
}
