/* Page d'accueil Zentra Buildings. S'appuie sur site.css (tokens, .wrap, .sec, .card, .specs, .tag…).
   Deux moments seulement sont riches en couleur : l'immeuble isométrique et le graphique des températures.
   Grille de 4 px. Graisses 400 et 500. Transitions sur color, background, border, opacity et transform. */

:root{
  /* Palette d'architecte pour les lots (état du loyer) */
  --lot-paid:#9bbcae; --lot-open:#a3b4cb; --lot-late:#ecc0b8; --lot-vacant:#fbfaf7;
  --lot-line:rgba(22,24,27,.3);
  /* Rampe de température : bleu-gris → papier → ocre */
  --t-cold:#5f7fa6; --t-mid:#d9d1bd; --t-warm:#b9792a; --t-none:#ecebe6;
}

/* ---------- Héros ---------- */
.hero{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:48px 64px;align-items:center;padding-top:64px;padding-bottom:96px}
.hero h1{font-size:clamp(40px,1rem + 3vw,64px);max-width:12ch}
.hero .lead{max-width:38ch}
.hero__proto{margin-top:24px;font:400 13px/1.5 var(--mono);color:var(--ink-3)}
.hero__fig{margin:0;background:var(--paper);border:1px solid var(--rule);border-radius:var(--r-panel);padding:24px 24px 20px}
.hero__stage{position:relative}
.iso--hero{width:100%;height:auto}

/* Annotations posées sur le dessin : trait fin + texte mono */
.ann{list-style:none;padding:0}
.ann__item{position:absolute;font:400 12px/1.5 var(--mono);color:var(--ink-2);font-variant-numeric:tabular-nums}
.ann__item b{display:block;font-weight:500;color:var(--ink)}
.ann__item--a{left:1.8%;bottom:61.8%;width:18.8%}
.ann__item--b{left:77.8%;top:28.4%;width:21.6%}
.ann-line,.ann-ext{fill:none;stroke:var(--ink);stroke-width:.8}
.ann-ext{stroke:var(--ink-3);stroke-width:.6}
.ann-halo{fill:none;stroke:var(--paper);stroke-width:3.2;stroke-linejoin:round}
.ann-dot{fill:var(--ink)}

/* Cartouche sous le dessin */
.hero__cap{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 24px;align-items:center;margin-top:16px;padding-top:16px;border-top:1px solid var(--rule)}
.hero__title{font-size:var(--t-small);font-weight:500}
.hero__cap .tag{justify-self:end}
.hero__note{display:block;margin-top:4px;font:400 12px/1.5 var(--mono);color:var(--ink-3)}
.hero__cap .key{grid-column:1/-1}

/* Légendes et échantillons */
.key{list-style:none;padding:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;font:400 12px/1.5 var(--mono);color:var(--ink-2)}
.key li,.key span{display:inline-flex;align-items:center;gap:8px}
.sw{display:inline-block;flex:none;width:16px;height:12px;border:1px solid var(--lot-line);background:var(--c,var(--paper-2))}
.sw--paid{--c:var(--lot-paid)}
.sw--open{--c:var(--lot-open)}
.sw--late{background:repeating-linear-gradient(135deg,var(--red-dot) 0 1px,transparent 1px 4px),var(--lot-late)}
.sw--vacant{--c:var(--lot-vacant);border-style:dashed}
.sw--none{background:repeating-linear-gradient(135deg,#9a9d98 0 1px,transparent 1px 4px),var(--t-none)}

/* ---------- Dessins isométriques (héros et section 3D, même objet) ---------- */
.iso-ground{fill:var(--paper-2)}
.iso-street{fill:none;stroke:var(--rule-strong);stroke-width:1;stroke-dasharray:6 5}
.iso-base__l,.iso-base__r{stroke:var(--lot-line);stroke-width:.8;stroke-dasharray:4 3}
.iso-base__l{fill:#e7e4dc}.iso-base__r{fill:#dad6cd}
.iso-cave{fill:#cdc9c0}
.plant__face{fill:#efece5}
.plant__unit{fill:#c9c4b9}
.plant__pipe{fill:none;stroke:#8e8a80;stroke-width:1.6;stroke-linejoin:round}
.plant__edge{fill:none;stroke:var(--lot-line);stroke-width:.8}
.lot--paid{--r:var(--lot-paid)}
.lot--open{--r:var(--lot-open)}
.lot--overdue{--r:var(--lot-late)}
.lot--vacant{--r:var(--lot-vacant)}
.lot__face{fill:var(--r)}
.lot__win{fill:#fff;fill-opacity:.55}
.lot--vacant .lot__win{fill:none;stroke:var(--lot-line);stroke-width:.6;stroke-dasharray:2 2}
.lot__shade{fill:#16181b;fill-opacity:.07}
.lot__edge{fill:none;stroke:var(--lot-line);stroke-width:.8}
.lot--vacant .lot__edge{stroke-dasharray:3 2}
.lot__hatch--t{display:none}
.iso-cor-l{fill:#e3e0d8}.iso-cor-r{fill:#d5d1c7}.iso-cor-t{fill:#f3f1ec}
.iso-box-l{fill:#dcd8cf}.iso-box-r{fill:#ccc8be}.iso-box-t{fill:#eceae4}
.iso-roof polygon{stroke:var(--lot-line);stroke-width:.7}
.iso-tree line{stroke:#9b968b;stroke-width:1.6;stroke-linecap:round}
.iso-tree circle{fill:#e3e6dd;stroke:var(--lot-line);stroke-width:.7}
.iso-labels text{font:400 12px var(--mono);fill:var(--ink-3);text-anchor:end}
.lot__hatch,.lot__win,.lot__shade,.lot__edge,.plant__unit,.plant__pipe,.plant__edge{pointer-events:none}

/* ---------- Énergie ---------- */
.en-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:48px 64px;align-items:start}
.en-chart{margin:0}
.en-chart__head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}
.en-chart__head h3{margin-bottom:4px}
.en-chart__head p{font-size:var(--t-small)}
.chart{width:100%;height:auto;overflow:visible}
.chart text{font:400 11px var(--mono);fill:var(--ink-3)}
.ch-y{text-anchor:end}.ch-x{text-anchor:middle}.ch-unit{text-anchor:end}
.ch-note{text-anchor:middle;fill:var(--amber)!important}
.ch-grid{stroke:var(--rule);stroke-width:1}
.ch-day{stroke:var(--rule);stroke-width:1;stroke-dasharray:2 4}
.ch-out{fill:none;stroke:var(--ink-3);stroke-width:1.2;stroke-linejoin:round}
.ch-in{fill:none;stroke:var(--green);stroke-width:2;stroke-linejoin:round}
.ch-stuck{fill:none;stroke:var(--amber-dot);stroke-width:2.4}
.en-legend{display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:16px;font-size:var(--t-small);color:var(--ink-2)}
.en-legend span{display:inline-flex;align-items:center;gap:8px}
.en-legend .sw{width:16px;height:2px;border:0}
.sw--in{background:var(--green)}
.sw--out{background:var(--ink-3)}
.en-legend .sw--stuck{height:12px;border:1px solid rgba(201,138,27,.5);background:repeating-linear-gradient(135deg,rgba(201,138,27,.55) 0 1px,transparent 1px 4px)}
.en-side h3{margin-bottom:20px}

/* Titre en marge à gauche, contenu à droite, comme une fiche */
.split,.offset{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);gap:24px 64px;align-items:start;margin-top:96px}
.offset{margin-top:48px}
.offset>*{grid-column:2}
.split h3{text-wrap:balance;max-width:20ch}
.split__text{margin-top:12px;font-size:var(--t-small);color:var(--ink-2);max-width:40ch}
.origins>div{grid-template-columns:minmax(0,1fr) minmax(0,2fr)}
.tag--est::before{background:transparent;box-shadow:inset 0 0 0 1px var(--ink-3)}

.ladder{list-style:none;padding:0;border-top:1px solid var(--rule-strong)}
.ladder li{display:grid;grid-template-columns:48px minmax(0,1fr);gap:16px;padding:16px 0;border-bottom:1px solid var(--rule);color:var(--ink-2)}
.ladder__n{font:400 17px/1.6 var(--mono);color:var(--ink)}

/* ---------- Immeuble 3D ---------- */
.sec__head--solo{grid-template-columns:minmax(0,1fr);align-items:start}
.sec__head--solo .eyebrow{margin-bottom:0}
.sec__head--solo h2{max-width:22ch}
.sec__head--solo .lead{max-width:60ch}
.b3d{margin:0;background:var(--ground);border:1px solid var(--rule);border-radius:var(--r-panel);padding:24px 32px 28px}
.b3d__bar{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;margin-bottom:16px}
.b3d__bar .tag{margin-left:auto}
.b3d__switch{border:1px solid var(--rule-strong);padding:4px;margin:0;display:inline-flex;background:var(--ground);border-radius:var(--r);position:relative}
.b3d__switch input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.b3d__switch label{padding:8px 16px;border-radius:var(--r-s);font-size:var(--t-small);font-weight:500;color:var(--ink-3);cursor:pointer;min-height:40px;display:inline-flex;align-items:center;transition:background-color .16s var(--ease),color .16s var(--ease)}
.b3d__switch label:hover{color:var(--ink)}
.b3d__switch input:checked+label{background:var(--paper-2);color:var(--ink)}
.b3d__switch input:focus-visible+label{outline:2px solid var(--ink);outline-offset:2px}
.b3d__switch input:disabled+label{opacity:.45;cursor:not-allowed}
.b3d__role{display:inline-flex;align-items:center;gap:8px;font-size:var(--t-small);color:var(--ink-2);cursor:pointer;min-height:40px}
.b3d__role[hidden]{display:none}
.b3d__role input{width:16px;height:16px;accent-color:var(--ink)}
.b3d__body{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,4fr);gap:24px 48px;align-items:start}
.b3d__svg{width:100%;height:auto;max-height:640px;margin:0 auto;overflow:visible}
.b3d__svg [data-lot],.b3d__svg [data-plant]{cursor:pointer;outline:none;transition:transform .2s var(--ease)}
.b3d__svg .is-hover,.b3d__svg .is-sel{transform:translate(var(--dx),var(--dy))}
.b3d__hl{fill:none;stroke:var(--ink);stroke-width:2;stroke-linejoin:round;pointer-events:none;transition:transform .2s var(--ease)}
.b3d:has(#b3d-temp:checked) .lot__face,.b3d[data-mode="temp"] .lot__face{fill:var(--t)}
.b3d:has(#b3d-temp:checked) .lot__hatch--r,.b3d[data-mode="temp"] .lot__hatch--r{display:none}
.b3d:has(#b3d-temp:checked) .lot__hatch--t,.b3d[data-mode="temp"] .lot__hatch--t{display:inline}
.b3d:has(#b3d-temp:checked) .lot--vacant .lot__win,.b3d[data-mode="temp"] .lot--vacant .lot__win{fill:#fff;stroke:none}
.b3d__legend{margin-top:16px}
.b3d__legend--temp{display:none}
.b3d:has(#b3d-temp:checked) .b3d__legend--rent,.b3d[data-mode="temp"] .b3d__legend--rent{display:none}
.b3d:has(#b3d-temp:checked) .b3d__legend--temp,.b3d[data-mode="temp"] .b3d__legend--temp{display:flex}
.b3d__scale{display:inline-block;width:120px;height:12px;border:1px solid var(--lot-line);background:linear-gradient(90deg,var(--t-cold),var(--t-mid) 50%,var(--t-warm))}
.b3d__nodata{margin-left:4px}
.b3d__panel{border-left:1px solid var(--rule);padding-left:32px;min-height:360px}
.b3d__kicker{font:400 13px/1.5 var(--mono);color:var(--ink-3);margin-bottom:8px}
.b3d__panel h3{font-size:24px;letter-spacing:-.02em;margin-bottom:20px}
.readout>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:12px;padding:12px 0;border-top:1px solid var(--rule);font-size:var(--t-small)}
.readout>div:last-child{border-bottom:1px solid var(--rule)}
.readout dt{color:var(--ink-2)}
.readout dd{font-weight:500;font-variant-numeric:tabular-nums}
.b3d__tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.b3d__hint{margin-top:16px;font-size:var(--t-small);color:var(--ink-2)}
.b3d__panel a{font-weight:500}
.b3d__cap{margin-top:20px;font-size:var(--t-small);color:var(--ink-2);max-width:80ch}
.b3d__cap strong{font-weight:500;color:var(--ink)}
.b3d__table{margin-top:16px;font-size:var(--t-small)}
.b3d__table summary{cursor:pointer;font-weight:500;padding:8px 0;width:max-content;max-width:100%}
.b3d__table .tbl{min-width:640px}
.is-late{color:var(--red)}
.nw{white-space:nowrap}

/* Tableaux (aperçus produit) */
.tbl-wrap{overflow-x:auto;margin-top:12px}
.tbl{width:100%;border-collapse:collapse;font-size:var(--t-small);font-variant-numeric:tabular-nums}
.tbl th,.tbl td{padding:8px 12px 8px 0;border-bottom:1px solid var(--rule);text-align:left;vertical-align:top}
.tbl thead th{font-size:var(--t-meta);font-weight:500;color:var(--ink-3);border-bottom-color:var(--rule-strong)}
.tbl tbody th{font-weight:500}
.num{text-align:right!important;font-variant-numeric:tabular-nums}
.tbl th.num,.tbl td.num{padding-right:0;padding-left:12px}
.tbl .is-quiet,.tbl .is-no{color:var(--ink-3)}

/* ---------- Gérance ---------- */
.ger-mock figure{margin:0}
.ger-mock .card>p{margin-bottom:8px}
.ger-specs{margin-top:96px}

/* ---------- Autopilote : frise à traits de cote ---------- */
.frieze{list-style:none;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:relative}
.frieze li{position:relative;padding:48px 32px 0 0}
.frieze li::before{content:"";position:absolute;left:0;right:0;top:28px;border-top:1px solid var(--ink)}
.frieze li::after,.frieze::after{content:"";position:absolute;left:0;top:22px;width:1px;height:13px;background:var(--ink);transform:rotate(45deg)}
.frieze::after{left:auto;right:0}
.frieze__n{position:absolute;left:0;top:0;font:400 13px/16px var(--mono);color:var(--ink-3)}
.frieze h3{margin-bottom:8px;text-wrap:balance}
.frieze p{font-size:var(--t-small);color:var(--ink-2)}
.frieze .frieze__meta{margin-top:16px;font:400 13px/1.5 var(--mono);color:var(--ink-3)}
.frieze .is-locked::before{border-top-style:dashed;border-top-color:var(--ink-3)}
.frieze .is-locked h3{color:var(--ink-2)}

.auto-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:48px 64px;margin-top:96px}
.auto-cols__text{margin-top:12px;font-size:var(--t-small);color:var(--ink-2);max-width:52ch}
.numl{list-style:none;padding:0;margin-top:24px;border-top:1px solid var(--rule-strong);counter-reset:n}
.numl>li{counter-increment:n;display:grid;grid-template-columns:40px minmax(0,1fr);gap:0 12px;padding:12px 0;border-bottom:1px solid var(--rule);font-size:var(--t-small);line-height:24px}
.numl>li::before{content:counter(n,decimal-leading-zero);font:400 13px/24px var(--mono);color:var(--ink-3)}
.numl b{display:block;font-weight:500}
.numl p{color:var(--ink-2);line-height:1.5;margin-top:4px}

/* ---------- Sécurité (fond nuit) ---------- */
.sec--night .acts{margin-top:48px}
.sec--night .link{text-decoration-color:rgba(236,234,228,.4)}
.sec--night :focus-visible{outline-color:var(--night-ink)}

/* ---------- État du produit ---------- */
.etat{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 64px}
.etat>div{border-top:1px solid var(--rule-strong);padding-top:24px}
.etat__meta{font:400 13px/1.5 var(--mono);color:var(--ink-3)}
.etat h3{margin:8px 0 16px}
.etat .list{font-size:var(--t-small);color:var(--ink-2)}
.etat__pilot{grid-column:1/-1;margin-top:64px;display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);gap:16px 64px;align-items:start}
.etat__pilot h3{margin:8px 0 0;max-width:20ch}
.etat__pilot p{color:var(--ink-2);max-width:56ch}
.etat__pilot .etat__meta{color:var(--ink-3)}
.etat__act{margin-top:16px}

/* ---------- Locataires : une ligne calme ---------- */
.tenants__line{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);gap:8px 64px;align-items:baseline;padding:32px 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.tenants__line h2{font-size:var(--t-h3);line-height:1.3;letter-spacing:-.01em;max-width:none}
.tenants__line p{color:var(--ink-2);max-width:64ch}

/* ---------- Appel final ---------- */
.final{padding-top:96px}
.final__inner{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:24px 64px;align-items:end}
.final h2{max-width:14ch;font-size:var(--t-display);line-height:1.02;letter-spacing:-.035em}
.final .lead{margin-top:0}
.final .acts{margin-top:28px}

/* ---------- Adaptations ---------- */
@media (max-width:1100px){
  .hero{grid-template-columns:minmax(0,1fr);gap:48px}
  .hero h1{max-width:14ch}
  .hero__fig{max-width:800px}
}
@media (max-width:900px){
  .en-grid,.b3d__body,.split,.offset,.auto-cols,.etat,.etat__pilot,.tenants__line,.final__inner{grid-template-columns:minmax(0,1fr)}
  .offset>*{grid-column:1}
  .split,.auto-cols,.ger-specs{margin-top:64px}
  .etat{gap:40px}
  .etat__pilot{margin-top:24px}
  .b3d{padding:20px 16px 24px}
  .b3d__panel{border-left:0;border-top:1px solid var(--rule);padding:20px 0 0;min-height:0}
  .card{padding:20px}
  .frieze{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:40px}
  .frieze::after{display:none}
}
@media (max-width:640px){
  .hero{padding-top:48px;padding-bottom:64px}
  .hero__fig{padding:16px}
  .ann-lines{display:none}
  .ann{margin-top:16px;display:grid;gap:8px}
  .ann__item{position:static;width:auto}
  .ann__item b{display:inline;margin-right:8px}
  .hero__cap{grid-template-columns:minmax(0,1fr)}
  .hero__cap .tag{justify-self:start}
  .hero__stage{overflow:hidden}
  .iso--hero{width:112%;max-width:none;margin-left:-1%}
  .b3d__bar .tag{margin-left:0}
  .b3d__switch label{padding:8px 12px}
  .en-chart__head{flex-direction:column;gap:8px}
  .chart text{font-size:16px}
  .iso-labels text{font-size:20px}
  /* Frise verticale */
  .frieze{grid-template-columns:minmax(0,1fr);row-gap:0}
  .frieze li{padding:0 0 32px 28px}
  .frieze li::before{left:0;right:auto;top:4px;bottom:0;border-top:0;border-left:1px solid var(--ink)}
  .frieze li::after{left:-6px;top:4px;width:13px;height:1px;transform:rotate(-45deg)}
  .frieze .is-locked::before{border-left-style:dashed;border-left-color:var(--ink-3)}
  .frieze__n{position:static;display:block;margin-bottom:8px}
  .numl>li{grid-template-columns:32px minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){
  .b3d__svg [data-lot],.b3d__svg [data-plant],.b3d__hl,.b3d__switch label{transition:none}
}
@media (forced-colors:active){
  .lot__edge,.plant__edge{stroke:CanvasText}
  .b3d__hl{stroke:Highlight}
}
