/* Innovmada — vitrine immobilière bilingue. Polices système uniquement (aucun CDN). */
:root {
  --navy: #1F3A5F;
  --navy-dark: #152a46;
  --navy-soft: #e8eef6;
  --gold: #C9A227;
  --ink: #1d2733;
  --muted: #5b6878;
  --line: #dde3ea;
  --bg: #f5f7fa;
  --white: #fff;
  --wa: #1f9d55;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* langue : les deux versions sont dans le HTML, on masque l'inactive */
html:not([data-lang="en"]) .l-en { display: none !important; }
html[data-lang="en"] .l-zh { display: none !important; }

/* aperçu WeChat : première image du body, invisible */
.wx-share { display: none; }

/* en-tête */
.top { background: var(--navy); color: var(--white); position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; min-width: 0; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-txt strong { font-size: 17px; letter-spacing: .02em; }
.brand-txt small { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { display: flex; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; flex: none; }
.lang button { background: none; border: 0; color: var(--white); padding: 6px 13px; font-size: 14px; min-height: 34px; }
.lang button.on { background: var(--white); color: var(--navy); font-weight: 600; }

/* bandeau d'accueil */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%); color: var(--white); padding: 36px 0 40px; }
.hero h1 { font-size: 26px; font-weight: 700; max-width: 760px; }
.hero-sub { margin: 8px 0 0; color: var(--gold); font-weight: 600; letter-spacing: .02em; }
.hero-txt { margin: 14px 0 22px; max-width: 720px; opacity: .9; font-size: 15px; }

/* boutons */
.btn { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; background: var(--navy); color: var(--white); text-decoration: none; padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: 15px; min-height: 46px; }
.btn .num { font-weight: 400; opacity: .9; font-size: 14px; }
.btn-light { background: var(--white); color: var(--navy); }
.btn-wa { background: var(--wa); }

/* filtres */
.list { padding-top: 22px; padding-bottom: 36px; }
.filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.frow { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.frow + .frow { border-top: 1px solid var(--line); }
.flabel { flex: none; width: 52px; font-size: 13px; color: var(--muted); padding-top: 7px; }
.chips { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 14px; min-height: 34px; white-space: nowrap; }
.chip.on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.count { color: var(--muted); font-size: 14px; margin: 16px 2px 10px; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* grille */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 6px 22px rgba(31,58,95,.12); transform: translateY(-2px); }
.card.is-feat { border-color: var(--gold); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: var(--navy-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--gold); color: #1d1600; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .03em; }
.badge.static { position: static; display: inline-block; }
.nph { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--navy-soft); color: var(--navy); font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; }
.code { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.card h3 { font-size: 16px; font-weight: 650; margin-top: 2px; }
.loc { color: var(--muted); font-size: 14px; margin: 0; }
.size { font-size: 14px; margin: 0; }
.price { margin: auto 0 0; padding-top: 6px; font-weight: 700; color: var(--navy); font-size: 15px; display: flex; flex-direction: column; }
.cny { font-weight: 500; font-size: 13px; color: var(--muted); }

/* visuel absent */
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--navy); background: repeating-linear-gradient(135deg, #e8eef6 0 14px, #edf2f8 14px 28px); font-size: 14px; text-align: center; padding: 16px; }
.ph-big { aspect-ratio: 4 / 3; border-radius: var(--radius); }

/* fiche */
.detail { padding-top: 14px; padding-bottom: 10px; }
.back { display: inline-block; margin: 4px 0 14px; text-decoration: none; font-size: 14px; }
.d-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.d-grid > *, .grid > * { min-width: 0; }
.gallery { display: flex; flex-direction: column; gap: 8px; }
.g-main { border: 0; padding: 0; background: #0f1d30; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.g-main img { width: 100%; height: 100%; object-fit: contain; }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.g-thumbs::-webkit-scrollbar { display: none; }
.th { flex: none; width: 76px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--navy-soft); opacity: .75; }
.th img { width: 100%; height: 100%; object-fit: cover; }
.th.on { border-color: var(--navy); opacity: 1; }
.d-info h1 { font-size: 22px; margin: 10px 0 4px; }
.notice { background: #fef3c7; color: #6b4a00; border-left: 4px solid var(--gold); border-radius: 8px; padding: 10px 14px; margin: 14px 0 4px; font-size: 14px; }
.notice p { margin: 0; }
.facts { margin: 14px 0 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.fact { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 10px 14px; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.fact dd { margin: 0; font-size: 15px; }
.rate { color: var(--muted); font-size: 12px; margin: 10px 2px 0; }
.desc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 20px 0 6px; }
.desc h2 { font-size: 17px; margin-bottom: 8px; color: var(--navy); }
.desc p { margin: 0; }
.pn { display: flex; justify-content: space-between; gap: 10px; padding: 18px 0 26px; font-size: 14px; }
.pn a { text-decoration: none; }

/* appel à l'action */
.cta { background: var(--navy); color: var(--white); padding: 30px 16px 34px; margin-top: 24px; }
.cta-in { max-width: 760px; margin: 0 auto; text-align: center; }
.cta h2 { font-size: 22px; }
.cta-ref { margin: 8px 0 0; color: var(--gold); }
.cta-co { margin: 12px 0 18px; opacity: .9; font-size: 14px; }
.cta-btns { display: grid; grid-template-columns: 1fr; gap: 10px; }
.cta .btn { background: var(--white); color: var(--navy); }
.cta .btn-wa { background: var(--wa); color: var(--white); }
.wechat { display: flex; align-items: center; gap: 14px; justify-content: center; text-align: left; margin-top: 18px; background: rgba(255,255,255,.08); border-radius: var(--radius); padding: 12px; font-size: 14px; }
.wechat img { background: #fff; border-radius: 6px; padding: 4px; }
.wechat-todo { border: 2px dashed rgba(255,255,255,.45); }
.qr-ph { width: 72px; height: 72px; flex: none; border: 2px dashed rgba(255,255,255,.6); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; opacity: .8; }

/* pied de page */
.foot { background: var(--navy-dark); color: rgba(255,255,255,.75); padding: 22px 0 30px; font-size: 13px; }
.disc { margin: 0 0 10px; max-width: 860px; }
.copy { margin: 0; opacity: .7; }

/* visionneuse */
.lb { position: fixed; inset: 0; background: rgba(5,12,22,.97); z-index: 50; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lb[hidden] { display: none; }
.lb img { max-width: 100vw; max-height: 86vh; object-fit: contain; }
.lb button { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 30px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lb-x { top: 12px; right: 12px; }
.lb-p { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-n { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-c { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: 14px; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 32px; }
  .cta-btns { grid-template-columns: repeat(3, 1fr); }
  .btn { flex-direction: column; gap: 2px; }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .hero { padding: 52px 0 56px; }
  .hero h1 { font-size: 38px; }
  .d-grid { grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: start; }
  .d-info h1 { font-size: 26px; margin-top: 0; }
  .fact { grid-template-columns: 110px 1fr; }
}
@media (hover: none) { .card:hover { transform: none; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

[hidden], .card[hidden], .lb button[hidden] { display: none !important; }
