/* ==================================================
   WIDGET MÉTÉO MINI - CSS
   ================================================== */

.widget-meteo {
  background: #f5f5f7;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  margin-bottom: 16px;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #e8e8ed;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.widget-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-icon {
  font-size: 24px;
  line-height: 1;
  opacity: 0.8;
}

.widget-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(0,0,0,.7);
  letter-spacing: -0.2px;
}

.widget-refresh {
  width: 32px;
  height: 32px;
  border: 0;
  background: rgba(0,0,0,.04);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .2s ease;
}

.widget-refresh:hover {
  background: rgba(0,0,0,.08);
  transform: rotate(180deg);
}

.refresh-icon {
  font-size: 16px;
  opacity: 0.6;
}

.widget-body {
  padding: 20px;
  background: #fff;
}

/* =========================
   SÉLECTEUR VILLE
   ========================= */
.meteo-city-selector {
  margin-bottom: 16px;
}

.city-select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.1);
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all .2s ease;
}

.city-select:focus {
  border-color: rgba(0,0,0,.2);
  background: #fff;
}

.city-select option {
  background: #fff;
  color: #1d1d1f;
  padding: 10px;
}

/* =========================
   MÉTÉO ACTUELLE
   ========================= */
.meteo-current {
  background: linear-gradient(135deg, #d4e4ff 0%, #e6f2ff 100%);
  border: 1px solid rgba(59,130,246,.15);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.meteo-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px 20px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0,0,0,.1);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.meteo-loading p {
  color: rgba(0,0,0,.5);
  font-size: 13px;
  margin: 0;
  font-weight: 500;
}

.current-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.current-temp-big {
  font-size: 40px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1;
  letter-spacing: -2px;
}

.current-icon-big {
  font-size: 48px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.1));
}

.current-desc {
  font-size: 15px;
  color: rgba(0,0,0,.6);
  text-transform: capitalize;
  margin-bottom: 14px;
  font-weight: 500;
}

.current-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 13px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(0,0,0,.5);
  font-weight: 500;
}

.detail-icon {
  font-size: 16px;
  opacity: 0.7;
}

.detail-value {
  font-weight: 600;
  color: #1d1d1f;
}

/* =========================
   PRÉVISION DEMAIN
   ========================= */
.meteo-tomorrow {
  background: linear-gradient(135deg, #f3e8ff 0%, #faf5ff 100%);
  border: 1px solid rgba(168,85,247,.15);
  border-radius: 16px;
  padding: 16px;
}

.tomorrow-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(0,0,0,.6);
}

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

.tomorrow-temp {
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -1px;
}

.tomorrow-icon {
  font-size: 40px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.1));
}

.tomorrow-desc {
  font-size: 13px;
  color: rgba(0,0,0,.5);
  text-transform: capitalize;
  margin-top: 4px;
  font-weight: 500;
}

/* =========================
   FOOTER
   ========================= */
.widget-footer {
  padding: 14px 20px;
  background: #f5f5f7;
  border-top: 1px solid rgba(0,0,0,.06);
}

.widget-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #007aff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity .2s ease;
}

.widget-link:hover {
  opacity: 0.7;
}

.link-arrow {
  font-size: 16px;
  transition: transform .2s ease;
  font-weight: 600;
}

.widget-link:hover .link-arrow {
  transform: translateX(4px);
}

/* =========================
   MODE SOMBRE
   ========================= */
@media (prefers-color-scheme: dark) {
  .widget-meteo {
    background: #1c1c1e;
  }
  
  .widget-header {
    background: #2c2c2e;
    border-bottom-color: rgba(255,255,255,.1);
  }
  
  .widget-title {
    color: rgba(255,255,255,.7);
  }
  
  .widget-refresh {
    background: rgba(255,255,255,.08);
  }
  
  .widget-refresh:hover {
    background: rgba(255,255,255,.15);
  }
  
  .widget-body {
    background: #1c1c1e;
  }
  
  .city-select {
    background: #2c2c2e;
    color: #fff;
    border-color: rgba(255,255,255,.1);
  }
  
  .city-select:focus {
    border-color: rgba(255,255,255,.2);
    background: #3a3a3c;
  }
  
  .city-select option {
    background: #2c2c2e;
    color: #fff;
  }
  
  .meteo-current {
    background: rgba(59,130,246,.15);
    border-color: rgba(59,130,246,.3);
  }
  
  .current-temp-big,
  .detail-value,
  .tomorrow-temp {
    color: #fff;
  }
  
  .current-desc,
  .tomorrow-desc {
    color: rgba(255,255,255,.7);
  }
  
  .detail-item {
    color: rgba(255,255,255,.6);
  }
  
  .meteo-tomorrow {
    background: rgba(168,85,247,.15);
    border-color: rgba(168,85,247,.3);
  }
  
  .tomorrow-header {
    color: rgba(255,255,255,.7);
  }
  
  .widget-footer {
    background: #2c2c2e;
    border-top-color: rgba(255,255,255,.1);
  }
  
  .widget-link {
    color: #0a84ff;
  }
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 992px) {
  .widget-meteo {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .widget-header {
    padding: 14px 16px;
  }
  
  .widget-body {
    padding: 16px;
  }
  
  .current-temp-big {
    font-size: 40px;
  }
  
  .current-icon-big {
    font-size: 48px;
  }
  
  .widget-footer {
    padding: 12px 16px;
  }
}
