/* ============================================================
   BAI — Styles Biens & Détail
   ============================================================ */

/* ---- Property Image Cards ---- */
.prop-img {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: 0;
  background-image: url("../images/Villa1.jpg");
  background-size: cover;
  background-position: center;
}
.prop-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.bien-card:hover .prop-img img { transform: scale(1.05); }
/* ---- Property Image Slider ---- */
.prop-slider {
  position: absolute; inset: 0;
  width: 100%; height: 100%; overflow: hidden;
}
.prop-slider .slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.prop-slider .slide.active {
  opacity: 1;
}
.prop-slider .slide::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.08);
}
.prop-slider .slide img {
  display: none;
}


/* SVG House Illustrations */
.house-svg-wrap {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: overlay;
}
.house-svg-wrap svg {
  display: none;
}
.house-svg-wrap.bg-villa2  { background-image: url("../images/Villa3.jpg"); }
.house-svg-wrap.bg-villa1   { background-image: url("../images/Villa1.jpg"); }
.house-svg-wrap.bg-villa3  { background-image: url("../images/Villa4.jpg"); }
.house-svg-wrap.bg-terrain { background-image: url("../images/Appart110.jpg"); }
.house-svg-wrap.bg-neuf    { background-image: url("../images/photo_9.jpg"); }
.house-svg-wrap.bg-entrepot{ background-image: url("../images/Appart110.jpg"); }
.house-svg-wrap.bg-meuble  { background-image: linear-gradient(160deg, #4a1a3a 0%, #c0392b 40%, #d8a9b8 100%), url("../images/Meubler1.jpg"); }
.house-svg-wrap:not([class*="bg-"]) { background-image: url("../images/Villa2.jpg") !important; }

/* Property badge overlays */
.prop-badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; flex-direction: column; gap: 6px; z-index: 2;
}
.prop-badge-type {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-louer  { background: #1A5276; color: #fff; }
.badge-vendre { background: #F5C842; color: #0D3B5E; }
.badge-neuf   { background: #16a34a; color: #fff; }
.badge-meuble { background: #7c3aed; color: #fff; }
.badge-exclusif { background: #c0392b; color: #fff; }
.badge-coeur  { background: #e91e63; color: #fff; }

.prop-dispo {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: rgba(255,255,255,0.95); color: #16a34a;
  font-size: 0.7rem; font-weight: 700; padding: 3px 10px;
  border-radius: 100px; display: flex; align-items: center; gap: 4px;
}
.prop-dispo::before { content: '●'; font-size: 0.55rem; }

.prop-fav {
  position: absolute; bottom: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; background: rgba(255,255,255,0.92);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; cursor: pointer; transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.prop-fav:hover { transform: scale(1.15); }

.prop-photos-count {
  position: absolute; bottom: 12px; left: 12px; z-index: 2;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 0.72rem; font-weight: 600; padding: 3px 10px;
  border-radius: 100px; display: flex; align-items: center; gap: 5px;
}

/* ---- Bien Card Body ---- */
.prop-body { padding: 20px 22px; }
.prop-ref { font-size: 0.72rem; color: var(--gris-text); letter-spacing: 0.05em; margin-bottom: 6px; }
.prop-titre {
  font-family: var(--font-titre); font-size: 1.18rem; font-weight: 600;
  color: var(--bleu-fonce); line-height: 1.25; margin-bottom: 6px;
}
.prop-loc {
  font-size: 0.83rem; color: var(--gris-text);
  display: flex; align-items: center; gap: 4px; margin-bottom: 14px;
}
.prop-features {
  display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--gris); border-bottom: 1px solid var(--gris);
  margin-bottom: 14px;
}
.prop-feat {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.8rem; color: var(--gris-text);
}
.prop-feat strong { color: var(--texte); font-weight: 600; }
.prop-prix {
  font-family: var(--font-titre); font-size: 1.45rem; font-weight: 700;
  color: var(--bleu); line-height: 1;
}
.prop-prix-note { font-size: 0.78rem; color: var(--gris-text); font-family: var(--font-corps); font-weight: 400; margin-left: 4px; }
.prop-actions { display: flex; gap: 8px; margin-top: 14px; }
.prop-actions a { flex: 1; text-align: center; font-size: 0.82rem; padding: 10px 12px; }

.prop-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 0;
}
.prop-gallery-item {
  min-height: 90px;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.prop-gallery-item:hover {
  transform: scale(1.03);
}

.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gallery-lightbox.open {
  display: flex;
}
.gallery-frame {
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-frame img {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}
.gallery-close,
.gallery-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.gallery-close:hover,
.gallery-nav:hover {
  background: rgba(255, 255, 255, 0.27);
  transform: scale(1.05);
}
.gallery-close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  font-size: 1.4rem;
}
.gallery-prev,
.gallery-next {
  top: 50%;
  transform: translateY(-50%);
}
.gallery-prev {
  left: 18px;
}
.gallery-next {
  right: 18px;
}
.gallery-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .prop-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-frame {
    max-height: calc(100vh - 100px);
  }
  .gallery-close,
  .gallery-nav {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
}

/* ---- Detail Page ---- */
.bien-detail-hero {
  display: grid; grid-template-columns: 2fr 1fr; gap: 4px;
  height: 440px; border-radius: var(--radius); overflow: hidden;
}
.bien-detail-main { height: 100%; }
.bien-detail-thumbs { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; }
.bien-detail-thumb { height: 100%; }

.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin-top: 40px; }

.detail-card {
  background: var(--blanc); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--ombre); margin-bottom: 24px;
  border: 1px solid var(--gris);
}
.detail-card h3 {
  font-family: var(--font-titre); font-size: 1.25rem; font-weight: 600;
  color: var(--bleu-fonce); margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--gris);
}
.detail-features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.detail-feat {
  background: var(--gris-clair); border-radius: 10px;
  padding: 16px; text-align: center;
}
.detail-feat .icon { font-size: 1.5rem; margin-bottom: 6px; }
.detail-feat .val { font-weight: 700; color: var(--bleu-fonce); font-size: 0.95rem; }
.detail-feat .lbl { font-size: 0.75rem; color: var(--gris-text); margin-top: 2px; }

.detail-prix-card {
  background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu));
  color: #fff; border-radius: var(--radius); padding: 28px; margin-bottom: 24px;
  text-align: center;
}
.detail-prix-card .prix {
  font-family: var(--font-titre); font-size: 2.2rem; font-weight: 700;
  color: var(--or); line-height: 1; margin-bottom: 4px;
}
.detail-prix-card .prix-note { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 20px; }

/* ---- Article Blog ---- */
.article-hero {
  height: 360px; border-radius: var(--radius); overflow: hidden; margin-bottom: 32px;
}
.article-body { max-width: 760px; }
.article-body h2 {
  font-family: var(--font-titre); font-size: 1.6rem; color: var(--bleu-fonce);
  margin: 28px 0 12px;
}
.article-body p { color: var(--gris-text); line-height: 1.8; margin-bottom: 16px; font-size: 0.95rem; }
.article-body ul { margin: 0 0 16px 20px; color: var(--gris-text); line-height: 1.9; font-size: 0.95rem; }

/* Responsive */
@media (max-width: 768px) {
  .bien-detail-hero { grid-template-columns: 1fr; height: auto; }
  .bien-detail-thumbs { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
}
