/* meteo79niort.fr
   VOIX : un carnet d'observations tenu proprement. Sobre, précis, aéré.
   IDÉE : le thermogramme (papier millimétré, trace à l'encre violette) en ouverture.
   COULEUR : gris-bleu brume du Marais (fond assez soutenu pour détacher les cadres), papier blanc, encre ardoise ; un seul accent, le violet d'encre.
            Couleurs de données et de vigilance désaturées, jamais criardes.
   TYPE : Archivo variable, chiffres tabulaires ; grands chiffres en graisse légère.
   MISE EN PAGE : grille 12 colonnes, cadres blancs à filet fin, alignés à gauche. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --fond: #e4e9ea;
  --ombre: 0 1px 2px rgba(31, 43, 48, 0.05), 0 3px 12px rgba(31, 43, 48, 0.05);
  --papier: #ffffff;
  --papier-2: #f7f9f8;
  --filet: #e1e6e4;
  --filet-2: #ccd4d1;
  --encre: #1f2b30;
  --encre-2: #5b686e;
  --encre-3: #8c979b;
  --violet: #5b4b9a;
  --violet-pale: #efedf7;

  --c-temp: #b8553f;
  --c-dew: #3c6fa6;
  --c-hum: #3d8586;
  --c-press: #5b4b9a;
  --c-wind: #3c6fa6;
  --c-gust: #b07a33;
  --c-rain: #4374ad;
  --c-solar: #a8862e;

  /* Vigilance : teintes franches, proches de la carte officielle, sans être fluo */
  --v1: #4ea852;
  --v2: #f2cb1d;
  --v3: #ee8a1f;
  --v4: #d2342c;
  --v2-pale: #fbf6e1;
  --v3-pale: #fcefe3;
  --v4-pale: #f9e5e3;

  --r: 14px;
  --r-s: 9px;
  --gap: clamp(14px, 2vw, 22px);
  --page: 1180px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--violet); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
  border-radius: 6px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête ---------- */
.site-head { background: var(--papier); border-bottom: 1px solid var(--filet); }
.site-head .inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  color: var(--encre);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 11px;
  line-height: 1.15;
}
.brand svg { flex: none; }
.brand span { display: grid; }
.brand b { font-weight: 700; font-stretch: 108%; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand small { font-weight: 400; color: var(--encre-2); font-size: 0.82rem; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; align-self: stretch; }
.nav a {
  color: var(--encre-2);
  text-decoration: none;
  padding: 0 12px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.nav a:hover { color: var(--encre); }
.nav a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--violet); font-weight: 600; }

/* Bandeau de vigilance (Deux-Sèvres) : discret, coloré par une pastille */
.vigi-band { display: none; }
.vigi-band.on { display: block; border-bottom: 1px solid var(--filet); }
.vigi-band a {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: var(--page);
  margin: 0 auto;
  padding: 10px var(--gap);
  color: var(--encre);
  text-decoration: none;
  font-size: 0.95rem;
}
.vigi-band a strong { font-weight: 600; }
.vigi-band a span.go { margin-left: auto; color: var(--violet); white-space: nowrap; }
.vigi-band a:hover span.go { text-decoration: underline; }
.vigi-band .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
.vigi-band.c2 { background: var(--v2-pale); } .vigi-band.c2 .dot { background: var(--v2); }
.vigi-band.c3 { background: var(--v3-pale); } .vigi-band.c3 .dot { background: var(--v3); }
.vigi-band.c4 { background: var(--v4-pale); } .vigi-band.c4 .dot { background: var(--v4); }

.demo-band { background: var(--violet-pale); color: var(--violet); text-align: center; padding: 6px 12px; font-size: 0.85rem; border-bottom: 1px solid #e0dcef; }

main {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(20px, 3.2vw, 36px) var(--gap) 56px;
}

h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 650; font-stretch: 106%; letter-spacing: -0.02em; }
h2 { font-size: 1.08rem; font-weight: 650; font-stretch: 104%; letter-spacing: -0.005em; }
h3 { font-size: 1rem; font-weight: 650; }
.lede { color: var(--encre-2); margin: 6px 0 0; max-width: 64ch; }
.muted { color: var(--encre-2); }
.small { font-size: 0.875rem; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.panel {
  background: var(--papier);
  border: 1px solid var(--filet);
  border-radius: var(--r);
  padding: clamp(18px, 2.2vw, 26px);
}
.panel, .releve, .inst, .days { box-shadow: var(--ombre); }
.panel + .panel { margin-top: var(--gap); }
.charts > .panel, .stat-grid > .panel, .vigi-layout > .panel { margin-top: 0; }
.stat-grid + .panel, .stat-grid + .charts, .charts + .panel { margin-top: var(--gap); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* ---------- Accueil : relevé ---------- */
.releve {
  display: grid;
  grid-template-columns: minmax(290px, 5fr) 7fr;
  background: var(--papier);
  border: 1px solid var(--filet);
  border-radius: var(--r);
  overflow: hidden;
}
.releve-main { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; }
.releve-when { color: var(--encre-2); font-size: 0.93rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.releve-when::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--v1); flex: none; }
.releve-when.stale::before { background: var(--v3); }
.releve-when strong { color: var(--encre); font-weight: 600; }
.temp-big {
  font-size: clamp(5rem, 11vw, 8.6rem);
  font-weight: 300;
  font-stretch: 104%;
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin: 22px 0 8px;
  white-space: nowrap;
}
.temp-big .u { font-size: 0.32em; font-weight: 400; letter-spacing: 0; vertical-align: 1.15em; margin-left: 0.1em; color: var(--encre-2); }
.feels { font-size: 1rem; color: var(--encre-2); margin: 0; min-height: 1.5em; }
.minmax { display: flex; gap: 0; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--filet); }
.minmax div { display: grid; flex: 1; }
.minmax div + div { padding-left: 18px; border-left: 1px solid var(--filet); }
.minmax .v { font-size: 1.55rem; font-weight: 500; font-stretch: 104%; letter-spacing: -0.01em; }
.minmax .v.lo { color: var(--c-dew); }
.minmax .v.hi { color: var(--c-temp); }
.minmax .l { color: var(--encre-2); font-size: 0.84rem; }
.delta24 { margin: 14px 0 0; font-size: 0.9rem; color: var(--encre-2); }

/* Le thermogramme */
.thermo {
  position: relative;
  background: #fbfcfc;
  border-left: 1px solid var(--filet);
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.thermo-head { display: flex; justify-content: space-between; padding: 16px 20px 0; font-size: 0.86rem; color: var(--encre-2); }
.thermo .plot { flex: 1; position: relative; min-height: 290px; }
.thermo svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.thermo .g1 { stroke: #edf1f3; stroke-width: 1; }
.thermo .g2 { stroke: #dbe3e7; stroke-width: 1; }
.thermo .trace { fill: none; stroke: var(--violet); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.thermo .area { fill: url(#thermo-fill); }
.thermo .axis text { font-size: 11px; fill: var(--encre-3); }
.thermo .mark circle { fill: var(--papier); stroke: var(--violet); stroke-width: 2; }
.thermo .mark text { font-size: 12px; font-weight: 600; fill: var(--encre); }
.thermo svg { touch-action: pan-y; }
.thermo svg:focus { outline: none; }
.thermo svg:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.thermo .hit { fill: transparent; cursor: crosshair; }
.thermo .rr rect { fill: var(--c-rain); opacity: 0.85; }
.thermo .rr rect.on { opacity: 1; fill: #2f5f97; }
.thermo .axis .rr-lbl { font-size: 11px; fill: var(--encre-2); }
.thermo .hover .hl { stroke: var(--encre-2); stroke-width: 1; stroke-dasharray: 3 3; }
.thermo .hover .hd { fill: var(--violet); stroke: var(--papier); stroke-width: 2; }
.thermo-tip { position: absolute; z-index: 2; pointer-events: none; display: grid; gap: 1px; padding: 8px 10px; border-radius: 8px;
  background: var(--encre); color: #fff; font-size: 0.82rem; line-height: 1.35; white-space: nowrap; box-shadow: 0 6px 18px rgba(31, 43, 48, 0.18); }
.thermo-tip b { font-weight: 700; }
.thermo-tip span { font-variant-numeric: tabular-nums; }
.thermo-tip .tr { color: #c9d6e6; }

/* Instruments */
.instruments {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: var(--gap);
}
.inst {
  background: var(--papier);
  border: 1px solid var(--filet);
  border-radius: var(--r);
  padding: 20px 22px 22px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.inst h2 { font-size: 0.95rem; font-weight: 500; color: var(--encre-2); font-stretch: 100%; display: flex; align-items: center; gap: 8px; }
.inst h2 svg { width: 18px; height: 18px; stroke: var(--encre-3); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inst .big { font-size: 2.35rem; font-weight: 400; font-stretch: 104%; letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 0; }
.inst .big .u { font-size: 0.42em; font-weight: 400; color: var(--encre-2); letter-spacing: 0; margin-left: 5px; }
.inst .sub { margin: 4px 0 0; color: var(--encre-2); font-size: 0.93rem; }
.inst dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: auto 0 0; padding-top: 16px; font-size: 0.9rem; }
.inst dt { color: var(--encre-2); }
.inst dd { margin: 0; text-align: right; font-weight: 500; }
.inst-wind { grid-column: span 5; display: grid; grid-template-columns: 1fr auto; gap: 0 16px; align-content: start; }
.inst-wind h2, .inst-wind dl { grid-column: 1 / -1; }
.inst-rain { grid-column: span 4; }
.inst-press { grid-column: span 3; }
.inst-hum { grid-column: span 4; }
.inst-sun { grid-column: span 4; }
.inst-fc { grid-column: span 4; }
.compass { width: 128px; height: 128px; margin-top: 4px; }
.compass .ring { fill: none; stroke: #edf1f3; stroke-width: 12; }
.compass .tick { stroke: var(--encre-3); stroke-width: 1.2; }
.compass text { font-size: 10.5px; fill: var(--encre-2); text-anchor: middle; dominant-baseline: central; font-weight: 600; }
.compass .needle { fill: var(--violet); }
.compass .shaft { stroke: var(--violet); stroke-width: 2.5; stroke-linecap: round; }
.compass .hub { fill: var(--papier); stroke: var(--violet); stroke-width: 2; }
.trend { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 6px 0 0; font-size: 0.93rem; color: var(--encre-2); }
.trend svg { width: 16px; height: 16px; }
.spark { width: 100%; height: 46px; margin-top: 12px; display: block; }
.spark path { fill: none; stroke: var(--c-press); stroke-width: 1.6; stroke-linejoin: round; }
.spark .base { stroke: var(--filet); stroke-width: 1; }

.fc-mini { display: grid; gap: 12px; margin-top: 14px; }
.fc-mini > div { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 0 12px; }
.fc-mini svg { width: 40px; height: 40px; }
.fc-mini .d { font-weight: 600; }
.fc-mini .t { color: var(--encre-2); font-size: 0.88rem; display: block; }
.fc-mini .tt { font-weight: 500; white-space: nowrap; }
.fc-mini .tt .lo { color: var(--encre-2); }
.more { display: inline-block; margin-top: auto; padding-top: 16px; font-weight: 500; font-size: 0.93rem; }

/* ---------- Segments, navigation de date ---------- */
.seg { display: inline-flex; background: var(--papier); border: 1px solid var(--filet); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--encre-2);
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  min-height: 36px;
}
.seg button:hover { color: var(--encre); background: var(--papier-2); }
.seg button[aria-pressed="true"] { background: var(--encre); color: #fff; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: var(--gap); }
.datenav { display: inline-flex; align-items: center; gap: 6px; }
.datenav button, .btn {
  font: inherit;
  border: 1px solid var(--filet);
  background: var(--papier);
  color: var(--encre);
  border-radius: 9px;
  min-width: 38px;
  min-height: 38px;
  cursor: pointer;
  font-size: 1.05rem;
}
.datenav button:hover { border-color: var(--filet-2); }
.datenav button:disabled { opacity: 0.35; cursor: default; }
.datenav input { font: inherit; font-size: 0.94rem; border: 1px solid var(--filet); border-radius: 9px; padding: 6px 10px; min-height: 38px; background: var(--papier); color: var(--encre); }
.period-title { font-size: 1.05rem; font-weight: 600; margin-left: 4px; }

/* ---------- Statistiques ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.figs { display: grid; gap: 0; margin-top: 8px; }
.fig { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 12px; padding: 10px 0; border-bottom: 1px solid var(--filet); }
.fig:last-child { border-bottom: 0; padding-bottom: 0; }
.fig .k { color: var(--encre-2); font-size: 0.9rem; }
.fig .v { font-size: 1.22rem; font-weight: 500; font-stretch: 104%; white-space: nowrap; }
.fig .w { grid-column: 1 / -1; font-size: 0.8rem; color: var(--encre-3); }
.ecarts-panel { margin-bottom: var(--gap); }
.ecarts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 26px; margin-top: 4px; }
.ecarts div { display: grid; align-content: start; }
.ecarts .v { font-size: 2rem; font-weight: 300; font-stretch: 104%; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ecarts .k { font-size: 0.9rem; color: var(--encre); margin-top: 2px; }
.ecarts .w { font-size: 0.8rem; color: var(--encre-2); }
.ecarts-note { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--filet); font-size: 0.8rem; color: var(--encre-2); max-width: 80ch; }
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px 22px; margin-top: 14px; }
.counts div { display: grid; }
.counts .v { font-size: 1.7rem; font-weight: 400; font-stretch: 104%; line-height: 1.1; }
.counts .k { font-size: 0.83rem; color: var(--encre-2); }

table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--filet); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { color: var(--encre-2); font-weight: 500; position: sticky; top: 0; background: var(--papier); border-bottom-color: var(--filet-2); }
table.data tbody tr:hover { background: var(--papier-2); }
.table-wrap { overflow-x: auto; max-height: 560px; }
td.hi { color: var(--c-temp); font-weight: 500; }
td.lo { color: var(--c-dew); font-weight: 500; }
.empty { padding: 30px 0; color: var(--encre-2); }

/* ---------- Graphiques ---------- */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.chart-box { position: relative; height: 250px; }
.legend { display: flex; gap: 16px; font-size: 0.86rem; color: var(--encre-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 16px; height: 2px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.chart-note { font-size: 0.84rem; color: var(--encre-2); }
.panel-head .val { font-weight: 600; color: var(--encre); }

/* ---------- Vigilance ---------- */
.vigi-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: var(--gap); align-items: start; }
#map .vd { stroke: #ffffff; stroke-width: 1.1; stroke-linejoin: round; cursor: pointer; }
#map .vd.c0 { fill: #d8dedc; } #map .vd.c1 { fill: var(--v1); } #map .vd.c2 { fill: var(--v2); } #map .vd.c3 { fill: var(--v3); } #map .vd.c4 { fill: var(--v4); }
#map .vd:hover, #map .vd:focus-visible { filter: brightness(0.94); outline: none; }
#map .vd.out { opacity: 0.32; }
#map .vd.sel { stroke: var(--encre); stroke-width: 2; }
#map .vr { fill: none; stroke: #33434a; stroke-width: 1.7; stroke-linejoin: round; pointer-events: none; }
#map.lvl-fr .vr { stroke: #33434a; stroke-width: 1.3; }
#map .vr.cur { stroke: var(--encre); stroke-width: 2.2; }
#map #g-lbl text { font-weight: 650; fill: var(--encre); text-anchor: middle; dominant-baseline: central; pointer-events: none; paint-order: stroke; stroke: rgba(255, 255, 255, 0.75); stroke-width: 3px; }
.vigi-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 0.86rem; color: var(--encre-2); }
.vigi-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chip { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.chip.c0 { background: #d8dedc; } .chip.c1 { background: var(--v1); } .chip.c2 { background: var(--v2); } .chip.c3 { background: var(--v3); } .chip.c4 { background: var(--v4); }
.vigi-side h2 small { font-weight: 400; }
.vcounts { display: flex; gap: 18px; margin: 12px 0 4px; flex-wrap: wrap; }
.vcounts div { display: flex; align-items: center; gap: 7px; color: var(--encre-2); font-size: 0.92rem; }
.vcounts b { font-size: 1.3rem; font-weight: 500; color: var(--encre); }
.dept-list { display: grid; margin-top: 8px; max-height: 640px; overflow-y: auto; }
.dept { display: grid; grid-template-columns: 12px 1fr; gap: 4px 12px; padding: 11px 10px; border-radius: var(--r-s); cursor: pointer; background: transparent; border: 0; border-bottom: 1px solid var(--filet); text-align: left; font: inherit; color: inherit; width: 100%; }
.dept:last-child { border-bottom: 0; }
.dept:hover { background: var(--papier-2); }
.dept .chip { margin-top: 6px; }
.dept .nm { font-weight: 600; }
.dept .nm small { font-weight: 400; color: var(--encre-3); margin-left: 6px; }
.dept ul, .vphen { grid-column: 2; margin: 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--encre-2); }
.dept li, .vphen li { display: flex; gap: 8px; align-items: baseline; }
.dept li .chip, .vphen li .chip { width: 8px; height: 8px; margin: 0; transform: translateY(-1px); }
.vphen { margin-top: 8px; font-size: 0.95rem; }
.level-word { font-weight: 500; color: var(--encre); }
.vlevel { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-s); font-weight: 600; }
.vlevel.c1 { background: #eef6ed; } .vlevel.c2 { background: var(--v2-pale); } .vlevel.c3 { background: var(--v3-pale); } .vlevel.c4 { background: var(--v4-pale); } .vlevel.c0 { background: var(--papier-2); }
.tl { margin-top: 10px; display: grid; gap: 8px; }
.tl-row, .tl-axis { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; font-size: 0.86rem; }
.tl-name { color: var(--encre-2); }
.tl-bar { position: relative; height: 16px; background: #eef6ed; border-radius: 4px; overflow: hidden; }
.tl-bar i { position: absolute; top: 0; bottom: 0; }
.tl-bar i.c2 { background: var(--v2); } .tl-bar i.c3 { background: var(--v3); } .tl-bar i.c4 { background: var(--v4); }
.tl-hours { position: relative; height: 1.2em; font-size: 0.72rem; color: var(--encre-3); }
.tl-hours span { position: absolute; transform: translateX(-50%); }
.tl-hours span:first-child { transform: none; } .tl-hours span:last-child { transform: translateX(-100%); }

/* ---------- Prévisions ---------- */
.fc-tools { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: var(--gap); }
.search { position: relative; }
.search input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 14px 10px 40px;
  min-height: 44px;
  border: 1px solid var(--filet-2);
  border-radius: 10px;
  background: var(--papier) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238c979b' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 13px 50% / 18px;
  color: var(--encre);
}
.search input::placeholder { color: var(--encre-3); }
.search input:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px var(--violet-pale); }
.search ul {
  position: absolute;
  z-index: 10;
  left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--papier);
  border: 1px solid var(--filet);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(31, 43, 48, 0.12);
  max-height: 340px;
  overflow-y: auto;
}
.search li { padding: 9px 12px; border-radius: 8px; cursor: pointer; display: grid; }
.search li b { font-weight: 600; }
.search li span { font-size: 0.84rem; color: var(--encre-2); }
.search li[aria-selected="true"], .search li:hover { background: var(--violet-pale); }
.search li.info { cursor: default; color: var(--encre-2); font-size: 0.9rem; }
.search li.info:hover { background: none; }
.cities { display: flex; gap: 2px; flex-wrap: wrap; }
.cities button.pinned { padding-right: 8px; display: inline-flex; align-items: center; gap: 6px; }
.cities button.fav { display: inline-flex; align-items: center; gap: 6px; }
.cities .star { fill: currentColor; }
.city-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 0 2px 12px; }
.city-bar h2 { margin: 0; font-size: 1.45rem; font-weight: 500; letter-spacing: -0.01em; }
.city-bar p { margin: 2px 0 0; font-size: 0.85rem; color: var(--encre-2); }
.city-bar p:empty { display: none; }
.fav-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid #c9d1d4;
  background: var(--papier); color: var(--encre); font: inherit; font-size: 0.9rem; cursor: pointer; }
.fav-toggle svg { fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linejoin: round; }
.fav-toggle:hover { border-color: var(--violet); }
.fav-toggle[aria-pressed="true"] { background: #ece9f6; border-color: #cfc8ea; color: var(--violet); font-weight: 600; }
.fav-toggle[aria-pressed="true"] svg { fill: var(--violet); }
.fav-toggle:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.cities button .x { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 15px; line-height: 1; color: inherit; opacity: 0.6; }
.cities button .x:hover { opacity: 1; background: rgba(127, 127, 127, 0.18); }

.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(116px, 1fr));
  gap: 0;
  overflow-x: auto;
  background: var(--papier);
  border: 1px solid var(--filet);
  border-radius: var(--r);
}
.day {
  background: transparent;
  padding: 16px 10px 14px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1px;
  border: 0;
  border-right: 1px solid var(--filet);
  cursor: pointer;
  font: inherit;
  color: inherit;
  position: relative;
}
.day:last-child { border-right: 0; }
.day:hover { background: var(--papier-2); }
.day .ens { display: grid; gap: 3px; margin-top: 6px; width: 100%; padding: 0 4px; }
.day .ens-p { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--encre); }
.day .ens-p b { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.day .ens-bar { flex: 1; height: 5px; border-radius: 3px; background: #e6ebee; overflow: hidden; }
.day .ens-bar i { display: block; height: 100%; background: var(--c-rain); border-radius: 3px; }
.day .ens-r { font-size: 0.75rem; color: var(--encre-2); }
.days-note { margin: 8px 2px 0; font-size: 0.8rem; color: var(--encre-2); max-width: 90ch; }
.rr-head { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 2px 46px; font-size: 0.8rem; color: var(--encre-2); }
.day[aria-pressed="true"] { background: var(--violet-pale); }
.day[aria-pressed="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--violet); border-radius: 2px; }
.day .dn { font-weight: 600; }
.day .dd { font-size: 0.8rem; color: var(--encre-3); }
.day svg { width: 52px; height: 52px; margin: 6px 0 2px; }
.day .temps { font-size: 1.2rem; font-weight: 500; margin-top: 2px; white-space: nowrap; }
.day .temps .lo { color: var(--encre-3); font-weight: 400; }
.day .rr { font-size: 0.84rem; color: var(--c-rain); }
.day .rr.dry { color: var(--encre-3); }
.day .gu { font-size: 0.8rem; color: var(--encre-2); }
.day .model { margin-top: 8px; font-size: 0.7rem; color: var(--encre-3); line-height: 1.25; }
.day.relay .model { color: var(--c-gust); }
.wx-label { font-size: 0.8rem; color: var(--encre-2); min-height: 2.5em; line-height: 1.25; }

.hours { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
.hour { flex: 0 0 62px; text-align: center; padding: 6px 2px; border-right: 1px solid var(--filet); scroll-snap-align: start; font-size: 0.84rem; }
.hour.newday { border-left: 1px solid var(--encre-3); }
.hour .h { color: var(--encre-2); min-height: 2.6em; display: flex; align-items: end; justify-content: center; line-height: 1.25; }
.hour svg { width: 32px; height: 32px; }
.hour .t { font-weight: 600; font-size: 0.98rem; }
.hour .p { color: var(--c-rain); min-height: 1.3em; }
.hour .w { color: var(--encre-2); font-size: 0.76rem; line-height: 1.3; }

.overview { width: 100%; border-collapse: collapse; }
.overview th, .overview td { padding: 10px 8px; border-bottom: 1px solid var(--filet); text-align: center; }
.overview thead th { font-weight: 500; color: var(--encre-2); font-size: 0.9rem; }
.overview th:first-child, .overview td:first-child { text-align: left; }
.overview tr:last-child td { border-bottom: 0; }
.overview td svg { width: 34px; height: 34px; vertical-align: middle; }
.overview .tt { font-weight: 500; }
.overview .tt .lo { color: var(--encre-3); font-weight: 400; }

.note { font-size: 0.84rem; color: var(--encre-2); margin: 16px 0 0; max-width: 80ch; }
.error { background: var(--v4-pale); color: #7d2e28; padding: 12px 16px; border-radius: var(--r-s); margin: 0 0 var(--gap); }

/* Icônes météo : couleurs naturelles, sans saturation */
.wx .sun { fill: #e3ab45; }
.wx .sunray { stroke: #e3ab45; stroke-width: 2.2; stroke-linecap: round; }
.wx .moon { fill: #a9b3c9; }
.wx .cloud { fill: #e3e8eb; stroke: #9aa7ae; stroke-width: 1.5; }
.wx .cloud.dark { fill: #b9c2c8; stroke: #7d8a92; }
.wx .drop { stroke: var(--c-rain); stroke-width: 2.2; stroke-linecap: round; }
.wx .flake { fill: #8fb0cc; }
.wx .bolt { fill: #e3ab45; stroke: #a87b23; stroke-width: 1; }
.wx .fog { stroke: #a6b1b8; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- Pied ---------- */
.site-foot { border-top: 1px solid var(--filet); background: var(--papier); }
.site-foot .inner { max-width: var(--page); margin: 0 auto; padding: 22px var(--gap) 30px; color: var(--encre-2); font-size: 0.84rem; display: grid; gap: 4px; }
.site-foot p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .releve { grid-template-columns: 1fr; }
  .thermo { border-left: 0; border-top: 1px solid var(--filet); min-height: 260px; }
  .inst-wind, .inst-rain, .inst-press, .inst-hum, .inst-sun, .inst-fc { grid-column: span 6; }
  .charts { grid-template-columns: 1fr; }
  .vigi-layout { grid-template-columns: 1fr; }
  .tl-row, .tl-axis { grid-template-columns: 100px 1fr; }
  .fc-tools { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .site-head .inner { gap: 0; padding-top: 10px; }
  .inst-wind, .inst-rain, .inst-press, .inst-hum, .inst-sun, .inst-fc { grid-column: 1 / -1; }
  .nav { margin: 6px calc(var(--gap) * -1) 0; width: calc(100% + var(--gap) * 2); overflow-x: auto; flex-wrap: nowrap; padding: 0 calc(var(--gap) - 12px); min-height: 44px; }
  .nav a { white-space: nowrap; }
  .brand small { display: none; }
  .temp-big { font-size: 6rem; }
  .vigi-band a span.go { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Jauges (humidité, UV) */
.meter { margin-top: 18px; }
.meter .track { position: relative; height: 8px; border-radius: 4px; background: #edf1f3; }
.meter .range { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: #bcd6d6; }
.meter .pin { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--papier); border: 2px solid var(--encre); }
.meter.uv .track { background: linear-gradient(90deg, #a9cfa0 0 27%, #e9d77f 27% 55%, #e6b178 55% 73%, #d68a80 73% 100%); }
.meter .scale { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--encre-3); margin-top: 6px; }
.meter.uv .scale { position: relative; height: 1.2em; }
.meter.uv .scale span { position: absolute; transform: translateX(-50%); }
.meter.uv .scale span:first-child { transform: none; }
.meter.uv .scale span:last-child { transform: translateX(-100%); }

/* Arc du jour (sans capteur solaire) */
.dayarc svg { width: 100%; height: 60px; display: block; margin-top: 10px; }
.dayarc .path { fill: none; stroke: #e6dcc0; stroke-width: 2; stroke-dasharray: 3 4; }
.dayarc .done { fill: none; stroke: #d9a441; stroke-width: 2.5; stroke-linecap: round; }
.dayarc .hz { stroke: var(--filet-2); stroke-width: 1; }
.dayarc .now { fill: #e3ab45; stroke: var(--papier); stroke-width: 2; }
.dayarc .night { fill: #a9b3c9; stroke: var(--papier); stroke-width: 2; }
#daylen .u { margin: 0 3px 0 4px; }

/* ---------- Cartes ---------- */
.map-panel { padding-bottom: 18px; }
.zone-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.zone-nav .back { font-size: 0.92rem; padding: 0 12px; }
.zone-pick select { font: inherit; font-size: 0.94rem; border: 1px solid var(--filet); border-radius: 9px; padding: 7px 10px; min-height: 38px; background: var(--papier); color: var(--encre); }
.map-wrap { width: 100%; }
#map { width: 100%; display: block; background: #f6f9fb; border-radius: var(--r-s); }
#map .reg { fill: #e6ebe8; stroke: #ffffff; stroke-width: 1.4; cursor: pointer; transition: fill 0.15s; }
#map:not(.zoomed) .reg:hover, #map:not(.zoomed) .reg:focus-visible { fill: #d9dfef; outline: none; }
#map.zoomed .reg { fill: #eef1f0; cursor: default; }
#map.zoomed .reg.cur { fill: #ffffff; stroke: var(--encre-3); stroke-width: 1.4; }
#map .dep { fill: none; stroke: #c9d2ce; stroke-width: 0.9; pointer-events: none; }
#map .town { cursor: pointer; }
#map .town:hover .pill, #map .town:focus-visible .pill { stroke: var(--encre); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
#map .town:focus-visible { outline: none; }
#map .pill { stroke: rgba(31, 43, 48, 0.25); stroke-width: 1px; vector-effect: non-scaling-stroke; }
#map text { text-anchor: middle; font-family: inherit; pointer-events: none; }
#map .tt { font-weight: 600; fill: var(--encre); paint-order: stroke; stroke: rgba(255, 255, 255, 0.85); stroke-width: 3px; }
#map .tt .lo { fill: var(--c-dew); }
#map .tt .hi { fill: var(--c-temp); }
#map .pv { font-weight: 650; }
#map .tn-name { fill: var(--encre-2); paint-order: stroke; stroke: rgba(255, 255, 255, 0.9); stroke-width: 3px; }
.map-foot { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; margin-top: 14px; }
.legend-bar { min-width: min(100%, 420px); }
.scale-bar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; border: 1px solid var(--filet); }
.scale-bar span { flex: 1; }
.scale-lbl { display: flex; font-size: 0.72rem; color: var(--encre-2); margin-top: 3px; }
.scale-lbl span { flex: 1; }
.scale-lbl .unit { flex: none; margin-left: 6px; color: var(--encre-3); }
#tbl td.lo { color: var(--c-dew); } #tbl td.hi { color: var(--c-temp); }
#map .hit { fill: transparent; }
.zone-picks { display: flex; gap: 8px; flex-wrap: wrap; }
#map .dep { fill: transparent; }
#map.lvl-r .dep, #map.lvl-d .dep { pointer-events: all; cursor: pointer; }
#map.lvl-r .dep:hover, #map.lvl-r .dep:focus-visible { fill: rgba(91, 75, 154, 0.07); outline: none; }
#map.lvl-d .reg.cur { fill: #eef1f0; }
#map.lvl-d .dep { fill: #f3f5f4; }
#map.lvl-d .dep:hover { fill: #eceff6; }
#map.lvl-d .dep.cur { fill: #ffffff; stroke: var(--encre-3); stroke-width: 1.4; cursor: default; }
.tl-hours span { white-space: nowrap; }

/* Texte de présentation (lisible aussi par les moteurs de recherche) */
.about { margin-top: calc(var(--gap) * 1.5); padding: 0 4px; max-width: 78ch; color: var(--encre-2); }
.about h2 { font-size: 1rem; color: var(--encre); margin-bottom: 6px; }
.about p { margin: 0 0 8px; font-size: 0.92rem; }
.links404 { margin: 10px 0 0; padding-left: 1.2em; line-height: 2; }

/* ---------- Nappes phréatiques ---------- */
.nappes-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: var(--gap); align-items: start; }
.nappes-grid > .panel { margin: 0; }
.nmap-panel { padding: 10px; }
#nmap { display: block; width: 100%; height: min(70vh, 620px); }
#nmap .nd-in { fill: #f6f8f8; stroke: #33434a; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
#nmap .nd-out { fill: #eceff0; stroke: #c3cbce; stroke-width: 1; vector-effect: non-scaling-stroke; }
#nmap .ns { cursor: pointer; outline: none; }
#nmap .ns .hit { fill: transparent; }
#nmap .ns.hov circle:not(.hit), #nmap .ns:focus-visible circle:not(.hit) { filter: brightness(1.08); stroke: #1f2b30; }
.nbar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; margin: 4px 0 12px; }
.nbar span { display: block; min-width: 6px; }
.nleg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; font-size: 0.85rem; color: var(--encre); }
.nleg li { display: flex; align-items: center; gap: 8px; }
.nleg b { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.nleg i, .nlist i, .nbadge i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.nleg i.none, .nlist i.none, .nbadge.none i { background: #fff; box-shadow: inset 0 0 0 1.6px #8c979b; }
.nnote { margin: 12px 0 0; font-size: 0.8rem; color: var(--encre-2); max-width: 90ch; }
.nlist { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--filet); max-height: 380px; overflow: auto; }
.nlist button { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; width: 100%; text-align: left;
  padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--encre); font: inherit; cursor: pointer; }
.nlist button i { grid-row: 1 / 3; align-self: center; }
.nlist .nn { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nlist .ns-state { grid-column: 2; font-size: 0.8rem; color: var(--encre-2); }
.nlist .nt { grid-column: 3; grid-row: 1 / 3; align-self: center; font-size: 0.8rem; color: var(--encre-2); }
.nlist button:hover, .nlist button.hov { background: var(--papier-2); }
.nlist button[aria-pressed="true"] { background: #ece9f6; }
.nlist button:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.nfiche { margin-top: var(--gap); }
.nhead { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.nhead h2 { margin: 0; font-size: 1.45rem; font-weight: 500; }
.nhead p { margin: 2px 0 0; color: var(--encre-2); font-size: 0.88rem; }
.nhead .nmeta { text-align: right; font-size: 0.8rem; }
.nsit { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 14px 0 4px; }
.nsit .w { font-size: 0.88rem; color: var(--encre-2); }
.nbadge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 999px; background: var(--papier-2); font-weight: 600; font-size: 0.92rem; }
.nbadge i { background: var(--c); width: 14px; height: 14px; }
.nfigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 24px; margin-top: 14px; }
.nfigs div { display: grid; }
.nfigs .v { font-size: 1.6rem; font-weight: 300; font-stretch: 104%; font-variant-numeric: tabular-nums; }
.nfigs .k { font-size: 0.82rem; color: var(--encre-2); }
.nfiche h3 { margin: 0; font-size: 1rem; font-weight: 600; }
#nmap .nf { stroke: #ffffff; stroke-width: 0.8; vector-effect: non-scaling-stroke; cursor: pointer; outline: none; }
#nmap .nf:hover, #nmap .nf:focus-visible { stroke: #1f2b30; stroke-width: 1.6; }
#nmap .nf-fav { fill: none; stroke: var(--violet); stroke-width: 2.6; vector-effect: non-scaling-stroke; pointer-events: none; }
#nmap.lvl-fr { height: min(76vh, 680px); }
.nbar-l { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nback { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid #c9d1d4; background: var(--papier);
  color: var(--encre); font: inherit; font-size: 0.88rem; cursor: pointer; }
.nback svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nback:hover { border-color: var(--violet); }
.ndep-pick { display: grid; gap: 6px; padding: 0 8px 10px; }
.ndep-pick label { font-size: 0.82rem; color: var(--encre-2); }
.ndep-pick select { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid #c9d1d4; background: var(--papier); color: var(--encre); }
.nlist .nfav-link svg { grid-row: 1 / 3; align-self: center; fill: var(--violet); }
@media (max-width: 900px) {
  .nappes-grid { grid-template-columns: 1fr; }
  #nmap.lvl-fr { height: auto; aspect-ratio: 1 / 0.98; }
  #nmap { height: 58vh; }
  .nhead .nmeta { text-align: left; }
}
.nprog { color: var(--encre); background: #f4f2fa; border-radius: 8px; padding: 8px 10px; }
