/* Ajouts pour /gauge/ — base = app.css (interface claire) */

.gauge-panel {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1rem 1.35rem;
  align-items: start;
  margin: 0.35rem 0 0.15rem;
}

.gauge-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 280px;
}

.gauge-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Chiffres SOUS la jauge (pas superposés) */
.gauge-center {
  position: static;
  transform: none;
  text-align: center;
  margin-top: -0.35rem;
  pointer-events: none;
}

.gauge-value {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.2rem, 4.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--ink);
}

.gauge-unit {
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.kwh-block > .delta-row {
  margin-top: 0.85rem;
}

/* Plus = rouge (consommation ↑), moins = vert (consommation ↓) */
.kwh-block > .delta-row .delta.up b {
  color: #c62828;
}
.kwh-block > .delta-row .delta.down b {
  color: #0f7a5f;
}
.kwh-block > .delta-row .delta.neutral b {
  color: var(--ink);
}

.gauge-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-top: 0.35rem;
}

.stat-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0;
}

.stat-chip {
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
}

.stat-chip .lbl {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.stat-chip .val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.stat-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.stat-chip .dot.accent { background: var(--accent); }
.stat-chip .dot.heat { background: var(--accent-2); }
.stat-chip .dot.cool { background: #2a8f9e; }

.stat-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.chart-wrap-tall {
  margin-top: 1.2rem;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.chart-wrap-tall h3 {
  margin: 0;
}

.chart-legend {
  display: flex;
  gap: 0.9rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.chart-legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 0.25rem;
}
.chart-legend i.scen { background: var(--accent); }
.chart-legend i.ref {
  background: transparent;
  border-top: 2px dashed rgba(26, 36, 32, 0.35);
  height: 0;
}

.chart-canvas-wrap {
  width: 100%;
  height: 220px;
}

.chart-canvas-wrap canvas,
canvas#dayChart {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 700px) {
  .gauge-panel {
    grid-template-columns: 1fr;
  }
  .gauge-hero {
    max-width: 260px;
  }
  .stat-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .stat-chip {
    flex: 1 1 120px;
  }
}
