/* ================================================================
   meteo.css
   Deux sections indépendantes :
   1. .meteo-*        → vignettes images station météo locale
   2. .om-*           → widget Open-Meteo (vent, prévisions)
   ================================================================ */

/* ══════════════════════════════════════════════════════════════════
   1. VIGNETTES MÉTÉO LOCALES (éphéméride, report, 24h, 7j…)
   ══════════════════════════════════════════════════════════════════ */

.meteo-section {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border-radius: 12px;
  padding: 2rem 1.5rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px rgba(0, 80, 160, 0.08);
}

.meteo-section-title {
  text-align: center;
  font-size: 1.6rem;
  color: #1a4a7a;
  margin-bottom: 0.3rem;
}

.meteo-section-subtitle {
  text-align: center;
  color: #5a7a9a;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.meteo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.meteo-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

  .meteo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 80, 160, 0.15);
  }

.meteo-card-label {
  background: #1a4a7a;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
  letter-spacing: 0.03em;
}

.meteo-img-wrapper {
  width: 100%;
  background: #f0f7ff;
  overflow: hidden;
}

.meteo-img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.4s ease;
}

@media (max-width: 600px) {
  .meteo-section {
    padding: 1.2rem 0.8rem;
  }

  .meteo-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .meteo-section-title {
    font-size: 1.3rem;
  }
}


/* ══════════════════════════════════════════════════════════════════
   2. WIDGET OPEN-METEO (classes préfixées om-)
   ══════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ── */
.om-section {
  background: linear-gradient(160deg, #e8f4fd 0%, #f0f8e8 100%);
  border-radius: 16px;
  padding: 2rem 1.5rem 1.5rem;
  margin: 2rem 0;
}

.om-section-title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
  color: #1a4f72;
}

.om-section-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: #5a7a8a;
  margin-bottom: 1.5rem;
}

  .om-section-subtitle a {
    color: #0066CC;
    text-decoration: none;
  }

.om-maj {
  font-style: italic;
}

/* ── Grille 3 cartes ── */
.om-current-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

@media (max-width: 580px) {
  .om-current-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Cartes ── */
.om-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 80, 160, 0.10);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.om-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3a7ca5;
  margin-bottom: 0.25rem;
}

/* Carte principale (ciel + temp) */
.om-card-main {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.om-icon-large {
  font-size: 3.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.om-card-main-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.om-description {
  font-size: 1rem;
  font-weight: 600;
  color: #1a4f72;
}

.om-temperature {
  font-size: 2.2rem;
  font-weight: 800;
  color: #e65c00;
  line-height: 1;
}

.om-humidite,
.om-pression {
  font-size: 0.82rem;
  color: #4a6a7a;
}

/* Carte vent */
.om-card-vent {
  align-items: center;
}

/* Boussole */
.om-compass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.om-compass-rose {
  position: relative;
  width: 90px;
  height: 90px;
  border: 2px solid #b0d0e8;
  border-radius: 50%;
  background: radial-gradient(circle, #f0f8ff 60%, #d0eaf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.compass-n, .compass-s, .compass-e, .compass-o {
  position: absolute;
  font-size: 0.65rem;
  font-weight: 700;
  color: #3a7ca5;
}

.compass-n {
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-s {
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-e {
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.compass-o {
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.compass-arrow {
  position: absolute;
  width: 4px;
  height: 38px;
  bottom: 50%;
  left: calc(50% - 2px);
  transform-origin: bottom center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.compass-arrow-head {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 28px solid #e65c00;
  margin-bottom: 2px;
}

.om-direction-label {
  font-size: 0.78rem;
  color: #3a7ca5;
  font-weight: 600;
}

/* Valeurs vent */
.om-vent-valeurs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
}

.om-vent-ligne {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.om-vent-ico {
  font-size: 1rem;
}

.om-vent-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a4f72;
  line-height: 1;
}

.om-vent-unit {
  font-size: 0.78rem;
  color: #5a7a8a;
}

.om-rafale .om-vent-val {
  font-size: 1.3rem;
  color: #e65c00;
}

/* Beaufort */
.om-beaufort {
  width: 100%;
  margin-top: 0.5rem;
}

.beaufort-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.beaufort-numero {
  display: inline-block;
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.beaufort-desc {
  font-size: 0.8rem;
  color: #1a4f72;
  font-weight: 600;
}

.beaufort-bar-bg {
  height: 8px;
  background: #e0eeee;
  border-radius: 4px;
  overflow: hidden;
}

.beaufort-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.beaufort-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: #8aabb8;
  margin-top: 2px;
}

/* Carte extra */
.om-extra-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.om-extra-item {
  display: grid;
  grid-template-columns: 1.4rem 1fr auto;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.83rem;
  border-bottom: 1px solid #e8f4fd;
  padding-bottom: 0.4rem;
}

  .om-extra-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

.om-extra-ico {
  font-size: 1.1rem;
  text-align: center;
}

.om-extra-label {
  color: #5a7a8a;
}

.om-extra-val {
  font-weight: 700;
  color: #1a4f72;
  text-align: right;
}

.om-conseil .om-extra-val {
  font-size: 0.75rem;
  color: #2e7d32;
}

/* ── Prévisions horaires – tableau lignes/colonnes ── */
.om-previsions {
  margin-top: 0.5rem;
}

.om-previsions-title {
  font-size: 1rem;
  color: #1a4f72;
  margin-bottom: 0.75rem;
}

.om-horaires-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0, 80, 160, 0.10);
}

/* Tableau */
.om-table {
  border-collapse: collapse;
  width: 100%;
  min-width: max-content;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.82rem;
}

  .om-table th.mht-label,
  .om-table td.mht-label {
    text-align: left;
    padding: 0.45rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #3a7ca5;
    white-space: nowrap;
    background: #f0f7ff;
    border-right: 2px solid #d0e8f8;
    border-bottom: 1px solid #e4f0f8;
    position: sticky;
    left: 0;
    z-index: 1;
  }

  .om-table th.mht-cell,
  .om-table td.mht-cell {
    text-align: center;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
    min-width: 58px;
    border-bottom: 1px solid #e4f0f8;
  }

  .om-table .mht-row:nth-child(even) td.mht-cell,
  .om-table .mht-row:nth-child(even) td.mht-label {
    background: #f8fcff;
  }

  .om-table .mht-row:nth-child(odd) td.mht-label {
    background: #f0f7ff;
  }

  .om-table .mht-row-jour th.mht-label,
  .om-table .mht-row-jour th.mht-jour {
    background: #0d3352;
    color: #fff;
    font-weight: 700;
    font-size: 0.80rem;
    letter-spacing: 0.05em;
    text-transform: capitalize;
    text-align: center;
    padding: 0.4rem 0.7rem;
    border-bottom: 2px solid #1a4f72;
  }

  .om-table .mht-row-jour th.mht-label {
    color: #a8d4ef;
  }

  .om-table .mht-row-jour th.mht-jour {
    border-right: 2px solid #3a7ca8;
  }

  .om-table .mht-row-heure th.mht-label,
  .om-table .mht-row-heure th.mht-cell {
    background: #1a4f72;
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    border-bottom: none;
    padding: 0.55rem 0.7rem;
  }

  .om-table .mht-row-heure th.mht-label {
    color: #a8d4ef;
  }

  .om-table .mht-row-last td {
    border-bottom: none;
  }

/* Cellules spécifiques */
.mht-icone {
  font-size: 1.3rem;
}

.mht-temp {
  font-weight: 700;
  color: #e65c00;
}

.mht-vent {
  font-weight: 800;
  font-size: 0.9rem;
}

.mht-rafale {
  color: #c04000;
  font-weight: 600;
}

.mht-dir {
  font-size: 1.15rem;
  color: #1a4f72;
}

.mht-unit {
  font-size: 0.62rem;
  font-weight: 400;
  color: #8aabb8;
  margin-left: 1px;
}

.mht-bft {
  display: inline-block;
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  border-radius: 5px;
  padding: 2px 6px;
  min-width: 22px;
}

.mht-precip {
  color: #3a7ca5;
  font-size: 0.78rem;
}
