/* ════════════════════════════════════════════════════════════════
   eMB STAY — PAGE CARTE (premium, responsive)
   Desktop : liste 360px à gauche + carte à droite
   Mobile  : carte plein écran + cartes swipables en bas + bascule liste
   Thème sombre, cohérent avec la navbar et la home.
   ════════════════════════════════════════════════════════════════ */

.sc {
  --sc-vio: #7C5CFC;
  --sc-vio-d: #4E33C4;
  --sc-teal: #1DD1A1;
  background: #070A11;
  color: #c7cede;
  min-height: 100vh;
}

/* ── Barre haute ── */
.sc-topbar {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  background: #0B0E13;
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: sticky;
  top: 0;
  z-index: 500;
}
.sc-search {
  flex: 1;
  position: relative;
  max-width: 420px;
}
.sc-search .ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: .5;
}
.sc-search input {
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 12px 14px 12px 38px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s;
}
.sc-search input::placeholder { color: rgba(255,255,255,.4); }
.sc-search input:focus { border-color: var(--sc-vio); }

/* Bascule liste/carte — cachée sur desktop, visible sur mobile */
.sc-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--sc-vio);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* ── Corps : liste + carte ── */
.sc-body {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: calc(100vh - 63px);
}

/* ── LISTE ── */
.sc-list {
  background: #0B0E13;
  border-right: 1px solid rgba(255,255,255,.08);
  overflow-y: auto;
  padding: 16px;
}
.sc-count {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.sc-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  margin-bottom: 9px;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.sc-card:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(124,92,252,.35);
  transform: translateY(-1px);
}
.sc-card-img {
  width: 94px;
  height: 94px;
  border-radius: 11px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #1a2130;
}
.sc-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .3s;
}
.sc-fav {
  position: absolute;
  top: 7px;
  right: 7px;
  color: #fff;
  font-size: 15px;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  opacity: .9;
}
.sc-card-body { flex: 1; min-width: 0; }
.sc-card-type {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  margin-bottom: 3px;
  text-transform: capitalize;
}
.sc-card-nm {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-card-note {
  font-size: 12px;
  color: #e8c24a;
  margin-bottom: 5px;
}
.sc-card-px {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.sc-card-px span {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  font-weight: 500;
}

/* État vide */
.sc-empty {
  text-align: center;
  padding: 50px 20px;
  color: rgba(255,255,255,.6);
}
.sc-empty .ico { font-size: 42px; margin-bottom: 12px; }
.sc-empty h3 { font-size: 16px; color: #fff; margin: 0 0 6px; }
.sc-empty p { font-size: 13px; margin: 0 0 16px; }
.sc-empty-btn {
  display: inline-block;
  background: var(--sc-vio);
  color: #fff;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
}

/* ── ZONE CARTE ── */
.sc-map-zone {
  position: relative;
  background: #0d1520;
}
#map-rbnb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0d1520;
}

/* Marqueurs prix (façon Airbnb) */
.sc-pin {
  background: var(--sc-vio);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 20px;
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.4);
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.sc-pin:hover {
  transform: scale(1.12);
  z-index: 1000;
}
.sc-pin.active {
  background: var(--sc-teal);
  color: #04342C;
  transform: scale(1.14);
  z-index: 1000;
}

/* Popup Leaflet — habillage sombre */
.leaflet-popup-content-wrapper {
  background: #0f1520;
  color: #e7ecf5;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
}
.leaflet-popup-tip { background: #0f1520; }
.sc-pop strong { color: #fff; font-size: 14px; }
.sc-pop a {
  color: var(--sc-teal);
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
}

/* Contrôles de zoom Leaflet — habillage sombre */
.leaflet-bar a {
  background: rgba(11,14,19,.9);
  color: #fff;
  border-color: rgba(255,255,255,.14);
}
.leaflet-bar a:hover { background: rgba(255,255,255,.14); }

/* ── CARTES SWIPABLES (mobile uniquement) ── */
.sc-swipe { display: none; }


/* ════════════════════════════════════════════════════════════════
   MOBILE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

  .sc-toggle { display: flex; }
  .sc-toggle .lbl-map { display: none; }         /* par défaut on est en carte */
  .sc.show-list .sc-toggle .lbl-list { display: none; }
  .sc.show-list .sc-toggle .lbl-map { display: inline; }

  /* Corps : une seule colonne, la carte occupe tout */
  .sc-body {
    display: block;
    height: calc(100vh - 63px);
    position: relative;
  }

  /* Liste cachée par défaut sur mobile (on montre la carte) */
  .sc-list {
    display: none;
    border-right: none;
    height: 100%;
    padding: 14px;
  }
  .sc.show-list .sc-list { display: block; }
  .sc.show-list .sc-map-zone { display: none; }

  /* Carte plein écran */
  .sc-map-zone {
    height: 100%;
  }

  /* Les cartes swipables apparaissent en bas de la carte */
  .sc-swipe {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    gap: 10px;
    padding: 0 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    z-index: 450;
  }
  .sc-swipe::-webkit-scrollbar { display: none; }

  .sc-mc {
    flex: 0 0 86%;
    scroll-snap-align: center;
    display: flex;
    background: rgba(15,19,28,.96);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .sc-mc-img {
    width: 100px;
    flex-shrink: 0;
    position: relative;
    background: #1a2130;
  }
  .sc-mc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s;
  }
  .sc-mc-body {
    flex: 1;
    padding: 11px 13px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .sc-mc-type {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    margin-bottom: 3px;
    text-transform: capitalize;
  }
  .sc-mc-nm {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sc-mc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .sc-mc-note { font-size: 12px; color: #e8c24a; }
  .sc-mc-px { font-size: 14px; font-weight: 800; color: #fff; }
  .sc-mc-px small { font-size: 10px; color: rgba(255,255,255,.5); font-weight: 500; }

  /* La barre haute reste visible, on réduit un peu */
  .sc-topbar { padding: 12px 14px; }
}

@media (max-width: 480px) {
  .sc-mc { flex: 0 0 90%; }
}
