/* =========================================================
   Appartement Bellegarde – feuille de style
   Palette : blanc cassé, pierre, terracotta, olive, anthracite
   ========================================================= */
:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --stone: #F1EBE1;
  --stone-2: #E4D9C9;
  --line: #DDD2C2;
  --ink: #2B2A28;
  --ink-soft: #57524B;
  --terra: #A84E28;
  --terra-dark: #8C3F1F;
  --olive: #55613A;
  --whatsapp: #128C4A;
  --focus: #1F5FA8;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(43, 42, 40, .10);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra); }
a:hover { color: var(--terra-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Bandeau d'aperçu (champs à compléter) ---------- */
.preview-banner { background: #FFF3CD; color: #5C4400; border-bottom: 1px solid #E8D48A; font-size: 14px; }
.preview-banner p { margin: 0; padding: 10px 48px 10px 16px; max-width: 1140px; margin: 0 auto; }
.preview-banner { position: relative; }
.preview-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 22px; line-height: 1; color: inherit; cursor: pointer; padding: 6px 10px; }
.todo { background: #FFF3CD; color: #5C4400; padding: 0 4px; border-radius: 3px; font-weight: 600; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(250, 247, 242, .94); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-logo { flex: none; width: 36px; height: 36px; }
.brand-city { color: var(--ink-soft); font-weight: 500; }
@media (max-width: 479px) { .brand-city { display: none; } }
.site-header nav { margin-left: auto; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 22px; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--terra); }
.site-header .btn-small { margin-left: auto; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .site-header .btn-small { margin-left: 8px; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--terra);
  background: var(--terra); color: #fff; font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--terra-dark); border-color: var(--terra-dark); color: #fff; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 15px; }
.btn-ghost { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .85); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .26); border-color: #fff; }
.btn-outline { background: transparent; color: var(--terra); }
.btn-outline:hover { background: var(--terra); color: #fff; }
.btn-whatsapp { background: var(--whatsapp); border-color: var(--whatsapp); }
.btn-whatsapp:hover { background: #0E6E3A; border-color: #0E6E3A; }

/* ---------- 1. Accueil ---------- */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #3b3530; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 50% 42%; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 17, 14, .82) 0%, rgba(20, 17, 14, .45) 42%, rgba(20, 17, 14, 0) 72%); }
.hero-content { position: relative; padding-top: 120px; padding-bottom: 40px; }
.eyebrow { margin: 0 0 8px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 6vw, 58px); line-height: 1.08; margin: 0 0 14px; max-width: 16em; }
.hero-price { margin: 0 0 18px; font-size: clamp(26px, 4vw, 34px); font-weight: 600; }
.hero-fees { display: inline-block; font-size: 15px; font-weight: 500; margin-left: 8px; padding: 3px 10px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 999px; vertical-align: middle; }
.key-figures { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; max-width: 760px; font-size: 15px; }
.key-figures strong { display: block; font-size: 18px; }
@media (min-width: 700px) { .key-figures { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 759px) {
  .hero { min-height: calc(100svh - 60px); }
  .hero-content { padding-top: 90px; padding-bottom: 84px; } /* dégage la barre fixe du bas */
  .hero h1 { font-size: 30px; }
  .eyebrow { font-size: 12px; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--stone); }
.section-title { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4.5vw, 42px); line-height: 1.15; margin: 0 0 18px; }
.section-intro { max-width: 760px; color: var(--ink-soft); margin: 0 0 28px; }
.prose p { margin: 0 0 14px; }
.lead { font-size: 19px; }
.note { font-size: 14px; color: var(--ink-soft); }
.two-col { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.two-col > * { min-width: 0; }
@media (min-width: 900px) {
  .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
  .two-col-media { align-items: center; }
}

/* ---------- 2. Points forts ---------- */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.features svg { width: 34px; height: 34px; fill: none; stroke: var(--terra); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.features h3 { font-size: 18px; margin: 0 0 4px; }
.features p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* ---------- 3. Galerie ---------- */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 10px; } .gallery li:first-child { grid-column: span 2; grid-row: span 2; } }
/* La dernière photo occupe 2 colonnes pour éviter une case vide (16 photos en 3 et 4 colonnes) */
@media (min-width: 640px) { .gallery li:last-child { grid-column: span 2; } .gallery li:last-child .gallery-item { aspect-ratio: 3 / 2; } .gallery li:last-child img { object-position: 50% 35%; } }
@media (min-width: 640px) and (max-width: 959px) { .gallery li:first-child { grid-column: span 2; } .gallery li:first-child .gallery-item { aspect-ratio: 3 / 2; } .gallery li:first-child img { object-position: 50% 55%; } }
.gallery-item { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--stone-2); border-radius: 6px; overflow: hidden; cursor: zoom-in; aspect-ratio: 3 / 4; }
.gallery li:first-child .gallery-item { aspect-ratio: auto; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.03); }

/* ---------- Tableaux ---------- */
.table-title { font-size: 18px; margin: 26px 0 10px; }
.two-col > div > .table-title:first-child { margin-top: 0; }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 16px; }
.data-table th, .data-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--stone); font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.data-table tbody th { font-weight: 500; color: var(--ink-soft); width: 48%; }
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: 0; }
.data-table td:last-child { white-space: normal; }
.data-table .total th, .data-table .total td { font-weight: 600; color: var(--ink); background: var(--stone); }

/* ---------- 5. Plan ---------- */
.plan { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.plan svg { width: 100%; height: auto; max-height: 640px; display: block; font-family: var(--sans); }
.plan figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 10px; }
.plan-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plan-hint { display: none; font-size: 13px; color: var(--ink-soft); margin: 0 0 6px; }
@media (max-width: 640px) {
  .plan-scroll svg { width: 640px; max-width: none; }
  .plan-hint { display: block; }
}
.p-wall { fill: #3A3733; }
.p-room { fill: #FFFFFF; }
.p-living { fill: #FBF6EE; }
.p-bed { fill: #F7F3EC; }
.p-balcony { fill: url(#hatch); }
.p-tech { fill: #CFC6B8; }
.p-closet { fill: #EEE6DA; }
.p-door { fill: #FFFFFF; }
.p-win { fill: #8DB9D6; }
.p-label { font-size: 19px; font-weight: 600; fill: var(--ink); text-anchor: middle; }
.p-area { font-size: 17px; fill: var(--ink-soft); text-anchor: middle; }
.p-small { font-size: 14px; }
.p-orient { font-size: 16px; font-weight: 600; letter-spacing: .2em; fill: var(--terra); text-anchor: middle; }

/* ---------- 6 & 10. Listes ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 800px) { #confort .checklist { grid-template-columns: 1fr 1fr; gap: 12px 32px; } }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--olive); border-bottom: 2px solid var(--olive); transform: rotate(-45deg); }

/* ---------- 7. Vue ---------- */
.view-pair { display: grid; gap: 16px; }
/* Photo 4:3 + vidéo 9:16 : colonnes 64/27 pour que les deux aient la même hauteur */
@media (min-width: 800px) { .view-pair { grid-template-columns: 64fr 27fr; align-items: start; } }
.view-pair figure { margin: 0; }
.view-pair img { width: 100%; height: auto; border-radius: var(--radius); }
.view-pair video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; margin: 0 auto; object-fit: contain; background: var(--stone-2); border-radius: var(--radius); }
@media (max-width: 799px) { .view-pair video { width: auto; max-width: 100%; max-height: 75svh; } }
.view-pair figcaption, .media-figure figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- 8. Résidence ---------- */
.media-figure { margin: 0; }
.media-figure img { border-radius: var(--radius); max-height: 560px; width: 100%; object-fit: cover; }
.optional[hidden] { display: none !important; }

/* ---------- 9. Quartier ---------- */
.map-figure { margin: 0; }
.map-link { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #F2ECE2; box-shadow: var(--shadow); cursor: zoom-in; }
.map-link img { width: 100%; height: auto; }
.map-figure figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
@media (min-width: 900px) { .map-figure { position: sticky; top: 84px; } }
.num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; color: #fff; font: 700 12px/1 var(--sans); vertical-align: middle; }
.n-c { background: #A84E28; } .n-s { background: #55613A; } .n-e { background: #1F5FA8; } .n-u { background: #6A4C93; } .n-p { background: #4A4744; }
.n-none { background: transparent; }
.walk li > span:first-child { display: inline-flex; align-items: center; }
.walk-lists h3 { font-size: 17px; margin: 18px 0 6px; color: var(--olive); }
.walk-lists h3:first-child { margin-top: 0; }
.walk { list-style: none; margin: 0; padding: 0; }
.walk li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.walk li span:last-child { color: var(--ink-soft); white-space: nowrap; }

/* ---------- 11. DPE ---------- */
.dpe-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.dpe-block h3 { margin: 0 0 12px; font-size: 18px; }
.dpe-sub { margin: 14px 0 6px; font-size: 14px; color: var(--ink-soft); }
.dpe-scale { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dpe-scale li { display: flex; align-items: center; gap: 10px; height: 28px; }
.dpe-scale li span { display: flex; align-items: center; height: 100%; padding-left: 10px; font-weight: 700; font-size: 15px; color: #fff; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.dpe-scale li:nth-child(1) span { width: 22%; }
.dpe-scale li:nth-child(2) span { width: 30%; }
.dpe-scale li:nth-child(3) span { width: 38%; }
.dpe-scale li:nth-child(4) span { width: 46%; }
.dpe-scale li:nth-child(5) span { width: 54%; }
.dpe-scale li:nth-child(6) span { width: 62%; }
.dpe-scale li:nth-child(7) span { width: 70%; }
.dpe-scale li.is-current { height: 38px; }
.dpe-scale li.is-current span { font-size: 19px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35); }
.dpe-scale li em { font-style: normal; font-weight: 600; font-size: 15px; white-space: nowrap; }
.c-a span { background: #009C6D; } .c-b span { background: #52B153; } .c-c span { background: #78BD76; color: #1d2b1d !important; }
.c-d span { background: #F4E70F; color: #333 !important; } .c-e span { background: #F0B50F; color: #333 !important; }
.c-f span { background: #EB8235; } .c-g span { background: #D7221F; }
.g-a span { background: #A4DBF8; color: #1f2c38 !important; } .g-b span { background: #8CB4D3; color: #1f2c38 !important; } .g-c span { background: #7792B1; }
.g-d span { background: #606F8F; } .g-e span { background: #4D5271; } .g-f span { background: #393551; } .g-g span { background: #281B35; }

.legal-list dl { margin: 0; }
.legal-list dl > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.legal-list dt { font-weight: 600; font-size: 15px; color: var(--olive); margin-bottom: 2px; }
.legal-list dd { margin: 0; font-size: 16px; }

/* ---------- 12. Contact ---------- */
.contact-section { background: var(--surface); }
.contact-price { font-family: var(--serif); font-size: 44px; font-weight: 600; margin: 0; line-height: 1.1; }
.contact-fees { margin: 4px 0 18px; color: var(--ink-soft); }
.contact-person { margin: 0 0 6px; }
.contact-lines { list-style: none; margin: 0 0 20px; padding: 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.composer { background: var(--stone); border-radius: var(--radius); padding: 22px; }
.composer h3 { margin: 0 0 4px; font-size: 19px; }
.composer label { display: block; font-weight: 500; font-size: 15px; margin: 14px 0 4px; }
.composer input, .composer textarea { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #BFB3A2; border-radius: 8px; background: #fff; color: var(--ink); }
.composer textarea { resize: vertical; }
.composer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- 13. Pied de page ---------- */
.site-footer { background: #2E2B27; color: #E9E2D6; padding: 40px 0 110px; font-size: 14px; }
.site-footer a { color: #F2C9AE; }
.footer-title { font-family: var(--serif); font-size: 24px; margin: 0 0 10px; color: #fff; }
.site-footer p { margin: 0 0 8px; max-width: 900px; }
.site-footer .todo { color: #5C4400; }
@media (min-width: 760px) { .site-footer { padding-bottom: 40px; } }

/* ---------- Barre mobile ---------- */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0, 0, 0, .08); padding-bottom: env(safe-area-inset-bottom); }
.mobile-bar a { display: flex; align-items: center; justify-content: center; min-height: 56px; font-weight: 600; text-decoration: none; color: var(--ink); }
.mobile-bar a:nth-child(2) { color: var(--whatsapp); }
.mobile-bar a:last-child { background: var(--terra); color: #fff; }
@media (min-width: 760px) { .mobile-bar { display: none; } }

/* ---------- Visionneuse ---------- */
.lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(15, 13, 11, .96); color: #fff; }
.lightbox::backdrop { background: rgba(15, 13, 11, .9); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; padding: 56px 12px 16px; }
.lightbox img { max-width: min(100%, 1600px); max-height: calc(100vh - 120px); object-fit: contain; border-radius: 4px; }
.lightbox figcaption { margin-top: 10px; font-size: 15px; text-align: center; }
.lb-count { color: #CFC6B8; margin-left: 8px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } }

