/* ========================================================
   Alpine Bento Fusion — Home Dashboard CSS
   Tablette Samsung Galaxy Tab E (1280x800), WebView ancien :
   pas de backdrop-filter, pas de glow animé, fonds opaques.
   Échelle : horloge 56 (en-tête fin) / valeurs 46 / titres 23 / méta >= 18 (px)
   ======================================================== */

:root {
  --bg-primary: #0d1626;
  --card-bg: #16233a;
  --card-bg-top: #1b2b46;
  --card-border: rgba(120, 200, 255, 0.45);

  --text-main: #f2f6fb;
  --text-muted: #b8c7da;
  --text-dim: #8fa3bd;

  --accent-cyan: #5cc8ff;
  --accent-amber: #ffb454;
  --accent-green: #34d399;
  --accent-blue: #3b82f6;
  --accent-red: #f87171;

  --radius-card: 14px;
  --radius-pill: 9999px;
  --gap: 9px;
  --header-h: 74px;

  --fs-clock: 50px;
  --fs-value: 46px;
  --fs-secondary: 30px;
  --fs-title: 23px;
  --fs-meta: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background-color: var(--bg-primary);
  background-image: linear-gradient(180deg, #0b1220 0%, #0d1626 100%);
  color: var(--text-main);
  min-height: 100vh;
  height: 100%;
  width: 100%;
  overflow: hidden; /* kiosque 1280x800 : jamais d'ascenseur */
  padding: 6px var(--gap) 6px;
}

html {
  height: 100%;
}

:focus-visible {
  outline: 3px solid var(--accent-amber);
  outline-offset: 2px;
}

/* ========================================================
   EN-TÊTE : barre fine 85px, tout en longueur
   horloge + date 2 lignes | soleil | pilule Tempo | réglage discret
   ======================================================== */

.dashboard-header {
  position: relative;
  height: var(--header-h);
  margin-bottom: var(--gap);
  padding: 0 64px 0 22px;
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  background-image: linear-gradient(180deg, var(--card-bg-top) 0%, var(--card-bg) 100%);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-card);
}

.header-left {
  display: flex;
  align-items: center;
}

.digital-clock {
  font-size: var(--fs-clock);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  line-height: 1;
  color: #bdeaff;
  text-shadow: 0 0 14px rgba(92, 200, 255, 0.55);
}

.date-full {
  margin-left: 20px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--text-main);
}

.date-full span {
  display: block;
}

/* Soleil en ligne : ☀ lever | coucher */
.header-sun {
  margin-left: auto;
  margin-right: 28px;
  display: flex;
  align-items: center;
  font-size: var(--fs-secondary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
  white-space: nowrap;
}

.sun-icon {
  margin-right: 10px;
  font-size: 34px;
  line-height: 1;
  color: var(--accent-amber);
}

.sun-sep {
  margin: 0 10px;
  color: var(--text-dim);
}

/* Pilule Tempo lumineuse : lueur statique, aucune animation */
.tempo-badge {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-size: 22px;
  font-weight: 600;
  white-space: nowrap;
  color: #ffffff;
  background-color: #1a7bc7;
  background-image: linear-gradient(180deg, #2488d8 0%, #1360a0 100%);
  border: 1.5px solid #6cbff8;
  box-shadow: 0 0 16px rgba(36, 136, 216, 0.45);
}

.tempo-badge[data-tempo="blanc"] {
  background-color: #cfd9e6;
  background-image: linear-gradient(180deg, #f2f6fb 0%, #cfd9e6 100%);
  border-color: #ffffff;
  color: #0d1626;
  box-shadow: 0 0 16px rgba(242, 246, 251, 0.45);
}

.tempo-badge[data-tempo="rouge"] {
  background-color: #dc2626;
  background-image: linear-gradient(180deg, #f05252 0%, #dc2626 100%);
  border-color: #fecaca;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.55);
}

.tempo-badge[data-tempo="unknown"] {
  background-color: #242c3d;
  background-image: linear-gradient(180deg, #323d52 0%, #1e2533 100%);
  border-color: #4b5870;
  color: var(--text-muted);
  box-shadow: none;
}

.tempo-badge.is-stale {
  border-color: var(--accent-amber);
}

/* Mode édition : icône discrète à l'extrémité droite, cible tactile 48px */
.btn-edit-mode {
  position: absolute;
  top: 50%;
  right: 8px;
  margin-top: -24px;
  min-width: 48px;
  height: 48px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
}

.btn-edit-mode:hover,
.btn-edit-mode:focus-visible {
  opacity: 1;
}

/* Simulateur tablette : pilule discrète, après la pastille Tempo */
.btn-tablet-preview {
  flex: none;
  display: flex;
  align-items: center;
  height: 40px;
  margin-left: 16px;
  padding: 0 14px;
  background: transparent;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-family: inherit;
  font-size: var(--fs-meta);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.55;
}

.btn-tablet-preview span:first-child {
  margin-right: 8px;
}

.btn-tablet-preview:hover,
.btn-tablet-preview:focus-visible {
  opacity: 1;
  color: var(--text-main);
}

.btn-tablet-preview[aria-pressed="true"] {
  opacity: 1;
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #0b1120;
  font-weight: 600;
}

/* Bouton bascule Mode Nuit / Veilleuse */
.btn-night-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.btn-night-mode:hover,
.btn-night-mode:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-main);
}

.btn-night-mode[aria-pressed="true"] {
  background: rgba(56, 182, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ========================================================
   MODE NUIT AUTOMATIQUE (VEILLEUSE ALPINE 22h30 - 06h30)
   Voile noir en opacité matérielle (accélération GPU pure sans repaint)
   ======================================================== */
#night-veil {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  transition: opacity 1.2s ease;
  will-change: opacity;
}

/* Activation immédiate sans flash au boot de 04:00 */
html.night-mode-early #night-veil {
  opacity: var(--night-veil-opacity, 0.65);
  transition: none !important;
}

body.night-mode #night-veil {
  opacity: var(--night-veil-opacity, 0.65);
}

/* Réveil instantané au toucher (Wake on touch 60s) */
body.night-mode.night-mode-woken #night-veil {
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* En mode édition : voile toujours désactivé */
body.edit-mode-active #night-veil {
  opacity: 0 !important;
}

body.night-mode .btn-night-mode {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

/* Cadre tablette : contenu exact 1280x800 (padding compris), châssis autour */
html {
  background-color: #05090f;
}

body.tablet-preview-mode {
  box-sizing: content-box;
  width: 1248px;
  height: 772px;
  max-width: 1248px;
  max-height: 772px;
  min-height: 0;
  margin: 20px auto;
  overflow: hidden;
  border: 8px solid #080f1a;
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.85);
}

body.tablet-preview-mode .dashboard-grid {
  min-height: calc(800px - var(--header-h) - 3 * var(--gap));
}

/* Libellé masqué au repos, visible une fois le mode édition actif */
#edit-mode-text {
  display: none;
  margin-left: 8px;
  font-size: var(--fs-meta);
  font-weight: 600;
}

.btn-edit-mode.active {
  opacity: 1;
  padding: 0 18px;
  background: var(--accent-cyan);
  color: #0b1120;
}

.btn-edit-mode.active #edit-mode-text {
  display: inline;
}

/* ========================================================
   GRILLE PRINCIPALE 50/50
   (grid-gap = repli Chrome < 66)
   ======================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: var(--gap);
  gap: var(--gap);
  min-height: calc(100vh - var(--header-h) - 3 * var(--gap));
}

.dashboard-column {
  display: flex;
  flex-direction: column;
  grid-gap: var(--gap);
  gap: var(--gap);
  min-width: 0;
  max-width: 100%;
}

/* ========================================================
   CARTES / BENTO WIDGETS (fond opaque, dégradé statique)
   ======================================================== */

.bento-card {
  background-color: var(--card-bg);
  background-image: linear-gradient(180deg, var(--card-bg-top) 0%, var(--card-bg) 100%);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 8px 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
}

.card-title-icon {
  color: var(--accent-cyan);
  margin-right: 8px;
}

.card-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.card-body {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

/* ========================================================
   WIDGETS SPÉCIFIQUES (Placeholders élégants)
   ======================================================== */

/* Météo Savoie : 3 tuiles villes (cible target_weather.jpg) + prévisions 3 jours */
.weather-current-grid,
.weather-forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 8px;
  gap: 8px;
}

.weather-city-box {
  background-color: #1f3150;
  background-image: linear-gradient(180deg, #243759 0%, #1d2e4b 100%);
  border: 1.5px solid rgba(120, 200, 255, 0.3);
  border-radius: 10px;
  padding: 4px 4px 4px;
  text-align: center;
}

.city-name {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
  white-space: nowrap;
  margin-bottom: 1px;
}

.city-weather-main {
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-icon {
  font-size: 26px;
  line-height: 1;
  margin-right: 6px;
}

.city-temp {
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: #fff;
}

.city-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.weather-city-box.is-stale .city-temp {
  color: var(--text-dim);
}

/* Séparateur + sous-bloc prévisions dans le même encadré */
.weather-divider {
  margin: 4px 0 4px;
  padding-top: 4px;
  border-top: 1.5px solid rgba(120, 200, 255, 0.25);
}

.weather-divider-label {
  font-size: 12px;
  color: var(--text-muted);
}

.forecast-day-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(120, 200, 255, 0.18);
  border-radius: 10px;
  padding: 4px 4px;
}

.forecast-day-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.forecast-day-icon {
  font-size: 20px;
  line-height: 1;
}

.forecast-day-temps {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.forecast-day-temps .temp-max {
  color: var(--accent-amber);
  font-weight: 700;
}

.forecast-day-temps .temp-min {
  color: var(--accent-cyan);
}

.forecast-snow-badge {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

/* Trafic RN90 */
/* ========================================================
   MODULE 3 : TRAFIC & ROUTES RN90 (FIDÈLE À LA MAQUETTE CIBLE)
   ======================================================== */

.traffic-title-svg {
  margin-right: 8px;
  stroke: var(--accent-cyan);
}

.traffic-container {
  display: flex;
  align-items: center;
}

.traffic-schematic-col {
  flex: 0 0 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.traffic-svg {
  display: block;
  width: 48px;
  height: 96px;
  overflow: visible;
}

/* Double voie routière cyan fluide */
.road-track {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 2.2px;
  stroke-linecap: round;
  opacity: 0.85;
}

/* Particules de flux animées partant d'Aime vers les destinations */
.route-flow-path {
  fill: none;
  stroke: #22c55e;
  stroke-width: 3.5px;
  stroke-linecap: round;
  stroke-dasharray: 1 14; /* Fluide : particules espacées, flux rapide */
  animation: routeFlowFluid 1.4s linear infinite;
  pointer-events: none;
  /* Pas de filter: drop-shadow ici : animé en boucle, il forcerait un repaint GPU continu (Galaxy Tab E). */
}

@keyframes routeFlowFluid {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -15px; /* Défilement continu parfaitement fluide */
  }
}

/* Ralenti : particules plus nombreuses / plus serrées, flux ralenti */
.route-flow-path.is-slow {
  stroke: #f59e0b;
  stroke-dasharray: 1 8; /* Plus dense (effet bouchon qui se forme) */
  animation: routeFlowSlow 2.4s linear infinite;
}

@keyframes routeFlowSlow {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -18px;
  }
}

/* Bouchon / Congestion : très dense (pare-chocs contre pare-chocs), avance au pas */
.route-flow-path.is-congested {
  stroke: #ef4444;
  stroke-dasharray: 1 4; /* Très dense / serré */
  animation: routeFlowCongested 5s linear infinite;
}

@keyframes routeFlowCongested {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -20px;
  }
}

.route-flow-path.is-unknown {
  display: none;
}

/* Nœuds lumineux */
.route-node-glow {
  fill: #22c55e;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.75));
  transition: fill 0.3s ease;
}

.route-node-core {
  fill: #ffffff;
  opacity: 0.95;
}

/* Nœud Aime : anneau argenté / blanc */
.route-node-aime {
  fill: var(--card-bg);
  stroke: #cbd5e1;
  stroke-width: 2.2px;
}

/* États du tracé en cas de ralentissement */
.route-node-glow.is-slow {
  fill: #f59e0b;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.75));
}
.route-node-glow.is-congested {
  fill: #ef4444;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.75));
}
.route-node-glow.is-unknown {
  fill: var(--text-dim);
  filter: none;
}

/* Colonne des tuiles */
.traffic-segments-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Tuiles de tronçons : capsules aux coins arrondis et fond vert sombre translucide */
.traffic-tile {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.traffic-tile.is-slow {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}

.traffic-tile.is-congested {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
}

.traffic-tile.is-unknown {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Ligne principale : Nom du tronçon à gauche, temps en vert à droite */
.tile-row-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.tile-name {
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.2px;
}

.tile-time {
  font-size: 16px;
  font-weight: 700;
  color: #22c55e;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: 8px;
}

.traffic-tile.is-slow .tile-time {
  color: #fbbf24;
}

.traffic-tile.is-congested .tile-time {
  color: #f87171;
}

.traffic-tile.is-unknown .tile-time {
  color: var(--text-muted);
}

/* Ligne secondaire : statut textuel doux */
.tile-row-sub {
  margin-top: 1px;
}

.status-text {
  font-size: 12px;
  font-weight: 500;
  color: #86efac;
}

.traffic-tile.is-slow .status-text {
  color: #fde68a;
}

.traffic-tile.is-congested .status-text {
  color: #fca5a5;
}

.traffic-tile.is-unknown .status-text {
  color: var(--text-dim);
}

/* Bandeau neige : masqué par défaut, affiché uniquement s'il neige */
.traffic-snow-banner {
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding: 8px 14px;
  background: #1d3a5c;
  border: 1.5px solid rgba(125, 211, 252, 0.6);
  border-radius: 10px;
}

.snow-banner-icon {
  font-size: var(--fs-secondary);
  margin-right: 12px;
}

.snow-banner-text {
  font-size: 15px;
  font-weight: 600;
  color: #e0f2fe;
  line-height: 1.25;
}

/* Sous-grille Droite (JW.org & News) */
.subgrid-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: var(--gap);
  gap: var(--gap);
}

/* ========================================================
   MODE ÉDITION / DRAG & DROP
   ======================================================== */

body.edit-mode-active .bento-card {
  border: 1.5px dashed var(--accent-cyan) !important;
  cursor: grab;
}

body.edit-mode-active .bento-card:active {
  cursor: grabbing;
}

.edit-controls-bar {
  display: none;
  background: #1b3a55;
  border: 1.5px solid var(--accent-cyan);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  color: #d6efff;
}

body.edit-mode-active .edit-controls-bar {
  display: flex;
}

.btn-reset-layout {
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid var(--accent-red);
  color: #fecaca;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
}

.btn-reset-layout:hover {
  background: var(--accent-red);
  color: #fff;
}

/* ========================================================
   ACCÈS STATIONS DE MONTAGNE (sous-bloc du widget Trafic)
   ======================================================== */

.traffic-stations-block {
  margin-top: 6px;
}

.stations-divider {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.stations-divider::before,
.stations-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--card-border);
  opacity: 0.6;
}

.stations-divider-label {
  margin: 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.stations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 12px;
  gap: 12px;
}

.station-card {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 200, 255, 0.25);
  border-radius: 12px;
}

.station-card-head {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.station-icon {
  margin-right: 10px;
  font-size: 28px;
  line-height: 1;
}

.station-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.station-name {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-main);
}

.station-altitude {
  font-size: 18px;
  color: var(--text-dim);
}

.station-status-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  font-size: var(--fs-meta);
  font-weight: 600;
  line-height: 1.3;
}

.station-status-pill.status-ok {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.55);
}

.station-status-pill.status-warn {
  color: var(--accent-amber);
  background: rgba(255, 180, 84, 0.14);
  border-color: rgba(255, 180, 84, 0.6);
}

.station-status-pill.status-alert {
  color: var(--accent-red);
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.65);
}

.station-status-pill.status-unknown {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.4);
}

.station-equip {
  margin-top: 6px;
  font-size: var(--fs-meta);
  color: var(--text-muted);
}

/* ========================================================
   BANDEAU FLASH INFO DÉFILANT (bas du widget Trafic)
   Défilement CSS pur sur transform : aucune charge JS/CPU.
   ======================================================== */

.dashboard-footer-ticker {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 26px;
  margin-top: 5px;
  overflow: hidden;
  background: rgba(16, 28, 48, 0.7);
  border: 1px solid rgba(120, 200, 255, 0.3);
  border-radius: 8px;
}

.ticker-badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 6px;
  background: #101c30;
  border-right: 1px solid rgba(120, 200, 255, 0.3);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.ticker-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  color: var(--accent-cyan);
}

.ticker-track {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  -webkit-animation: marquee 16s linear infinite;
  animation: marquee 16s linear infinite;
}

.dashboard-footer-ticker:hover .ticker-content {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}

.ticker-content span {
  margin-right: 24px;
}

.ticker-content .ticker-sep {
  color: var(--accent-cyan);
}

@-webkit-keyframes marquee {
  from { -webkit-transform: translateX(0); }
  to { -webkit-transform: translateX(-100%); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ========================================================
   CARTE MOBILITÉ : grille 2 colonnes (Route | Carburant)
   min-width:0 partout : le marquee ne doit pas élargir la grille.
   ======================================================== */

.fuel-meta-bar {
  flex: none;
}

.station-compact-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.station-compact-right {
  flex: none;
  margin-left: 8px;
}

/* ========================================================
   COLONNE CARBURANT SP95-E10 : podium Top 3
   ======================================================== */

.fuel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.fuel-title {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.fuel-title-icon {
  margin-right: 6px;
  font-size: 16px;
}

.fuel-station-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 3px 8px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
}

.fuel-station-card.is-best {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.45);
}

.fuel-station-main {
  display: flex;
  align-items: center;
  min-width: 0;
}

.fuel-rank-pill {
  flex: none;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  color: var(--text-main);
}

.is-best .fuel-rank-pill {
  background: var(--accent-cyan);
  color: #0d1626;
}

.fuel-station-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fuel-station-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  /* noms complets « Enseigne (Lieu-dit) » : retour à la ligne autorisé, 2 lignes max */
  max-height: 2.4em;
  word-wrap: break-word;
  color: var(--text-main);
}

.fuel-station-city {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-dim);
}

.fuel-price-pill {
  flex: none;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
  white-space: nowrap;
}

.fuel-price-pill.pill-best {
  background: rgba(34, 211, 238, 0.18);
  color: var(--accent-cyan);
}

.fuel-meta-bar {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 180, 84, 0.1);
  border: 1px solid rgba(255, 180, 84, 0.35);
  margin-top: 4px;
}

.fuel-meta-icon {
  flex: none;
  margin-right: 5px;
  font-size: 13px;
}

.fuel-meta-text {
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================================
   PROPOSITION A : TRAFIC & ACCÈS STATIONS | CARBURANT (cartes séparées)
   Portée limitée à #card-traffic et #card-fuel (surcharge les règles
   héritées de la grille Mobilité). Chrome <= 80 : flex/grid + marges,
   grid-gap en repli, pas d'aspect-ratio ni clamp.
   ======================================================== */

#card-traffic,
#card-fuel {
  min-width: 0;
  padding: 6px 12px;
}

#card-traffic {
  flex: 0 0 auto;
}

#card-traffic .card-header,
#card-fuel .card-header {
  margin-bottom: 3px;
}

/* --- Trafic : schéma + tuiles pleine largeur --- */
#card-traffic .traffic-container {
  width: 100%;
}

#card-traffic .traffic-schematic-col {
  flex: 0 0 100px;
  margin-right: 10px;
}

#card-traffic .traffic-svg {
  width: 60px;
  height: 118px;
}

#card-traffic .road-track {
  stroke: #38bdf8;
  stroke-width: 1.8px;
  opacity: 0.65;
}

/* Le halo animé (drop-shadow) est retiré : les nœuds, statiques, gardent le leur */
#card-traffic .route-flow-path {
  stroke-width: 5px;
}

#card-traffic .route-node-glow {
  filter: drop-shadow(0 0 7px rgba(34, 197, 94, 0.95));
}

#card-traffic .route-node-glow.is-slow {
  filter: drop-shadow(0 0 7px rgba(245, 158, 11, 0.95));
}

#card-traffic .route-node-glow.is-congested {
  filter: drop-shadow(0 0 7px rgba(239, 68, 68, 0.95));
}

#card-traffic .route-node-glow.is-unknown {
  filter: none;
}

#card-traffic .route-node-aime {
  stroke-width: 3.2px;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.8));
}

#card-traffic .traffic-segments-col {
  flex: 1 1 auto;
  gap: 5px;
}

#card-traffic .traffic-tile {
  padding: 4px 12px;
}

#card-traffic .traffic-segments-col {
  justify-content: center;
}

#card-traffic .tile-name {
  font-size: 16.5px;
}

#card-traffic .tile-time {
  font-size: 22px;
  line-height: 1.1;
}

#card-traffic .status-text {
  font-size: 12px;
}

/* --- Stations : 2 colonnes égales côte à côte --- */
#card-traffic .traffic-stations-block {
  margin-top: 4px;
}

#card-traffic .stations-divider {
  margin-bottom: 2px;
}

#card-traffic .stations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: 6px;
  gap: 6px;
}

#card-traffic .station-card-compact {
  display: flex;
  flex-direction: column;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 200, 255, 0.3);
  border-radius: 8px;
  gap: 1px;
  min-width: 0;
}

#card-traffic .station-compact-left {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

#card-traffic .station-icon {
  flex: none;
  margin-right: 6px;
  font-size: 16px;
  line-height: 1;
}

#card-traffic .station-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

#card-traffic .station-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-main);
  white-space: nowrap;
}

#card-traffic .station-altitude {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

#card-traffic .station-compact-right {
  display: flex;
  width: 100%;
  margin-left: 0;
}

#card-traffic .station-status-pill {
  width: 100%;
  text-align: center;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 14.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Flash défilant : pied de carte, pleine largeur --- */
#card-traffic .dashboard-footer-ticker {
  height: 23px;
  margin-top: 4px;
}

#card-traffic .ticker-title {
  font-size: 12px;
}

#card-traffic .ticker-content {
  font-size: 13px;
}

#card-traffic .traffic-snow-banner {
  margin-top: 5px;
  padding: 4px 10px;
}

#card-traffic .snow-banner-icon {
  font-size: 18px;
  margin-right: 8px;
}

#card-traffic .snow-banner-text {
  font-size: 14px;
}

/* --- Carburant : podium 3 colonnes, économie ancrée en pied --- */
#card-fuel {
  flex: 1 1 auto;
  min-height: 0;
}

#card-fuel .fuel-card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#card-fuel .fuel-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 5px;
}

#card-fuel .fuel-podium-card {
  min-width: 0;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 200, 255, 0.25);
  border-radius: 8px;
}

#card-fuel .fuel-podium-card.is-best {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(92, 200, 255, 0.75);
}

#card-fuel .fuel-podium-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

#card-fuel .fuel-rank-pill {
  flex: none;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  font-size: 12px;
  line-height: 20px;
}

#card-fuel .fuel-price-pill {
  margin-left: 0;
  padding: 1px 7px;
  font-size: 20.5px;
  font-weight: 800;
  line-height: 1.2;
}

#card-fuel .fuel-podium-details {
  min-width: 0;
}

#card-fuel .fuel-station-name {
  max-height: 2.4em;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.15;
  word-wrap: break-word;
}

#card-fuel .fuel-station-city {
  font-size: 13px;
  line-height: 1.2;
}

#card-fuel .fuel-meta-bar {
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 6px;
}

#card-fuel .fuel-meta-icon {
  margin-right: 6px;
  font-size: 14px;
}

#card-fuel .fuel-meta-text {
  font-size: 12px;
  line-height: 1.3;
}

/* ========================================================
   MODULE 5 : WEBCAMS PANORAMIQUES (carrousel 7 s, pan 360°)
   Transform/opacity uniquement, pas de blur (Tab E).
   ======================================================== */

#card-webcam {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  height: 355px;
  flex: 0 0 auto;
}

.webcam-card-body {
  flex: 1;
  min-height: 0;
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
}

/* absolute : hauteur définie sans dépendre du % sur un enfant flex (vieux WebView) */
.webcam-viewport {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius-card);
}

.webcam-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.webcam-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-transform: translateX(0);
  transform: translateX(0);
}

.webcam-slide.next {
  -webkit-transform: translateX(100%);
  transform: translateX(100%);
}

/* Slide latéral vers la gauche */
.webcam-track.is-sliding .webcam-slide {
  -webkit-transition: -webkit-transform 0.8s ease-in-out;
  transition: transform 0.8s ease-in-out;
}

.webcam-track.is-sliding .webcam-slide.active {
  -webkit-transform: translateX(-100%);
  transform: translateX(-100%);
}

.webcam-track.is-sliding .webcam-slide.next {
  -webkit-transform: translateX(0);
  transform: translateX(0);
}

/* Image à 140 % de la largeur : le pan révèle les 40 % cachés (-28.57 % de 140 %) */
.webcam-panorama-img {
  display: block;
  width: 140%;
  height: 100%;
  object-fit: cover;
  -webkit-transform: translateX(0);
  transform: translateX(0);
}

.webcam-slide.active .webcam-panorama-img.is-panning {
  -webkit-animation: webcamPan 5s linear forwards;
  animation: webcamPan 5s linear forwards;
}

@-webkit-keyframes webcamPan {
  from { -webkit-transform: translateX(0); }
  to   { -webkit-transform: translateX(-28.57%); }
}

@keyframes webcamPan {
  from { transform: translateX(0); }
  to   { transform: translateX(-28.57%); }
}

/* Overlay ultra-fin : 36 px en pied, >90 % du panorama dégagé */
.webcam-slim-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(8, 15, 26, 0) 0%, rgba(8, 15, 26, 0.72) 100%);
  z-index: 2;
}

.webcam-overlay-left,
.webcam-overlay-right {
  display: flex;
  align-items: center;
  min-width: 0;
}

.webcam-station-icon {
  font-size: 16px;
  margin-right: 8px;
}

.webcam-title-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.webcam-telemetry-pill {
  display: flex;
  align-items: center;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: rgba(8, 15, 26, 0.65);
  border: 1px solid rgba(120, 200, 255, 0.25);
}

.telemetry-icon {
  margin-right: 4px;
  font-size: 12px;
}

.webcam-overlay-left {
  flex: 1 1 auto;
  margin-right: 8px;
}

.webcam-overlay-right {
  flex: 0 0 auto;
}

.webcam-badge-live {
  display: flex;
  align-items: center;
  margin-right: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.webcam-badge-live.is-stale {
  color: var(--accent-amber);
}

.webcam-badge-live.is-stale .live-dot {
  background: var(--accent-amber);
  animation: none;
}

.live-dot {
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  -webkit-animation: livePulse 2s ease-in-out infinite;
  animation: livePulse 2s ease-in-out infinite;
}

@-webkit-keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.webcam-index-pill {
  padding: 1px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(8, 15, 26, 0.65);
  border: 1px solid var(--card-border);
}

.webcam-progress-line {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent-cyan);
  -webkit-transform-origin: 0 50%;
  transform-origin: 0 50%;
  -webkit-transform: scaleX(0);
  transform: scaleX(0);
}

.webcam-progress-line.is-running {
  -webkit-animation: webcamProgress 5s linear forwards;
  animation: webcamProgress 5s linear forwards;
}

@-webkit-keyframes webcamProgress {
  from { -webkit-transform: scaleX(0); }
  to   { -webkit-transform: scaleX(1); }
}

@keyframes webcamProgress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ========================================================
   MODULE 6 : MÉDIAS (JW.org + Actualités)
   Pas de blur : image + dégradé statique. Pas d'inset/aspect-ratio (Chrome ≤ 80).
   ======================================================== */
.medias-row {
  display: flex;
  flex-direction: row;
  gap: var(--gap);
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.medias-row > * {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
}

/* Fallback d'espacement pour anciennes WebViews (Chrome < 84) ignorant gap en flexbox */
.medias-row > * + * {
  margin-left: var(--gap);
}

@supports (gap: var(--gap)) {
  .medias-row > * + * {
    margin-left: 0;
  }
}

#card-jw {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  padding: 0;
  height: 100%;
  min-height: 0;
  background-color: var(--card-bg);
  background-size: cover;
  background-position: center;
  cursor: default;
}

.jw-bg-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(8, 15, 26, 0.4) 0%, rgba(8, 15, 26, 0.85) 65%, rgba(8, 15, 26, 0.96) 100%);
}

.jw-content {
  position: relative;
  z-index: 2;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 12px;
}

.jw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.jw-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(8, 15, 26, 0.7);
  border: 1px solid rgba(120, 200, 255, 0.45);
  color: var(--accent-cyan);
  max-width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jw-title {
  margin: 0 0 3px;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.jw-snippet {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.jw-footer {
  display: flex;
  align-items: center;
}

.jw-source-pill {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #4a6da7;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
}

/* ========================================================
   CARTE ACTUALITÉS MULTI-SOURCES (#card-news) — 3 articles / source
   ======================================================== */
#card-news {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 8px 12px;
}

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-shrink: 0;
  gap: 6px;
  white-space: nowrap;
}

.news-card-header .card-title {
  white-space: nowrap;
  flex-shrink: 0;
}

.news-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.news-counter {
  font-size: 12px;
  font-weight: 700;
  padding: 1.5px 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.news-source-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 1.5px 6px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

#news-update-badge {
  font-size: 12px;
  padding: 1.5px 6px;
  line-height: 1.2;
}

/* Thèmes par source */
.source-dauphine {
  background: rgba(227, 6, 19, 0.22);
  border: 1px solid rgba(255, 90, 95, 0.55);
  color: #ff6b6b;
}

.source-france3 {
  background: rgba(0, 85, 166, 0.25);
  border: 1px solid rgba(64, 150, 255, 0.55);
  color: #64b5f6;
}

.source-franceinfo {
  background: rgba(245, 166, 35, 0.22);
  border: 1px solid rgba(255, 183, 3, 0.55);
  color: #ffd166;
}

.source-lemonde {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.source-offline {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid rgba(255, 183, 3, 0.5);
  color: var(--accent-amber);
}

/* Corps de la carte : liste des 3 articles */
.news-card-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.news-items-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 0;
  gap: 3px;
}

.news-item-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 0;
  min-height: 0;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2.5px solid transparent;
  transition: background 0.15s ease, border-left-color 0.15s ease;
  cursor: pointer;
}

.news-item-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.news-item-row:active {
  background: rgba(255, 255, 255, 0.12);
}

#card-news.active-dauphine .news-item-row { border-left-color: rgba(227, 6, 19, 0.65); }
#card-news.active-france3 .news-item-row { border-left-color: rgba(30, 144, 255, 0.65); }
#card-news.active-franceinfo .news-item-row { border-left-color: rgba(255, 183, 3, 0.65); }
#card-news.active-lemonde .news-item-row { border-left-color: rgba(255, 255, 255, 0.6); }

.news-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.news-item-time {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.news-item-title {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.25;
  font-weight: 600;
  color: #f0f4f8;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), #64b5f6);
  transition: width 0.2s linear;
}

#card-news.news-paused .news-progress-bar {
  background: var(--accent-amber);
  opacity: 0.9;
  width: 100% !important;
  transition: none !important;
}

#card-news.news-paused .news-counter {
  color: var(--accent-amber);
}

/* ========================================================
   AÉRATION & DÉ-ENCOMBREMENT (2026-10-24)
   Badges de fraîcheur masqués en nominal, visibles si périmé/partiel.
   Éléments conservés dans le DOM (tests + scripts JS).
   ======================================================== */
.card-badge,
.jw-source-pill,
.fuel-rank-pill,
.news-counter {
  display: none;
}

.card-badge.is-stale,
.card-badge.is-partial {
  display: inline-flex;
}

/* Webcam : l'image porte déjà le badge LIVE */
#webcam-update-badge {
  display: none;
}

/* Stations : indicateur épuré « ● Route dégagée » sans boîte */
#card-traffic .station-status-pill.status-ok {
  background: transparent;
  border-color: transparent;
  text-align: left;
  padding-left: 0;
}

#card-traffic .station-status-pill.status-ok::before {
  content: "\25CF\00a0";
  font-size: 16px;
}

/* Capsule Tempo : fond translucide, liseré fin */
.tempo-badge {
  height: 38px;
  padding: 0 18px;
  font-size: 18px;
  font-weight: 500;
  background-image: none;
  background-color: rgba(36, 136, 216, 0.16);
  border-width: 1px;
  border-color: rgba(108, 191, 248, 0.7);
  box-shadow: none;
}

.tempo-badge[data-tempo="blanc"] {
  background-color: rgba(242, 246, 251, 0.14);
  border-color: rgba(255, 255, 255, 0.75);
  color: #f2f6fb;
}

.tempo-badge[data-tempo="rouge"] {
  background-color: rgba(220, 38, 38, 0.3);
  border-color: #fecaca;
}

.tempo-badge[data-tempo="unknown"] {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #4b5870;
}

.tempo-badge.is-stale {
  border-color: var(--accent-amber);
}

/* Météo : Aime (Maison) HERO mise en avant à 3m, Bourg-St-Maurice et Albertville satellites sobres */
#box-aime {
  background-image: linear-gradient(180deg, #244677 0%, #172d4e 100%);
  border: 1.5px solid var(--accent-cyan);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.22);
}

#box-aime .city-name {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.2px;
}

#box-aime .city-temp {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
}

#box-aime .city-icon {
  font-size: 30px;
}

#box-aime .city-meta {
  color: #f1f5f9;
  font-weight: 500;
  font-size: 12px;
}

#box-bsm,
#box-albertville {
  background-image: linear-gradient(180deg, rgba(28, 42, 65, 0.6) 0%, rgba(18, 28, 45, 0.6) 100%);
  border: 1px solid rgba(120, 200, 255, 0.16);
}

#box-bsm .city-name,
#box-albertville .city-name {
  color: #94a3b8;
  font-size: 12px;
}

#box-bsm .city-temp,
#box-albertville .city-temp {
  font-size: 21px;
  font-weight: 600;
  color: #cbd5e1;
}

#box-bsm .city-icon,
#box-albertville .city-icon {
  font-size: 22px;
  opacity: 0.85;
}

#box-bsm .city-meta,
#box-albertville .city-meta {
  color: #a9b4c4;
  font-size: 12px;
}

/* Carburant : économie en ligne sobre, sans boîte */
.fuel-meta-bar {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* Actualités : source neutre (le rouge reste réservé aux alertes) */
.news-source-badge.source-dauphine,
.news-source-badge.source-france3,
.news-source-badge.source-franceinfo,
.news-source-badge.source-lemonde {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #a9b4c4;
}
