/* ══════════════════════════════════════════════════════
   FICHE BIEN — annonce (immeuble-de-rapport-sarlat.php)
   et bloc « bien à la une » (Assets/Section_Bien_Une.php)
   ══════════════════════════════════════════════════════ */

/* Bloc à la une (accueil, page Sarlat) */
.ic-bien-une-link { display: block; color: inherit; text-decoration: none; }
.ic-bien-une .ic-featured-img { aspect-ratio: 16/8; }
.ic-bien-une .ic-featured-img img { transition: transform .8s cubic-bezier(.25,.46,.45,.94); }
.ic-bien-une-link:hover .ic-featured-img img { transform: scale(1.03); }
.ic-bien-badge, .ib-badge {
  position: absolute; top: 18px; left: 18px; z-index: 2;
  background: var(--terre); color: #fff;
  font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  padding: 8px 14px;
}
.ic-bien-photos {
  position: absolute; right: 18px; bottom: 18px; z-index: 2;
  background: rgba(25,23,20,.72); color: #fff; font-size: 12px; padding: 7px 12px;
  backdrop-filter: blur(6px);
}
.ic-bien-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ic-bien-chips li {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ardoise);
  border: 1px solid var(--border); padding: 6px 10px; background: var(--blanc);
}
.ic-bien-une .ic-featured-price small {
  display: block; font-family: var(--font-main); font-size: 11px; color: var(--muted);
  letter-spacing: .5px; margin-top: 4px; white-space: normal; max-width: 220px; margin-left: auto;
}
.ic-bien-une .ic-featured-caption { gap: 24px; }

/* Page annonce */
.ib-main { padding-top: 72px; background: var(--creme); }
.ib-head { padding: 28px 5% 24px; }
.ib-crumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; font-size: 12px; color: var(--muted); }
.ib-crumb a { color: var(--muted); text-decoration: none; }
.ib-crumb a:hover { color: var(--terre); }
.ib-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: 22px; }
.ib-kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--terre);
}
.ib-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 0 4px rgba(74,94,58,.15); }
.ib-title {
  font-family: var(--font-title); font-weight: 600; color: var(--noir);
  font-size: clamp(34px, 5.2vw, 68px); line-height: 1; letter-spacing: -.02em; margin: 14px 0 12px;
}
.ib-title em { font-weight: 300; font-style: italic; color: var(--terre); }
.ib-loc { font-size: 14px; color: var(--ardoise); }
.ib-loc i { color: var(--terre); margin-right: 4px; }
.ib-head-price { text-align: right; flex-shrink: 0; }
.ib-price { display: block; font-family: var(--font-title); font-size: clamp(34px, 4vw, 54px); font-weight: 600; color: var(--noir); line-height: 1; }
.ib-price-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 8px; max-width: 260px; margin-left: auto; }

/* Galerie */
.ib-gallery { padding: 0 5%; }
.ib-slider { position: relative; background: var(--noir); }
.ib-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  aspect-ratio: 16/8; scrollbar-width: none; outline: none;
}
.ib-track::-webkit-scrollbar { display: none; }
.ib-slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; cursor: zoom-in; position: relative; overflow: hidden; }
.ib-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ib-slide-portrait img { object-fit: contain; background: #1f1c18; }
.ib-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 52px; height: 52px; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(250,250,247,.9); color: var(--noir); font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.18); transition: background .2s, transform .2s;
}
.ib-nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.ib-prev { left: 20px; } .ib-next { right: 20px; }
.ib-count, .ib-full {
  position: absolute; bottom: 18px; z-index: 3;
  background: rgba(25,23,20,.72); color: #fff; font-size: 12px; letter-spacing: 1px;
  padding: 8px 14px; border: none; backdrop-filter: blur(6px);
}
.ib-count { left: 18px; }
.ib-full { right: 18px; cursor: pointer; font-family: var(--font-main); }
.ib-full:hover { background: var(--terre); }
.ib-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.ib-thumb {
  padding: 0; border: none; cursor: pointer; background: var(--creme-d);
  aspect-ratio: 4/3; overflow: hidden; opacity: .55; transition: opacity .2s, outline-color .2s;
  outline: 2px solid transparent; outline-offset: -2px;
}
.ib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ib-thumb:hover { opacity: .85; }
.ib-thumb.active { opacity: 1; outline-color: var(--terre); }

/* Lightbox */
.ib-lightbox {
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0;
  border: none; background: rgba(15,13,11,.96); color: #fff;
}
.ib-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.ib-lightbox::backdrop { background: rgba(15,13,11,.96); }
#ib-lb-img { max-width: 92vw; max-height: 86vh; object-fit: contain; display: block; }
.ib-lb-close, .ib-lb-nav {
  position: absolute; border: none; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.1); width: 50px; height: 50px; border-radius: 50%; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.ib-lb-close:hover, .ib-lb-nav:hover { background: var(--terre); }
.ib-lb-close { top: 20px; right: 20px; }
.ib-lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.ib-lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.ib-lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 13px; letter-spacing: 2px; color: rgba(255,255,255,.7); }

/* Chiffres clés */
.ib-keys {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin: 40px 5% 0; background: var(--border); border: 1px solid var(--border);
}
.ib-key { background: var(--blanc); padding: 26px 24px; display: flex; flex-direction: column; gap: 4px; }
.ib-key i { font-size: 22px; color: var(--terre); margin-bottom: 8px; }
.ib-key strong { font-family: var(--font-title); font-size: 28px; font-weight: 600; color: var(--noir); line-height: 1.1; }
.ib-key span { font-size: 12px; color: var(--muted); }

/* Mise en page */
.ib-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; padding: 56px 5% 72px; align-items: start; }
.ib-block { padding: 0 0 48px; margin-bottom: 48px; border-bottom: 1px solid var(--border); }
.ib-block:last-child { border-bottom: none; margin-bottom: 0; }
.ib-block h2 {
  font-family: var(--font-title); font-weight: 600; font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1; color: var(--noir); margin-bottom: 22px; letter-spacing: -.01em;
}
.ib-block h2 em { font-weight: 300; font-style: italic; color: var(--terre); }
.ib-block p { font-size: 15px; line-height: 1.8; color: var(--ardoise); margin-bottom: 14px; }
.ib-note { font-size: 13px !important; color: var(--muted) !important; }
.ib-note a { color: var(--terre); }

.ib-lots { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.ib-lots li {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px;
  background: var(--blanc); border: 1px solid var(--border); padding: 16px 18px;
}
.ib-lot-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--terre-xl); color: var(--terre); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.ib-lot-name { font-size: 14px; font-weight: 600; color: var(--noir); line-height: 1.3; }
.ib-lot-name small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ib-lot-m2 { font-family: var(--font-title); font-size: 22px; font-weight: 600; color: var(--terre); white-space: nowrap; }

.ib-dark { background: var(--noir); padding: 48px 44px !important; border-bottom: none !important; }
.ib-dark .ic-section-label { color: rgba(255,255,255,.35); }
.ib-dark h2 { color: #fff; }
.ib-dark h2 em { color: var(--pierre); }
.ib-dark p { color: rgba(255,255,255,.6); font-size: 14px; }
.ib-rent { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.12); margin-bottom: 22px; }
.ib-rent div { background: var(--noir); padding: 22px 20px; display: flex; flex-direction: column; gap: 4px; }
.ib-rent span { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.45); }
.ib-rent strong { font-family: var(--font-title); font-size: 34px; font-weight: 600; color: #fff; line-height: 1.1; }
.ib-rent small { font-size: 12px; color: rgba(255,255,255,.45); }
.ib-rent .ib-rent-total { background: var(--terre); }
.ib-rent .ib-rent-total span, .ib-rent .ib-rent-total small { color: rgba(255,255,255,.75); }

/* DPE / GES */
.ib-dpe-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.ib-dpe { position: relative; background: var(--blanc); border: 1px solid var(--border); padding: 20px 20px 22px; overflow: hidden; }
.ib-dpe-title { font-size: 11px !important; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--muted) !important; margin-bottom: 14px !important; }
.ib-scale { list-style: none; display: flex; flex-direction: column; gap: 4px; opacity: .32; filter: grayscale(.35); }
.ib-scale li { height: 22px; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; padding-left: 10px; clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%); }
.ib-scale li:nth-child(1) { width: 34%; } .ib-scale li:nth-child(2) { width: 44%; } .ib-scale li:nth-child(3) { width: 54%; }
.ib-scale li:nth-child(4) { width: 64%; } .ib-scale li:nth-child(5) { width: 74%; } .ib-scale li:nth-child(6) { width: 84%; } .ib-scale li:nth-child(7) { width: 94%; }
.ib-scale-dpe li:nth-child(1){background:#009c6d}.ib-scale-dpe li:nth-child(2){background:#52b153}.ib-scale-dpe li:nth-child(3){background:#78bd76}
.ib-scale-dpe li:nth-child(4){background:#e3c600}.ib-scale-dpe li:nth-child(5){background:#e9a218}.ib-scale-dpe li:nth-child(6){background:#e8731d}.ib-scale-dpe li:nth-child(7){background:#d7221f}
.ib-scale-ges li:nth-child(1){background:#a4dbf8}.ib-scale-ges li:nth-child(2){background:#8cb4d3}.ib-scale-ges li:nth-child(3){background:#7792b1}
.ib-scale-ges li:nth-child(4){background:#606f8f}.ib-scale-ges li:nth-child(5){background:#4d5271}.ib-scale-ges li:nth-child(6){background:#393551}.ib-scale-ges li:nth-child(7){background:#281b35}
.ib-dpe-stamp {
  position: absolute; right: 20px; top: 50%; transform: translateY(-20%) rotate(-8deg);
  font-family: var(--font-title); font-size: 30px !important; font-weight: 600; color: var(--terre) !important;
  border: 2px solid var(--terre); padding: 4px 16px; margin: 0 !important; background: rgba(250,250,247,.9);
  letter-spacing: 1px;
}

/* Honoraires */
.ib-fees { margin-bottom: 16px; border-top: 1px solid var(--border); }
.ib-fees div { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ib-fees dt { color: var(--muted); }
.ib-fees dd { color: var(--noir); font-weight: 600; text-align: right; }

/* Encart prix */
.ib-aside { position: sticky; top: 96px; }
.ib-card { background: var(--blanc); border: 1px solid var(--border); padding: 30px 28px; box-shadow: 0 18px 50px rgba(25,23,20,.08); }
.ib-card-type { font-size: 10px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); }
.ib-card-price { font-family: var(--font-title); font-size: 46px; font-weight: 600; color: var(--noir); line-height: 1; margin: 12px 0 8px; }
.ib-card-sub { font-size: 12px; color: var(--muted); line-height: 1.5; }
.ib-card-list { list-style: none; margin: 22px 0; border-top: 1px solid var(--border); }
.ib-card-list li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.ib-card-list b { color: var(--noir); font-weight: 600; }
.ib-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 18px; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.ib-btn-main { background: var(--terre); color: #fff; }
.ib-btn-main:hover { background: var(--terre-l); }
.ib-btn-ghost { border: 1px solid var(--noir); color: var(--noir); margin-top: 10px; }
.ib-btn-ghost:hover { background: var(--noir); color: #fff; }
.ib-card-agency { font-size: 12px; color: var(--muted); margin-top: 18px; line-height: 1.6; }
.ib-card-agency b { color: var(--noir); letter-spacing: 1px; }

.ib-mobile-bar { display: none; }

@media (max-width: 1024px) {
  .ib-layout { grid-template-columns: 1fr; gap: 40px; }
  .ib-aside { position: static; }
  .ib-keys { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .ib-head { padding: 20px 16px 18px; }
  .ib-head-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ib-head-price { text-align: left; }
  .ib-price-sub { margin-left: 0; }
  .ib-gallery { padding: 0; }
  .ib-track { aspect-ratio: 4/3; }
  .ib-nav { width: 40px; height: 40px; font-size: 16px; }
  .ib-prev { left: 10px; } .ib-next { right: 10px; }
  .ib-thumbs { display: flex; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
  .ib-thumb { flex: 0 0 84px; }
  .ib-keys { margin: 28px 16px 0; }
  .ib-key { padding: 18px 16px; }
  .ib-key strong { font-size: 22px; }
  .ib-layout { padding: 40px 16px 56px; }
  .ib-lots { grid-template-columns: 1fr; }
  .ib-dark { padding: 32px 22px !important; margin-left: -16px; margin-right: -16px; }
  .ib-rent { grid-template-columns: 1fr; }
  .ib-dpe-wrap { grid-template-columns: 1fr; }
  .ib-fees div { flex-direction: column; gap: 4px; }
  .ib-fees dd { text-align: left; }
  .ib-mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
    background: var(--blanc); border-top: 1px solid var(--border); padding: 10px 16px;
    box-shadow: 0 -8px 24px rgba(25,23,20,.08);
  }
  .ib-mobile-bar b { font-family: var(--font-title); font-size: 24px; color: var(--noir); display: block; line-height: 1; }
  .ib-mobile-bar small { font-size: 11px; color: var(--muted); }
  .ib-mobile-bar .ib-btn { padding: 12px 16px; }
  .ib-page .ic-footer { padding-bottom: 90px; }
  .ic-bien-une .ic-featured-img { aspect-ratio: 4/3; }
  .ic-bien-une .ic-featured-caption { flex-direction: column; gap: 10px; }
  .ic-bien-une .ic-featured-price { text-align: left; }
  .ic-bien-une .ic-featured-price small { margin-left: 0; }
}
