* { box-sizing: border-box; }
:root {
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #1f2d3d;
  background: #f4f6f9;
}
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.top-banner { background: #1f2d3d; border-bottom: 1px solid #111a24; }
.brand { display: flex; align-items: center; gap: 1rem; max-width: 1140px; margin: auto; padding: .5rem 1rem; }
.brand img { height: 52px; width: auto; }
.brand-main { color: #fff; font-weight: 800; }
.brand-sub { color: #cbd5df; font-size: .875rem; }
nav { background: #fff; border-bottom: 1px solid #dee2e6; }
.home-link {
  display: inline-flex;
  padding: .45rem .7rem;
  border: 1px solid #c5ccd3;
  border-radius: 6px;
  background: #fff;
  color: #1f2d3d;
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  text-decoration: none;
  cursor: pointer;
}
.home-link:hover { background: #f1f4f7; border-color: #aeb7c1; }
:focus-visible { outline: 3px solid #2866a2; outline-offset: 3px; }
.content { flex: 1; width: 100%; max-width: 1440px; margin: auto; padding: 1rem; }
.card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(10, 34, 66, .06);
  overflow: hidden;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #dee2e6;
  padding: .85rem 1.1rem;
}
.card-body { padding: 1rem; }
h1, h2, p { margin: 0; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.2rem; }
.muted { color: #4e5d6b; }
.intro { margin: 0 0 .85rem; }
.choix-station { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-bottom: 1rem; }
.choix-station[hidden] { display: none; }
.choix-station select {
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #c5ccd3;
  border-radius: 6px;
  padding: .4rem;
  max-width: 100%;
}
.station-map {
  height: clamp(350px, 65vh, 850px);
  border: 1px solid #d8e1ea;
  border-radius: 6px;
}
.map-legend { margin-bottom: .85rem; }
.map-legend ul {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  padding: 0;
  margin: .45rem 0;
}
.map-legend > span { color: #4e5d6b; font-size: .9rem; }
.map-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .16rem .55rem;
  border-radius: 999px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cumul-1 { background: #d4eaf6; color: #173e59; }
.cumul-2 { background: #b7e0ce; color: #123d32; }
.cumul-3 { background: #f4db83; color: #493300; }
.cumul-4 { background: #f4a356; color: #462100; }
.cumul-5 { background: #ba4625; color: #fff; }
.seuil-g1 { background: #85142c; color: #fff; }
.sans-cumul { background: #e2e6eb; color: #344250; }
.station-map .station-marker {
  display: flex;
  padding: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px #1f2d3d;
  font-family: inherit;
  font-size: 15px;
  white-space: nowrap;
}
.station-marker.seuil-g1 { font-size: 17px; font-weight: 800; }
.station-marker:focus-visible { z-index: 1000 !important; }
.station-header { margin: .15rem 0 .9rem; }
.station-header p { margin-top: .25rem; }
.notice {
  margin-bottom: 1rem;
  padding: .85rem 1.1rem;
  border: 1px solid #d8e1ea;
  border-left: 5px solid #597896;
  border-radius: 8px;
  background: #f8fbfd;
}
.notice strong { font-size: 1.18rem; }
.notice p { margin-top: .25rem; }
.warning { border-color: #e0af6e; border-left-color: #9c3f16; background: #fff5df; color: #652f13; }
.success { border-color: #add2bf; border-left-color: #176957; background: #edf8f2; color: #155443; }
.chart-shell { position: relative; height: clamp(320px, 57vh, 570px); }
.chart-legend { display: flex; flex-wrap: wrap; gap: .45rem 1.25rem; margin-bottom: .75rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.chart-legend span::before { content: ""; width: 1.35rem; border-top: 3px solid #176957; }
.chart-legend span + span::before { border-top: 2px dashed #9c3f16; }
footer { padding: 1rem; background: #fff; border-top: 1px solid #dee2e6; color: #4e5d6b; }
@media (max-width: 560px) {
  .content { padding: .75rem; }
  .card-body, .card-header { padding: .75rem; }
  .choix-station select { flex: 1; min-width: 0; }
}
