:root {
  --primary:    #4a6fa5;
  --trust:      #4397f4;
  --trust-dark: #2b86ec;
  --soft:       #d8f3fd;
  --dark:       #1a2a3a;
  --bg:         #f8feff;
  --bg-card:    #e4f8fe;
  --bg-white:   #edfafe;
  --border:     #a8ddf0;
}

/* ── Base ────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--dark);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
  background: #f0fbff !important;
  box-shadow: 0 4px 18px rgba(67,151,244,.18);
  border-bottom: 1px solid var(--border);
}
.navbar .nav-link       { color: var(--dark); }
.navbar .nav-link:hover { color: var(--trust); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--trust));
  display: inline-block;
}
.navbar-brand { color: var(--dark) !important; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-trust {
  background: var(--trust);
  color: #fff;
  border: none;
  border-radius: 10px;
}
.btn-trust:hover, .btn-trust:focus {
  background: var(--trust-dark);
  color: #fff;
}
.btn-outline-secondary {
  border-color: var(--trust);
  color: var(--trust);
}
.btn-outline-secondary:hover {
  background: var(--trust);
  color: #fff;
  border-color: var(--trust);
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #b0e4f8, #d8f3fd);
  padding: 64px 0;
}

/* ── Cards & sections ────────────────────────────────────────── */
.search-card, .form-section, .sidebar {
  border: 0;
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(74,111,165,.20);
  background: var(--bg-white);
}
.search-card .btn { white-space: nowrap; min-width: 90px; }
.form-section { padding: 22px; }

/* ── Property cards ──────────────────────────────────────────── */
.property-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: .2s;
  background: var(--bg-white);
}
.property-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(74,111,165,.25);
}
.property-img {
  height: 210px;
  object-fit: cover;
  width: 100%;
  background: #c0e8f8;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge-owner  { background: #d0f0fc; color: #2a4a6a; }
.badge-agency { background: #c8eefa; color: #1a3a5a; }

/* ── Price color ─────────────────────────────────────────────── */
.text-success { color: var(--trust) !important; }

/* ── Ad slot ─────────────────────────────────────────────────── */
.ad-slot {
  border: 2px dashed var(--border);
  background: #d0f0fc;
  color: #3a6080;
  border-radius: 18px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 15px;
}

/* ── Dashboard shell ─────────────────────────────────────────── */
.dashboard-shell { background: var(--bg); min-height: 80vh; }
.sidebar         { padding: 18px; }
.sidebar a       { color: var(--dark); text-decoration: none; }
.sidebar a:hover { color: var(--trust); }

/* ── Mobile hamburger button (navbar, all pages) ─────────────────── */
.sidebar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: none;
}
.sidebar-toggle-btn .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--trust);
  position: relative;
}
.sidebar-toggle-btn .bar::before,
.sidebar-toggle-btn .bar::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--trust);
}
.sidebar-toggle-btn .bar::before { top: -6px; }
.sidebar-toggle-btn .bar::after  { top: 6px; }

@media (max-width: 991.98px) {
  .sidebar-toggle-btn { display: inline-flex; }
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,30,40,.45);
  z-index: 1055;
}
.sidebar-backdrop.show { display: block; }

.sidebar-close-btn {
  display: block;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--dark);
  position: absolute;
  top: 12px;
  right: 14px;
  line-height: 1;
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* ── Global mobile side menu (hamburger, all pages) ──────────────── */
.global-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--bg-white);
  z-index: 1060;
  overflow-y: auto;
  box-shadow: 4px 0 28px rgba(20,30,40,.28);
}
.global-mobile-menu.open {
  display: block;
  animation: slideInLeft .25s ease;
}
.global-menu-link {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--dark);
  text-decoration: none;
  font-size: 15px;
}
.global-menu-link:hover {
  background: #e4f4fc;
  color: var(--trust);
}
#globalMenuBackdrop {
  z-index: 1055;
}

@media (min-width: 992px) {
  .global-mobile-menu, #globalMenuBackdrop { display: none !important; }
}

@media (max-width: 991.98px) {
  /* Per-page sidebars (Dashboard, Messages, Favorites, Account, Admin)
     are replaced by the global hamburger menu on mobile */
  .sidebar-page-col {
    display: none;
  }
  .sidebar-page-col ~ [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
}

/* ── Agency / private boxes ──────────────────────────────────── */
.agency-box {
  border: 1px solid var(--border);
  background: #d0f0fc;
  border-radius: 18px;
  padding: 18px;
}
.private-box {
  border: 1px solid #a8ddf0;
  background: #ddf4fe;
  border-radius: 18px;
  padding: 18px;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert-info    { background: #d0f0fc; border-color: #6aaed4; color: #1a3a5a; }
.alert-success { background: #d8f3fd; border-color: #4397f4; color: #1a2a3a; }
.alert-warning { background: #fff3cd; border-color: #ffc107; color: #664d03; }
.alert-danger  { background: #ffe0e0; border-color: #f5a8a8; color: #7a1a1a; }

/* ── Form controls ───────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
  border-color: var(--trust);
  box-shadow: 0 0 0 .2rem rgba(67,151,244,.30);
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  background: #b0e4f8 !important;
  border-top: 1px solid var(--border);
}

/* ── Nav active ──────────────────────────────────────────────── */
.nav-link.active, .nav-link:active { color: var(--trust) !important; }

/* ── Bootstrap badge overrides ───────────────────────────────── */
.badge.bg-success { background-color: var(--trust) !important; }
.badge.bg-light   { background-color: #d0f0fc !important; color: var(--dark) !important; }

/* ── Carousel ────────────────────────────────────────────────── */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(40%) sepia(60%) saturate(400%) hue-rotate(190deg);
}
.carousel-indicators [data-bs-target] { background-color: var(--trust); }

/* ── Pricing highlight ───────────────────────────────────────── */
.pricing-highlight { border: 2px solid var(--trust) !important; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--trust); border-radius: 3px; }

/* ── Korean font ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');
body { font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif; }

/* ── Search page: full-width results (4 colonnes desktop) ── */
#searchResults .col-md-6 { flex: 0 0 auto; width: 25%; }
@media (max-width: 1400px) { #searchResults .col-md-6 { width: 33.333%; } }
@media (max-width: 991px)  { #searchResults .col-md-6 { width: 50%; } }
@media (max-width: 575px)  { #searchResults .col-md-6 { width: 100%; } }

/* ── Ad slot enhanced ────────────────────────────────────── */
.ad-slot {
  background: linear-gradient(90deg, #f0fbff, #e4f8fe);
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  color: var(--trust);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 14px;
  min-height: 60px;
}

/* ── Sélecteur de langue FR / NL / EN ───────────────────────── */
.lang-switch { display:inline-flex; gap:2px; border:1px solid #d5dde5; border-radius:999px; padding:2px; background:#fff; }
.lang-switch .lang-btn { font-size:12px; font-weight:700; letter-spacing:.03em; padding:3px 9px; border-radius:999px; color:#4a6fa5; text-decoration:none; line-height:1.4; }
.lang-switch .lang-btn:hover { background:#eef3f9; }
.lang-switch .lang-btn.active { background:#4397f4; color:#fff; }

/* ── Barre du haut : toujours visible, recherche intégrée, adaptée à tous les écrans ── */
#app-navbar { position: sticky; top: 0; z-index: 1040; background: #fff; }
.vutaluca-topbar { background: #fff; box-shadow: 0 2px 14px rgba(67,151,244,.14); border-bottom: 1px solid #e3ebf5; }
.vutaluca-topbar .topbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 24px; }
.vutaluca-topbar .tb-brand { order: 1; margin: 0; }
.vutaluca-topbar .top-right { order: 2; margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.vutaluca-topbar .top-search { order: 3; flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.top-search .ts-commune { flex: 2.6 1 240px; min-width: 0; }
.top-search .ts-type    { flex: 1 1 140px; min-width: 0; }
.top-search .ts-cat     { flex: 1.2 1 160px; min-width: 0; }
.top-search .ts-price   { flex: 1 1 130px; min-width: 0; }
.top-search .form-control, .top-search .form-select { height: 42px; border-radius: 12px; }
/* grand écran : tout sur une seule ligne */
@media (min-width: 1200px) {
  .vutaluca-topbar .top-search { order: 2; flex: 1 1 0; flex-wrap: nowrap; margin: 0 8px; }
  .vutaluca-topbar .top-right { order: 3; margin-left: 0; }
}
/* tablette / mobile */
@media (max-width: 991.98px) {
  .vutaluca-topbar .topbar-inner { padding: 8px 14px; }
  .vutaluca-topbar .tb-brand { margin-right: auto; }
  .vutaluca-topbar .top-right { margin-left: 0; }
}
@media (max-width: 575.98px) {
  .top-search .ts-commune { flex: 1 1 100%; }
  .top-search .ts-type, .top-search .ts-cat, .top-search .ts-price { flex: 1 1 calc(50% - 8px); }
  .vutaluca-topbar .lang-switch .lang-btn { padding: 3px 7px; }
}
/* sélecteur de communes à cocher */
.commune-multi { position: relative; }
.commune-multi .cm-btn { height: 42px; border-radius: 12px; display: flex; align-items: center; overflow: hidden; background: #fff; cursor: pointer; }
.commune-multi .cm-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.commune-multi .cm-menu { min-width: 320px; max-height: 380px; border-radius: 14px; }
.commune-multi .cm-list { max-height: 260px; overflow-y: auto; }
.commune-multi .cm-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; cursor: pointer; margin: 0; }
.commune-multi .cm-item:hover { background: #eef3f9; }
.commune-multi .cm-item small { margin-left: auto; }
.hero-compact { padding-top: 36px; padding-bottom: 28px; }
/* menu du bas */
.site-footer { background: #f4f7fa; border-top: 1px solid #e3e9ef; }
.footer-menu a { color: #27415f; text-decoration: none; font-weight: 500; }
.footer-menu a:hover { color: #4397f4; text-decoration: underline; }

/* ── Coordonnées protégées (appui long) ─────────────────────────── */
.reveal-btn { position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.reveal-btn .rv-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: #4397f4; }
.reveal-btn.holding .rv-bar { width: 100%; transition: width 1s linear; }
.reveal-btn.holding { background: #eaf3fe; }
.contact-vis-box { border: 1px solid #cfe3fb; background: #f4f9ff; border-radius: 16px; padding: 16px; }
.tr-box summary { color: #2b86ec; }
