/* ── LOCAL FONTS ── */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('fonts/dm-sans-ext.woff2') format('woff2') tech(color-COLRv1),
       url('fonts/dm-sans.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('fonts/dm-sans.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/dm-sans-italic-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/dm-sans-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/dm-mono-300-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/dm-mono-300.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/dm-mono-400-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/dm-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/bebas-neue-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/bebas-neue.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.6s cubic-bezier(0.4,0,0.2,1);
  --accent: #4a90d9;
  --accent2: #89bef0;
  --card-border-w: 0.5px;
  --card-border-style: solid;
  --card-shadow: none;
}

/* ── THEMES ── */

[data-theme="verre"] { /* Glass premium — spatial, iOS 18 / Vision Pro dark */
  --bg: #0d0d0f; --bg2: #161618; --bg3: #1f1f22;
  --fg: #f2f2f7; --fg2: rgba(242,242,247,0.55); --fg3: rgba(242,242,247,0.28);
  --card: rgba(255,255,255,0.05); --card-b: rgba(255,255,255,0.09);
  --card-solid: #1a1a1d; --card-b-solid: #2a2a2f;
  --map-land: #0d0d0f;
  --radius: 20px; --radius-sm: 14px;
  --card-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 32px rgba(0,0,0,0.45);
}
[data-theme="plasma"] { /* Aurora sombre — Linear, Vercel, Stripe dark */
  --bg: #09090b; --bg2: #111113; --bg3: #1c1c22;
  --fg: #fafafa; --fg2: #a1a1aa; --fg3: #52525b;
  --card: rgba(255,255,255,0.03); --card-b: rgba(255,255,255,0.07);
  --card-solid: #141416; --card-b-solid: #27272a;
  --map-land: #09090b;
  --radius: 14px; --radius-sm: 10px;
  --card-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 8px 40px rgba(0,0,0,0.50);
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(139,92,246,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 55% 40% at 85% 85%, rgba(16,185,129,0.07) 0%, transparent 60%),
    #09090b;
}
[data-theme="carbone"] { /* Matte noir + grain — chassis MacBook Pro, Figma dark */
  --bg: #0a0a0a; --bg2: #111111; --bg3: #1a1a1a;
  --fg: #ffffff; --fg2: #888888; --fg3: #444444;
  --card: rgba(255,255,255,0.03); --card-b: rgba(255,255,255,0.08);
  --card-solid: #141414; --card-b-solid: #222222;
  --map-land: #0a0a0a;
  --radius: 6px; --radius-sm: 4px;
  --card-border-w: 1px;
  --card-shadow: none;
  background-color: #0a0a0a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  background-repeat: repeat;
}
/* ── NOUVEAUX : CLAIRS ── */

[data-theme="glace"] { /* Verre dépoli bleuté — cristallin, propre, iOS light */
  --bg: #f0f6fd; --bg2: #ffffff; --bg3: #e3edf7;
  --fg: #0f1729; --fg2: #4a5568; --fg3: #90a0b8;
  --card: rgba(255,255,255,0.72); --card-b: rgba(180,200,228,0.45);
  --card-solid: #ffffff; --card-b-solid: #e0e8f2;
  --map-land: #e4ecf5;
  --radius: 20px; --radius-sm: 14px;
  --card-shadow: 0 2px 24px rgba(15,23,42,0.06), 0 0 0 1px rgba(15,23,42,0.04);
}
[data-theme="aube"] { /* Aurore chaude — pêche, crémeux, doux */
  --bg: #fef7f2; --bg2: #ffffff; --bg3: #fde8dc;
  --fg: #2d1a0c; --fg2: #7a5a40; --fg3: #b89878;
  --card: rgba(255,255,255,0.80); --card-b: rgba(220,160,120,0.30);
  --card-solid: #ffffff; --card-b-solid: #f2e0d0;
  --map-land: #f2e6dc;
  --radius: 16px; --radius-sm: 10px;
  --card-shadow: 0 2px 20px rgba(40,20,10,0.05), 0 0 0 1px rgba(200,140,100,0.08);
}
[data-theme="nacre"] { /* Nacré lavande — nacré, éthéré, élégant */
  --bg: #f5f3fa; --bg2: #ffffff; --bg3: #ece6f5;
  --fg: #1a1530; --fg2: #5e5878; --fg3: #9a94b0;
  --card: rgba(255,255,255,0.78); --card-b: rgba(160,140,210,0.30);
  --card-solid: #ffffff; --card-b-solid: #e8e2f2;
  --map-land: #ebe6f2;
  --radius: 18px; --radius-sm: 12px;
  --card-shadow: 0 2px 24px rgba(30,20,60,0.05), 0 0 0 1px rgba(140,120,200,0.10);
}

/* ── NOUVEAUX : FONCÉS ── */

[data-theme="encre"] { /* Bleu encre profond — nocturne, littéraire, minimal */
  --bg: #080b1a; --bg2: #0e1128; --bg3: #181c3a;
  --fg: #e0e4ff; --fg2: #8890c8; --fg3: #4a5290;
  --card: rgba(255,255,255,0.03); --card-b: rgba(100,120,255,0.12);
  --card-solid: #101428; --card-b-solid: #1e2250;
  --map-land: #080b1a;
  --radius: 18px; --radius-sm: 12px;
  --card-shadow: 0 0 0 1px rgba(80,100,255,0.07), 0 8px 40px rgba(5,0,40,0.50);
}
[data-theme="cuivre"] { /* Cuivre chaud — terreux, métallique, enveloppant */
  --bg: #0e0b08; --bg2: #181410; --bg3: #241f18;
  --fg: #f0e8dc; --fg2: #a89878; --fg3: #6b5c48;
  --card: rgba(255,255,255,0.03); --card-b: rgba(200,160,100,0.15);
  --card-solid: #181410; --card-b-solid: #2a2418;
  --map-land: #0e0b08;
  --radius: 14px; --radius-sm: 10px;
  --card-shadow: 0 0 0 1px rgba(200,160,100,0.06), 0 8px 40px rgba(0,0,0,0.50);
}
[data-theme="mousse"] { /* Mousse végétale — forêt sombre, organique, ancré */
  --bg: #060e09; --bg2: #0c1810; --bg3: #14281c;
  --fg: #d8f0e0; --fg2: #6b9a78; --fg3: #3a6048;
  --card: rgba(255,255,255,0.03); --card-b: rgba(80,180,120,0.12);
  --card-solid: #0c1810; --card-b-solid: #1a3018;
  --map-land: #060e09;
  --radius: 16px; --radius-sm: 10px;
  --card-shadow: 0 0 0 1px rgba(60,160,100,0.07), 0 8px 40px rgba(0,10,5,0.50);
}

/* ── Glace : backdrop-filter comme Verre ── */
[data-theme="glace"] .hr-card,
[data-theme="glace"] .day-card,
[data-theme="glace"] .detail-card,
[data-theme="glace"] .city-hero,
[data-theme="glace"] .past-stats {
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

/* ── Verre : backdrop-filter sur toutes les surfaces ── */
[data-theme="verre"] .hr-card,
[data-theme="verre"] .day-card,
[data-theme="verre"] .detail-card,
[data-theme="verre"] .city-hero,
[data-theme="verre"] .past-stats {
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
#app {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* ── APP HEADER ── */
#app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.25s ease;
}
#app-header.scrolled {
  border-bottom-color: color-mix(in srgb, var(--fg) 10%, transparent);
}
.app-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.header-logo {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  flex-shrink: 0;
}
.header-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.header-site-name {
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
  line-height: 1;
}
.header-city {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg3);
  font-family: var(--font-mono);
  line-height: 1;
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.28s ease, margin-top 0.28s ease, opacity 0.22s ease, transform 0.22s ease;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 220px;
  pointer-events: none;
}
#app-header.scrolled .header-city {
  max-height: 20px;
  margin-top: 4px;
  opacity: 1;
  transform: translateY(0);
}
.app-header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
/* Mobile : hamburger visible, 5 boutons cachés */
.desktop-btns { display: none; }
.hamburger-wrap { display: flex; }
/* Desktop ≥600px : 5 boutons visibles, hamburger caché */
@media(min-width: 600px) {
  .desktop-btns { display: flex; gap: 8px; align-items: center; }
  .hamburger-wrap { display: none; }
}

/* ── CITY HERO ── */
.city-hero {
  background: var(--hero-bg, var(--card));
  border: var(--card-border-w) var(--card-border-style) var(--hero-border, var(--card-b));
  border-radius: var(--radius);
  padding: 1.6rem 0 1.6rem 1.75rem;
  min-height: 170px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow, none);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.city-hero-text {
  flex: 0 0 var(--hero-text-w, 48%);
  min-width: 0;
  position: relative;
  z-index: 3;
}
.city-map-wrap {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 600ms ease;
}
.city-map-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to right, var(--map-land) 30%, transparent 55%);
  z-index: 2;
  pointer-events: none;
  transition: background var(--transition);
}
@keyframes map-pulse {
  0%   { transform: scale(1); opacity: 0.6; }
  10%  { transform: scale(3); opacity: 0; }
  100% { opacity: 0; }
}
.map-loc-pin {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}
.map-loc-pin::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
}
.map-loc-pin.pulsing::after {
  animation: map-pulse 8s ease-out infinite;
}
.city-name {
  font-size: clamp(18px, 3.5vw, 26px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--fg);
}
.city-sub {
  font-size: 12px;
  color: var(--fg2);
  font-family: var(--font-mono);
  margin-top: 10px;
  line-height: 1.8;
}
.ctrl-btn {
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--fg2);
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 5px;
}
.ctrl-btn:hover { background: var(--card-b); color: var(--fg); }
.ctrl-btn.active { border-color: var(--accent); color: var(--accent); }
.ctrl-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Boutons dans l'entête */
#app-header .ctrl-btn {
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  border-color: color-mix(in srgb, var(--fg) 14%, transparent);
  color: color-mix(in srgb, var(--fg) 65%, transparent);
  margin-top: 0;
}
#app-header .ctrl-btn:hover {
  background: color-mix(in srgb, var(--fg) 16%, transparent);
  color: var(--fg);
}
#app-header .ctrl-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── HAMBURGER MENU ── */
.hamburger-wrap {
  position: relative;
}
.hamburger-stack {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.hamburger-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg2);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  min-width: 190px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 50;
  overflow: hidden;
}
.hamburger-menu.open {
  display: block;
  animation: menuDown 0.18s ease;
}
@keyframes menuDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hamburger-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 0.5px solid var(--card-b);
  padding: 11px 14px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--fg2);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.hamburger-item:last-child { border-bottom: none; }
.hamburger-item:hover { background: var(--card); color: var(--fg); }
.hamburger-item.active { color: var(--accent); }
.hamburger-item svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── ALERTS UNIFIED BANNER ── */
@keyframes aurora-border {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.space-alert-wrap {
  position: relative;
  border-radius: calc(var(--radius-sm) + 2px);
  margin-bottom: 1rem;
  padding: 2px;
  background: linear-gradient(270deg, #00c896, #00bfff, #7b2fbe, #3bceac, #a855f7, #00c896);
  background-size: 400% 400%;
  animation: aurora-border 12s ease infinite;
}
.space-alert-inner {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.space-alert-hd {
  padding: 7px 14px 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, rgba(0, 140, 100, 0.92), rgba(80, 30, 160, 0.88));
  color: #fff;
}
.space-alert-hd svg { width: 12px; height: 12px; flex-shrink: 0; }
.space-alert-row {
  background: rgba(0, 200, 150, 0.09) !important;
  color: #00c896 !important;
  border-top-color: rgba(0, 200, 150, 0.18) !important;
}
.space-alert-row:hover { filter: brightness(0.93); }
.space-alert-row.active { filter: brightness(0.88); }
.space-alert-detail-inner { border-top-color: rgba(59, 130, 246, 0.18) !important; }

.alerts-unified {
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}
.alerts-unified-hd {
  padding: 7px 14px 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}
.alerts-unified-hd svg { width: 12px; height: 12px; flex-shrink: 0; }
.alert-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 14px;
  width: 100%;
  text-align: left;
  border: none;
  border-top: 1px solid rgba(0,0,0,0.12);
  background: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.alerts-unified .alert-row:first-of-type {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.alert-row:hover { filter: brightness(0.93); }
.alert-row.active { filter: brightness(0.88); }
.alert-row.jaune-row { position: relative; overflow: hidden; }
.alert-row.jaune-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #FFC107;
}
.alert-detail-drawer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.38s ease;
}
.alert-detail-drawer.open { max-height: 600px; }
.alert-detail-inner {
  padding: .75rem 14px 1rem;
  border-top: 1px solid rgba(0,0,0,0.12);
}
.alert-detail-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: .5rem;
  color: var(--fg);
}
.alert-detail-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg2);
  white-space: pre-wrap;
}
.alert-dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── SEARCH ── */
.search-input {
  width: 100%;
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--fg);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }
.search-results { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.search-result {
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  transition: border-color 0.2s;
}
.search-result:hover { border-color: var(--accent); }
.search-result-name { font-size: 14px; font-weight: 500; color: var(--fg); }
.search-result-sub { font-size: 12px; color: var(--fg2); margin-top: 2px; font-family: var(--font-mono); }
.search-result-star {
  background: none; border: none; font-size: 18px; cursor: pointer;
  color: var(--fg2); flex-shrink: 0; padding: 4px;
  line-height: 1; transition: color 0.2s;
}
.search-result-star:hover { color: var(--accent); }

/* ── PANEL (settings) ── */
.panel-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  backdrop-filter: blur(4px);
}
.panel-overlay.open { display: flex; align-items: flex-end; justify-content: center; }
@media(min-width:600px){ .panel-overlay.open { align-items: center; } }
.panel {
  background: var(--bg2);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}
.panel-overlay, .panel-overlay *, .panel, .panel * { touch-action: pan-y; }
@media(min-width:600px){ .panel { border-radius: var(--radius); } }
#day-panel { max-width: 600px; }
.panel-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
}
.day-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 12px;
}
.day-nav span {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
}
.day-nav-btn {
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 22px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.day-nav-btn:hover { background: var(--card-b); color: var(--accent); }
.day-nav-btn:disabled { opacity: 0.3; pointer-events: none; }
.panel-close {
  background: none; border: none; color: var(--fg2); cursor: pointer; font-size: 20px; line-height: 1;
}
.fav-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  gap: 10px;
}
.fav-slot.active { border-color: var(--accent); }
.fav-slot-name { font-size: 14px; font-weight: 500; color: var(--fg); cursor: pointer; flex: 1; }
.fav-slot-name:hover { color: var(--accent); }
.fav-slot-empty { font-size: 14px; color: var(--fg3); flex: 1; }
.fav-slot-btn { background: none; border: none; color: var(--fg2); cursor: pointer; font-size: 18px; padding: 4px; transition: color 0.2s; }
.fav-slot-btn:hover { color: var(--accent); }
.setting-group { margin-bottom: 1.25rem; }
.setting-label { font-size: 11px; font-family: var(--font-mono); color: var(--fg2); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.option-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.advanced-details { border-top: 0.5px solid var(--card-b); margin-top: 0.25rem; }
.advanced-summary {
  font-size: 11px; font-family: var(--font-mono); color: var(--fg3);
  text-transform: uppercase; letter-spacing: .08em;
  cursor: pointer; padding: 12px 0 0;
  list-style: none; display: flex; align-items: center; gap: 4px;
  user-select: none;
}
.advanced-summary::-webkit-details-marker { display: none; }
.advanced-summary::after { content: '›'; display: inline-block; transition: transform 0.2s; }
details[open] .advanced-summary::after { transform: rotate(90deg); }
.advanced-content { padding-top: 1rem; }
.option-btn {
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--fg2);
  cursor: pointer;
  transition: all 0.2s;
}
.option-btn:hover { color: var(--fg); border-color: var(--accent); }
.option-btn.active { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 500; }

/* ── HERO CARD ── */
.hero {
  background: var(--card);
  border: none;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.45);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}
/* ── HERO CONDITION TINTS ── */
.hero-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
  position: relative;
  z-index: 2;
}
.hero-temp-block { display: flex; align-items: center; gap: 12px; }
.hero-temp-divider { width: 1px; height: 2em; background: transparent; flex-shrink: 0; }
.hero-top-sep { width: 0.5px; height: 72px; background: var(--card-b); flex-shrink: 0; align-self: center; opacity: 0.7; }
.hero-temp {
  font-size: clamp(72px, 16vw, 108px);
  font-weight: 100;
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: var(--hero-fg, var(--fg));
}
.hero-unit { font-size: 32px; color: var(--hero-fg2, var(--fg2)); vertical-align: super; margin-left: 4px; }
.hero-minmax { display: flex; flex-direction: column; gap: 2px; }
.hero-max { color: var(--accent); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.hero-min { color: var(--hero-fg2, var(--fg2)); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.hero-summary {
  font-size: 0.85rem;
  color: var(--hero-fg2, var(--fg2));
  line-height: 1.5;
  flex: 1;
  min-width: 0;
  align-self: center;
}
.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 8px;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 0.5px solid var(--card-b);
  width: 100%;
}
.hero-stat { display: flex; align-items: flex-start; gap: 8px; }
.hero-pres-widget {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--card-b);
}
.hero-pres-body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.hero-pres-value-row { display: flex; align-items: baseline; gap: 5px; }
.hero-pres-value { font-size: 20px; font-weight: 300; color: var(--hero-fg, var(--fg)); }
.hero-pres-unit  { font-size: 12px; color: var(--hero-fg2, var(--fg2)); }
.hero-pres-trend { font-size: 14px; color: var(--hero-fg2, var(--fg2)); }
.hero-pres-delta { font-size: 11px; color: var(--hero-fg2, var(--fg3)); white-space: nowrap; }
.hero-pres-desc  { font-size: 11.5px; color: var(--hero-fg2, var(--fg2)); line-height: 1.4; }
.hs-icon { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.hs-icon svg { width: 15px; height: 15px; }
.hs-body { display: flex; flex-direction: column; }
.hs-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--hero-fg2, var(--fg2));
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.hs-value { font-size: 15px; font-weight: 400; color: var(--hero-fg, var(--fg)); }
.hs-unit { font-size: 11px; color: var(--hero-fg2, var(--fg2)); font-weight: 400; }
.hs-sub { font-size: 11px; color: var(--hero-fg2, var(--fg2)); margin-top: 2px; }


/* ── UV BADGE ── */
.uv-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 20px;
  border: 0.5px solid;
}
.uv-0 { color: #5db85d; border-color: #5db85d44; background: #5db85d11; }
.uv-1 { color: #a8c840; border-color: #a8c84044; background: #a8c84011; }
.uv-2 { color: #f5d020; border-color: #f5d02044; background: #f5d02011; }
.uv-3 { color: #f5a623; border-color: #f5a62344; background: #f5a62311; }
.uv-4 { color: #e8402a; border-color: #e8402a44; background: #e8402a11; }
/* Thèmes clairs : variantes plus sombres pour le contraste */

.hero-text-dark .uv-0,
.hero-text-dark .uv-1,
.hero-text-dark .uv-2,
.hero-text-dark .uv-3,
.hero-text-dark .uv-4 { color: rgba(0,0,0,0.90); border-color: rgba(0,0,0,0.15); background: rgba(0,0,0,0.08); }

/* Thèmes pâles : assombrir les badges UV vert/jaune (illisibles sur fond clair) */
[data-theme="brume"] .uv-1, [data-theme="lin"] .uv-1 { color: #6f8a1c; }
[data-theme="brume"] .uv-2, [data-theme="lin"] .uv-2 { color: #b8920a; }

/* ── UV BAR ── */
.uv-label { font-size: 10px; font-family: var(--font-mono); color: var(--fg2); text-transform: uppercase; letter-spacing: .06em; }
.uv-bar-wrap { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; width: 100%; align-self: stretch; }
.uv-bar-track { width: 100%; }
.uv-bar-row { display: flex; align-items: center; gap: 8px; }
.uv-bar-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg, #4caf50 0%, #8bc34a 20%, #ffeb3b 35%, #ff9800 55%, #f44336 75%, #9c27b0 100%); position: relative; }
.uv-bar-cursor { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; border-radius: 50%; background: var(--fg); border: 2px solid var(--bg); transition: left 0.8s ease; }
.uv-bar-value { font-size: 11px; font-family: var(--font-mono); white-space: nowrap; }
.uv-bar-labels { display: flex; justify-content: space-between; font-size: 9px; font-family: var(--font-mono); color: var(--fg2); }
.hero-stat-uv { display: block; }
.hero-stat-uv .hs-body { width: 100%; }
.uv-arc-header { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.uv-hbar-wrap { position: relative; margin-top: 8px; padding-top: 8px; width: 100%; }
.uv-hbar-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #4caf50 0%, #8bc34a 20%, #ffeb3b 35%, #ff9800 55%, #f44336 75%, #9c27b0 100%); }
.uv-hbar-indicator { position: absolute; top: 0; transform: translateX(-50%); width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 5px solid var(--fg); }
.uv-hbar-labels { display: flex; justify-content: space-between; font-size: 9px; font-family: var(--font-mono); color: var(--fg3); margin-top: 3px; }

/* ── SECTION TITLE ── */
.section-head {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg2);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 2rem 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hourly-info-btn {
  background: none;
  border: 1px solid currentColor;
  color: var(--fg2);
  border-radius: 50%;
  width: 13px;
  height: 13px;
  font-size: 8px;
  font-family: var(--font);
  font-style: italic;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  flex-shrink: 0;
  text-transform: none;
  letter-spacing: 0;
}
.hourly-info-btn:hover { opacity: 1; }

#hourly-info-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
}
.hourly-info-card {
  background: var(--bg2);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 300px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.hourly-info-title {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.hourly-info-section { margin-bottom: 16px; }
.hourly-info-section:last-child { margin-bottom: 0; }
.hourly-info-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}
.hourly-info-sub {
  font-size: 11px;
  color: var(--fg3);
  margin-bottom: 7px;
}
.hourly-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.hourly-info-swatch {
  width: 24px;
  height: 5px;
  border-radius: 3px;
  flex-shrink: 0;
}
.hourly-info-range {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fg2);
  width: 44px;
  flex-shrink: 0;
}
.hourly-info-desc {
  font-size: 12px;
  color: var(--fg);
}
.hourly-info-wind-demo {
  width: 6px;
  border-radius: 3px 3px 0 0;
  flex-shrink: 0;
}
.wind-demo-wind { height: 18px; background: var(--accent); }
.wind-demo-gust { height: 18px; background: var(--fg3); }

/* ── HOURLY ── */
.hourly-block { width: 100%; }
.scroll-wrap { position: relative; }
.scroll-wrap::after {
  content: '›';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--accent);
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.scroll-wrap.scrolled-end::after {
  opacity: 0;
}
.hourly-combined-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-padding-right: 6px;
}
.hourly-combined-scroll::-webkit-scrollbar { display: none; }
.hourly-inner { display: flex; flex-direction: column; gap: 6px; width: fit-content; }
.hourly-cards-row { display: flex; gap: 6px; }
.section-head-wind {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg2);
  margin: 2rem 0 0.75rem;
}
.hr-divider { width: 100%; border-top: 1px solid var(--card-b); margin: 8px 0; }
.hr-wind-icon { display: flex; justify-content: center; margin-bottom: 2px; }
.hr-wind-icon svg { color: var(--accent); width: 12px; height: 12px; }
.hr-wind-row { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 65px; }
.wind-bars { display: flex; align-items: flex-end; gap: 4px; height: 60px; }
.wind-bar-col { display: flex; align-items: flex-end; width: 18px; height: 60px; }
.wind-bar { width: 18px; border-radius: 2px 2px 0 0; }
.wind-bar-wind { background: var(--accent); }
.wind-bar-gust { background: var(--accent); opacity: 0.35; }
.wind-labels { display: flex; gap: 4px; font-family: var(--font-mono); justify-content: center; margin-top: 5px; }
.wind-unit { font-size: 9px; font-family: var(--font-mono); color: var(--fg3); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.wind-val { font-size: 11px; font-weight: 500; color: var(--fg); width: 18px; text-align: center; }
.wind-gust { font-size: 11px; color: var(--fg2); width: 18px; text-align: center; }
.hr-card {
  flex-shrink: 0;
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  padding: 10px 10px 8px;
  overflow: hidden;
  text-align: center;
  width: max(calc((min(860px, 100vw) - 2rem - 6 * 6px) / 7), 82px);
  min-width: max(calc((min(860px, 100vw) - 2rem - 6 * 6px) / 7), 82px);
  max-width: max(calc((min(860px, 100vw) - 2rem - 6 * 6px) / 7), 82px);
  box-shadow: var(--card-shadow, none);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hr-dp-bar { height: 3px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin: 6px -10px -8px; opacity: 0.75; }
.hr-dp-dot { width: 6px; height: 6px; border-radius: 50%; margin: 5px auto 0; opacity: 0.80; flex-shrink: 0; }
.hr-time { font-size: 10px; font-family: var(--font-mono); color: var(--fg); }
.hr-icon-wrap { width: 28px; height: 28px; margin: 5px auto; }
.hr-temp { font-size: 13px; font-weight: 500; color: var(--fg); }
.hr-precip { font-size: 10px; color: #5ba4cf; margin-top: 2px; font-family: var(--font-mono); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 26px; }
.hr-precip-prob { font-size: 9px; color: var(--fg3); min-height: 11px; }

/* ── DAILY FORECAST ── */
.daily-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.day-card {
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  min-height: 150px;
  box-shadow: var(--card-shadow, none);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.day-card:hover { border-color: var(--accent); }
.day-name { font-size: 11px; font-family: var(--font-mono); color: var(--fg1); margin-bottom: 6px; }
.day-icon-wrap { width: 32px; height: 32px; margin: 0 auto 6px; }
.day-max { font-size: 15px; font-weight: 500; color: var(--fg); }
.day-min { font-size: 13px; color: var(--fg1); margin-left: 4px; }
.day-precip-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  min-height: 28px;
}
.day-precip-amount { font-size: 11px; font-family: var(--font-mono); color: #5ba4cf; }
.day-precip-prob   { font-size: 10px; font-family: var(--font-mono); color: var(--fg1); }
.day-extras {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: var(--card-border-w) var(--card-border-style) var(--card-b);
}
.day-extra-item {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg2);
  white-space: nowrap;
}

/* ── PAST STATS (7 derniers jours) ── */
.past-stats {
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow, none);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 8px;
}

/* ── BOTTOM DETAIL GRID ── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 1rem;
}
.detail-card {
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--card-shadow, none);
}
.detail-icon { color: var(--accent); flex-shrink: 0; }
.detail-icon svg { width: 24px; height: 24px; }
.detail-card:nth-child(1) .detail-icon svg { animation: thermopulse 2.5s ease-in-out infinite; }
.detail-card:nth-child(2) .detail-icon svg { animation: windrock 2s ease-in-out infinite; }
.detail-card:nth-child(3) .detail-icon svg { animation: drip 2s ease-in-out infinite; }
@keyframes thermopulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }
@keyframes windrock { 0%,100%{transform:rotate(0deg)} 25%{transform:rotate(-8deg)} 75%{transform:rotate(8deg)} }
@keyframes drip { 0%,100%{transform:translateY(0);opacity:1} 50%{transform:translateY(3px);opacity:0.7} }
.detail-body {}
.detail-label { font-size: 10px; font-family: var(--font-mono); color: var(--fg2); text-transform: uppercase; letter-spacing:.06em; }
.detail-val { font-size: 16px; font-weight: 400; color: var(--fg); margin-top: 2px; }
.detail-sub { font-size: 11px; color: var(--fg2); }

/* ── CIEL PANELS ── */
.ciel-card-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ciel-grid { grid-template-columns: 1fr !important; }
@media (min-width: 768px) {
  .ciel-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ── LOADING/ERROR ── */
.status-msg {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--fg2);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
}
.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--card-b);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media(max-width:480px) {
  #app { padding: 1rem 0.75rem 3rem; }
  .app-header-inner { padding: 0 0.75rem; }
  .city-hero { padding: 1.1rem 0 1.1rem 1.1rem; min-height: 150px; }
  .city-map-wrap { width: 100%; }
  .city-hero-text { --hero-text-w: 58%; flex: 0 0 var(--hero-text-w); }
  .hero { padding: 1.1rem; }
  .astro-card { padding: 10px 2px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .hero-top { gap: 12px; }
  .hero-top-sep { height: 56px; }
  .hero-summary { text-align: left; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hs-sub { word-break: break-word; }
}
@media(min-width:700px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .past-stats { grid-template-columns: repeat(4, 1fr); }
}

/* ── IMMERSIVE ANIMATIONS ── */
@keyframes sunpulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.05);opacity:0.88} }
@keyframes raypulse { 0%,100%{transform:scale(1);opacity:0.6} 50%{transform:scale(1.12);opacity:1} }
@keyframes halopulse { 0%,100%{opacity:0.10} 50%{opacity:0.25} }
@keyframes clouddrift { 0%,100%{transform:translateX(0)} 50%{transform:translateX(4px)} }
@keyframes fogdrift { from{transform:translateX(0)} to{transform:translateX(8px)} }
@keyframes fall { from{transform:translateY(-20px)} to{transform:translateY(200px)} }
@keyframes lightning-strike {
  0%, 88%, 100% { opacity: 0; }
  88.3%          { opacity: 0.92; }
  88.6%          { opacity: 0.04; }
  88.9%          { opacity: 0.85; }
  89.2%          { opacity: 0; }
}
@keyframes lightning-strike-2 {
  0%, 92%, 100% { opacity: 0; }
  92.3%          { opacity: 0.72; }
  92.5%          { opacity: 0.03; }
  92.8%          { opacity: 0.65; }
  93.0%          { opacity: 0; }
}
@keyframes snowdrift { from{transform:translateY(-20px) translateX(0)} to{transform:translateY(200px) translateX(8px)} }
@keyframes flash { 0%,70%,74%,84%,86%,100%{opacity:0} 71%,73%{opacity:1} 72%,85%{opacity:0.3} }
@keyframes heatwave { from{transform:translateY(0);opacity:0.15} to{transform:translateY(-8px);opacity:0} }
@keyframes windswirl { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

.compass-arrow {
  animation: compassSettle 0.9s ease-out forwards;
  transform-box: view-box;
  transform-origin: 40px 40px;
}
@keyframes compassSettle {
  0%   { transform: rotate(-30deg); }
  20%  { transform: rotate(15deg); }
  38%  { transform: rotate(-9deg); }
  52%  { transform: rotate(5deg); }
  63%  { transform: rotate(-3deg); }
  74%  { transform: rotate(1.5deg); }
  83%  { transform: rotate(-0.5deg); }
  100% { transform: rotate(0deg); }
}

/* ── DAY DETAIL ── */
.day-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 1rem;
}
.day-detail-stat {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.day-detail-stat-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg2);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.day-detail-stat-value { font-size: 18px; font-weight: 400; color: var(--fg); }
.day-detail-stat-sub { font-size: 11px; color: var(--fg2); margin-top: 2px; }
.day-temp-chart {
  margin-top: 1rem;
  width: 100%;
  height: 150px;
  overflow: visible;
  display: block;
}

/* ── FOOTER ── */
.app-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--card-b);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg2);
  line-height: 2;
  letter-spacing: 0.04em;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up:nth-child(1){animation-delay:.05s}
.fade-up:nth-child(2){animation-delay:.1s}
.fade-up:nth-child(3){animation-delay:.15s}
.fade-up:nth-child(4){animation-delay:.2s}
.fade-up:nth-child(5){animation-delay:.25s}

/* ── WIND COMPASS ── */
.wind-compass {
  width: 36px; height: 36px;
  position: relative; display: inline-block;
}
.compass-arrow {
  position: absolute; inset: 0;
  display: flex; align-items: flex-start; justify-content: center;
  transition: transform 0.8s ease;
}

/* ── SUN & MOON ── */
.sun-moon-section {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
.sun-panel {
  flex: 1;
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius);
  padding: 16px;
}
.moon-panel {
  flex: 1;
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sun-arc-svg { width: 100%; display: block; overflow: visible; padding-top: 10px; }
.sun-rise-set {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.sun-time-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--fg2);
}
.sun-duration {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin: 6px 0 2px;
}
.sun-dot {
  animation: sunpulse 3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.moon-icon-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}
.moon-svg { animation: moonpulse 8s ease-in-out infinite; }
@keyframes moonpulse {
  0%, 100% { opacity: 0.92; }
  50% { opacity: 1; }
}
.moon-phase-name { font-size: 13px; font-weight: 500; color: var(--fg); text-align: center; }
.moon-illumination { font-size: 11px; font-family: var(--font-mono); color: var(--fg2); }
.moon-times { font-size: 11px; font-family: var(--font-mono); color: var(--fg2); text-align: center; line-height: 1.8; }
.moon-next-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.moon-badge { background: var(--card-b); border-radius: 20px; padding: 3px 10px; font-size: 10px; font-family: var(--font-mono); color: var(--fg2); }
@media(max-width:480px) {
  .sun-moon-section { flex-direction: column; }
  .sun-panel, .moon-panel { width: 100%; flex: unset; box-sizing: border-box; }
}

/* ── CIEL SECTION ── */
#ciel { border-radius: var(--radius); overflow: hidden; }

/* ── SKY CARDS ── */
.sky-card {
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: .75rem;
}
.sky-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
}
.sky-card-header .nc-section-lbl { margin-bottom: 0; }
.sky-info-btn {
  background: none;
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: 50%;
  color: var(--fg3);
  cursor: pointer;
  font-size: 12px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
}
.sky-info-btn:hover, .sky-info-btn.active { color: var(--accent); border-color: var(--accent); }
.sky-info-panel {
  overflow: hidden;
  max-height: 0;
  padding: 0;
  transition: max-height 0.38s ease, padding 0.38s ease;
}
.sky-info-panel.open {
  max-height: 900px;
  padding: 0 0 .75rem 0;
}
.sky-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  padding-left: .75rem;
}
.sky-info-grid > *:nth-child(odd)  { color: var(--fg3); }
.sky-info-grid > *:nth-child(even) { color: var(--fg); }
.sky-info-sep {
  font-size: 9px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--fg2);
  background: var(--bg2);
  border-radius: 3px;
  padding: .2rem .5rem;
  margin: .75rem 0 .4rem;
}
.hf-table {
  display: grid;
  grid-template-columns: 2.5rem 4rem 1fr 1.2rem;
  gap: 3px 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  align-items: center;
  padding-left: .75rem;
}
.hf-open   { color: #4ade80; }
.hf-closed { color: var(--fg3); }
.stat-cell {
  background: var(--bg-stat, var(--bg2));
  border-radius: var(--radius-sm);
  padding: .75rem;
}
.stat-lbl {
  font-size: 11px;
  color: var(--fg2);
  font-family: var(--font-mono);
}
.stat-val {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}
.astro-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; width: 100%; box-sizing: border-box; mask-image: linear-gradient(to right, black calc(100% - 60px), transparent 100%); -webkit-mask-image: linear-gradient(to right, black calc(100% - 60px), transparent 100%); }
.sky-card > .astro-scroll { margin-top: .75rem; }
.astro-scroll::-webkit-scrollbar { display: none; }
.scrolled-end {
  mask-image: none !important;
  -webkit-mask-image: none !important;
}
.sky-card svg text {
  font-size: 5px !important;
  font-family: var(--font-mono);
}
.nc-section-lbl { font-size: 9px; color: var(--fg3); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .75rem; }
.nc-bar-wrap { position: relative; margin: .25rem 0 0; height: 34px; }
.nc-bar-track { height: 3px; background: rgba(255,255,255,0.07); border-radius: 2px; position: absolute; top: 21px; left: 0; right: 0; }
.nc-bar-fill {
  height: 3px;
  border-radius: 2px;
  background-size: 400% 100%;
  animation: bar-flow 30s linear infinite;
}
.nc-bar-dot { position: absolute; top: 14px; width: 17px; height: 17px; border-radius: 50%; transform: translateX(-50%); }
.nc-bar-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg2); font-family: var(--font-mono); margin-top: .25rem; }
@keyframes bar-flow {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.nc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.nc-stat { background: var(--card-bg); border-radius: 8px; padding: .6rem .75rem; }
.nc-stat-lbl { font-size: 9px; color: var(--fg3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.nc-stat-val { font-size: 13px; color: var(--fg); }
.nc-stat:last-child { text-align: right; }
.nc-badge { font-size: 9px; padding: 2px 8px; border-radius: 99px; letter-spacing: .04em; font-family: var(--font-mono); }
.nc-badge-moon { background: rgba(200,180,100,0.12); color: #c8b468; border: 0.5px solid rgba(200,180,100,0.25); }
.nc-badge-dark { background: rgba(255,255,255,0.05); color: var(--fg3); border: 0.5px solid rgba(255,255,255,0.08); }
.astro-card { flex-shrink: 0; width: max(calc((100% - 6 * 6px) / 7), 72px); min-width: max(calc((100% - 6 * 6px) / 7), 72px); max-width: max(calc((100% - 6 * 6px) / 7), 72px); background: var(--card); border: var(--card-border-w) var(--card-border-style) var(--card-b); border-radius: 16px; padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 5px; }
.astro-today { }
.astro-day { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--fg2); font-family: var(--font-mono); }
.astro-div { height: 0.5px; background: var(--card-b); margin: 3px 0; }
.astro-sr { font-size: 11px; font-weight: 500; color: #f97316; font-family: var(--font-mono); white-space: nowrap; position: relative; }
.astro-ss { font-size: 11px; color: var(--fg2); font-family: var(--font-mono); white-space: nowrap; position: relative; }
.astro-dur { font-size: 10px; color: var(--fg3); font-family: var(--font-mono); }
.astro-phase { font-size: 16px; line-height: 1.4; }
.astro-mr { font-size: 11px; color: var(--accent); font-family: var(--font-mono); position: relative; }
.astro-ms { font-size: 11px; color: var(--fg2); font-family: var(--font-mono); position: relative; }
.astro-arrow { position: absolute; left: 0; display: flex; align-items: center; height: 100%; }
.nc-bar-countdown { font-size: 11px; text-align: center; margin-top: .25rem; margin-bottom: 8px; letter-spacing: .04em; color: var(--accent); font-family: var(--font-mono); }
.sun-stats-grid, .moon-stats-grid { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-family: var(--font-mono); font-size: 11px; align-items: baseline; margin: 15px 0; border-top: 0.5px solid var(--card-b); border-bottom: 0.5px solid var(--card-b); padding: 10px 0; }
/* ── ÉCLIPSES (Notre ciel) ── */
.ecl-cards { display: flex; flex-direction: column; gap: 8px; }
.ecl-card { background: var(--bg2); border: var(--card-border-w) var(--card-border-style) var(--card-b); border-radius: var(--radius-sm); padding: 11px 13px; display: flex; gap: 11px; align-items: flex-start; }
.ecl-card.past { opacity: 0.5; }
.ecl-icon { width: 28px; height: 28px; flex-shrink: 0; display: block; }
.ecl-body { flex: 1; min-width: 0; }
.ecl-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.ecl-type { font-size: 13px; font-weight: 600; color: var(--fg); }
.ecl-badges { display: flex; gap: 4px; flex-wrap: wrap; flex-shrink: 0; }
.ecl-past-badge { font-size: 9px; font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--fg3); background: var(--card-b); border-radius: 20px; padding: 2px 7px; }
.ecl-qc-badge { font-size: 9px; font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 0.5px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 20px; padding: 2px 7px; }
.ecl-date { font-size: 10px; font-family: var(--font-mono); color: var(--fg3); margin-top: 3px; }
.ecl-regions { font-size: 11px; color: var(--fg2); margin-top: 4px; line-height: 1.4; }
.ecl-tabs { display: flex; border-bottom: 1px solid var(--card-b); margin-top: 12px; }
.ecl-tab { position: relative; flex: 1; padding: 7px 4px; font-size: 11px; font-family: var(--font-mono); letter-spacing: .04em; color: var(--fg3); background: transparent; border: none; cursor: pointer; transition: color .2s, background .2s; }
.ecl-tab::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform 0.28s cubic-bezier(0.4,0,0.2,1); }
.ecl-tab:hover { color: var(--fg2); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.ecl-tab.active { color: var(--fg); }
.ecl-tab.active::after { transform: scaleX(1); }
@keyframes ecl-out-left  { to   { opacity:0; transform:translateX(-14px); } }
@keyframes ecl-out-right { to   { opacity:0; transform:translateX( 14px); } }
@keyframes ecl-in-right  { from { opacity:0; transform:translateX( 14px); } to { opacity:1; transform:translateX(0); } }
@keyframes ecl-in-left   { from { opacity:0; transform:translateX(-14px); } to { opacity:1; transform:translateX(0); } }
/* ── MARÉES ── */
.tide-loading { font-size: 11px; font-family: var(--font-mono); color: var(--fg3); padding: .5rem 0 1rem; }
.tide-error { font-size: 12px; font-family: var(--font-mono); color: var(--fg3); padding: 1rem 0; text-align: center; }
.tide-head { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.tide-drop { position: relative; }
.tide-drop-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font);
  color: var(--fg);
  transition: border-color 0.2s;
  user-select: none;
}
.tide-drop-trigger:hover { border-color: var(--accent); }
.tide-drop-arrow { font-size: 10px; color: var(--fg3); display: inline-block; transition: transform 0.2s; }
.tide-drop.open .tide-drop-arrow { transform: scaleY(-1); }
.tide-drop-list {
  display: none;
  position: fixed;
  background: var(--bg2);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius-sm);
  z-index: 200;
  overflow-y: auto;
  scrollbar-width: none;
  max-height: 220px;
  min-width: 170px;
  max-width: min(280px, calc(100vw - 2rem));
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.tide-drop-list.open { display: block; }
.tide-drop-list::-webkit-scrollbar { display: none; }
.tide-drop-item {
  padding: 7px 12px;
  font-size: 12px;
  font-family: var(--font);
  color: var(--fg2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: normal;
  word-break: break-word;
}
.tide-drop-item:hover { background: var(--bg3); color: var(--fg); }
.tide-drop-item.active { color: var(--accent); }

/* Tableau 3 jours */
.tide-tbl { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: .75rem; table-layout: fixed; }
.tide-tbl thead th { padding: 0 .5rem .65rem; text-align: center; border-bottom: 0.5px solid var(--card-b); }
.tide-tbl .t-th-lbl { display: block; font-size: 9px; font-family: var(--font-mono); color: var(--fg3); text-transform: uppercase; letter-spacing: .07em; font-weight: 400; }
.tide-tbl thead th.t-today .t-th-lbl { color: var(--accent); }
.tide-tbl .t-th-date { display: block; font-size: 10px; font-family: var(--font-mono); color: var(--fg3); margin-top: 2px; }
.tide-tbl tbody td { text-align: center; padding: .65rem .5rem; border-bottom: 0.5px solid var(--card-b); vertical-align: middle; position: relative; }
.tide-tbl tbody tr:last-child td { border-bottom: none; }
.tide-tbl td.t-today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.tide-tbl td.t-next { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.tide-tbl td.t-next::before { content: ''; position: absolute; top: 0; left: 18%; right: 18%; height: 1.5px; background: var(--accent); border-radius: 1px; }
.tide-tbl .t-time { font-family: var(--font-mono); font-size: 13px; color: var(--tide-fg, var(--fg)); font-weight: 500; letter-spacing: .02em; }
.tide-tbl td.t-next .t-time { color: var(--tide-hi, var(--accent)); }
.tide-tbl .t-meta { font-family: var(--font-mono); font-size: 11px; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.tide-tbl .t-hi { color: var(--tide-hi, var(--accent)); opacity: .8; }
.tide-tbl .t-lo { color: var(--tide-lo, var(--fg3)); }
.tide-tbl .t-empty { font-family: var(--font-mono); font-size: 13px; color: var(--fg3); opacity: .35; }

/* ── ALERTS BADGE ── */
.alerts-badge {
  display: none;
  align-items: center;
  gap: 7px;
  background: rgba(212, 83, 107, 0.15);
  border: 0.5px solid rgba(212, 83, 107, 0.45);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin: 0.75rem 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #d4536b;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  transition: background 0.2s, border-color 0.2s;
}
.alerts-badge:hover { background: rgba(212, 83, 107, 0.22); border-color: rgba(212, 83, 107, 0.7); }
.alerts-badge.visible { display: flex; }
.alerts-badge svg { width: 15px; height: 15px; flex-shrink: 0; }
.alerts-badge-count {
  background: #d4536b;
  color: #fff;
  border-radius: 99px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-left: auto;
}

/* ── ALERTS DRAWER ── */
.alerts-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  backdrop-filter: blur(3px);
  align-items: flex-end;
  justify-content: center;
}
.alerts-drawer-overlay.open { display: flex; }
.alerts-drawer {
  background: var(--bg2);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 860px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
}
.alerts-drawer-overlay.open .alerts-drawer { transform: translateY(0); }
@media(min-width:600px){ .alerts-drawer { border-radius: var(--radius); max-height: 280px; margin-bottom: 1rem; } }
.alerts-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.5rem;
  flex-shrink: 0;
}
.alerts-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}
.alerts-drawer-title svg { width: 15px; height: 15px; color: #d4536b; flex-shrink: 0; }
.drawer-tab-bar {
  display: flex;
  gap: 0;
  padding: 0 1.25rem;
  border-bottom: 0.5px solid var(--card-b);
  flex-shrink: 0;
}
.drawer-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 14px;
  font-size: 12px;
  font-family: var(--font);
  color: var(--fg2);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -0.5px;
}
.drawer-tab:hover { color: var(--fg); }
.drawer-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.drawer-panel {
  overflow-y: auto;
  padding: 0.75rem 1.25rem 1rem;
  flex: 1;
}
.drawer-panel::-webkit-scrollbar { width: 4px; }
.drawer-panel::-webkit-scrollbar-thumb { background: var(--card-b); border-radius: 2px; }
.drawer-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: var(--card-border-w) var(--card-border-style) var(--card-b);
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.drawer-alert-item:hover { border-color: var(--accent); }
.drawer-alert-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.drawer-alert-text { font-size: 13px; color: var(--fg); line-height: 1.4; }
.kp-block { display: flex; flex-direction: column; gap: 6px; }
.kp-row { display: flex; align-items: center; gap: 10px; }
.kp-value { font-size: 22px; font-weight: 300; color: var(--fg); font-family: var(--font-mono); }
.kp-label { font-size: 12px; color: #d4536b; font-weight: 500; }
.kp-details { font-size: 12px; color: var(--fg2); line-height: 1.7; font-family: var(--font-mono); }
.kp-source { font-size: 10px; color: var(--fg3); margin-top: 4px; font-family: var(--font-mono); }

/* ── THEME LAB ── */
#theme-lab {
  position: fixed; bottom: 0; right: 0; z-index: 9000;
  width: min(360px, 100vw);
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px 0 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e6edf3;
  box-shadow: -4px -4px 24px rgba(0,0,0,0.6);
}
.lab-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  font-size: 13px; font-weight: 500;
}
.lab-body { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.lab-row { display: flex; align-items: center; gap: 8px; }
.lab-label { flex: 1; font-size: 11px; color: #8b949e; }
.lab-color {
  width: 28px; height: 22px; padding: 0; border: none; border-radius: 4px;
  cursor: pointer; background: none;
}
.lab-key { font-size: 10px; color: #6a7280; width: 110px; text-align: right; }
.lab-btn {
  font-family: var(--font-mono); font-size: 11px;
  background: rgba(255,255,255,0.08); color: #e6edf3;
  border: 0.5px solid rgba(255,255,255,0.15); border-radius: 6px;
  padding: 4px 10px; cursor: pointer;
}
.lab-btn:hover { background: rgba(255,255,255,0.15); }
.lab-btn.active { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.40); }
.lab-close { padding: 4px 8px; font-size: 14px; line-height: 1; }
.lab-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.lab-name-input {
  flex: 1; font-family: var(--font-mono); font-size: 11px;
  background: rgba(255,255,255,0.06); color: #e6edf3;
  border: 0.5px solid rgba(255,255,255,0.15); border-radius: 6px;
  padding: 4px 8px; outline: none;
}
.lab-name-input:focus { border-color: rgba(255,255,255,0.35); }

/* ── UPDATE TOAST ── */
.update-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 1.5rem));
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg2);
  border: 0.5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  z-index: 200;
  white-space: nowrap;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
  opacity: 0;
}
.update-toast.visible {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  opacity: 1;
}
.update-toast-msg {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--fg);
}
.update-toast-msg svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.update-toast-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.update-toast-btn:hover { opacity: 0.85; }
.update-toast-btn:disabled { opacity: 0.5; cursor: default; }

#splash-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease;
}
#splash-screen.splash-hide {
  opacity: 0;
  pointer-events: none;
}
#splash-screen svg {
  animation: splash-icon-in 0.5s ease-out forwards;
}
@keyframes splash-icon-in {
  0% { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}

/* ══════════════════════════════════════════════════════════
   THÈME TEXTE — identité + layout spécifique
   ══════════════════════════════════════════════════════════ */

