:root {
  --bg: #121418;
  --panel: rgba(22, 25, 31, 0.92);
  --panel-solid: #16191f;
  --line: rgba(255, 255, 255, 0.10);
  --text: #eef0f3;
  --muted: #9aa3ae;
  --accent: #7fa7c9;
  --accent-ink: #0d1620;
  --future: #c9a76f;
  --danger: #e0786b;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-text-size-adjust: 100%; overflow: hidden; }
button { font: inherit; color: inherit; }

#map { position: fixed; inset: 0; background: #1b1e24; }
.leaflet-container { background: #1b1e24; font-family: inherit; }
.leaflet-control-attribution { background: rgba(18, 20, 24, 0.75) !important; color: #8d96a1 !important;
  font-size: 10px; max-width: 70vw; }
.leaflet-control-attribution a { color: #b7c3cf !important; }
.leaflet-control-zoom { display: none; }
@media (hover: hover) and (pointer: fine) { .leaflet-control-zoom { display: block; } }
.leaflet-bar a { background: var(--panel-solid); color: var(--text); border-color: var(--line); }

/* ---------- barre du haut ---------- */
.top { position: fixed; z-index: 1000; left: 0; right: 0; top: 0;
  padding: calc(var(--safe-top) + 10px) 12px 10px; background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto; }
.back { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 20px; flex: none; }
.back:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.title { flex: 1; min-width: 0; }
.title h1 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: 0.01em; }
.title p { margin: 1px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,0.06); }

.modes { display: flex; gap: 4px; margin: 10px auto 0; max-width: 760px; padding: 4px;
  background: rgba(255,255,255,0.05); border-radius: 12px; }
.modes button { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.modes button[aria-pressed="true"] { background: #2a2f38; color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset; }

/* ---------- légende ---------- */
.legend { max-width: 760px; margin: 10px auto 0; }
.legend[hidden] { display: none; }
.scale { display: grid; grid-template-columns: repeat(9, 1fr); height: 12px; border-radius: 4px; overflow: hidden; }
.ticks { display: grid; grid-template-columns: repeat(9, 1fr); font-size: 11px; color: var(--muted); margin-top: 3px; }
.ticks span:last-child::after { content: " mm/h"; white-space: nowrap; }
.ticks span:last-child { white-space: nowrap; }
.legend img { max-width: 100%; display: block; background: #fff; border-radius: 6px; }
.legend .note { font-size: 11px; color: var(--muted); margin: 4px 0 0; }

/* ---------- boutons flottants ---------- */
.fabs { position: fixed; z-index: 1000; right: 12px; bottom: calc(var(--safe-bottom) + 118px);
  display: flex; flex-direction: column; gap: 10px; }
.fab { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.fab[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.fab svg { width: 22px; height: 22px; }

/* ---------- frise temporelle ---------- */
.timeline { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0;
  padding: 10px 12px calc(var(--safe-bottom) + 12px); background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.tl-inner { max-width: 760px; margin: 0 auto; }
.tl-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.tl-time { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-day { font-size: 14px; color: var(--muted); }
.tl-kind { margin-left: auto; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px;
  background: rgba(127,167,201,0.16); color: var(--accent); }
.tl-kind.future { background: rgba(201,167,111,0.16); color: var(--future); }
.tl-row { display: flex; align-items: center; gap: 12px; }
.play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--text); color: #111;
  display: grid; place-items: center; cursor: pointer; flex: none; }
.play svg { width: 18px; height: 18px; }
.track { position: relative; flex: 1; height: 44px; }
.track input[type=range] { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent;
  -webkit-appearance: none; appearance: none; z-index: 2; cursor: pointer; }
.track input[type=range]::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.track input[type=range]::-moz-range-track { height: 44px; background: transparent; }
.track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 44px; background: var(--text); border-radius: 2px; }
.track input[type=range]::-moz-range-thumb { width: 4px; height: 44px; background: var(--text); border: 0; border-radius: 2px; }
.bar { position: absolute; left: 0; right: 0; top: 18px; height: 8px; border-radius: 4px;
  background: rgba(255,255,255,0.08); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; flex: 1; border-right: 1px solid rgba(0,0,0,0.25); }
.bar i.past { background: rgba(127,167,201,0.20); }
.bar i.past.ok { background: rgba(127,167,201,0.65); }
.bar i.past.err { background: rgba(224,120,107,0.5); }
.bar i.future { background: rgba(201,167,111,0.35); }
.bar i.now { box-shadow: 2px 0 0 #fff; }
.hours { position: absolute; left: 0; right: 0; top: 30px; height: 14px; font-size: 10px; color: var(--muted); pointer-events: none; }
.hours span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.status { font-size: 11px; color: var(--muted); margin-top: 6px; min-height: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status.err { color: var(--danger); }

/* ---------- panneau infos ---------- */
.sheet { position: fixed; z-index: 2000; inset: 0; background: rgba(0,0,0,0.5); display: grid; place-items: end center; }
.sheet[hidden] { display: none; }
.sheet-card { width: 100%; max-width: 640px; max-height: 82vh; overflow: auto; background: var(--panel-solid);
  border-radius: 18px 18px 0 0; padding: 20px 18px calc(var(--safe-bottom) + 20px); border: 1px solid var(--line); }
.sheet-card h2 { margin: 0 0 8px; font-size: 18px; }
.sheet-card h3 { margin: 18px 0 6px; font-size: 14px; color: var(--accent); }
.sheet-card p, .sheet-card li { font-size: 14px; line-height: 1.5; color: #cfd5dc; }
.sheet-card ul { padding-left: 18px; margin: 6px 0; }
.sheet-card a { color: var(--accent); }
.sheet-card label { display: flex; gap: 10px; align-items: center; font-size: 14px; padding: 6px 0; }
.sheet-card .close { float: right; }
.sheet-card code { font-size: 12px; background: rgba(255,255,255,0.06); padding: 1px 4px; border-radius: 4px; }

.probe { background: var(--panel-solid); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 9px; font-size: 13px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel-solid); color: var(--text); }
.leaflet-popup-content { margin: 10px 12px; font-size: 13px; }

.me { width: 16px; height: 16px; border-radius: 50%; background: #4aa3ff; border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(74,163,255,0.25); }

.basemap { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.85) saturate(0.35); }

/* ---------- v4 : recherche, épingle, prévision au point ---------- */
.pin { width: 22px; height: 30px; background: #ff5a4e; border-radius: 50% 50% 50% 0; transform: rotate(-45deg) translate(4px, -4px);
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.pin-btn { margin-top: 8px; width: 100%; border: 0; border-radius: 9px; padding: 8px 10px; background: var(--accent); color: var(--accent-ink); font-weight: 650; cursor: pointer; }
.pin-chip { display: flex; gap: 6px; margin-bottom: 8px; }
.pin-chip[hidden] { display: none; }
.pin-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,90,78,.10);
  border-radius: 10px; padding: 7px 10px; cursor: pointer; text-align: left; font-size: 13px; }
.pin-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.pin-main #pin-val { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.pin-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff5a4e; flex: none; }
.pin-more { color: var(--accent); font-weight: 600; white-space: nowrap; }
.pin-x { border: 1px solid var(--line); background: transparent; border-radius: 10px; width: 36px; cursor: pointer; color: var(--muted); }
.fabs { bottom: calc(var(--safe-bottom) + 160px); }
.srch { display: flex; gap: 8px; margin: 10px 0; }
.srch input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0f1115; color: var(--text); }
.srch button { border: 0; border-radius: 10px; padding: 0 14px; background: var(--accent); color: var(--accent-ink); font-weight: 650; }
.results { list-style: none; padding: 0; margin: 0; }
.results li { padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.results li span { font-size: 12px; color: var(--muted); }
.results li.note { cursor: default; }
.days { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.days td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.days .wx { font-size: 18px; text-align: center; }
.days .mm { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.days .pr, .days .tt { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hourly { width: 100%; height: 130px; display: block; background: rgba(255,255,255,.03); border-radius: 8px; }
.note { font-size: 12px; color: var(--muted); }
.pin { width: 26px; height: 36px; transform: none; border: 0; border-radius: 0; box-shadow: none; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 26 36%27%3E%3Cpath d=%27M13 35C13 35 2 21.5 2 13a11 11 0 0 1 22 0c0 8.5-11 22-11 22z%27 fill=%27%23ff5a4e%27 stroke=%27%23fff%27 stroke-width=%272%27/%3E%3Ccircle cx=%2713%27 cy=%2713%27 r=%274%27 fill=%27%23fff%27/%3E%3C/svg%3E"); filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }

/* ---------- v6 : app installée ---------- */
html, body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.top, .timeline, .fabs, .sheet { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.sheet-card input, .sheet-card select { -webkit-user-select: text; user-select: text; }
@media (display-mode: standalone) { .back { display: none; } .title { padding-left: 4px; } }

/* ---------- v7 ---------- */
.scale.fc, .ticks.fc { grid-template-columns: repeat(14, 1fr); }
.ticks.fc span:last-child::after { content: ""; }
.ticks.fc { font-size: 10px; }
#legend-fc .note { margin-top: 3px; }
/* app installée : la zone sous la frise prend la couleur de la frise */
html, body { background: #16191f; }
.timeline { background: #16191f; }

/* ---------- v8 : app installée sur iOS ---------- */
/* Viewport trop court en mode autonome avec barre d'état translucide :
   la page doit couvrir aussi la hauteur de la barre d'état. */
html { height: auto; min-height: calc(100% + env(safe-area-inset-top, 0px)); background: #16191f; overflow: hidden; }
body { min-height: 100%; }
/* Pas de flou d'arrière-plan derrière du texte (rendu baveux sur iOS) : fonds opaques */
.top, .timeline { background: #16191f; backdrop-filter: none; -webkit-backdrop-filter: none; }
.title h1 { font-weight: 700; line-height: 1.25; -webkit-font-smoothing: antialiased; }
.title { padding-top: 1px; }

/* ---------- v9 : prévision au point ---------- */
#sheet-point .sheet-card { max-height: 88vh; }
.dstrip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  padding: 4px 2px 10px; margin: 10px -4px 6px; scrollbar-width: none; }
.dstrip::-webkit-scrollbar, .hstrip::-webkit-scrollbar { display: none; }
.dcard { flex: 0 0 74px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.035); cursor: pointer; }
.dcard.sel { background: rgba(127,167,201,.18); border-color: var(--accent); }
.dcard .dn { font-weight: 700; font-size: 13px; text-transform: capitalize; }
.dcard .dd { font-size: 11px; color: var(--muted); }
.dcard .di { font-size: 26px; line-height: 1.1; margin: 2px 0; }
.dcard .dt { font-size: 13px; color: var(--muted); white-space: nowrap; }
.dcard .dt b { color: var(--text); }
.dcard .dbar { height: 28px; width: 14px; display: flex; align-items: flex-end; }
.dcard .dbar i { display: block; width: 100%; border-radius: 3px; }
.dcard .dm { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dcard .dp { font-size: 11px; color: var(--muted); min-height: 13px; }
.dhead h3 { margin: 6px 0 2px; font-size: 16px; color: var(--text); }
.dhead p { margin: 2px 0; font-size: 14px; }
.dchart { width: 100%; height: 150px; display: block; margin-top: 10px; background: rgba(255,255,255,.03); border-radius: 10px; }
.hwrap { display: flex; margin-top: 10px; }
.hlegend, .hcell { display: flex; flex-direction: column; align-items: center; }
.hlegend { flex: 0 0 36px; align-items: flex-start; color: var(--muted); font-size: 10px; padding-top: 6px; }
.hstrip { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 2px; padding-bottom: 4px; }
.hcell { flex: 0 0 46px; padding: 6px 0; border-radius: 10px; background: rgba(255,255,255,.03); }
.hcell.past { opacity: .42; }
.hlegend span, .hcell span { height: 20px; line-height: 20px; white-space: nowrap; }
.hcell .hh { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hcell .hi { font-size: 18px; height: 26px; line-height: 26px; }
.hlegend .hi { height: 26px; }
.hcell .ht { font-weight: 700; font-size: 14px; }
.hcell .hm { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hcell .hp { font-size: 11px; color: var(--muted); }
.hcell .hw { font-size: 11px; color: var(--muted); }
.hcell .hw small { color: #f2c27b; margin-left: 1px; font-size: 9px; }

/* ---------- v10 ---------- */
.dchart { height: auto; }

/* ---------- v11 : vent, pression, analyses ---------- */
.modes button { font-size: 13px; padding: 8px 2px; }
.pmodes { max-width: 760px; margin: 8px auto 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pmodes[hidden], .seg[hidden] { display: none; }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.05); }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 6px 9px; border-radius: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #2a2f38; color: var(--text); }
.legend-img { display: block; max-height: 46px; max-width: 100%; object-fit: contain; object-position: left; background: #fff; border-radius: 6px; cursor: zoom-in; }
.legend-img.open { max-height: 60vh; cursor: zoom-out; }
.chartview { position: fixed; left: 0; right: 0; z-index: 900; overflow: auto; background: #f4f4f2; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.chartview[hidden] { display: none; }
.chartview img { display: block; width: 100%; height: auto; }
.chart-wait { position: absolute; top: 40%; left: 0; right: 0; text-align: center; color: #333; font-size: 14px; }
.chart-wait[hidden] { display: none; }
.cz { position: fixed; right: 12px; z-index: 950; display: flex; gap: 6px; }
.chartview:not([hidden]) ~ .fabs { display: none; }
.cz button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-solid); color: var(--text); font-size: 22px; line-height: 1; }
.chart-src { position: fixed; left: 8px; z-index: 950; margin: 0; font-size: 10px; color: #333; background: rgba(255,255,255,.8); padding: 2px 6px; border-radius: 4px; }

/* ---------- v12 : lisibilité des couches DWD à traits noirs ---------- */
/* barbules de vent, isobares : noir → clair sur le fond sombre */
.leaflet-image-layer.ink { filter: invert(1) hue-rotate(180deg) drop-shadow(0 0 1px rgba(0,0,0,.9)); }
/* option « fond de carte clair » : tuiles d'origine, couches DWD non inversées */
body.light-map .basemap { filter: saturate(0.5) brightness(1.02); }
body.light-map .leaflet-image-layer.ink { filter: none; }
body.light-map #map, body.light-map .leaflet-container { background: #e8e8e4; }

/* ---------- v13 : vent ---------- */
.scale.wind, .ticks.wind { grid-template-columns: repeat(10, 1fr); }
.ticks.wind span:last-child::after { content: var(--wunit, " km/h"); }
.wind-field { image-rendering: auto; }

.fab[hidden] { display: none; }

/* ---------- v16 : zoom + / − ---------- */
.zoomgrp { display: flex; flex-direction: column; width: 48px; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel); box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.zoomgrp .zb { height: 48px; border: 0; background: transparent; color: var(--text); font-size: 26px; font-weight: 500; line-height: 1; cursor: pointer; }
.zoomgrp .zb + .zb { border-top: 1px solid var(--line); }
.zoomgrp .zb:active { background: rgba(255,255,255,.08); }
.zoomgrp .zb:disabled { color: var(--muted); opacity: .4; }

/* ---------- v17 : fondu enchaîné des images WMS ---------- */
/* fondus : réglés en ligne par WmsFrames.show */
/* v19 : prochaines heures au point */
#psoon { margin-bottom: 12px; }
.soon-radar { margin: 2px 0 10px; padding: 9px 11px; border-radius: 10px; background: rgba(91,150,255,.12); border: 1px solid rgba(91,150,255,.28); font-size: 14px; line-height: 1.4; }
.soon-radar .note { display: block; margin-top: 2px; font-size: 12px; }
.soon-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.soon-h span { color: var(--muted); font-size: 13px; }
#psoon .dchart { height: auto; margin-top: 6px; }
#radar-note { margin-top: 4px; }
#psoon > .note { font-size: 12px; margin-top: 4px; }
/* v20 : l'attribut hidden l'emporte toujours (ex. image de légende en display:block) */
[hidden] { display: none !important; }
.qff-leg { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; font-size: 13px; }
.qff-leg svg { flex: none; }
/* v21 : pression colorée */
.scale.qff { display: block; height: 12px; border-radius: 6px; }
.pticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); }
.pticks span { position: absolute; top: 2px; transform: translateX(-50%); }
.pticks span[style*="right"] { transform: none; }
#legend-qff b.lo { color: #8fc2ff; } #legend-qff b.hi { color: #ff9a8a; }
/* v22 : onglets — pictos quand la largeur manque (seul l'onglet actif garde son nom) */
.modes button svg { display: none; width: 20px; height: 20px; flex: none; }
.modes button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .modes button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 7px 4px; transition: flex-grow .2s ease; }
  .modes button svg { display: block; }
  .modes button span { display: none; }
  .modes button[aria-pressed="true"] { flex-grow: 2.3; }
  .modes button[aria-pressed="true"] span { display: inline; }
}
/* v23 : repères de temps plus lisibles, instant partagé */
.days { position: absolute; left: 0; right: 0; top: 0; height: 28px; pointer-events: none; }
.days span { position: absolute; top: 1px; padding-left: 4px; font-size: 11px; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.days span:first-of-type { padding-left: 0; }
.days b.mid { position: absolute; top: 2px; height: 26px; width: 0; border-left: 1.5px solid rgba(255,255,255,.55); }
.tl-day b { font-weight: 650; color: var(--text); }
.tl-now { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; cursor: pointer; }
.tl-head { flex-wrap: nowrap; }
.tl-day { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-kind { margin-left: 0; flex: none; }
.tl-time { flex: none; }
.tl-now { margin-left: 0; flex: none; width: 30px; height: 26px; padding: 0; display: grid; place-items: center; align-self: center; }
.tl-now svg { width: 16px; height: 16px; }
.track { height: 52px; }
.track input[type=range]::-webkit-slider-runnable-track { height: 52px; }
.track input[type=range]::-moz-range-track { height: 52px; }
.track input[type=range]::-webkit-slider-thumb { height: 52px; }
.track input[type=range]::-moz-range-thumb { height: 52px; }
.bar { top: 21px; }
.hours { top: 34px; }
.days b.mid { top: 4px; height: 27px; }
/* v29 : timeline sur un axe de temps commun à tous les onglets */
.bar { display: block; position: absolute; }
.bar i { position: absolute; top: 0; bottom: 0; flex: none; border-right: 0; box-shadow: inset -1px 0 0 rgba(0,0,0,.22); }
.days b.nowmark { position: absolute; top: 15px; height: 17px; width: 0; border-left: 2px solid #fff; border-radius: 1px; transform: translateX(-1px); }
/* v33 : bouton ↻ */
#btn-refresh.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* v36 : état des données */
.health { display: grid; gap: 8px; margin: 6px 0 14px; }
.h-head { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 14px; }
.h-head span { margin-left: auto; color: var(--muted); font-size: 12px; }
.h-head i, .h-row > i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #6b7380; }
.h-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 2px; border-bottom: 1px solid rgba(255,255,255,.07); }
.h-row > i { margin-top: 5px; }
.h-row > div { flex: 1; min-width: 0; }
.h-l1 { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 14px; }
.h-l1 span { color: var(--text); opacity: .85; font-size: 13px; }
.h-row p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.h-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); margin-top: 5px; overflow: hidden; }
.h-bar b { display: block; height: 100%; background: currentColor; }
.h-ok > i, .h-ok .h-bar b { background: #4cc38a; } .h-ok .h-bar b { color: #4cc38a; }
.h-warn > i, .h-warn .h-bar b { background: #f0b43c; }
.h-bad > i, .h-bad .h-bar b { background: #e5604f; }
.h-off .h-bar b { background: #6b7380; }
.h-head.h-ok i { background: #4cc38a; } .h-head.h-warn i { background: #f0b43c; } .h-head.h-bad i { background: #e5604f; }
.h-refresh { justify-self: start; margin-top: 2px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 99px; cursor: pointer; }
details.tech { margin-top: 12px; } details.tech summary { cursor: pointer; color: var(--muted); font-size: 13px; }
/* v38 : ↻ dans l'en-tête de l'écran ⓘ */
.sheet-head { display: flex; align-items: center; gap: 8px; }
.sheet-head h2 { margin: 0; flex: 1; min-width: 0; }
.hcell .hk { color: #9fc4e8; }   /* v39 : vent en nœuds */
.hlegend { flex-basis: 46px; }
/* v40 : unité du vent dans la légende */
.wleg-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.wleg-row .note { margin: 0; flex: 1; min-width: 0; }
.seg.wunit { flex: none; padding: 2px; }
.seg.wunit button { padding: 3px 8px; font-size: 11px; }
/* v42 : favoris, lecture depuis le début */
.pin-fav { font-size: 17px; color: var(--muted); }
.pin-fav.on { color: #f2c27b; }
.favs-add { width: 100%; margin: 8px 0 4px; border: 1px dashed rgba(242,194,123,.5); background: rgba(242,194,123,.08); color: #f2c27b; font: inherit; font-weight: 600; font-size: 14px; padding: 10px 12px; border-radius: 10px; text-align: left; cursor: pointer; }
.favs { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.fav { display: flex; align-items: stretch; gap: 6px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.fav.cur { border-color: rgba(255,90,78,.6); background: rgba(255,90,78,.08); }
.fav-go { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; padding: 10px 12px; cursor: pointer; }
.fav-go strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fav-go > span:not(.fav-wx) { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fav-tools { display: flex; align-items: center; gap: 2px; padding-right: 6px; }
.fav-tools button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.fav-tools button:disabled { opacity: .25; cursor: default; }
.fav-tools button:active { background: rgba(255,255,255,.08); }
.tl-start { width: 30px; }
.favs, .favs-add { clear: both; }
.tl-now, .tl-start { width: 28px; height: 26px; }
.tl-head { gap: 6px; }
#favs-list { padding-left: 0; margin-left: 0; }
/* v43 : bouton présent toujours visible, météo des favoris */
.tl-now:disabled { opacity: .3; cursor: default; }
.fav-go .fav-wx { display: flex; align-items: center; gap: 8px; margin-top: 6px; white-space: normal; overflow: visible; max-width: 100%; color: var(--text); font-size: 13px; }
.fav-wx.wait { color: var(--muted); }
.fav-wx .fw-i { font-size: 22px; line-height: 1; }
.fav-wx .fw-t { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fav-wx .fw-d { color: var(--muted); font-size: 12px; line-height: 1.3; white-space: normal; }

/* favoris sur la carte */
.favpt { position: relative; width: 18px; height: 18px; }
.favpt i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #ffc83d; color: #3a2a00; font: 700 11px/1 system-ui, sans-serif; font-style: normal; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.favpt span { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 600 12px/1 system-ui, sans-serif; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 2px #000; pointer-events: none; }
.favs-map { clear: both; }
.fav-wx .nw { white-space: nowrap; }

/* boutons ⏮ et →|← fixes, tout à droite de la ligne : seuls jour et étiquette varient en largeur */
.tl-kind { flex: 0 1 auto; min-width: 0; max-width: 42%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-start { margin-left: 2px; }

/* v45 : boutons flottants calés sur le panneau du bas */
.fabs { bottom: calc(var(--tl-h, 160px) + 14px); }
/* v45 : liste des favoris, mode lecture et mode « Modifier » */
#sheet-favs .sheet-head { margin-bottom: 6px; }
.favs-edit { border: 1px solid var(--line); background: transparent; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; height: 34px; padding: 0 12px; border-radius: 10px; cursor: pointer; flex: none; }
.favs-edit.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.favs { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fav { display: block; min-width: 0; }
.fav-go { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name main" "det det"; align-items: center; column-gap: 12px; row-gap: 6px; padding: 12px 14px; }
.fav-name { grid-area: name; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fav-name strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.fav-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-main { grid-area: main; display: flex; align-items: center; gap: 6px; }
.fav-main .fw-i { font-size: 26px; line-height: 1; }
.fav-main .fw-t { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.fav-det { grid-area: det; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.fav-det .nw { white-space: nowrap; }
.fw-wait { color: var(--muted); }
.fav.edit { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; }
.fav.edit .fav-name { flex: 1; }
.fav.edit .fav-tools { display: flex; gap: 6px; padding: 0; }
.fav.edit .fav-tools button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); font-size: 17px; }
.fav.edit .fav-tools button.del { color: #ff7a70; border-color: rgba(255,90,78,.35); background: rgba(255,90,78,.08); }
.fav.edit .fav-tools button:disabled { opacity: .25; }

/* v46 : fiche au point colorisée */
.dcard .dw { font-size: 11px; font-weight: 600; white-space: nowrap; }
.dcard .dt span { font-weight: 600; }
.hcell .hw { font-weight: 600; }
.hcell .hk { opacity: .8; }
.hcell .hw small { margin-left: 1px; font-size: 9px; }
.dhead b { font-weight: 700; }
