.analysis-theme-enabled {
  --analysis-bg: #071217;
  --analysis-bg-accent: #10252a;
  --analysis-panel: #0b1a20;
  --analysis-panel-raised: #12252c;
  --analysis-control: #0a1b21;
  --analysis-border: rgba(139,179,187,.15);
  --analysis-rule: rgba(145,184,192,.11);
  --analysis-title: #f2f7f7;
  --analysis-text: #bbcbcf;
  --analysis-muted: #8fa8af;
  --analysis-tooltip: #07171e;
  --analysis-grid: rgba(154,190,197,.11);
  --analysis-axis: #9fb2b8;
  --analysis-zero: rgba(238,246,245,.55);
  --analysis-secondary: #487a92;
  --analysis-shadow: 0 15px 38px rgba(0,0,0,.18);
  --analysis-accent: #ff6720;
  --analysis-cool: #62a7c8;
  color-scheme: dark;
}

.analysis-theme-enabled:not(.darkviz-page) {
  --analysis-bg: #f7f5f0;
  --analysis-bg-accent: #f7f5f0;
  --analysis-panel: #ffffff;
  --analysis-panel-raised: #ffffff;
  --analysis-control: #f3f3ef;
  --analysis-border: #dfe2df;
  --analysis-rule: #e7e9e6;
  --analysis-title: #173245;
  --analysis-text: #526c7a;
  --analysis-muted: #738791;
  --analysis-tooltip: #173541;
  --analysis-grid: rgba(80,108,122,.13);
  --analysis-axis: #667f8a;
  --analysis-zero: rgba(23,50,69,.5);
  --analysis-secondary: #6f96a8;
  --analysis-shadow: 0 18px 55px rgba(22,50,67,.075);
  color-scheme: light;
}

.analysis-theme-switch {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:39px;
  padding:9px 13px;
  border:1px solid var(--analysis-border);
  border-radius:9px;
  background:var(--analysis-control);
  color:var(--analysis-title);
  cursor:pointer;
  font:inherit;
  font-size:.7rem;
  font-weight:900;
  white-space:nowrap;
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
}
.analysis-theme-switch:hover { border-color:var(--analysis-accent); transform:translateY(-1px); }
.analysis-theme-switch [data-theme-icon] { color:var(--analysis-accent); font-size:1rem; line-height:1; }

.normal-header-actions { display:flex; align-items:center; gap:9px; }

.normal-page.analysis-theme-enabled:not(.darkviz-page) {
  color:var(--analysis-text);
  background:var(--analysis-bg);
}
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-header h1,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-panel h2,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-metric strong,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-records-list strong { color:var(--analysis-title); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-header .lightviz-station-line p { color:var(--analysis-muted); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-back { border-color:var(--analysis-border); color:#355666; background:rgba(255,255,255,.58); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-back:hover { border-color:var(--analysis-accent); color:#d85d2a; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-metric,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-panel { border-color:var(--analysis-border); background:var(--analysis-panel); box-shadow:var(--analysis-shadow); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-metric>span { color:#607582; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-metric small,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-metric em,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-reference,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-chart-note,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-daily-panel>p { color:var(--analysis-muted); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-switch,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-month-choices button { border-color:var(--analysis-border); background:var(--analysis-control); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-switch button,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-month-choices button { color:#607987; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-switch button.is-active { color:#fff; background:var(--analysis-accent); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-month-choices button.is-active { border-color:var(--analysis-accent); color:#d85d2a; background:#fff3ec; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-table-wrap th { color:#708591; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-table-wrap td { border-color:var(--analysis-rule); color:var(--analysis-text); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-table-wrap th:first-child,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-table-wrap td:first-child { color:#1f4053; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-history-panel>p { color:#425d6d; background:#fff5ef; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-records-list article { border-color:var(--analysis-rule); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-records-list p,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-records-list small,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-records-empty { color:var(--analysis-muted); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-presets { border-color:var(--analysis-rule); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-presets>span,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-dates label,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .analysis-season-controls label { color:var(--analysis-muted); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-presets button,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-dates input,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .analysis-season-controls select,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-navigation>button { border-color:var(--analysis-border); background:var(--analysis-control); color:#526c7a; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-presets button:hover,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-navigation>button:hover:not(:disabled) { border-color:rgba(255,103,32,.55); color:#173245; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-presets button.is-active { border-color:var(--analysis-accent); color:#fff; background:linear-gradient(135deg,#e85e24,#f27a42); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-dates>button { border-color:rgba(52,140,130,.28); color:#287c73; background:#eef8f5; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-dates>button:hover { color:#fff; background:#348c82; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .dual-range-track { background:#dce2df; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .dual-range input[type="range"]::-webkit-slider-thumb { border-color:#fff; box-shadow:0 0 0 2px rgba(255,103,32,.25),0 4px 12px rgba(22,50,67,.2); }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .dual-range input[type="range"]::-moz-range-thumb { border-color:#fff; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-scale { color:#607987; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-range-scale small,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-history-extent,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .variable-date-hint { color:#78909a; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #normalResults button { background:#f5f6f3; color:#294b5c; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #normalResults button strong { color:#173245; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #normalResults button small,
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #normalResults>span { color:#718894; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #normalResults button.is-selected { border-color:var(--analysis-accent); background:#fff5ef; }
.normal-page.analysis-theme-enabled:not(.darkviz-page) #analysisStationPickerMap { background:#e8efed; }

/* Chaleur d'été — composants propres à cette analyse. */
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-metric--combined { background:linear-gradient(145deg,#fff4eb,#fff); }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-season-summary,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-ranking-panel>p { color:#425d6d; background:#fff5ef; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-season-summary strong { color:var(--analysis-title); }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-calendar-detail { border-color:var(--analysis-border); background:var(--analysis-control); color:var(--analysis-text); }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-calendar-detail strong,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-calendar h3,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-episodes strong { color:var(--analysis-title); }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-calendar-legend,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-weekdays,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-episodes p,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-episodes em,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-empty { color:var(--analysis-muted); }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day { border-color:#dfe5e2; background:#f2f4f1; color:#607987; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day:hover,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-selected { border-color:#173245; color:#173245; box-shadow:0 0 0 1px #173245; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-warm { border-color:#c89a31; background:#fff5d7; color:#7b5b13; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-day { border-color:#e78351; background:#fff0e7; color:#9b431b; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-night { border-color:#6b9fb9; background:#eaf5fa; color:#315f76; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-combined,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-episode { color:#fff; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-combined { border-color:#a44327; background:#9f3d24; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-episode { border-color:#d6362a; background:#e34636; box-shadow:0 0 8px rgba(227,70,54,.2); }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-combined:hover,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-combined.is-selected,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-episode:hover,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-episode.is-selected { border-color:#fff; color:#fff; box-shadow:0 0 0 1px #a43b25; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-very_hot { border-color:#e2642d; background:#ffe9dd; color:#9d3e18; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-day.is-missing { color:#80939a; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-episodes article { border-color:var(--analysis-rule); }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-metric-switch button { border-color:var(--analysis-border); background:var(--analysis-control); color:#607987; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-metric-switch button:hover { border-color:rgba(255,103,32,.55); color:var(--analysis-title); }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .heatwave-metric-switch button.is-active { border-color:var(--analysis-accent); background:#fff2ea; color:#c94e18; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .variable-social-actions button { border-color:rgba(52,140,130,.35); background:#eef8f5; color:#287c73; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .variable-social-actions button:hover { background:#348c82; color:#fff; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #heatwaveResults button { background:#f5f6f3; color:#294b5c; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #heatwaveResults button strong { color:#173245; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #heatwaveResults button small,
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #heatwaveResults>span { color:#718894; }
.heatwave-page.analysis-theme-enabled:not(.darkviz-page) .normal-side #heatwaveResults button.is-selected { border-color:var(--analysis-accent); background:#fff5ef; }

@media(max-width:680px) {
  .normal-header-actions { width:100%; }
  .normal-header-actions .normal-back,
  .normal-header-actions .analysis-theme-switch { flex:1; box-sizing:border-box; text-align:center; }
}
