/* =========================================================
   AubeMeteo - Theme BOREAL (aligne sur L'Aube Etoilee Inter)
   4 modes : aube (5h-10h) · jour (10h-17h) · crepuscule (17h-21h) · nuit (21h-5h)
   ========================================================= */

/* ---- JOUR (defaut, 10h-17h) : ciel clair ---- */
:root, [data-boreal="jour"] {
  --boreal-sky-top: #87ceeb;
  --boreal-sky-mid: #b8d8e8;
  --boreal-sky-bottom: #e8f0e4;

  --bg: #e8f0e4;
  --bg-soft: #d8e8d4;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #ffffff;
  --card-border: rgba(31, 51, 41, 0.14);
  --card-border-hover: rgba(31, 51, 41, 0.32);
  --text: #1f3329;
  --text-muted: #4b6254;
  --text-dim: #7c8e80;
  --accent: #1f3329;
  --accent-2: #fbbf24;
  --accent-soft: rgba(31, 51, 41, 0.1);
  --header-bg: rgba(255, 255, 255, 0.72);
  --header-border: rgba(31, 51, 41, 0.12);

  --sun: #d97706;
  --sun-soft: rgba(217, 119, 6, 0.15);
  --rain: #1d4ed8;
  --rain-soft: rgba(29, 78, 216, 0.2);
  --snow: #e0f2fe;
  --storm: #6d28d9;
  --storm-soft: rgba(109, 40, 217, 0.18);
  --fog: #64748b;

  --shadow-lg: 0 20px 60px -20px rgba(31, 51, 41, 0.18);
  --shadow-md: 0 4px 20px -4px rgba(31, 51, 41, 0.1);
  --radius: 14px;
  --radius-sm: 8px;
  --star-opacity: 0;
  --aurora-opacity: 0;
  color-scheme: light;
}

/* ---- AUBE (5h-10h) : brume chaude et rose ---- */
[data-boreal="aube"] {
  --boreal-sky-top: #c8dce8;
  --boreal-sky-mid: #f2d4b8;
  --boreal-sky-bottom: #e8c8a8;

  --bg: #e8c8a8;
  --bg-soft: #d4b896;
  --card: rgba(255, 250, 240, 0.8);
  --card-solid: #fff5e0;
  --card-border: rgba(74, 58, 46, 0.14);
  --card-border-hover: rgba(74, 58, 46, 0.35);
  --text: #3a2618;
  --text-muted: #6b4d3a;
  --text-dim: #98826e;
  --accent: #b45309;
  --accent-2: #fbbf24;
  --accent-soft: rgba(180, 83, 9, 0.1);
  --header-bg: rgba(250, 235, 215, 0.75);
  --header-border: rgba(74, 58, 46, 0.15);

  --sun: #d97706;
  --sun-soft: rgba(217, 119, 6, 0.18);
  --rain: #1d4ed8;
  --rain-soft: rgba(29, 78, 216, 0.2);
  --snow: #e0f2fe;
  --storm: #6d28d9;
  --storm-soft: rgba(109, 40, 217, 0.2);

  --shadow-lg: 0 20px 60px -20px rgba(74, 58, 46, 0.22);
  --shadow-md: 0 4px 20px -4px rgba(74, 58, 46, 0.12);
  --star-opacity: 0.3;
  --aurora-opacity: 0.55;
  color-scheme: light;
}

/* ---- CREPUSCULE (17h-21h) : coucher de soleil ---- */
[data-boreal="crepuscule"] {
  --boreal-sky-top: #1e1b4b;
  --boreal-sky-mid: #c2410c;
  --boreal-sky-bottom: #f4a76a;

  --bg: #2b1a2f;
  --bg-soft: #4a3a5c;
  --card: rgba(70, 50, 80, 0.58);
  --card-solid: #3a2a4c;
  --card-border: rgba(255, 245, 224, 0.14);
  --card-border-hover: rgba(253, 230, 138, 0.45);
  --text: #fff5e0;
  --text-muted: #d8b8e0;
  --text-dim: #a88caa;
  --accent: #fde68a;
  --accent-2: #fb923c;
  --accent-soft: rgba(253, 230, 138, 0.15);
  --header-bg: rgba(26, 14, 38, 0.72);
  --header-border: rgba(255, 245, 224, 0.12);

  --sun: #fbbf24;
  --sun-soft: rgba(251, 191, 36, 0.18);
  --rain: #60a5fa;
  --rain-soft: rgba(96, 165, 250, 0.22);
  --snow: #e0f2fe;
  --storm: #c084fc;
  --storm-soft: rgba(192, 132, 252, 0.22);

  --shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 4px 20px -4px rgba(0, 0, 0, 0.35);
  --star-opacity: 0.5;
  --aurora-opacity: 0.75;
  color-scheme: dark;
}

/* ---- METEO · CLOUDY : ciel couvert, ambiance grise chaleureuse ---- */
[data-boreal="cloudy"] {
  --boreal-sky-top: #475569;
  --boreal-sky-mid: #64748b;
  --boreal-sky-bottom: #94a3b8;

  --bg: #334155;
  --bg-soft: #475569;
  --card: rgba(30, 41, 59, 0.58);
  --card-solid: #1e293b;
  --card-border: rgba(226, 232, 240, 0.14);
  --card-border-hover: rgba(226, 232, 240, 0.38);
  --text: #f1f5f9;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --accent: #a5b4fc;
  --accent-2: #fde68a;
  --accent-soft: rgba(165, 180, 252, 0.14);
  --header-bg: rgba(30, 41, 59, 0.7);
  --header-border: rgba(226, 232, 240, 0.1);

  --sun: #fbbf24;
  --sun-soft: rgba(251, 191, 36, 0.15);
  --rain: #60a5fa;
  --rain-soft: rgba(96, 165, 250, 0.2);
  --snow: #e0f2fe;
  --storm: #a855f7;
  --storm-soft: rgba(168, 85, 247, 0.2);
  --fog: #cbd5e1;

  --shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 20px -4px rgba(0, 0, 0, 0.3);
  --star-opacity: 0;
  --aurora-opacity: 0.2;
  color-scheme: dark;
}

/* ---- METEO · RAINY : pluie melancolique bleu-gris ---- */
[data-boreal="rainy"] {
  --boreal-sky-top: #0f172a;
  --boreal-sky-mid: #1e3a5f;
  --boreal-sky-bottom: #475569;

  --bg: #1e293b;
  --bg-soft: #334155;
  --card: rgba(30, 58, 95, 0.55);
  --card-solid: #1e3a5f;
  --card-border: rgba(147, 197, 253, 0.14);
  --card-border-hover: rgba(147, 197, 253, 0.4);
  --text: #e0f2fe;
  --text-muted: #93c5fd;
  --text-dim: #60a5fa;
  --accent: #60a5fa;
  --accent-2: #bae6fd;
  --accent-soft: rgba(96, 165, 250, 0.15);
  --header-bg: rgba(15, 23, 42, 0.7);
  --header-border: rgba(147, 197, 253, 0.12);

  --sun: #fbbf24;
  --sun-soft: rgba(251, 191, 36, 0.14);
  --rain: #3b82f6;
  --rain-soft: rgba(59, 130, 246, 0.2);
  --snow: #e0f2fe;
  --storm: #a855f7;
  --storm-soft: rgba(168, 85, 247, 0.2);
  --fog: #94a3b8;

  --shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 4px 20px -4px rgba(0, 0, 0, 0.35);
  --star-opacity: 0;
  --aurora-opacity: 0.15;
  color-scheme: dark;
}

/* ---- METEO · STORMY : orage, tonnerre et foudre ---- */
[data-boreal="stormy"] {
  --boreal-sky-top: #020617;
  --boreal-sky-mid: #1e1b4b;
  --boreal-sky-bottom: #312e81;

  --bg: #1e1b4b;
  --bg-soft: #312e81;
  --card: rgba(30, 27, 75, 0.58);
  --card-solid: #1e1b4b;
  --card-border: rgba(196, 181, 253, 0.16);
  --card-border-hover: rgba(196, 181, 253, 0.4);
  --text: #ede9fe;
  --text-muted: #c4b5fd;
  --text-dim: #a78bfa;
  --accent: #c4b5fd;
  --accent-2: #fde68a;
  --accent-soft: rgba(196, 181, 253, 0.14);
  --header-bg: rgba(30, 27, 75, 0.75);
  --header-border: rgba(196, 181, 253, 0.14);

  --sun: #fbbf24;
  --sun-soft: rgba(251, 191, 36, 0.14);
  --rain: #93c5fd;
  --rain-soft: rgba(147, 197, 253, 0.22);
  --snow: #e0f2fe;
  --storm: #c084fc;
  --storm-soft: rgba(192, 132, 252, 0.26);
  --fog: #94a3b8;

  --shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, 0.65);
  --shadow-md: 0 4px 20px -4px rgba(0, 0, 0, 0.4);
  --star-opacity: 0.2;
  --aurora-opacity: 0.5;
  color-scheme: dark;
}

/* ---- METEO · SNOWY : neige, blanc bleute cristallin ---- */
[data-boreal="snowy"] {
  --boreal-sky-top: #cbd5e1;
  --boreal-sky-mid: #e2e8f0;
  --boreal-sky-bottom: #f1f5f9;

  --bg: #e2e8f0;
  --bg-soft: #f1f5f9;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #ffffff;
  --card-border: rgba(30, 64, 175, 0.14);
  --card-border-hover: rgba(30, 64, 175, 0.35);
  --text: #1e293b;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --accent: #1e40af;
  --accent-2: #0ea5e9;
  --accent-soft: rgba(30, 64, 175, 0.1);
  --header-bg: rgba(255, 255, 255, 0.75);
  --header-border: rgba(30, 64, 175, 0.14);

  --sun: #d97706;
  --sun-soft: rgba(217, 119, 6, 0.12);
  --rain: #1d4ed8;
  --rain-soft: rgba(29, 78, 216, 0.15);
  --snow: #bae6fd;
  --storm: #6d28d9;
  --storm-soft: rgba(109, 40, 217, 0.15);
  --fog: #64748b;

  --shadow-lg: 0 20px 60px -20px rgba(30, 41, 59, 0.2);
  --shadow-md: 0 4px 20px -4px rgba(30, 41, 59, 0.12);
  --star-opacity: 0;
  --aurora-opacity: 0;
  color-scheme: light;
}

/* ---- NUIT (21h-5h) : ciel etoile ---- */
[data-boreal="nuit"] {
  --boreal-sky-top: #020617;
  --boreal-sky-mid: #0a1a24;
  --boreal-sky-bottom: #0f172a;

  --bg: #0a1a24;
  --bg-soft: #111827;
  --card: rgba(30, 41, 59, 0.55);
  --card-solid: #1e293b;
  --card-border: rgba(244, 248, 246, 0.12);
  --card-border-hover: rgba(56, 189, 248, 0.38);
  --text: #f4f8f6;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #38bdf8;
  --accent-2: #fde68a;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --header-bg: rgba(10, 26, 36, 0.7);
  --header-border: rgba(244, 248, 246, 0.1);

  --sun: #fbbf24;
  --sun-soft: rgba(251, 191, 36, 0.16);
  --rain: #3b82f6;
  --rain-soft: rgba(59, 130, 246, 0.2);
  --snow: #e0f2fe;
  --storm: #a855f7;
  --storm-soft: rgba(168, 85, 247, 0.2);
  --fog: #94a3b8;

  --shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 20px -4px rgba(0, 0, 0, 0.4);
  --star-opacity: 1;
  --aurora-opacity: 0.3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background:
    linear-gradient(180deg, var(--boreal-sky-top) 0%, var(--boreal-sky-mid) 40%, var(--boreal-sky-bottom) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  transition: background 1.2s ease, color 0.4s ease;
  position: relative;
}

/* ===== Couches decoratives (stars + aurora) ===== */
.sky-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.sky-layer > * { position: absolute; inset: 0; }

.stars {
  background-image:
    radial-gradient(1px 1px at 15% 20%, #fff, transparent 60%),
    radial-gradient(1.2px 1.2px at 32% 58%, #fff, transparent 60%),
    radial-gradient(1px 1px at 48% 12%, #fde68a, transparent 60%),
    radial-gradient(1.4px 1.4px at 64% 34%, #fff, transparent 60%),
    radial-gradient(1px 1px at 78% 22%, #fff, transparent 60%),
    radial-gradient(1.6px 1.6px at 85% 66%, #c084fc, transparent 60%),
    radial-gradient(1px 1px at 8% 70%, #fff, transparent 60%),
    radial-gradient(1.1px 1.1px at 28% 80%, #fff, transparent 60%),
    radial-gradient(1px 1px at 58% 82%, #fde68a, transparent 60%),
    radial-gradient(1.2px 1.2px at 72% 46%, #fff, transparent 60%),
    radial-gradient(1px 1px at 92% 28%, #fff, transparent 60%),
    radial-gradient(1.3px 1.3px at 40% 30%, #fff, transparent 60%),
    radial-gradient(1px 1px at 20% 42%, #fff, transparent 60%);
  opacity: var(--star-opacity);
  transition: opacity 1.5s ease;
  animation: twinkle 4.5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.35); }
}

.aurora {
  background:
    radial-gradient(ellipse 60% 28% at 20% 10%, rgba(147, 197, 253, 0.28), transparent 65%),
    radial-gradient(ellipse 50% 22% at 80% 16%, rgba(236, 72, 153, 0.22), transparent 65%),
    radial-gradient(ellipse 70% 24% at 50% 22%, rgba(134, 239, 172, 0.2), transparent 65%);
  filter: blur(40px);
  opacity: var(--aurora-opacity);
  animation: aurora-drift 18s ease-in-out infinite alternate;
  transition: opacity 1.5s ease;
}
@keyframes aurora-drift {
  0%   { transform: translateX(-4%) translateY(0) scale(1); }
  100% { transform: translateX(6%) translateY(2%) scale(1.08); }
}

/* Les contenus passent au-dessus */
.site-header, main.container, .site-footer { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #7dd3fc; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ===== Header ===== */
.site-header {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--header-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.brand-tagline {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--card-border);
}
@media (max-width: 760px) {
  .brand-tagline { display: none; }
}

.site-nav a {
  margin-left: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--accent); }

.lang-switch {
  margin-left: 18px;
  display: inline-flex;
  gap: 4px;
  padding: 3px 4px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}
.lang-switch .lang-link {
  margin: 0;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.lang-switch .lang-link.active {
  background: var(--accent);
  color: var(--header-bg);
}
.lang-switch .lang-link:hover { color: var(--text); }
.lang-switch .lang-link.active:hover { color: var(--header-bg); }

.header-search {
  flex: 1;
  max-width: 360px;
  display: flex;
  gap: 6px;
}
.header-search input {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 0.88rem;
}
.header-search input::placeholder { color: var(--text-dim); }
.header-search button {
  background: var(--accent);
  color: #0a0e1a;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

main.container { flex: 1; padding-top: 30px; padding-bottom: 60px; }

/* ===== Hero / bannière globale ===== */
.hero, .city-hero {
  position: relative;
  border-radius: var(--radius);
  padding: 34px 36px;
  margin-bottom: 24px;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero::before, .city-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.15), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,0.1), transparent 40%);
  pointer-events: none;
}
.hero-sun { background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #fde68a 100%); }
.hero-cloud-sun { background: linear-gradient(135deg, #0ea5e9 0%, #7dd3fc 50%, #e2e8f0 100%); }
.hero-cloud { background: linear-gradient(135deg, #475569 0%, #64748b 50%, #94a3b8 100%); }
.hero-rain, .hero-drizzle { background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%); }
.hero-storm { background: linear-gradient(135deg, #1e1b4b 0%, #6d28d9 50%, #a855f7 100%); }
.hero-snow { background: linear-gradient(135deg, #64748b 0%, #cbd5e1 50%, #f8fafc 100%); color: #0f172a; }
.hero-fog { background: linear-gradient(135deg, #475569 0%, #94a3b8 50%, #cbd5e1 100%); }
.hero-unknown { background: linear-gradient(135deg, #1e293b 0%, #334155 100%); }

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}
.hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: bold;
  border: 1px solid rgba(255,255,255,0.3);
}
.hero-icon.big-icon { width: 88px; height: 88px; font-size: 2.6rem; }
.hero-text h1 {
  margin: 0 0 6px 0;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.country-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  margin-left: 10px;
  vertical-align: middle;
}
.hero-text .hero-sub {
  margin: 0;
  font-size: 1rem;
  opacity: 0.95;
}
.hero-sub-small { font-size: 0.82rem !important; opacity: 0.78 !important; margin-top: 6px !important; }
.hero-big-uptime {
  text-align: right;
  padding-left: 20px;
  border-left: 1px solid rgba(255,255,255,0.25);
}
.hero-big-uptime .big {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.hero-big-uptime .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-top: 4px;
}

/* ===== KPI strip ===== */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.kpi {
  background: var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi-value.sun { color: var(--sun); }
.kpi-value.rain { color: var(--rain); }
.kpi-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  font-weight: 500;
}

/* ===== Quick actions ===== */
.quick-actions { margin: -6px 0 24px 0; }
.quick-search {
  display: flex;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.quick-search input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}
.quick-search input::placeholder { color: var(--text-dim); }

/* ===== Category / city grid ===== */
.category { margin-bottom: 28px; }
.category-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.category-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.city-card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Particules meteo animees sur les cartes */
.city-card.weather-rain::after,
.city-card.weather-drizzle::after,
.city-card.weather-storm::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(170deg, transparent 45%, rgba(96, 165, 250, 0.35) 47%, transparent 49%),
    linear-gradient(170deg, transparent 60%, rgba(96, 165, 250, 0.3) 62%, transparent 64%),
    linear-gradient(170deg, transparent 75%, rgba(96, 165, 250, 0.25) 77%, transparent 79%);
  background-size: 100% 20px;
  opacity: 0.35;
  animation: rain-fall 0.9s linear infinite;
}
.city-card.weather-snow::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 15% 20%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.8px 1.8px at 45% 50%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(2.2px 2.2px at 78% 32%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.6px 1.6px at 30% 70%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(2px 2px at 60% 82%, rgba(255,255,255,0.85), transparent 60%);
  background-size: 120px 140px;
  opacity: 0.55;
  animation: snow-fall 6s linear infinite;
}
.city-card.weather-sun::after {
  content: "";
  position: absolute;
  top: -50%; right: -40%;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,0.25), transparent 65%);
  pointer-events: none;
  animation: sun-pulse 4s ease-in-out infinite;
}
.city-card.weather-storm::after {
  background-image:
    linear-gradient(170deg, transparent 45%, rgba(168, 85, 247, 0.35) 47%, transparent 49%),
    linear-gradient(170deg, transparent 62%, rgba(168, 85, 247, 0.3) 64%, transparent 66%);
  animation-duration: 0.5s;
}
@keyframes rain-fall {
  from { background-position: 0 -20px; }
  to   { background-position: 0 0; }
}
@keyframes snow-fall {
  from { background-position: 0 -20px, 20px -10px, 40px -30px, 10px -15px, 30px -5px; }
  to   { background-position: 0 140px, 20px 130px, 40px 110px, 10px 125px, 30px 135px; }
}
@keyframes sun-pulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.08); }
}
.city-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.6;
}
.city-card.weather-sun::before { background: var(--sun); }
.city-card.weather-cloud-sun::before { background: var(--sun); opacity: 0.5; }
.city-card.weather-rain::before,
.city-card.weather-drizzle::before { background: var(--rain); }
.city-card.weather-storm::before { background: var(--storm); }
.city-card.weather-snow::before { background: var(--snow); }
.city-card.weather-fog::before { background: var(--fog); }
.city-card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.city-link {
  display: block;
  color: var(--text);
}
.city-link:hover { color: var(--text); }

.city-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.city-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.city-country {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.city-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.city-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 0 6px 0;
}
.temp-main { display: flex; align-items: baseline; }
.temp-value {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.temp-unit {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}
.weather-desc {
  text-align: right;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 55%;
}

.city-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--card-border);
  padding-top: 8px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.temp-min { color: #7dd3fc; font-weight: 700; }
.temp-max { color: #fb923c; font-weight: 700; }

.remove-form {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
}
.remove-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(0,0,0,0.25);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}
.remove-btn:hover { color: #ef4444; border-color: #ef4444; }

/* ===== Detail page ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.back-link:hover { color: var(--accent); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 20px 0 14px 0;
  letter-spacing: -0.02em;
}

/* ===== Hourly scroll ===== */
.hourly-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px 2px;
  scroll-snap-type: x mandatory;
}
.hour-card {
  flex: 0 0 auto;
  min-width: 88px;
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  scroll-snap-align: start;
}
.hour-card.weather-rain, .hour-card.weather-drizzle { border-color: rgba(59, 130, 246, 0.35); background: var(--rain-soft); }
.hour-card.weather-sun { border-color: rgba(251, 191, 36, 0.35); background: var(--sun-soft); }
.hour-card.weather-storm { border-color: rgba(168, 85, 247, 0.35); background: var(--storm-soft); }
.hour-time { font-size: 0.76rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.hour-icon { font-size: 1.6rem; margin: 4px 0; }
.hour-temp { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.hour-precip { font-size: 0.75rem; color: #60a5fa; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hour-wind { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.hour-feel { font-size: 0.68rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.hour-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.snow-sum { color: #cbd5e1; font-size: 0.78rem; font-weight: 600; }
.rain-sum { color: #60a5fa; font-size: 0.78rem; font-weight: 600; }
.gust-label { color: #f472b6; font-size: 0.78rem; font-weight: 600; }
.hour-card { min-width: 96px; }

/* ===== Daily list ===== */
.daily-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 6px;
}
.daily-row {
  display: grid;
  grid-template-columns: 100px 40px 1fr 70px 100px 80px 200px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.daily-row:hover { background: rgba(56, 189, 248, 0.06); }
.day-label { font-weight: 600; color: var(--text); }
.day-icon { font-size: 1.4rem; text-align: center; }
.day-desc { color: var(--text-muted); font-size: 0.9rem; }
.day-precip { color: #60a5fa; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.day-wind { color: var(--text-muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.day-temps { display: flex; align-items: center; gap: 8px; justify-content: flex-end; font-variant-numeric: tabular-nums; font-weight: 700; }
.temp-bar {
  display: inline-block;
  width: 60px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #7dd3fc, #fde68a, #fb923c);
}

/* ===== History chart ===== */
.history-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.history-bar {
  flex: 1;
  min-width: 2px;
  height: var(--h, 30%);
  background: linear-gradient(180deg, #fde68a, var(--accent));
  border-radius: 3px 3px 0 0;
  opacity: 0.85;
  cursor: help;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.history-bar:hover { opacity: 1; transform: scaleY(1.05); }
.history-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ===== Temperature color gradient ===== */
.t-glacial { color: #a78bfa !important; }
.t-vcold   { color: #818cf8 !important; }
.t-cold    { color: #60a5fa !important; }
.t-cool    { color: #2dd4bf !important; }
.t-mild    { color: #86efac !important; }
.t-warm    { color: #fbbf24 !important; }
.t-hot     { color: #fb923c !important; }
.t-vhot    { color: #ef4444 !important; }
.t-na      { color: var(--text-dim) !important; }

.temp-main.t-glacial { color: #a78bfa; }
.temp-main.t-vcold   { color: #818cf8; }
.temp-main.t-cold    { color: #60a5fa; }
.temp-main.t-cool    { color: #2dd4bf; }
.temp-main.t-mild    { color: #86efac; }
.temp-main.t-warm    { color: #fbbf24; }
.temp-main.t-hot     { color: #fb923c; }
.temp-main.t-vhot    { color: #ef4444; }
.temp-main.t-na      { color: var(--text-dim); }

.temp-main { color: var(--text); transition: color 0.3s ease; }

/* ===== Sparkline (homepage city cards) ===== */
.spark-wrap {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.city-card.weather-sun .spark-wrap { color: #fbbf24; }
.city-card.weather-cloud-sun .spark-wrap { color: #fde68a; }
.city-card.weather-rain .spark-wrap,
.city-card.weather-drizzle .spark-wrap { color: #60a5fa; }
.city-card.weather-storm .spark-wrap { color: #a855f7; }
.city-card.weather-snow .spark-wrap { color: #cbd5e1; }
.city-card.weather-fog .spark-wrap { color: #94a3b8; }
.spark {
  width: 100%;
  height: 36px;
  display: block;
}
.spark-range {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ===== Gauges ===== */
.gauge-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}
.gauge-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
  transition: width 0.4s ease;
}
.gauge-fill.clouds { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.gauge-fill.humidity { background: linear-gradient(90deg, #38bdf8, #3b82f6); }

/* ===== UV chip ===== */
.uv-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.uv-low     { background: rgba(34, 197, 94, 0.2);  color: #86efac; }
.uv-mid     { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.uv-high    { background: rgba(251, 146, 60, 0.2); color: #fb923c; }
.uv-vhigh   { background: rgba(239, 68, 68, 0.2);  color: #fb7185; }
.uv-extreme { background: rgba(168, 85, 247, 0.3); color: #c4b5fd; }

/* ===== Wind compass ===== */
.wind-compass {
  margin-top: 10px;
  color: var(--text-muted);
}
.wind-compass svg {
  width: 56px;
  height: 56px;
  display: block;
  margin: 0 auto;
}
.wind-arrow {
  transform-origin: 30px 30px;
  transform: rotate(var(--deg, 0deg));
  transition: transform 0.5s ease;
}

/* ===== Sun arc ===== */
.sun-section { margin-bottom: 28px; }
.sun-panel {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.12), rgba(251, 191, 36, 0.08) 60%, rgba(14, 165, 233, 0.1));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 24px 16px;
}
.sun-arc {
  width: 100%;
  max-width: 380px;
  height: 100px;
  display: block;
  margin: 0 auto 8px;
}
.sun-endpoints {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.sun-endpoints .sun-ico { font-size: 1.3rem; display: block; margin-bottom: 2px; }
.sun-endpoints .sun-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.moon-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
}
.moon-icon { font-size: 1.8rem; line-height: 1; }
.moon-text strong { color: var(--text); font-weight: 700; }
.moon-text { font-size: 0.78rem; color: var(--text-muted); line-height: 1.35; }

.sun-progress {
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 14px;
  font-weight: 600;
}

/* ===== Hourly temperature chart ===== */
.chart-wrap {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 18px 10px;
}
.temp-chart {
  width: 100%;
  height: 260px;
  color: var(--text);
  display: block;
}
@media (min-width: 900px) {
  .temp-chart { height: 300px; }
}
.chart-legend {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--card-border);
}
.chart-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}
.chart-legend .line-temp { background: linear-gradient(90deg, #38bdf8, #fb923c); }
.chart-legend .dot-rain { background: #3b82f6; }
.chart-legend .chart-range { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ===== Daily temperature range bar ===== */
.temp-range {
  position: relative;
  display: inline-block;
  flex: 1;
  height: 8px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 4px;
  max-width: 140px;
  min-width: 60px;
  overflow: hidden;
}
.temp-range-bar {
  position: absolute;
  top: 0; bottom: 0;
  background: linear-gradient(90deg, #60a5fa, #2dd4bf 30%, #fbbf24 60%, #fb923c 85%, #ef4444);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.day-uv { text-align: center; }

/* ===== Air quality + pollens ===== */
.air-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}
@media (max-width: 760px) {
  .air-panel { grid-template-columns: 1fr; }
}
.aqi-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius);
  color: #0a0e1a;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}
.aqi-hero.aqi-great   { background: linear-gradient(135deg, #4ade80, #22c55e); }
.aqi-hero.aqi-good    { background: linear-gradient(135deg, #a3e635, #84cc16); }
.aqi-hero.aqi-mid     { background: linear-gradient(135deg, #fde047, #facc15); }
.aqi-hero.aqi-poor    { background: linear-gradient(135deg, #fb923c, #f97316); color: #fff; }
.aqi-hero.aqi-bad     { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.aqi-hero.aqi-extreme { background: linear-gradient(135deg, #a855f7, #7e22ce); color: #fff; }
.aqi-hero.t-na        { background: var(--card); color: var(--text); }
.aqi-value {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.aqi-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.aqi-sub { font-size: 1rem; font-weight: 700; }

.air-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.air-chip {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chip-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.chip-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.chip-value em { font-style: normal; font-size: 0.72rem; color: var(--text-muted); font-weight: 500; margin-left: 2px; }

.pollen-panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.pollen-title { margin: 0 0 10px 0; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.pollen-list { display: flex; flex-direction: column; gap: 8px; }
.pollen-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px 90px;
  gap: 10px;
  align-items: center;
  font-size: 0.88rem;
}
.pollen-label { color: var(--text); font-weight: 600; }
.pollen-bar-wrap {
  height: 8px;
  background: rgba(148,163,184,0.15);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.pollen-bar {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.pollen-bar.pollen-none  { background: #64748b; }
.pollen-bar.pollen-low   { background: linear-gradient(90deg, #86efac, #4ade80); }
.pollen-bar.pollen-mid   { background: linear-gradient(90deg, #fde047, #facc15); }
.pollen-bar.pollen-high  { background: linear-gradient(90deg, #fb923c, #f97316); }
.pollen-bar.pollen-vhigh { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.pollen-value { font-variant-numeric: tabular-nums; font-weight: 700; }
.pollen-value em { font-style: normal; font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.pollen-value.pollen-none  { color: var(--text-muted); }
.pollen-value.pollen-low   { color: #86efac; }
.pollen-value.pollen-mid   { color: #fde047; }
.pollen-value.pollen-high  { color: #fb923c; }
.pollen-value.pollen-vhigh { color: #ef4444; }
.pollen-chip {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}
.pollen-chip.pollen-none  { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.pollen-chip.pollen-low   { background: rgba(34,197,94,0.18); color: #86efac; }
.pollen-chip.pollen-mid   { background: rgba(250,204,21,0.22); color: #fde047; }
.pollen-chip.pollen-high  { background: rgba(249,115,22,0.22); color: #fb923c; }
.pollen-chip.pollen-vhigh { background: rgba(239,68,68,0.22); color: #fb7185; }
@media (max-width: 760px) {
  .pollen-row { grid-template-columns: 80px 1fr 60px; }
  .pollen-row .pollen-chip { grid-column: 2 / -1; text-align: left; }
}

/* ===== Alerts bar (homepage) ===== */
.alerts-bar {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(251, 146, 60, 0.08));
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 22px;
}
.alerts-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #fca5a5;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.alerts-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: alert-pulse 1.6s infinite;
}
@keyframes alert-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); transform: scale(1); }
  70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); transform: scale(1.05); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); transform: scale(1); }
}
.alerts-count {
  margin-left: auto;
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}
.alerts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 0.88rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.alert:hover { transform: translateY(-1px); color: var(--text); }
.alert-icon { font-size: 1.2rem; }
.alert-label { flex: 1; font-weight: 600; }
.alert-city { color: var(--text-muted); font-size: 0.78rem; font-weight: 500; }
.alert.alert-danger  { border-left: 3px solid #ef4444; }
.alert.alert-warning { border-left: 3px solid #fbbf24; }
.alert.alert-info    { border-left: 3px solid #38bdf8; }

/* ===== Leaflet map ===== */
.map-section { margin-bottom: 28px; }
.leaflet-map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #0b1222;
  box-shadow: var(--shadow-lg);
}
.leaflet-container { background: #0b1222; }
.leaflet-control-attribution {
  background: rgba(15, 23, 42, 0.75) !important;
  color: var(--text-muted) !important;
  font-size: 0.68rem !important;
  padding: 3px 8px !important;
  border-radius: 6px 0 0 0;
}
.leaflet-control-attribution a { color: var(--accent) !important; }
.leaflet-control-zoom a {
  background: var(--card-solid) !important;
  color: var(--text) !important;
  border-color: var(--card-border) !important;
}
.leaflet-control-zoom a:hover { background: var(--accent) !important; color: #0a0e1a !important; }

.aube-marker {
  background: transparent !important;
  border: none !important;
}
.map-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #0a0e1a;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 0 0 2px rgba(255,255,255,0.45) inset;
  width: 64px;
  height: 48px;
  line-height: 1;
  transition: transform 0.18s ease;
}
.aube-marker:hover .map-marker { transform: scale(1.15); z-index: 1000; }
.map-marker .mm-icon { font-size: 1.05rem; margin-bottom: 1px; line-height: 1; }
.map-marker .mm-temp { font-size: 0.95rem; font-variant-numeric: tabular-nums; }

.map-marker.map-marker--extreme::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  border: 2px solid rgba(239, 68, 68, 0.7);
  animation: marker-pulse 1.6s infinite;
  pointer-events: none;
}
@keyframes marker-pulse {
  0%   { transform: scale(0.92); opacity: 0.9; }
  70%  { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(0.92); opacity: 0; }
}

.map-footer {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.map-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.map-scale { display: flex; align-items: center; gap: 5px; }
.swatch {
  width: 14px; height: 14px; border-radius: 4px; display: inline-block;
}
.swatch.t-glacial { background: #a78bfa; }
.swatch.t-cold    { background: #60a5fa; }
.swatch.t-mild    { background: #86efac; }
.swatch.t-warm    { background: #fbbf24; }
.swatch.t-hot     { background: #fb923c; }
.swatch.t-vhot    { background: #ef4444; }

.jump-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  max-height: 120px;
  overflow-y: auto;
}
.jump-chip {
  border: 1px solid var(--card-border);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
  padding: 5px 11px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.jump-chip:hover {
  transform: translateY(-1px);
  background: rgba(56, 189, 248, 0.14);
  border-color: var(--card-border-hover);
}
.jump-temp {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
}
.jump-chip.t-cold .jump-temp    { color: #60a5fa; }
.jump-chip.t-mild .jump-temp    { color: #86efac; }
.jump-chip.t-warm .jump-temp    { color: #fbbf24; }
.jump-chip.t-hot .jump-temp     { color: #fb923c; }
.jump-chip.t-vhot .jump-temp    { color: #ef4444; }
.jump-chip.t-vcold .jump-temp,
.jump-chip.t-glacial .jump-temp { color: #a78bfa; }

/* Popup style */
.leaflet-popup-content-wrapper {
  background: var(--card-solid);
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.leaflet-popup-content { margin: 14px 18px; min-width: 200px; }
.leaflet-popup-tip { background: var(--card-solid); }
.leaflet-popup-close-button { color: var(--text-muted) !important; }
.map-popup strong { font-size: 1rem; display: block; }
.map-popup .popup-country { font-size: 0.78rem; color: var(--text-muted); }
.map-popup .popup-temp {
  font-size: 2rem;
  font-weight: 800;
  margin: 6px 0 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}
.map-popup .popup-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }
.map-popup .popup-spark {
  display: block;
  width: 100%;
  height: 36px;
  margin-bottom: 6px;
}
.map-popup .popup-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

/* Mini-carte sur page ville */
.minimap-section { margin-bottom: 22px; }
.minimap {
  width: 100%;
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #0b1222;
}

/* ===== API terms block ===== */
.terms-block {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-left: 3px solid #fbbf24;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-bottom: 24px;
}
.terms-block .section-title { margin: 0 0 10px 0; }
.terms-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text);
}
.terms-list li { padding-left: 4px; }

/* ===== API docs page ===== */
.api-hero {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(168, 85, 247, 0.12) 60%, rgba(251, 191, 36, 0.08));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.api-hero h1 { margin: 0 0 8px; font-size: 1.8rem; letter-spacing: -0.02em; }
.api-hero-badge {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--accent);
  color: #0a0e1a;
  padding: 10px 22px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}
.endpoint-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.endpoint-card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.2s ease;
}
.endpoint-card:hover { border-color: var(--card-border-hover); }
.endpoint-card.method-get    { border-left: 3px solid #38bdf8; }
.endpoint-card.method-post   { border-left: 3px solid #22c55e; }
.endpoint-card.method-delete { border-left: 3px solid #ef4444; }
.endpoint-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.method-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #0a0e1a;
}
.method-get .method-pill    { background: #38bdf8; }
.method-post .method-pill   { background: #22c55e; }
.method-delete .method-pill { background: #ef4444; color: #fff; }
.endpoint-path {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}
.endpoint-try {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--accent-soft);
}
.endpoint-summary { margin: 0 0 6px; color: var(--text); font-size: 0.92rem; }
.endpoint-returns, .endpoint-example { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.endpoint-label {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 6px;
}
.endpoint-example code {
  background: rgba(0,0,0,0.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  color: #fde68a;
}
.code-block {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  color: #e2e8f0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}
.wmo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.wmo-grid div {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.wmo-grid code {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 6px;
}

.fetch-footnote {
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ===== Search page ===== */
.search-hero {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(168, 85, 247, 0.12));
  border: 1px solid var(--card-border);
  margin-bottom: 28px;
}
.search-hero h1 { margin: 0 0 8px 0; font-size: 1.8rem; letter-spacing: -0.02em; }
.big-search {
  margin: 20px auto 0;
  max-width: 520px;
  display: flex;
  gap: 8px;
}
.big-search input {
  flex: 1;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
}
.btn {
  background: var(--accent);
  color: #0a0e1a;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: #7dd3fc; color: #0a0e1a; transform: translateY(-1px); }

.results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0;
}
.result-info { min-width: 0; }
.result-name { font-weight: 700; color: var(--text); }
.result-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 3px; }

.empty-box, .error-box {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  color: var(--text-muted);
}
.error-box { border-left: 3px solid #ef4444; color: #fca5a5; }

.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-state h1 { margin: 0 0 10px 0; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 22px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: auto;
  text-align: center;
}
.site-footer p { margin: 3px 0; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .site-header .container { gap: 8px; }
  .header-search { order: 3; width: 100%; max-width: none; }
  .site-nav a { margin-left: 12px; font-size: 0.82rem; }

  .hero-content, .city-hero .hero-content { grid-template-columns: auto 1fr; }
  .hero-big-uptime {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.25);
    padding: 12px 0 0 0;
    text-align: left;
  }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .hero, .city-hero { padding: 22px; }
  .daily-row {
    grid-template-columns: 80px 30px 1fr;
    row-gap: 6px;
  }
  .daily-row .day-desc { grid-column: 1 / -1; }
  .daily-row .day-precip, .daily-row .day-wind { grid-column: span 1; font-size: 0.78rem; }
  .daily-row .day-temps { grid-column: 1 / -1; justify-content: flex-start; }
}
