/* Horizon Pierre Immobilier — thème alpin : bleu lac, blanc, bois et sable */
:root {
  --primary: #0d4a6b;        /* bleu lac : contraste 9:1 avec le blanc */
  --on-primary: #fff;
  --accent: #d8b47a;         /* sable : texte foncé dessus */
  --wood: #7a4e2d;
  --bg: #ffffff;
  --bg-alt: #f3f6f8;
  --sand: #f6f0e6;
  --text: #11222e;
  --muted: #4a5a66;
  --line: #dbe2e7;
  --radius: 14px;
  --font-title: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

.brand__mark { background: var(--primary); }
.brand__name { font-weight: 700; letter-spacing: .01em; }
.btn--sm { min-height: 40px; padding: .45rem 1rem; font-size: .9rem; }
.eyebrow { color: var(--wood); }
.eyebrow--light { color: #f3dcb4; }

/* --- Haut de page avec recherche ------------------------------------------- */
.hero { position: relative; isolation: isolate; color: #fff; padding: clamp(3rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8, 30, 45, .88) 0%, rgba(8, 30, 45, .62) 55%, rgba(8, 30, 45, .35) 100%); }
.hero h1 { max-width: 17ch; }
.hero .lead { color: #e3edf3; max-width: 40rem; }

.search { margin-top: 2rem; max-width: 62rem; padding: 1rem; border-radius: 18px; background: #fff; color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.search__tx { display: inline-flex; gap: .25rem; padding: .25rem; margin-bottom: .9rem; border-radius: 999px; background: var(--bg-alt); }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 42px; padding: .4rem 1.3rem; border-radius: 999px; font-weight: 700; }
.seg input:checked + span { background: var(--primary); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.search__fields { display: grid; gap: .75rem; }
@media (min-width: 640px) { .search__fields { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .search__fields { grid-template-columns: 1.1fr 1.2fr 1fr .9fr auto; align-items: end; } }
.search .field > span { font-size: .8rem; color: var(--muted); }
.search__go { min-height: 48px; border-radius: var(--radius-sm); }

.hero__stats { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 2rem 0 0; }
.hero__stats div { display: flex; flex-direction: column-reverse; }
.hero__stats dt { font-size: .85rem; color: #d3e0e8; }
.hero__stats dd { margin: 0; font-family: var(--font-title); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }

/* --- Liste des biens ---------------------------------------------------------- */
.listing-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2rem; }
.listing-head > div:first-child { max-width: 42rem; }
.listing-tools { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; }
.count { margin: 0; font-weight: 700; align-self: center; }
.field--inline { grid-template-columns: auto; }
.field--inline select { min-height: 40px; padding: .4rem .7rem; }

.property { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s; cursor: pointer; animation: fade-in .4s var(--ease); }
.property[hidden] { display: none; }
.property:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(13, 74, 107, .16); }
@keyframes fade-in { from { opacity: 0; } }
.property__media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: var(--bg-alt); }
.property__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.property:hover .property__media img { transform: scale(1.05); }
.property.is-sold .property__media img { filter: saturate(.55); }
.property__photos { position: absolute; right: .7rem; bottom: .7rem; display: inline-flex; gap: .3rem; align-items: center; padding: .2rem .55rem; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff; font-size: .78rem; font-weight: 600; }
.property__photos .ico { width: 1rem; height: 1rem; }
.property__body { display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem 1.2rem 1.2rem; flex: 1; }
.property__meta { margin: 0; font-size: .85rem; color: var(--muted); }
.property h3 { margin: 0; font-size: 1.12rem; }
.property__link { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.property__link:hover { color: var(--primary); text-decoration: underline; }
.property__foot { margin-top: auto; padding-top: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--line); }
.property__price { margin: 0; font-family: var(--font-title); font-size: 1.35rem; font-weight: 700; color: var(--primary); }
.per { font-family: var(--font-body); font-size: .8rem; font-weight: 600; color: var(--muted); margin-left: .2rem; }
.specs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; color: var(--muted); }
.specs li { display: inline-flex; align-items: center; gap: .35rem; }
.specs .ico { width: 1.05rem; height: 1.05rem; color: var(--primary); }
.specs--lg { font-size: 1rem; color: var(--text); margin: .75rem 0 1.25rem; }

.tag { position: absolute; left: .7rem; top: .7rem; padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.tag--static { position: static; display: inline-block; margin: .25rem 0 .5rem; }
.tag--exclusivite { background: var(--primary); color: #fff; }
.tag--nouveau { background: var(--accent); color: #2b1d0b; }
.tag--compromis { background: #fff; color: #8a1c13; border: 1.5px solid #8a1c13; }

.dpe-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.dpe-chip abbr { text-decoration: none; }
.dpe-chip b { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 .3rem; border-radius: 6px; background: var(--dpe); color: var(--dpe-txt); font-size: .95rem; border: 1px solid rgba(0, 0, 0, .15); }
.dpe-chip--na { font-weight: 600; }

.empty { display: grid; justify-items: center; gap: .5rem; text-align: center; max-width: 36rem; margin: 1rem auto 0; }
.empty[hidden] { display: none; }
.empty > .ico { width: 2rem; height: 2rem; color: var(--primary); }

/* --- Fiche détaillée (fenêtre) -------------------------------------------------- */
.modal--detail { width: min(100% - 1rem, 1040px); }
.modal--detail .modal__box { padding: 0; }
.detail__gallery { position: relative; background: #0f1a22; }
.detail__track { grid-auto-columns: 100%; column-gap: 0; padding: 0; }
.detail__slide img { width: 100%; aspect-ratio: 3 / 2; max-height: 62vh; object-fit: cover; }
.detail__nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .92); border: 0; }
.detail__gallery .carousel { position: relative; }
.detail__nav--prev { left: .75rem; } .detail__nav--next { right: .75rem; }
.detail__thumbs { display: flex; gap: .4rem; padding: .5rem; overflow-x: auto; }
.detail__thumbs button { flex: none; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; opacity: .8; }
.detail__thumbs button:hover, .detail__thumbs button:focus-visible { opacity: 1; border-color: var(--accent); }
.detail__thumbs img { width: 96px; height: 64px; object-fit: cover; }
.detail__body { padding: clamp(1.25rem, 3vw, 2.25rem); }
.detail__body h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .25rem; }
.detail__body h3 { margin-top: 1.75rem; font-size: 1.1rem; }
.detail__place { display: flex; gap: .4rem; align-items: center; color: var(--muted); margin: 0 0 .5rem; }
.detail__price { margin: .5rem 0 0; font-family: var(--font-title); font-size: 2rem; font-weight: 700; color: var(--primary); }
.detail__price small { display: block; font-family: var(--font-body); font-size: .88rem; font-weight: 500; color: var(--muted); }
.detail__grid { display: grid; gap: 0 2.5rem; }
@media (min-width: 860px) { .detail__grid { grid-template-columns: 1.25fr 1fr; } }
.check-list--2 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.detail__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.visit { margin-top: 1.25rem; }
.visit[hidden] { display: none; }
.visit h3 { margin: 0; }
.muted { color: var(--muted); }
.warn { display: flex; gap: .5rem; padding: .7rem .9rem; border-radius: 10px; background: #fdecea; color: #7a1a12; font-weight: 600; }

/* Échelle DPE / GES */
.scale { margin: 0 0 1.25rem; }
.scale figcaption { font-size: .85rem; font-weight: 700; margin-bottom: .4rem; }
.scale ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.scale__row { display: flex; align-items: center; gap: .6rem; }
.scale__bar { display: flex; align-items: center; height: 22px; padding-left: .5rem; font-size: .8rem; font-weight: 800; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); }
.scale__row:not(.is-on) .scale__bar { opacity: .55; }
.scale__row.is-on .scale__bar { height: 32px; font-size: 1.05rem; opacity: 1; }
.scale__val { font-weight: 800; white-space: nowrap; }
.scale__val small { font-weight: 500; color: var(--muted); }

.legal { padding-left: 1.1rem; font-size: .9rem; color: var(--muted); display: grid; gap: .35rem; }
.legal a { color: var(--primary); }

/* --- Estimation ------------------------------------------------------------------ */
.section--sand { background: var(--sand); }
.estim { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 960px) { .estim { grid-template-columns: .9fr 1.1fr; } }
.estim__img { margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; }
.estim__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
@media (max-width: 959px) { .estim__img { display: none; } }

/* --- Équipe ------------------------------------------------------------------------ */
.agent { text-align: center; display: grid; justify-items: center; gap: .3rem; }
.agent__photo { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 4px solid var(--sand); margin-bottom: .5rem; }
.agent h3 { margin: 0; }
.agent__role { margin: 0; color: var(--wood); font-weight: 600; }
.agent__zone { display: flex; gap: .35rem; align-items: center; margin: 0 0 .5rem; font-size: .9rem; color: var(--muted); }
.agent .contact-list { justify-items: center; }

/* --- Contact ------------------------------------------------------------------------ */
.contact { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 960px) { .contact { grid-template-columns: 1fr 1fr; } }
.contact__addr { font-style: normal; font-size: 1.15rem; margin-bottom: 1.25rem; }
.contact__h { margin-top: 2rem; }

/* --- Pied de page ------------------------------------------------------------------- */
.site-footer { background: #0b2433; }
.footer-brand { font-family: var(--font-title); font-size: 1.35rem; font-weight: 700; color: #fff; }
.legal--footer { color: inherit; font-size: .84rem; padding-left: 1rem; }
.fees-box summary { cursor: pointer; font-weight: 600; text-decoration: underline; }
.fees { width: 100%; border-collapse: collapse; margin-top: .75rem; font-size: .84rem; }
.fees caption { text-align: left; font-weight: 700; color: #fff; padding-bottom: .25rem; }
.fees th, .fees td { padding: .35rem 0; border-bottom: 1px solid rgba(255, 255, 255, .15); text-align: left; font-weight: 400; vertical-align: top; }
.fees td { padding-left: .75rem; }
.small { font-size: .82rem; }
