/* ========================================
   Météo
   ======================================== */
.meteo-grid {
  display: block;
}

.meteo-hour-pills-row {
  white-space: nowrap;
  scrollbar-width: thin;
}

.meteo-hour-pills-row .pill {
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .meteo-grid {
    grid-template-columns: 1fr;
  }
}

.meteo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: var(--shadow);
  font-size: var(--fs-sm);
}

.pill b {
  font-weight: 700;
  letter-spacing: .02em;
}

.pill .pc {
  color: var(--muted);
}

.pill .temp {
  font-weight: 700;
}


.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.badge .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--badge-dot);
  box-shadow: 0 0 8px var(--badge-dot);
}

/* Météo compact & carte */
.meteo--compact .panel {
  padding: 12px;
}

.meteo-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  align-items: start;
}

@media (max-width: 900px) {
  .meteo-card {
    grid-template-columns: 1fr;
  }
}

.meteo-left {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 6px;
}

.meteo-top {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.meteo-top .place-tag {
  font: 700 clamp(18px, 2.2vw, 24px)/1.1 system-ui;
  padding: 4px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.meteo-top .place-tag .pin {
  font-size: 0.9em;
  opacity: 0.75;
  transform: translateY(1px);
}

.meteo-top .temp {
  font-size: 70px;
  font-weight: 800;
}
.temp .unit {
    font-size: 0.5em;
    vertical-align: super;
}
.meteo-top .minmax {
  color: var(--muted);
  font-size: var(--fs-sm);
 
}
.meteo-top .minmax b {
  font-weight: 800;
}

.meteo-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.meteo-kv {
  padding: 6px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--meteo-kv-bg);
  font-size: 18px;
}

.meteo-kv .k {
  font-size: 12px;
  color: var(--muted);
}

.meteo-kv .v {
  font-weight: 700;
}

.meteo-rainline {
  font-weight: 700;
  color: var(--meteo-text-primary);
  font-size: var(--fs-sm);
  margin-top: 2px;
}

.meteo-rainline--muted {
  color: var(--muted);
}

.meteo-rainline--active {
  background-color: var(--meteo-rainline-active-bg);
  border-left: 3px solid var(--meteo-rainline-active-border);
  padding-left: 8px;
  border-radius: 4px;
}

.meteo-right {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--meteo-bg-gradient);
  padding: 10px;
}

.meteo-right .tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.meteo-right .tab {
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  cursor: default;
}

.meteo-right .unit {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.meteo--compact {
  padding-top: clamp(10px, 1.5vw, 5px);
  padding-right: clamp(14px, 2.2vw, 22px);
  padding-bottom: clamp(5px, 1.8vw, 5px);
  padding-left: clamp(14px, 2.2vw, 22px);
}

/* ========================================
   Graphiques météo (Sparkline)
   ======================================== */
.spark-wrap {
  position: relative;
  height: 140px;
}

.spark-wrap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.spark-grid line {
  stroke: var(--spark-grid);
  stroke-width: 1;
}

.spark-grid-vert line {
  stroke: var(--spark-grid-vert);
  stroke-width: 1;
}

.spark-dots circle {
  r: 2.6;
  fill: var(--spark-dots);
}

.spark-axis text {
  font-size: 11px;
  fill: var(--spark-text);
  dominant-baseline: hanging;
}

.spark-path {
  fill: var(--spark-fill);
  stroke: var(--spark-line);
  stroke-width: 2;
}

/* ========================================
   Semaine météo
   ======================================== */
.days {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.day {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--day-bg);
  white-space: nowrap;
}

.day h5 {
  margin: 0;
  font: 700 16px/1.2 system-ui;
  min-width: 30px;
  color: var(--day-title);
}

.day .wx {
  font-size: 20px;
}

.day .tt {
  font-size: 14px;
  display: flex;
  gap: 4px;
  font-weight: 600;
}

.day .rain, .day .wind {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  border: 1px solid transparent;
}

.day .rain {
  background: var(--day-rain-bg);
  color: var(--day-rain-text);
  border-color: var(--day-rain-border);
}

.day .wind {
  background: var(--day-wind-bg);
  color: var(--day-wind-text);
  border-color: var(--day-wind-border);
}

.day .wind .arrow {
  font-weight: 900;
}

/* ========================================
   Alerts
   ======================================== */
.alerts {
  display: grid;
  grid-auto-rows: minmax(56px, auto);
  gap: 12px;
}

.alert {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: calc(var(--radius) - 6px);
  border: 1px dashed var(--border);
  background: var(--alert-bg);
}

.alert .dot {
  inline-size: 14px;
  block-size: 14px;
  border-radius: 999px;
  background: var(--warning);
  box-shadow: 0 0 8px var(--shadow-warning);
  flex: none;
}

.alert--danger .dot {
  background: var(--danger);
  box-shadow: 0 0 8px var(--shadow-danger);
}

/* ========================================
   Mobile - Météo
   ======================================== */
@media (max-width: 600px) {
  .meteo-card {
    grid-template-columns: 1fr;
  }

  .meteo-hour-pills-row {
    white-space: normal;
    overflow-x: visible;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .meteo-hour-pills-row .pill {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .days {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .day {
    flex: 1 1 calc(50% - 8px);
    white-space: normal;
  }

  .meteo-hourline {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    gap: 6px;
  }

  .meteo-hourline .hitem {
    display: flex !important;
    flex: 0 0 calc(50% - 6px);
    box-sizing: border-box;
    justify-content: flex-start;
  }

  .day {
    flex: 1 1 100%;
  }
}



/* V2===========================
   Zone 3: Météo
   =========================== */

/* Météo  layout principal */
.meteo--compact .title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.meteo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.meteo-card {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 10px;
  align-items: stretch;
  grid-template-rows: auto auto;
}
 .meteo-card-line {
    grid-column: 1 / -1;    /* traverse toute la carte */
    display: flex;
    gap: 14px;
    width: 100%;
    margin-top: 4px;
  }

  .meteo-card-line > div {
    flex: 1;
    min-width: 0;           /* évite les débordements */
  }

  @media (max-width: 900px) {
    .meteo-card-line {
      flex-direction: column; /* optionnel si tu veux empiler en mobile */
    }
  }
.meteo-left,
.meteo-right {
  display: flex;
  flex-direction: column;
  
}

/* Météo  détails colonne gauche */
.meteo-top {
  display: grid;
  grid-template-rows: auto auto;
  align-items: end;
  gap: 6px 12px;
}

.place-tag {
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--panel-soft, #f5f7fb);
  border: 1px solid var(--border-soft, #d5e0f0);
  border-radius: 999px;
  color: var(--text-muted, #6b7280);
  font-size: 0.9rem;
  font-weight: 600;
}

.place-tag .pin {
  font-size: 1rem;
}

.temp {
  grid-row: 1 / span 2;
  justify-self: end;
  font-size: clamp(52px, 8vw, 86px);
  font-weight: 800;
  line-height: 0.95;
}

.minmax {
  grid-column: 1 / -1;
  font-size: 0.95rem;
  color: var(--text-muted, #6b7280);
  font-weight: 500;
  align-self: center; 
  height: 90%;
}

.meteo-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;

}

.meteo-kv {
  background: var(--panel-soft, #f5f7fb);
  border: 1px solid var(--border-soft, #d5e0f0);
  border-radius: var(--radius-l, 16px);
  padding: 3px 12px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);

  display: flex;
  flex-direction: column;
  align-items: center;   /* ✅ tout centré */
  text-align: center;
}

/* Intitulé en haut (Hum., Précip., Vent, UV) */
.meteo-kv .k {
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
  margin-bottom: 4px;
}

/* Valeur principale centrée */
.meteo-kv .v{
  display: grid;
  align-items: baseline;
  justify-content: center;  /* ✅ centrage horizontal du contenu */

  gap: 0px;
  font-size: 1.5rem;       /* taille de base des valeurs */
  font-weight: 800;
  color: var(--text-main, #102143);
}
/* Humidite : valeur + unite alignees sur la meme ligne et centrees */
.meteo-kv .v.humid {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

/* Unités dans les KV météo */
.meteo-unit {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.7;
}

.wind-group {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;          /* flèche & texte très proches */
  margin-left: 6px;  /* petit espace après "km/h" */
}

.wind-arrow {
  font-size: 1.5rem;
}

.wind-dir {
  font-size: 1.5rem;
}



/* Spécifique humidité : valeur + unité sur une même ligne */
.meteo-details .meteo-kv:first-child {
  display: inline;
 }


.meteo-nowcast {
  display: flex;
  align-items: center;
  grid-column: 1 / -1;
  gap: 10px;
  padding: 5px 14px;
  background: rgba(255, 204, 0, 0.18);
  border: 1px solid rgba(255, 204, 0, 0.55);
  border-radius: var(--radius-l, 16px);
  font-weight: 700;
  color: var(--text-main, #102143);
}

.meteo-nowcast[hidden] {
  display: none !important;
}

.meteo-nowcast .icon {
  font-size: 1.2rem;
}

.meteo-nowcast .nowcast-rain {
  margin-left: 15px;
  font-size: 1.2rem;
  font-weight: 700;
}

/* Météo  graph & heures */
.meteo-right-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
}

.tabs {
  display: inline-flex;
  gap: 8px;
  font-weight: 600;
}

.tabs .tab {
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
}

.tabs .tab.active {
  background: var(--panel-soft, #f5f7fb);
  border-color: var(--border-soft, #d5e0f0);
  color: var(--text-main, #102143);
}

.meteo-chart-wrap {
  background: var(--panel-soft, #f5f7fb);
  border-radius: var(--radius-xl, 22px);
  border: 1px solid var(--border-soft, #d5e0f0);
  padding: 14px 16px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.meteo-chart {
  height: 150px;
}

.meteo-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
}

.meteo-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meteo-chart-legend .leg-temp::before,
.meteo-chart-legend .leg-rain::before {
  content: "";
  width: 12px;
  height: 4px;
  border-radius: 999px;
  display: inline-block;
}

.meteo-chart-legend .leg-temp::before {
  background: #2b7cff;
}

.meteo-chart-legend .leg-rain::before {
  background: #ffd34d;
}

.meteo-hours-block {
  margin: 6px 0;
}

.meteo-hours-header {
  font-weight: 700;
  color: var(--text-main, #102143);
  margin-bottom: 8px;
}

.meteo-hourline {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.meteo-hourline::-webkit-scrollbar {
  height: 6px;
}

.meteo-hourline::-webkit-scrollbar-thumb {
  background: var(--border-soft, #d5e0f0);
  border-radius: 999px;
}

.meteo-hour-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--panel-soft, #f5f7fb);
  border: 1px solid var(--border-soft, #d5e0f0);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}

.mh-time {
  font-size: 1.2rem;
  color: var(--text-main, #102143);
  font-weight: 700;
}

.mh-temp {
  font-size: 1.2rem;
  font-weight: 800;
}

.mh-rain {
  font-size: 0.85rem;
  color: var(--text-main, #102143);
}

/* Météo  semaine */

.week-title {
  font-weight: 700;
  color: var(--text-main, #102143);
  margin-bottom: 8px;
}


.meteo-week-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel-soft, #f5f7fb);
  border: 1px solid var(--border-soft, #d5e0f0);
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
  min-width: 180px;
}

.mw-day {
  font-weight: 800;
  color: var(--text-main, #102143);
  min-width: 36px;
}

.mw-icon {
  font-size: 1.2rem;
}

.mw-temps {
  font-weight: 700;
}

.mw-rain,
.mw-wind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.mw-rain {
  background: rgba(43, 124, 255, 0.08);
  color: #1c4b9d;
}

.mw-wind {
  background: rgba(255, 204, 0, 0.14);
  color: #9c7200;
}

.mw-rain-icon,
.mw-wind-icon {
  display: inline-flex;
}

/* Responsive */
@media (max-width: 900px) {
  .meteo-card {
    grid-template-columns: 1fr;
  }
}

/* Ajustement disposition meteo-card-line : blocs empilés sur toute la largeur */
.meteo-card-line {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;

}

.meteo-card-line > div {
  width: 100%;
}

@media (max-width: 768px) {
  .tcard {
    padding: 8px 10px;
  }

  .rer-grid {
    grid-template-columns: 1fr;
  }
}


/* Météo – graphe */
.meteo-chart-wrap {
  position: relative;
  margin-top: 8px;
}

.meteo-chart {
  width: 100%;
  height: 130px;
}

.meteo-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* lignes principales */
.meteo-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.meteo-line-temp {
  stroke: #f2b600; /* jaune pour la température */
}

.meteo-line-rain {
  stroke: #2f7ed8; /* bleu pour la pluie */
  stroke-dasharray: 4 3;
}

/* points */
.meteo-dot {
  stroke-width: 1.5;
  stroke: #ffffff40;
}

.meteo-dot-temp {
  fill: #f2b600;
}

.meteo-dot-rain {
  fill: #2f7ed8;
}

/* légende sous le graphe */
.meteo-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
  font-size: 0.8rem;
  opacity: 0.9;
}

.meteo-chart-legend span::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}

.meteo-chart-legend .leg-temp::before {
  background: #f2b600;
}

.meteo-chart-legend .leg-rain::before {
  background: #2f7ed8;
}


/* Météo – titres “Aujourd’hui” / “Cette semaine” */
.meteo-hours-header .label,
.meteo-week-block .week-title {
  font-weight: 600;
  margin-bottom: 4px;
}

/* Pills horaires – alignement un peu plus compact */
.meteo-hourline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meteo-hour-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffffee;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04);
  font-size: 0.85rem;
}

.meteo-hour-pill .mh-temp {
  font-weight: 600;
}

.meteo-hour-pill .mh-rain {
  opacity: 1;
}

/* Pills semaine – alignement */
.meteo-week {
  display: flex;
  flex-wrap: wrap;

  gap: 6px;
}

.meteo-week-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffffee;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04);
  font-size: 0.9rem;
}

.meteo-week-pill .mw-day {
  text-transform: capitalize;
  font-size: 1.1rem;
}

.meteo-week-pill .mw-temps {
  font-weight: 600;
  font-size: 1.2rem;
}

/* mini-chips pluie / vent dans la pill */
.mw-rain,
.mw-wind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.mw-rain {
  background: #e3f2ff;
}

.mw-wind {
  background: #ffeab8;
}

/* Météo – échelle du graphe */
.meteo-axis-line {
  stroke: rgba(0, 0, 0, 0.12);
  stroke-width: 1;
}

.meteo-axis-label {
  font-size: 0.7rem;
  fill: rgba(0, 0, 0, 0.55);
}
.meteo-chart {
  width: 100%;
  height: 130px;
}
.meteo-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Valeurs au-dessus des points */
.meteo-point-label {
  font-size: 0.7rem;
  font-weight: 500;
  fill: rgba(0, 0, 0, 0.7);
}
.meteo-axis-label-rain {
  fill: #2f7ed8; /* même bleu que la courbe de pluie */
}
.meteo-hour-pill .mh-icon {
  font-size: 1.2rem;
  margin: 0 2px;
}

/* Précipitation sur pills horaires */
.meteo-hour-pill .mh-precip {
  font-size: 1.2rem;
  color: #2f7ed8;
  font-weight: 600;
  opacity: 0.85;
}

/* Barres de précipitation sur le graphique */
.meteo-bar-rain {
  fill: rgba(47, 126, 216, 0.45);
  stroke: none;
}

.meteo-rain-label {
  font-size: 0.6rem;
  font-weight: 600;
  fill: #2f7ed8;
}




