/* ==========================================================================
   VIBABI — Listing Detail Styles
   Pour fiches biens (vente, location) et programmes immobiliers
   ========================================================================== */

/* --- Hero gallery (Airbnb-style 4-grid) ---------------------------------- */
.listing-hero {
  padding-top: 88px;
  padding-inline: var(--gutter);
}

.listing-hero__top {
  max-width: 1400px;
  margin: 0 auto;
  padding-block: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.listing-hero__crumbs {
  font-size: 0.875rem;
  color: var(--stone);
}
.listing-hero__crumbs a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.listing-hero__crumbs a:hover { color: var(--terracotta); }

.listing-hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.listing-hero__action {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: transparent;
  border: 1px solid var(--mist);
  border-radius: 999px;
  font-size: 0.825rem;
  font-family: var(--font-body);
  cursor: pointer;
  color: var(--ink);
  transition: all 0.2s;
}
.listing-hero__action:hover { border-color: var(--ink); background: var(--bone-soft); }

.listing-gallery {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: clamp(380px, 62vh, 600px);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.listing-gallery > a:first-child {
  grid-row: 1 / span 2;
}
.listing-gallery a {
  display: block;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.listing-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.listing-gallery a:hover img { transform: scale(1.04); }

.listing-gallery__more {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.75rem 1.25rem;
  font-size: 0.825rem;
  font-family: var(--font-body);
  cursor: pointer;
  border-radius: 4px;
  z-index: 2;
  transition: background 0.2s;
}
.listing-gallery__more:hover { background: var(--ink); color: var(--bone); }

@media (max-width: 860px) {
  .listing-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: clamp(280px, 50vh, 420px);
  }
  .listing-gallery > a:not(:first-child) { display: none; }
  .listing-gallery > a:first-child { grid-row: 1; }
}

/* --- Listing body grid -------------------------------------------------- */
.listing-body {
  max-width: 1400px;
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 960px) { .listing-body { grid-template-columns: 1fr; } }

.listing-content > section + section {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--mist);
}

.listing-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.listing-location {
  color: var(--stone);
  font-size: 1rem;
  margin-top: 0.5rem;
}

.listing-price {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  margin-top: 1rem;
  letter-spacing: -0.01em;
}
.listing-price small { color: var(--stone); font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; margin-left: 0.5rem; }

/* Stats bar */
.listing-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--mist);
  border: 1px solid var(--mist);
  margin-top: 2rem;
}
.listing-stat {
  background: var(--bone);
  padding: 1.5rem 1.25rem;
}
.listing-stat__label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.35rem;
}
.listing-stat__value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
}

/* Description */
.listing-section__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.75rem;
}
.listing-section__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}
.listing-prose p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.listing-prose p + p { margin-top: 1.2rem; }
.listing-prose em { color: var(--terracotta); font-family: var(--font-display); font-variation-settings: "opsz" 144, "SOFT" 100; }

/* Amenities grid */
.amenities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem 1.5rem;
}
.amenity {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}
.amenity__icon {
  width: 36px; height: 36px;
  border: 1px solid var(--mist);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--terracotta);
  font-family: var(--font-display);
}

/* Floor plan */
.floorplan {
  background: var(--bone-soft);
  padding: 2rem;
  border-radius: 4px;
  text-align: center;
}
.floorplan img {
  max-width: 100%;
  height: auto;
  filter: grayscale(100%) contrast(0.9);
}

/* Map */
.listing-map {
  height: 380px;
  background: var(--bone-soft);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.listing-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(20%); }

/* Nearby points */
.nearby {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.nearby__item {
  padding: 1rem 1.25rem;
  background: var(--bone-soft);
  border-radius: 4px;
  font-size: 0.9rem;
}
.nearby__item strong { display: block; margin-bottom: 0.25rem; font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; }
.nearby__item span { color: var(--stone); }

/* --- Sidebar card ------------------------------------------------------- */
.listing-sidebar {
  position: sticky;
  top: 110px;
}
@media (max-width: 960px) { .listing-sidebar { position: static; } }

.sidebar-card {
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: 4px;
  padding: 2rem;
  box-shadow: 0 24px 60px -30px rgba(14,14,12,0.15);
}

.sidebar-card__price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.sidebar-card__price small { font-family: var(--font-body); font-size: 0.9rem; color: var(--stone); font-weight: 400; margin-left: 0.25rem; }
.sidebar-card__rating {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--stone);
  margin-top: 0.5rem;
}
.sidebar-card__rating strong { color: var(--ink); }

.sidebar-card__dates {
  margin-top: 1.5rem;
  border: 1px solid var(--mist);
  border-radius: 4px;
  overflow: hidden;
}
.sidebar-card__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.sidebar-card__row + .sidebar-card__row { border-top: 1px solid var(--mist); }
.sidebar-card__row > div {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
}
.sidebar-card__row > div + div { border-left: 1px solid var(--mist); }
.sidebar-card__row label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.25rem;
}
.sidebar-card__row input, .sidebar-card__row select {
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  width: 100%;
  outline: none;
  padding: 0;
}

.sidebar-card__cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--terracotta);
  color: var(--bone);
  border: 0;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background 0.2s;
}
.sidebar-card__cta:hover { background: var(--terracotta-deep); }

.sidebar-card__cta--outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  margin-top: 0.75rem;
}
.sidebar-card__cta--outline:hover { background: var(--ink); color: var(--bone); }

.sidebar-card__breakdown {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--mist);
  display: grid;
  gap: 0.6rem;
  font-size: 0.875rem;
}
.sidebar-card__breakdown > div {
  display: flex;
  justify-content: space-between;
  color: var(--stone);
}
.sidebar-card__breakdown > div.total {
  font-weight: 500;
  color: var(--ink);
  padding-top: 0.75rem;
  border-top: 1px solid var(--mist);
  font-family: var(--font-display);
  font-size: 1rem;
}

.sidebar-agent {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--mist);
  display: flex;
  gap: 1rem;
  align-items: center;
}
.sidebar-agent__avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bone-soft);
}
.sidebar-agent__avatar img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); }
.sidebar-agent__name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
.sidebar-agent__role { font-size: 0.8rem; color: var(--stone); margin-top: 0.1rem; }

/* --- Host section for short-stay ---------------------------------------- */
.host-panel {
  background: var(--bone-soft);
  padding: 2rem;
  border-radius: 4px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
}
.host-panel__avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper);
}
.host-panel__avatar img { width: 100%; height: 100%; object-fit: cover; }
.host-panel__title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
.host-panel__meta { font-size: 0.875rem; color: var(--stone); margin-top: 0.25rem; }

/* --- Reviews section ---------------------------------------------------- */
.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.review {
  padding: 1.5rem;
  border: 1px solid var(--mist);
  border-radius: 4px;
}
.review__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.review__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--sand);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
}
.review__name { font-weight: 500; font-size: 0.95rem; }
.review__date { font-size: 0.75rem; color: var(--stone); }
.review__stars { font-size: 0.8rem; color: var(--terracotta); margin-bottom: 0.5rem; }
.review__text { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.65; }

/* --- Program detail specific -------------------------------------------- */
.program-hero {
  position: relative;
  margin-top: 88px;
  height: clamp(480px, 80vh, 720px);
  overflow: hidden;
}
.program-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.program-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(14,14,12,0.25) 0%, rgba(14,14,12,0) 30%, rgba(14,14,12,0.75) 100%);
  z-index: 1;
}
.program-hero__inner {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter);
  color: var(--bone);
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
}
.program-hero__status {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--terracotta);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 1.5rem;
}
.program-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.program-hero__title em { color: var(--terracotta); font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100; }
.program-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  font-size: 0.95rem;
  opacity: 0.9;
}
.program-hero__meta > div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--bone);
  margin-bottom: 0.1rem;
}

/* Key facts bar */
.program-facts {
  background: var(--ink);
  color: var(--bone);
  padding: 2.5rem var(--gutter);
}
.program-facts__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: rgba(245,241,234,0.1);
}
.program-fact {
  background: var(--ink);
  padding: 1.25rem 1.5rem;
}
.program-fact small {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245,241,234,0.5);
  display: block;
  margin-bottom: 0.35rem;
}
.program-fact strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
}

/* Units table */
.units-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.units-table th, .units-table td {
  padding: 1.1rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--mist);
}
.units-table th {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 500;
  border-bottom-color: var(--ink);
}
.units-table td.price { font-family: var(--font-display); font-size: 1.05rem; }
.units-table tr:hover td { background: var(--bone-soft); }
.unit-status {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.unit-status--dispo { background: #e9f3ea; color: #2f6b36; }
.unit-status--option { background: #fdf4e3; color: #8a5a10; }
.unit-status--vendu { background: var(--mist); color: var(--stone); }

/* Timeline */
.prog-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  counter-reset: step;
  margin-top: 2rem;
}
.prog-timeline__step {
  padding: 1.75rem 1.25rem;
  border-right: 1px solid var(--mist);
  position: relative;
}
.prog-timeline__step:last-child { border-right: 0; }
.prog-timeline__step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero) ".";
  font-family: var(--font-display);
  font-style: italic;
  color: var(--terracotta);
  font-size: 1.5rem;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  display: block;
  margin-bottom: 0.75rem;
}
.prog-timeline__step.done { opacity: 0.45; }
.prog-timeline__step.current::before { color: var(--ink); }
.prog-timeline__step.current strong { color: var(--terracotta); }
.prog-timeline__step strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.prog-timeline__step span { font-size: 0.85rem; color: var(--stone); }

@media (max-width: 720px) {
  .prog-timeline { grid-template-columns: 1fr; }
  .prog-timeline__step { border-right: 0; border-bottom: 1px solid var(--mist); }
  .prog-timeline__step:last-child { border-bottom: 0; }
}

/* Architect / developer cards */
.prog-credits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 680px) { .prog-credits { grid-template-columns: 1fr; } }
.prog-credit {
  padding: 2rem;
  background: var(--bone-soft);
  border-radius: 4px;
}
.prog-credit small { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--terracotta); }
.prog-credit h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; margin: 0.5rem 0 0.75rem; }
.prog-credit p { font-size: 0.9rem; color: var(--stone); line-height: 1.65; }

/* Programme card grid (for listing) */
.program-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.program-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -20px rgba(14,14,12,0.18); }
.program-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.program-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.program-card:hover .program-card__media img { transform: scale(1.05); }
.program-card__badge {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--bone);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  z-index: 2;
}
.program-card__badge--terracotta { background: var(--terracotta); color: var(--bone); }
.program-card__body { padding: 1.5rem; }
.program-card__location { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); margin-bottom: 0.5rem; }
.program-card__title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
.program-card__meta {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--mist);
  font-size: 0.8rem;
  color: var(--stone);
  flex-wrap: wrap;
}
.program-card__meta strong { color: var(--ink); font-family: var(--font-display); font-weight: 500; margin-left: 0.25rem; }

/* Share / save action icons in hero (simple unicode) */
.icon-heart::before { content: "♡"; font-size: 1.1rem; line-height: 1; }
.icon-share::before { content: "↗"; font-size: 1.1rem; line-height: 1; }
.icon-print::before { content: "⎙"; font-size: 1.1rem; line-height: 1; }
.icon-calendar::before { content: "▦"; font-size: 1rem; line-height: 1; }
