/*
 * Ohm Assistant — mise en page de l'application (coquille, jumeau 3D, pages).
 * Les couleurs viennent exclusivement des tokens de glass.css.
 */

html,
body {
  overflow-x: hidden;
}
body {
  --sidenav-w: 0px;
  --header-h: 72px;
}
@media (min-width: 768px) {
  body { --sidenav-w: 240px; }
}

/* ─── Scène 3D plein écran ─────────────────────────────────────────────── */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
}
.scene-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: color-mix(in oklab, var(--color-surface-1) 74%, transparent);
  transition: opacity var(--dur-3) var(--ease-standard);
}
body:not([data-route='3d']) .scene { pointer-events: none; }
body:not([data-route='3d']) .scene-veil { opacity: 1; }
body:not([data-route='3d']) .v-labels { display: none; }
@media (min-width: 641px) and (pointer: fine) {
  /* Le canevas est figé hors de la page 3D (rendu à la demande) : le flou ne
     coûte qu'une passe. Désactivé sur mobile. */
  .scene canvas { transition: filter var(--dur-3) var(--ease-standard); }
  body:not([data-route='3d']) .scene canvas { filter: blur(6px) saturate(0.9); }
  body:not([data-route='3d']) .scene-veil { background: color-mix(in oklab, var(--color-surface-1) 62%, transparent); }
}
@media (max-width: 640px), (pointer: coarse) {
  body:not([data-route='3d']) .scene-veil { background: color-mix(in oklab, var(--color-surface-1) 88%, transparent); }
}

/* ─── Navigation latérale (bureau) ─────────────────────────────────────── */
.sidenav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 240px;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom)) calc(16px + var(--safe-left));
  display: none;
}
@media (min-width: 768px) {
  .sidenav { display: block; }
}
.sidenav-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px;
  border-radius: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 18px;
  text-decoration: none;
  color: inherit;
}
.brand img { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.wordmark {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-brand-700);
  white-space: nowrap;
}
.brand .eyebrow { font-size: 0.625rem; margin-top: 2px; }
.nav-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.nav-list .nav-lens {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 44px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transition: top 0.45s var(--ease-glide), height 0.45s var(--ease-glide), opacity 0.2s ease;
}
.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  color: color-mix(in oklab, var(--color-fg) 70%, transparent);
  transition: color var(--dur-2) var(--ease-standard), transform var(--dur-2) var(--ease-standard);
}
.nav-item:hover { color: var(--color-fg); }
.nav-item:active { transform: scale(0.96); }
.nav-item[aria-current='page'] { color: var(--color-brand-700); }
.nav-item .i { stroke-width: 2; }
.nav-item[aria-current='page'] .i { stroke-width: 2.5; }
.sidenav-foot {
  padding: 12px;
  margin-top: 8px;
  border-top: 1px solid color-mix(in oklab, var(--color-fg) 10%, transparent);
}
.sidenav-prop { font-size: 0.8125rem; font-weight: 700; margin-top: 2px; }

/* ─── Navigation basse (mobile) ────────────────────────────────────────── */
.bottomnav {
  position: fixed;
  z-index: 40;
  left: calc(10px + var(--safe-left));
  right: calc(10px + var(--safe-right));
  bottom: calc(10px + var(--safe-bottom));
}
@media (min-width: 768px) {
  .bottomnav { display: none; }
}
.bottomnav-bar {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 5px;
  border-radius: var(--r-pill);
}
.bottomnav-bar .nav-lens {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: 0;
  border-radius: var(--r-pill);
  opacity: 0;
  pointer-events: none;
  transition: left 0.45s var(--ease-glide), width 0.45s var(--ease-glide), opacity 0.2s ease;
}
.bnav-item {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-size: 0.6875rem;
  font-weight: 700;
  color: color-mix(in oklab, var(--color-fg) 66%, transparent);
  transition: color var(--dur-2) var(--ease-standard);
}
.bnav-item .i { width: 20px; height: 20px; stroke-width: 2; }
.bnav-item[aria-current='page'] { color: var(--color-brand-700); }
.bnav-item[aria-current='page'] .i { stroke-width: 2.5; }
.bnav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }

/* ─── Coquille & en-tête ───────────────────────────────────────────────── */
.shell {
  position: relative;
  z-index: 10;
  padding: 0 calc(12px + var(--safe-right)) 0 calc(12px + var(--safe-left));
  min-height: 100dvh;
}
@media (min-width: 768px) {
  .shell { padding: 0 24px 0 var(--sidenav-w); }
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: calc(10px + var(--safe-top));
}
@media (min-width: 768px) {
  .app-header { padding-top: calc(16px + var(--safe-top)); }
}
.header-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-radius: 24px;
}
@media (min-width: 768px) {
  .header-bar { padding: 10px 12px 10px 20px; }
}
.header-logo { display: flex; flex: none; }
.header-logo img { width: 34px; height: 34px; }
@media (min-width: 768px) {
  .header-logo { display: none; }
}
.header-titles { flex: 1; min-width: 0; }
.header-titles h1 {
  font-size: 1.0625rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-titles p {
  font-size: 0.75rem;
  color: color-mix(in oklab, var(--color-fg) 70%, transparent);
}
@media (min-width: 768px) {
  .header-titles h1 { font-size: 1.25rem; }
}
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-fg);
  flex: none;
}
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-muted);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--c-muted) 25%, transparent);
}
.live-chip[data-state='open'] .live-dot {
  background: var(--color-ok-700);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-ok-700) 25%, transparent);
  animation: ohm-pulse 2.4s ease-in-out infinite;
}
.live-chip[data-state='retry'] .live-dot,
.live-chip[data-state='connecting'] .live-dot { background: var(--color-warn-700); }
.live-chip[data-state='offline'] .live-dot { background: var(--color-danger-700); }
.live-value:empty { display: none; }
.live-value { color: var(--color-brand-700); font-weight: 900; }
@media (max-width: 520px) {
  .live-chip { padding: 0; width: 44px; justify-content: center; }
  .live-chip .live-label,
  .live-chip .live-value { display: none; }
  .header-titles p { display: none; }
  .header-bar { gap: 6px; }
}

main {
  outline: none;
  padding-bottom: calc(var(--nav-clear) + 8px);
}
@media (min-width: 768px) {
  main { padding-bottom: 40px; }
}
.page { display: none; }
.page.is-active { display: block; }
.content {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.page-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.page-intro p { max-width: 70ch; font-size: 0.875rem; color: color-mix(in oklab, var(--color-fg) 75%, transparent); }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 4px 0;
  font-size: 1.125rem;
}
.section-title .i { color: var(--color-brand-700); width: 18px; height: 18px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.kpi-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)); }
@media (max-width: 420px) {
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 1.25rem; }
  .card { padding: 16px; }
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.loading-block { display: flex; flex-direction: column; gap: 12px; }
.loading-block .skeleton { height: 120px; }
.noscript { margin: 40px auto; max-width: 420px; padding: 20px; border-radius: 22px; position: relative; z-index: 50; }
.confirm-actions { justify-content: flex-end; width: 100%; }

/* ─── Jumeau 3D : panneaux flottants ───────────────────────────────────── */
body[data-route='3d'] { overflow: hidden; overscroll-behavior: none; }
body[data-route='3d'] .shell { pointer-events: none; min-height: 0; }
body[data-route='3d'] .app-header,
body[data-route='3d'] .v-float { pointer-events: auto; }
body[data-route='3d'] main { padding: 0; }

.v-float { position: fixed; z-index: 20; }
.v-toolbar {
  top: calc(var(--header-h) + 10px);
  left: calc(var(--sidenav-w) + 12px + var(--safe-left));
  right: calc(12px + var(--safe-right));
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none !important;
}
.v-toolbar > * { pointer-events: auto; }
@media (min-width: 768px) {
  .v-toolbar { left: calc(var(--sidenav-w) + 4px); right: 24px; top: calc(var(--header-h) + 12px); }
}
.v-tools { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; flex: 0 0 auto; }
.v-tools .seg > button,
.v-tools .seg > .popover-anchor > button { min-height: 36px; padding: 0 12px; }
.seg > .popover-anchor { display: flex; }
.v-hud {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}
.hud-chip .hud-sep { width: 1px; height: 16px; background: color-mix(in oklab, var(--color-fg) 18%, transparent); }
.hud-chip b { font-weight: 900; color: var(--color-brand-700); }
.hud-chip .dot { width: 9px; height: 9px; }
.hud-flame { display: inline-flex; align-items: center; gap: 4px; }
.hud-flame[data-on='true'] .i { color: var(--color-warn-700); }

.popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  padding: 8px 14px;
  border-radius: 20px;
  z-index: 25;
}
.popover h3 { font-size: 0.75rem; margin: 6px 0 2px; }
.popover .switch { font-size: 0.875rem; }
.popover .switch .i { color: var(--color-brand-700); }
.popover-anchor { position: relative; }
.room-menu { max-height: min(60dvh, 420px); overflow-y: auto; padding: 6px; }
.room-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: left;
}
.room-menu button:hover { background: var(--color-brand-100); color: var(--color-brand-700); }
.room-menu button small { font-weight: 600; color: color-mix(in oklab, var(--color-fg) 65%, transparent); }

/* Panneau de détail : à droite sur bureau, feuille basse sur mobile */
.v-panel {
  right: 24px;
  top: calc(var(--header-h) + 88px);
  width: 370px;
  max-height: calc(100dvh - var(--header-h) - 88px - 110px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--r-glass);
  animation: ohm-pop-in 260ms var(--ease-emphasized) backwards;
}
.v-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px 10px 16px;
  background: color-mix(in oklab, var(--color-surface-2) 82%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--color-fg) 9%, transparent);
}
.v-panel-head .v-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  flex: none;
  color: var(--color-brand-700);
  background: var(--color-brand-100);
}
.v-panel-head .v-icon.gas { color: var(--color-fg); background: var(--c-gas-wash); }
.v-panel-head .v-icon.elec { color: var(--color-fg); background: var(--c-elec-wash); }
.v-panel-head h2 { font-size: 1.0625rem; }
.v-panel-head .grow { flex: 1; min-width: 0; }
.v-panel-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; font-size: 0.875rem; }
.v-panel-body h3 { font-size: 0.75rem; }
.v-grip { display: none; }
.v-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.v-list button,
.v-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  border-radius: 12px;
  background: color-mix(in oklab, var(--color-fg) 4%, transparent);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  color: var(--color-fg);
}
.v-list button:hover,
.v-list a:hover { background: var(--color-brand-100); color: var(--color-brand-700); }
.v-list .i { color: var(--color-brand-700); }
.v-list .meta { margin-left: auto; font-size: 0.75rem; color: color-mix(in oklab, var(--color-fg) 62%, transparent); white-space: nowrap; }
.v-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.v-photos button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: color-mix(in oklab, var(--color-fg) 6%, transparent); }
.v-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-pair > div { padding: 10px 12px; border-radius: 14px; background: color-mix(in oklab, var(--color-fg) 4%, transparent); }
.stat-pair b { display: block; font-size: 1.125rem; font-weight: 900; color: var(--color-brand-700); }
.stat-pair span { font-size: 0.75rem; color: color-mix(in oklab, var(--color-fg) 68%, transparent); }

@media (max-width: 767px) {
  .v-panel {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: calc(68px + 18px + var(--safe-bottom));
    width: auto;
    max-height: 56dvh;
    border-radius: var(--r-xl);
    animation: ohm-sheet-in 420ms var(--ease-emphasized) backwards;
  }
  .v-grip { display: flex; justify-content: center; padding: 6px 0 0; }
  .v-grip span { width: 40px; height: 5px; border-radius: 9999px; background: color-mix(in oklab, var(--color-fg) 25%, transparent); }
  .v-panel-head { padding-top: 8px; }
}

/* Barre de relecture (replay) */
.v-replay {
  left: calc(var(--sidenav-w) + 12px);
  right: 24px;
  bottom: calc(20px + var(--safe-bottom));
  margin: 0 auto;
  max-width: 760px;
  padding: 10px 14px 12px;
  border-radius: var(--r-glass);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: ohm-fade-in var(--dur-3) var(--ease-standard) both;
}
@media (min-width: 768px) {
  .v-replay { left: calc(var(--sidenav-w) + 4px); }
}
@media (min-width: 1100px) {
  body.v-panel-open .v-replay { right: 410px; }
}
@media (max-width: 767px) {
  .v-replay {
    left: 8px;
    right: 8px;
    bottom: calc(68px + 18px + var(--safe-bottom));
    padding: 8px 10px 10px;
  }
  body.v-panel-open .v-replay { display: none; }
}
.replay-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.replay-time { font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.replay-read { margin-left: auto; display: flex; gap: 12px; font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.replay-read b { font-weight: 900; }
.replay-read .row { gap: 5px; }
.replay-spark { position: relative; height: 34px; }
.replay-spark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.replay-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  touch-action: pan-y;
}
.replay-range::-webkit-slider-runnable-track { height: 6px; border-radius: 9999px; background: color-mix(in oklab, var(--color-brand-500) 22%, transparent); }
.replay-range::-moz-range-track { height: 6px; border-radius: 9999px; background: color-mix(in oklab, var(--color-brand-500) 22%, transparent); }
.replay-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 2px solid var(--color-brand-600); box-shadow: 0 2px 8px rgb(13 28 63 / 0.3); }
.replay-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--color-brand-600); }
.replay-controls { display: flex; align-items: center; gap: 8px; }
.replay-controls .seg > button { min-height: 32px; padding: 0 10px; font-size: 0.75rem; }
@media (max-width: 520px) {
  .replay-read .lbl { display: none; }
  .replay-top { flex-wrap: wrap; row-gap: 4px; }
  .replay-top [data-replay-close] { order: 2; margin-left: auto; }
  .replay-read { order: 3; width: 100%; margin-left: 0; }
}

/* Étiquettes et repères projetés */
.v-labels {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.v-label {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  pointer-events: auto;
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--color-fg);
}
.v-label[hidden] { display: none; }
.v-room {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgb(255 255 255 / 0.9);
  border: 1px solid rgb(255 255 255 / 0.95);
  box-shadow: 0 6px 16px -10px rgb(13 28 63 / 0.55);
}
.v-room small { font-weight: 600; margin-left: 4px; color: color-mix(in oklab, var(--color-fg) 62%, transparent); }
.v-room.is-selected { background: var(--color-brand-600); color: #fff; border-color: var(--color-brand-600); }
.v-room.is-selected small { color: rgb(255 255 255 / 0.85); }
.v-pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.95);
  border: 2px solid var(--c-muted);
  box-shadow: 0 6px 14px -8px rgb(13 28 63 / 0.6);
  color: var(--color-ink-700);
}
.v-pin .i { width: 14px; height: 14px; }
.v-pin.gas { border-color: var(--c-gas); }
.v-pin.elec { border-color: var(--c-elec); }
.v-pin.eau { border-color: var(--c-ecs); }
.v-pin.is-selected { transform: scale(1.18); background: var(--color-brand-600); border-color: #fff; color: #fff; }
.v-pin-name {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgb(255 255 255 / 0.95);
  box-shadow: 0 4px 10px -6px rgb(13 28 63 / 0.5);
  display: none;
}
.v-pin:hover .v-pin-name,
.v-pin:focus-visible .v-pin-name,
.v-pin.is-selected .v-pin-name { display: block; color: var(--color-fg); }
:root[data-theme='dark'] .v-room,
:root[data-theme='dark'] .v-pin,
:root[data-theme='dark'] .v-pin-name { background: rgb(23 27 54 / 0.92); border-color: rgb(255 255 255 / 0.14); }
:root[data-theme='dark'] .v-pin { border-color: var(--c-muted); color: var(--color-ink-700); }
:root[data-theme='dark'] .v-pin.gas { border-color: var(--c-gas); }
:root[data-theme='dark'] .v-pin.elec { border-color: var(--c-elec); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .v-room,
  :root:not([data-theme='light']) .v-pin,
  :root:not([data-theme='light']) .v-pin-name { background: rgb(23 27 54 / 0.92); border-color: rgb(255 255 255 / 0.14); }
  :root:not([data-theme='light']) .v-pin { border-color: var(--c-muted); }
  :root:not([data-theme='light']) .v-pin.gas { border-color: var(--c-gas); }
  :root:not([data-theme='light']) .v-pin.elec { border-color: var(--c-elec); }
}
.v-pin.is-selected,
:root .v-pin.is-selected { background: var(--color-brand-600); border-color: #fff; color: #fff; }

.v-loading {
  position: fixed;
  z-index: 15;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.875rem;
}
.v-badge-fallback { font-size: 0.75rem; }

/* Infobulle des graphiques */
.viz-tip {
  position: fixed;
  z-index: 70;
  left: 0;
  top: 0;
  max-width: 260px;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  pointer-events: none;
  color: var(--color-fg);
}
.viz-tip .tip-title { font-weight: 700; color: color-mix(in oklab, var(--color-fg) 70%, transparent); margin-bottom: 4px; }
.viz-tip .tip-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.viz-tip .tip-row b { font-weight: 900; font-size: 0.875rem; color: var(--color-fg); }
.viz-tip .tip-key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.viz-tip .tip-key.dot { width: 8px; height: 8px; border-radius: 50%; }

/* ─── Connexion ────────────────────────────────────────────────────────── */
.login-page { min-height: 100dvh; }
.login-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
}
.login-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.login-logo {
  position: relative;
  width: 160px;
  height: 160px;
  animation: ohm-pop-in 520ms var(--ease-emphasized) backwards;
}
.login-logo::before {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 197 82 / 0.45), rgb(71 113 209 / 0.18) 55%, transparent 72%);
  filter: blur(10px);
  animation: ohm-glow 4s ease-in-out infinite;
}
.login-logo img { position: relative; width: 100%; height: 100%; }
@keyframes ohm-glow { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.login-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--color-brand-700); }
.login-tag { font-size: 0.9375rem; color: color-mix(in oklab, var(--color-fg) 72%, transparent); }
.login-card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: var(--r-glass);
}
.login-step-title { font-size: 1.25rem; margin-bottom: 2px; }
.login-submit { width: 100%; }
.pw-wrap .input { padding-right: 52px; }
.pw-toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: color-mix(in oklab, var(--color-fg) 65%, transparent);
}
.pw-wrap > .i { z-index: 1; }
.otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.otp-box {
  width: 100%;
  min-width: 0;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--color-fg) 18%, transparent);
  background: var(--color-surface-2);
  color: var(--color-fg);
  caret-color: var(--color-brand-600);
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
.otp-box:focus { outline: none; border-color: var(--color-brand-500); box-shadow: 0 0 0 3px rgb(71 113 209 / 0.25); }
.otp-box[aria-invalid='true'] { border-color: var(--color-danger-600); }
.dev-code { justify-content: center; flex-wrap: wrap; white-space: normal; padding: 6px 12px; text-transform: none; }
.dev-code .btn { min-height: 28px; }
.login-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.login-foot { text-align: center; }
@media (max-width: 380px) {
  .otp { gap: 6px; }
  .otp-box { height: 50px; font-size: 1.3rem; }
  .login-card { padding: 18px; }
}

/* Divers 3D */
.dot-ok { background: var(--color-ok-700); }
.hud-chip[data-state='retry'] .dot,
.hud-chip[data-state='connecting'] .dot { background: var(--color-warn-700); }
.hud-chip[data-state='offline'] .dot,
.hud-chip[data-state='idle'] .dot { background: var(--color-danger-700); }
.heat-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--c-gas-wash); }
.heat-note .i { color: var(--c-gas); margin-top: 2px; }
.v-photo-missing { display: grid; place-items: center; color: color-mix(in oklab, var(--color-fg) 45%, transparent); }
@media (max-width: 520px) {
  .hud-chip .hud-state { display: none; }
  .hud-chip { padding: 6px 12px; gap: 6px; }
}

/* ─── Graphiques ───────────────────────────────────────────────────────── */
.viz { margin: 0; min-width: 0; }
.viz .card-head { flex-wrap: wrap; }
.viz-titles { min-width: 0; flex: 1 1 220px; }
.viz-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.viz-body { position: relative; min-height: 40px; }
.viz-svg { display: block; overflow: visible; font-family: var(--font-sans); }
.viz-svg .tick { font-size: 11px; font-weight: 600; fill: var(--viz-text-3); font-variant-numeric: tabular-nums; }
.viz-svg .tick.sub { font-weight: 700; fill: var(--viz-text-2); }
.viz-svg .tick.strong { fill: var(--viz-text-2); font-weight: 700; }
.viz-svg .axis-title { font-size: 11px; font-weight: 700; fill: var(--viz-text-2); }
.viz-svg .end-label { font-size: 12px; font-weight: 700; fill: var(--viz-text); }
.viz-svg .in-label { font-size: 12px; font-weight: 800; fill: #fff; pointer-events: none; }
.viz-svg .hit { outline: none; }
.viz-svg .hit:focus-visible { outline: none; stroke: var(--color-brand-600); stroke-width: 2; }
.viz-svg path[tabindex]:focus-visible { outline: none; stroke: var(--viz-text); stroke-width: 2; }
.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: -4px 0 10px;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--viz-text-2);
}
.viz-legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; flex: none; background: var(--sw); }
.sw.rect { width: 12px; height: 12px; border-radius: 3px; }
.sw.line { width: 16px; height: 3px; border-radius: 2px; }
.sw.dot { width: 9px; height: 9px; border-radius: 50%; }
.viz-note { margin-top: 8px; font-size: 0.75rem; color: color-mix(in oklab, var(--color-fg) 65%, transparent); }
.viz-table .tbl-wrap { max-height: 420px; overflow: auto; }
.viz-table thead th { position: sticky; top: 0; background: var(--viz-surface); }
.heat-wrap { position: relative; }
.heat-wrap canvas { display: block; touch-action: pan-y; }
.heat-scale { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.heat-scale .grad { flex: 0 1 220px; height: 8px; border-radius: 9999px; }

/* ─── Analyse énergétique ──────────────────────────────────────────────── */
.energy .cov { font-size: 0.8125rem; color: color-mix(in oklab, var(--color-fg) 75%, transparent); max-width: 80ch; }
.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.insights li { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: color-mix(in oklab, var(--color-fg) 4%, transparent); }
.insights li .chip { align-self: flex-start; }
.dpe-badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.9375rem;
  color: #0d1c3f;
  background: var(--dpe-d);
}
.dpe-badge.lg { min-width: 36px; height: 36px; font-size: 1.25rem; border-radius: 10px; }
.dpe-badge[data-l="A"] { background: var(--dpe-a); color: #fff; }
.dpe-badge[data-l="B"] { background: var(--dpe-b); }
.dpe-badge[data-l="C"] { background: var(--dpe-c); }
.dpe-badge[data-l="D"] { background: var(--dpe-d); }
.dpe-badge[data-l="E"] { background: var(--dpe-e); }
.dpe-badge[data-l="F"] { background: var(--dpe-f); }
.dpe-badge[data-l="G"] { background: var(--dpe-g); color: #fff; }
.kpi-value.row { gap: 10px; }
.dpe-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.dpe-rows { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.dpe-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 8px; min-height: 30px; }
.dpe-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px 13px 13px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0d1c3f;
  background: var(--dpe-d);
}
.dpe-bar b { font-weight: 900; font-size: 0.9375rem; }
.dpe-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dpe-bar[data-w="0"] { width: 46%; }
.dpe-bar[data-w="1"] { width: 55%; }
.dpe-bar[data-w="2"] { width: 64%; }
.dpe-bar[data-w="3"] { width: 73%; }
.dpe-bar[data-w="4"] { width: 82%; }
.dpe-bar[data-w="5"] { width: 91%; }
.dpe-bar[data-w="6"] { width: 100%; }
.dpe-bar[data-l="A"] { background: var(--dpe-a); color: #fff; }
.dpe-bar[data-l="B"] { background: var(--dpe-b); }
.dpe-bar[data-l="C"] { background: var(--dpe-c); }
.dpe-bar[data-l="D"] { background: var(--dpe-d); }
.dpe-bar[data-l="E"] { background: var(--dpe-e); }
.dpe-bar[data-l="F"] { background: var(--dpe-f); }
.dpe-bar[data-l="G"] { background: var(--dpe-g); color: #fff; }
.dpe-bar.ges[data-l="A"] { background: var(--ges-a); color: #0d1c3f; }
.dpe-bar.ges[data-l="B"] { background: var(--ges-b); }
.dpe-bar.ges[data-l="C"] { background: var(--ges-c); }
.dpe-bar.ges[data-l="D"] { background: var(--ges-d); }
.dpe-bar.ges[data-l="E"] { background: var(--ges-e); color: #fff; }
.dpe-bar.ges[data-l="F"] { background: var(--ges-f); color: #fff; }
.dpe-bar.ges[data-l="G"] { background: var(--ges-g); color: #fff; }
.dpe-marks { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-left: 8px; }
.dpe-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  max-width: 100%;
  padding: 3px 9px 3px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-fg);
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-fg);
  white-space: nowrap;
}
.dpe-mark .i { width: 13px; height: 13px; }
.dpe-mark b { font-weight: 900; }
.dpe-mark::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  border: 5px solid transparent;
  border-right-color: var(--color-fg);
  transform: translate(-50%, -50%);
}
.dpe-mark.real { background: var(--color-fg); color: var(--color-surface-2); }
.dpe-mark.conv { border-style: dashed; }
.dpe-summary { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.dpe-summary .stat-pair b { display: flex; align-items: center; gap: 6px; }
.sig-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 12px; }
.sig-stats > div { padding: 10px 12px; border-radius: 14px; background: color-mix(in oklab, var(--color-fg) 4%, transparent); }
.sig-stats b { display: block; font-size: 1.0625rem; font-weight: 900; color: var(--color-brand-700); }
.sig-stats span { font-size: 0.75rem; color: color-mix(in oklab, var(--color-fg) 68%, transparent); }
.sig-read { margin-top: 10px; }
.decomp-list { list-style: none; margin: 12px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; }
.decomp-list li { display: flex; align-items: center; gap: 10px; }
.decomp-list .grow { flex: 1; min-width: 0; font-weight: 600; }
.decomp-list small { display: block; font-weight: 500; font-size: 0.75rem; color: color-mix(in oklab, var(--color-fg) 62%, transparent); }
.hero-figure { font-size: 3rem; font-weight: 900; line-height: 1; letter-spacing: -0.03em; color: var(--color-brand-700); margin: 4px 0 6px; }
.hero-figure small { font-size: 1.125rem; font-weight: 700; color: color-mix(in oklab, var(--color-fg) 65%, transparent); }
.talon, .hphc { display: flex; flex-direction: column; gap: 4px; }
.hphc { margin-top: 12px; gap: 8px; }
.talon + .rule { margin-top: 14px; }
.meter { height: 12px; border-radius: 9999px; background: color-mix(in oklab, var(--c-elec) 22%, transparent); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--c-elec); }
.tbl.scen th[scope="row"] { font-weight: 500; min-width: 220px; }
.params-card { padding: 0; }
.params-card > summary { padding: 16px 20px; flex-wrap: wrap; }
.params-card > summary > .xs { flex-basis: 100%; order: 3; padding-left: 26px; font-weight: 500; }
.params-form { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.params-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.method .acc { background: color-mix(in oklab, var(--color-surface-2) 70%, transparent); }
.method .section-title { margin-bottom: 8px; }

/* Relecture : coût */
.replay-cost { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.replay-cost p { overflow: hidden; text-overflow: ellipsis; }
.replay-spark.cost { height: 22px; }
.replay-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 520px) {
  .replay-cost [data-c-split] { display: none; }
}

.tbl tbody th { text-transform: none; letter-spacing: 0; font-size: 0.8125rem; font-weight: 600; color: var(--color-fg); white-space: normal; }

/* ─── Filtres (équipements, documents) ─────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-glass);
}
.filters .eq-search { flex: 1 1 260px; min-width: 0; }
.filters .chip-row { flex-basis: 100%; display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters .chip-row::-webkit-scrollbar { display: none; }
.filters .chip-row .chip-filter { flex: none; }
.filters .seg { flex: none; }
.filters .seg .dot { width: 7px; height: 7px; }
@media (max-width: 520px) {
  .filters [data-add] span { display: none; }
  .filters [data-add] { width: 44px; padding: 0; }
  .filters .seg { order: 3; width: 100%; }
  .filters .seg > button { flex: 1; padding: 0 8px; }
}

/* ─── Équipements ──────────────────────────────────────────────────────── */
.eq-group { display: flex; flex-direction: column; gap: 8px; }
.eq-group .section-title .chip { margin-left: 4px; }
.eq-list { list-style: none; margin: 0; padding: 4px; border-radius: var(--r-glass); }
.eq-list li + li { border-top: 1px solid color-mix(in oklab, var(--color-fg) 8%, transparent); }
.eq-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  text-align: left;
  transition: background-color var(--dur-1) var(--ease-standard);
}
.eq-row:hover { background: color-mix(in oklab, var(--color-brand-500) 8%, transparent); }
.eq-ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  color: var(--color-brand-700);
  background: var(--color-brand-100);
}
.eq-ic.gas { color: var(--color-fg); background: var(--c-gas-wash); }
.eq-ic.elec { color: var(--color-fg); background: var(--c-elec-wash); }
.eq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eq-name { font-weight: 700; font-size: 0.9375rem; }
.eq-sub { font-size: 0.8125rem; color: color-mix(in oklab, var(--color-fg) 68%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.eq-chev { color: color-mix(in oklab, var(--color-fg) 45%, transparent); }
.eq-actions { width: 100%; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.eq-fs { border: 0; margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.eq-fs legend { padding: 0; float: left; width: 100%; margin-bottom: 4px; }
fieldset.eq-fs:not(.section-f) { padding: 0; }
.doc-checks { display: grid; gap: 4px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); max-height: 220px; overflow-y: auto; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border-radius: 10px; font-size: 0.875rem; }
.check:hover { background: color-mix(in oklab, var(--color-fg) 5%, transparent); }
.check input { width: 18px; height: 18px; accent-color: var(--color-brand-600); flex: none; }
.eq-maint { padding: 12px 14px; }

/* ─── Documents ────────────────────────────────────────────────────────── */
.doc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.doc-grid.photos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-glass);
  transition: box-shadow var(--dur-2) var(--ease-standard), transform var(--dur-2) var(--ease-standard);
}
.doc-card.is-drop { box-shadow: 0 0 0 3px var(--color-brand-500); transform: scale(1.01); }
.doc-drop-hint { display: none; position: absolute; inset: 0; place-items: center; border-radius: inherit; font-weight: 700; color: var(--color-brand-700); background: color-mix(in oklab, var(--color-brand-100) 85%, transparent); pointer-events: none; }
.doc-card.is-drop .doc-drop-hint { display: grid; }
.doc-head { display: flex; gap: 12px; align-items: flex-start; }
.doc-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; color: var(--color-brand-700); background: var(--color-brand-100); }
.doc-titles { min-width: 0; }
.doc-titles h3 { font-size: 0.9375rem; line-height: 1.3; }
.doc-sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: color-mix(in oklab, var(--color-fg) 80%, transparent); }
.doc-facts { font-size: 0.75rem; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.doc-thumb {
  display: grid;
  place-items: center;
  gap: 4px;
  aspect-ratio: 4 / 3;
  margin: -16px -16px 0;
  border: 0;
  border-radius: var(--r-glass) var(--r-glass) 0 0;
  overflow: hidden;
  color: color-mix(in oklab, var(--color-fg) 50%, transparent);
  background: color-mix(in oklab, var(--color-fg) 6%, transparent);
}
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-progress { margin-top: 4px; }
.doc-frame { width: 100%; height: min(70dvh, 760px); border: 0; border-radius: 14px; background: #fff; }
.doc-img { display: block; max-width: 100%; max-height: 70dvh; margin: 0 auto; border-radius: 14px; }
.facts-edit { display: flex; flex-direction: column; gap: 8px; }
.fact-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 44px; gap: 8px; }
@media (max-width: 520px) {
  .fact-row { grid-template-columns: 1fr 44px; }
  .fact-row input:first-child { grid-column: 1 / -1; }
}

/* ─── Logement ─────────────────────────────────────────────────────────── */
.ident-title { font-size: 1.375rem; margin: 2px 0 4px; }
.lots-title { margin: 14px 0 6px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: color-mix(in oklab, var(--color-fg) 12%, transparent); }
.timeline li { position: relative; display: flex; gap: 14px; }
.tl-dot { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; flex: none; border: 2px solid var(--color-surface-2); }
.tl-dot.chip-ok { background: var(--color-ok-700); }
.tl-dot.chip-warn { background: var(--color-warn-700); }
.tl-dot.chip-danger { background: var(--color-danger-700); }
.tl-body { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.rooms-tbl tfoot th, .rooms-tbl tfoot td { border-top: 1px solid color-mix(in oklab, var(--color-fg) 15%, transparent); border-bottom: 0; }
.risks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.risks li { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px; border-radius: 14px; background: color-mix(in oklab, var(--color-fg) 4%, transparent); }

/* ─── Import ───────────────────────────────────────────────────────────── */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 28px 20px;
  text-align: center;
  border-radius: var(--r-glass);
  border: 2px dashed color-mix(in oklab, var(--color-brand-500) 55%, transparent) !important;
  cursor: pointer;
  transition: background-color var(--dur-2), transform var(--dur-2) var(--ease-emphasized), border-color var(--dur-2);
}
.dropzone:hover,
.dropzone.is-over { background: color-mix(in oklab, var(--color-brand-100) 80%, transparent); border-color: var(--color-brand-500) !important; }
.dropzone.is-over { transform: scale(1.01); }
.dropzone:focus-within { outline: 2px solid var(--color-brand-600); outline-offset: 2px; }
.dz-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: var(--color-brand-700); background: var(--color-brand-100); }
.dz-title { font-size: 1.125rem; font-weight: 800; }
.dz-link { color: var(--color-brand-700); font-weight: 700; text-decoration: underline; }
.imp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.imp-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 14px; background: color-mix(in oklab, var(--color-fg) 4%, transparent); }
.imp-list .grow { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; }
.imp-ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; color: var(--color-brand-700); background: var(--color-brand-100); }
.imp-progress { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.imp-actions { margin: 12px 0 6px; }
.help-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.help-list li { display: flex; gap: 10px; align-items: flex-start; }
.help-list .i { color: var(--color-brand-700); margin-top: 2px; }

/* ─── Simulation thermique (jumeau 3D) ─────────────────────────────────── */
.v-thermal {
  left: calc(var(--sidenav-w) + 4px);
  top: calc(var(--header-h) + 88px);
  width: 340px;
  max-height: calc(100dvh - var(--header-h) - 110px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--r-glass);
  animation: ohm-pop-in 260ms var(--ease-emphasized) backwards;
}
.th-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px 10px 16px;
  background: color-mix(in oklab, var(--color-surface-2) 82%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--color-fg) 9%, transparent);
}
.th-head h2 { font-size: 1.0625rem; }
.th-head .grow { flex: 1; min-width: 0; }
.th-head .v-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; flex: none; color: var(--color-fg); background: var(--c-gas-wash); }
.th-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.th-view { align-self: stretch; }
.th-view > button { flex: 1; }
.th-ctl { display: flex; flex-direction: column; gap: 4px; }
.th-val { font-size: 1.125rem; font-weight: 900; color: var(--color-brand-700); }
.th-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  touch-action: pan-y;
}
.th-range::-webkit-slider-runnable-track { height: 6px; border-radius: 9999px; background: color-mix(in oklab, var(--color-brand-500) 22%, transparent); }
.th-range::-moz-range-track { height: 6px; border-radius: 9999px; background: color-mix(in oklab, var(--color-brand-500) 22%, transparent); }
.th-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 2px solid var(--color-brand-600); box-shadow: 0 2px 8px rgb(13 28 63 / 0.3); }
.th-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--color-brand-600); }
.th-presets { gap: 6px; }
.th-presets .chip-filter { min-height: 36px; padding: 0 10px; font-size: 0.75rem; }
.th-date .input { min-height: 36px; padding: 4px 10px; width: 150px; }
.th-results .stat-pair b { font-size: 1.25rem; }
.th-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.th-cold button { min-height: 40px; }
.th-sw { width: 14px; height: 14px; border-radius: 4px; flex: none; background: var(--c-muted); }
.th-flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.th-flags li { display: flex; gap: 8px; align-items: flex-start; }
.th-flags .chip { padding: 2px 6px; }
.th-flags:empty { display: none; }
.th-legend { display: flex; flex-direction: column; gap: 6px; }
.th-grad { height: 10px; border-radius: 9999px; }
.th-ticks { justify-content: space-between; }
.th-chips .chip { white-space: normal; }
.th-dpe { gap: 4px; }
.dpe-badge.sm { min-width: 20px; height: 20px; font-size: 0.75rem; border-radius: 6px; padding: 0 4px; }
.dpe-badge.ges[data-l="A"] { background: var(--ges-a); color: #0d1c3f; }
.dpe-badge.ges[data-l="B"] { background: var(--ges-b); color: #0d1c3f; }
.dpe-badge.ges[data-l="C"] { background: var(--ges-c); color: #0d1c3f; }
.dpe-badge.ges[data-l="D"] { background: var(--ges-d); color: #0d1c3f; }
.dpe-badge.ges[data-l="E"] { background: var(--ges-e); color: #fff; }
.dpe-badge.ges[data-l="F"] { background: var(--ges-f); color: #fff; }
.dpe-badge.ges[data-l="G"] { background: var(--ges-g); color: #fff; }
body.v-thermal-open .v-replay { display: none; }
.v-label .v-temp { margin-left: 6px; font-weight: 900; color: var(--color-brand-700); }
.v-label .v-temp[data-level="cold"] { color: var(--color-info-700); }
.v-label .v-temp[data-level="hot"] { color: var(--color-danger-700); }
.v-room.is-selected .v-temp { color: #fff; }
@media (max-width: 767px) {
  .v-thermal {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: calc(68px + 18px + var(--safe-bottom));
    width: auto;
    max-height: 42dvh;
    border-radius: var(--r-xl);
    animation: ohm-sheet-in 420ms var(--ease-emphasized) backwards;
  }
  .v-thermal .v-grip { display: flex; justify-content: center; padding: 6px 0 0; }
  .th-head { padding-top: 8px; }
  body.v-panel-open .v-thermal { display: none; }
}

/* DPE (logement, documents, équipements) */
.dpe-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.dpe-line .dpe-badge { min-width: 30px; height: 30px; }
.dpe-line .btn { min-height: 36px; }
.v-tools .btn[aria-pressed="true"] { background: var(--color-brand-100); color: var(--color-brand-700); border-color: color-mix(in oklab, var(--color-brand-500) 60%, transparent); }
