/* Visite filmée — démo Forge Labs. S'appuie sur ../_shared/demo.css et immo.css. */

.vis { max-width: 1400px; margin: 0 auto; padding: 24px var(--gutter) 48px; display: grid; gap: 24px; }
.vis > * { min-width: 0; }
.vis h1 { font-size: clamp(1.55rem, 2.8vw, 2.3rem); max-width: 26em; margin: 8px 0; }
.vis .lead { font-size: clamp(1rem, 1.3vw, 1.1rem); max-width: 60rem; margin: 0; }
.vis-banner { font-size: .88rem; padding: 9px var(--gutter); }
.vis-banner strong { color: #3a2802; }

/* Mise en page visite + panneau latéral */
.tour { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); align-items: start; }
.tour > * { min-width: 0; }
@media (max-width: 1080px) { .tour { grid-template-columns: minmax(0, 1fr); } }

/* Visionneuse */
.viewer-wrap { display: grid; gap: 10px; min-width: 0; }
.viewer { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 16px; overflow: hidden; background: #121c28; box-shadow: 0 1px 2px rgba(18, 28, 40, .08), 0 18px 40px -20px rgba(18, 28, 40, .55); }
.stage { position: absolute; inset: 0; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity .7s ease; background: #121c28; }
.layer.in { opacity: 1; }
.layer.pre { visibility: hidden; }
.pills { position: absolute; left: 12px; right: 12px; bottom: 44px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; pointer-events: none; }
.pill-go { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 14px 6px 10px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .9); background: rgba(18, 28, 40, .78); color: #fff; font: 600 .84rem/1.1 var(--font-body); cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: opacity .3s ease, background .15s ease; }
.pill-go svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pill-go:hover { background: var(--tuile-500); }
.pill-go.off { opacity: 0; pointer-events: none; }
.v-play { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 14px 6px 10px; border-radius: 999px; border: 1.5px solid #fff; background: var(--tuile-500); color: #fff; font: 700 .86rem/1.1 var(--font-body); cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); }
.v-play svg { width: 17px; height: 17px; fill: currentColor; }
.v-play:hover { background: var(--tuile-600); }
.v-cap { display: none; margin: 0; color: #4a3303; background: var(--verif-100); border-radius: 10px; padding: 8px 10px; line-height: 1.4; }
.v-badge.photo { background: #fff; color: var(--ardoise-900); }
.hs-layer { position: absolute; inset: 0; pointer-events: none; }
.v-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.v-room { margin: 0; display: inline-flex; align-items: center; gap: 10px; background: rgba(18, 28, 40, .78); color: #fff; padding: 7px 12px; border-radius: 999px; font-size: .92rem; line-height: 1.2; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); min-width: 0; }
.v-room b { font-family: var(--font-display); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-idx { font: 700 .74rem/1 var(--font-body); color: var(--verif-200); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v-badge { flex: none; background: var(--verif-200); color: #2b1d02; font: 700 .72rem/1 var(--font-body); padding: 7px 10px; border-radius: 999px; white-space: nowrap; }
.v-note { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 22px 14px 9px; font-size: .78rem; line-height: 1.35; color: #fff; background: linear-gradient(to top, rgba(12, 18, 26, .78), rgba(12, 18, 26, 0)); pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.v-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; background: rgba(18, 28, 40, .82); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: .86rem; }

/* Repères sur les ouvertures */
.hs { position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; padding: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translate(-9999px, 0); transition: opacity .25s ease; color: #fff; font: inherit; }
.hs-dot { position: relative; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .22); border: 2px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); display: grid; place-items: center; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.hs-dot::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.hs-dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #fff; animation: hs-pulse 2.2s ease-out infinite; }
@keyframes hs-pulse { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(1.9); opacity: 0; } }
.hs-lbl { background: rgba(18, 28, 40, .86); color: #fff; font: 600 .78rem/1.2 var(--font-body); padding: 5px 9px; border-radius: 8px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.hs:hover .hs-dot, .hs:focus-visible .hs-dot { background: var(--tuile-500); }
.hs:focus-visible { outline: none; }
.hs:focus-visible .hs-dot { outline: 3px solid var(--focus); outline-offset: 3px; }
.hs.off { opacity: 0; pointer-events: none; }

/* Commandes */
.v-progress { height: 3px; background: var(--pierre-200); border-radius: 3px; overflow: hidden; }
.v-progress span { display: block; height: 100%; width: 0; background: var(--tuile-500); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ctl { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: .5em 1em; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ardoise-900); font: 600 .9rem/1 var(--font-body); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ctl:hover { border-color: var(--ardoise-800); }
.ctl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ctl-main { background: var(--ardoise-800); border-color: var(--ardoise-800); color: #fff; }
.ctl-main:hover { background: var(--ardoise-700); }
.ctl-main svg { fill: currentColor; stroke: none; }
.ctl-main .i-pause { fill: none; stroke: currentColor; stroke-width: 3; }
.ctl-main .i-pause, .ctl-main[aria-pressed="true"] .i-play { display: none; }
.ctl-main[aria-pressed="true"] .i-pause { display: block; }
.ctl[aria-pressed="true"]:not(.ctl-main) { background: var(--verif-100); border-color: var(--verif-500); }
.ctl:disabled { opacity: .45; cursor: default; }
.ctl:disabled:hover { border-color: var(--line); }
#fs { margin-left: auto; }
.keys { margin: 0; }
kbd { font: 600 .78rem/1 var(--font-body); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; background: #fff; color: var(--ink); }

/* Plein écran */
.viewer-wrap:fullscreen { background: #0d141c; padding: 14px; grid-template-rows: minmax(0, 1fr) auto auto; align-content: stretch; }
.viewer-wrap:fullscreen .viewer { aspect-ratio: auto; height: 100%; }
.viewer-wrap:fullscreen .v-cap { display: none; }
.viewer-wrap:fullscreen .keys { color: rgba(255, 255, 255, .7); }
.viewer-wrap:fullscreen .v-progress { background: rgba(255, 255, 255, .15); }

/* Panneaux */
.side { display: grid; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 1px 2px rgba(18, 28, 40, .05), 0 8px 24px -14px rgba(18, 28, 40, .22); min-width: 0; }
.panel h2 { font-size: 1.18rem; margin: 0; }
.panel-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.panel-row p { margin: 0; }

.plan svg { width: 100%; height: auto; display: block; }
.plan-help { margin: 8px 0 0; }
.plan .room { fill: var(--pierre-50); stroke: var(--ardoise-700); stroke-width: 2; cursor: pointer; transition: fill .3s ease; }
.plan .room:hover { fill: var(--ardoise-100); }
.plan .room.on { fill: var(--tuile-100); }
.plan .balc { fill: url(#hatch-b); }
.plan .balc.on { fill: var(--tuile-100); }
.plan .outer { fill: none; stroke: var(--ardoise-900); stroke-width: 5; stroke-linejoin: miter; pointer-events: none; }
.plan .open-split { stroke: var(--ardoise-600); stroke-width: 1.5; stroke-dasharray: 4 4; pointer-events: none; }
.plan .gap { fill: #fff; pointer-events: none; }
.plan .win { stroke: #4f8cc0; stroke-width: 2; pointer-events: none; }
.plan .door { fill: none; stroke: var(--ardoise-600); stroke-width: 1.2; pointer-events: none; }
.plan .plac { fill: url(#hatch-p); stroke: var(--ardoise-700); stroke-width: 1; pointer-events: none; }
.plan .lbl { font: 600 11px/1 var(--font-body); fill: var(--ardoise-800); pointer-events: none; }
.plan .lbl-s { font: 500 9px/1 var(--font-body); fill: var(--muted); pointer-events: none; }
.plan .lbl-p { font-size: 7.5px; }
.plan .vp { cursor: pointer; }
.plan .vp .cone { fill: rgba(184, 90, 60, .0); transition: fill .3s ease; }
.plan .vp.on .cone { fill: rgba(184, 90, 60, .3); }
.plan .vp circle { fill: var(--ardoise-800); stroke: #fff; stroke-width: 2; transition: fill .2s ease; }
.plan .vp.on circle { fill: var(--tuile-500); }
.plan .vp:hover circle { fill: var(--ardoise-600); }
.plan .vp.on:hover circle { fill: var(--tuile-600); }
.plan .vp text { font: 700 10px/1 var(--font-body); fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.plan .vp:focus { outline: none; }
.plan .vp:focus-visible circle { stroke: var(--focus); stroke-width: 4; }

.room-panel .eyebrow { margin: 0 0 6px; }
.room-panel h2 { margin-bottom: 10px; }
.r-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.r-facts div { background: var(--pierre-100); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.r-facts dt { font: 700 .7rem/1.2 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.r-facts dd { margin: 3px 0 0; font-weight: 600; font-size: .92rem; line-height: 1.3; }
.room-panel h3 { font-size: .95rem; margin: 0 0 6px; font-family: var(--font-body); font-weight: 700; }
.r-list { margin: 0 0 10px; padding-left: 1.1em; font-size: .9rem; line-height: 1.45; display: grid; gap: 3px; }
.r-note { margin: 0; }

/* Fiche du bien */
.fiche-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1080px) { .fiche-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .f-price { grid-column: 1 / -1; } }
@media (max-width: 680px) { .fiche-grid { grid-template-columns: minmax(0, 1fr); } }
.fiche-grid > * { min-width: 0; }
.f-big { font: 700 clamp(1.6rem, 3vw, 2.1rem)/1.1 var(--font-display); color: var(--ardoise-900); margin: 0 0 10px; }
.f-big small { font: 600 .9rem/1 var(--font-body); color: var(--muted); }
.f-dl { margin: 0 0 12px; display: grid; gap: 6px; font-size: .92rem; }
.f-dl div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; }
.f-dl dt { color: var(--muted); }
.f-dl dd { margin: 0; }
@media (max-width: 420px) { .f-dl div { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.f-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.f-tags li { background: var(--ardoise-100); color: var(--ardoise-900); border-radius: 999px; padding: 5px 10px; font-size: .82rem; font-weight: 600; }

.dpe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dpe-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-width: 0; }
.dpe-box p { margin: 0 0 6px; font: 700 .76rem/1.2 var(--font-body); color: var(--ink); }
.dpe-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dpe-bars li { height: 15px; border-radius: 0 3px 3px 0; color: #fff; font: 800 .68rem/15px var(--font-body); padding-left: 6px; position: relative; opacity: .4; }
.dpe-bars li:nth-child(1) { width: 34%; } .dpe-bars li:nth-child(2) { width: 43%; } .dpe-bars li:nth-child(3) { width: 52%; } .dpe-bars li:nth-child(4) { width: 61%; } .dpe-bars li:nth-child(5) { width: 70%; } .dpe-bars li:nth-child(6) { width: 79%; } .dpe-bars li:nth-child(7) { width: 88%; }
.dpe-bars.e li:nth-child(1) { background: #009c6d; } .dpe-bars.e li:nth-child(2) { background: #52b153; } .dpe-bars.e li:nth-child(3) { background: #78bd76; } .dpe-bars.e li:nth-child(4) { background: #f4e70f; color: #2b2600; } .dpe-bars.e li:nth-child(5) { background: #f0b50f; } .dpe-bars.e li:nth-child(6) { background: #eb8235; } .dpe-bars.e li:nth-child(7) { background: #d7221f; }
.dpe-bars.c li:nth-child(1) { background: #a4dbf8; } .dpe-bars.c li:nth-child(2) { background: #8cb4d3; } .dpe-bars.c li:nth-child(3) { background: #7792b1; } .dpe-bars.c li:nth-child(4) { background: #607192; } .dpe-bars.c li:nth-child(5) { background: #4d5271; } .dpe-bars.c li:nth-child(6) { background: #393551; } .dpe-bars.c li:nth-child(7) { background: #281b35; }
.dpe-bars li.on { opacity: 1; height: 19px; line-height: 19px; font-size: .78rem; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
.f-energy { margin: 10px 0 0; }

.surf { width: 100%; border-collapse: collapse; font-size: .9rem; }
.surf caption { text-align: left; font: 700 .76rem/1.2 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; }
.surf th, .surf td { padding: 5px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.surf thead th { font-weight: 700; font-size: .8rem; color: var(--muted); }
.surf .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }
.surf tfoot th, .surf tfoot td { font-weight: 700; border-bottom: 0; }
.surf tfoot .hors th, .surf tfoot .hors td { font-weight: 400; color: var(--muted); }

/* Fabrication */
.how { background: var(--ardoise-900); color: var(--pierre-100); border-radius: 18px; padding: clamp(20px, 3.4vw, 34px); }
.how h2 { color: #fff; font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin: 0 0 14px; }
.how-list { margin: 0; padding: 0; list-style: none; counter-reset: how; display: grid; gap: 12px 26px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .how-list { grid-template-columns: minmax(0, 1fr); } }
.how-list li { counter-increment: how; position: relative; padding-left: 38px; font-size: .94rem; line-height: 1.5; color: rgba(241, 239, 231, .86); }
.how-list li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--tuile-500); color: #fff; display: grid; place-items: center; font: 700 .8rem/1 var(--font-body); }
.how-list b { color: #fff; }

.warn { display: flex; gap: 12px; align-items: flex-start; background: var(--verif-100); border: 1px solid var(--verif-200); border-left: 5px solid var(--verif-500); color: #3e2a03; border-radius: 12px; padding: 14px 16px; }
.warn svg { flex: none; color: var(--verif-500); margin-top: 1px; }
.warn p { margin: 0; font-size: .92rem; line-height: 1.5; }
.warn strong { display: block; font-size: 1rem; margin-bottom: 4px; color: #2f2002; }

/* Mobile */
@media (max-width: 640px) {
  .vis { padding-top: 18px; gap: 18px; }
  .viewer { border-radius: 12px; }
  .v-top { top: 8px; left: 8px; right: 8px; }
  .v-room { font-size: .82rem; padding: 6px 10px; gap: 7px; }
  .v-badge { font-size: .66rem; padding: 6px 8px; }
  .v-note { font-size: .68rem; padding: 16px 10px 6px; }
  .hs-dot { width: 30px; height: 30px; }
  .hs-dot::before { width: 9px; height: 9px; }
  .hs-lbl { display: none; }
  .v-note { display: none; }
  .v-cap { display: block; }
  .pills { bottom: 8px; left: 8px; right: 8px; gap: 6px; }
  .pill-go { min-height: 34px; font-size: .74rem; padding: 4px 10px 4px 8px; }
  .v-play { min-height: 34px; font-size: .74rem; padding: 4px 10px 4px 8px; }
      .ctl { min-height: 44px; padding: .5em .8em; font-size: .86rem; }
  .ctl-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .controls { gap: 6px; }
  #fs { margin-left: 0; }
  .keys { display: none; }
}
@media (max-width: 400px) {
  .v-badge { font-size: .62rem; padding: 5px 7px; }
  .ctl { padding: .5em .7em; font-size: .82rem; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-dot::after { animation: none; opacity: 0; }
}
