/* ── Reset minimal ───────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body {
  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  background: transparent;
  color: #000;
}

/* ══════════════════════════════════════════════════════════
   WIDGET
   Max 370 px — embarqué en iframe, les breakpoints > 640px
   ne s'activent jamais.
══════════════════════════════════════════════════════════ */

.widget {
  width: 100%;
  max-width: 23.125rem; /* 370 px */
  overflow: hidden;
  position: relative; /* ancre le bouton loupe et le panneau overlay */
}

/* ── Bouton loupe ────────────────────────────────────────────────────────── */
.btn-search {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  padding: 0.3rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.btn-search:hover {
  background: #f0f0f0;
}

.btn-search svg {
  width: 100%;
  height: 100%;
}

/* ── Panneau de recherche (overlay, sur la carte du jour) ────────────────── */
.search-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.5rem 0.625rem 0.375rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.search-panel-inner {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#widget-search-input {
  flex: 1;
  padding: 0.45rem 0.7rem;
  border: 1.5px solid #ccc;
  border-radius: 0.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

#widget-search-input:focus {
  border-color: #4a9f4a;
}

.btn-close {
  flex-shrink: 0;
  width: 1.8rem;
  height: 1.8rem;
  border: none;
  border-radius: 9999px;
  background: #eee;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.btn-close:hover {
  background: #ddd;
}

.widget > a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ── Carte principale (fond blanc, jour courant) ─────────────────────────── */
.card-main {
  background: #fff;
  padding: 0.375rem 0 0.875rem; /* pt-1.5  pb-3.5 */
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 0.75rem;
  gap: 0.5rem;
}

.main-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.date {
  font-size: 1rem;
  padding-bottom: 0.25rem;
}

.ville {
  font-size: 1.125rem;
  font-weight: 700;
  text-align: left;
}

.temperature {
  font-size: 3.3rem;  /* --text-6xl de l'original */
  font-weight: 700;
  line-height: 1.1;
}

.picto-main {
  width: 7rem;
  height: auto;
}

/* ── Ligne vent / hygro / précip ─────────────────────────────────────────── */
.meteo-details {
  display: flex;
  justify-content: space-evenly;
  list-style: none;
  padding: 0.5rem 0.25rem 0;
  font-size: 1rem;
}

.meteo-details li {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.icon {
  width: 1.75rem;   /* h-7 w-7 */
  height: 1.75rem;
  padding: 0.3rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* ── Prévisions J+1 → J+5 (fond gris) ───────────────────────────────────── */
.card-forecast {
  background: #E8E8E8;
  padding: 0.5rem 0 1rem;
}

.forecast-list {
  display: flex;
  justify-content: space-evenly;
  list-style: none;
  padding-bottom: 0.375rem;
}

.forecast-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.forecast-item h2 {
  font-size: 1rem;
  font-weight: 400;
}

.picto-small {
  width: 2rem;
  height: auto;
}

.forecast-item p {
  font-size: 1rem;
}

/* ── Erreur ──────────────────────────────────────────────────────────────── */
.error-card {
  max-width: 23.125rem;
  padding: 1rem;
  background: #fff3f3;
  border: 1px solid #f9a;
  border-radius: 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.error-detail {
  font-size: 0.75rem;
  color: #888;
}

.error-back {
  color: #2a7a2a;
  font-size: 0.875rem;
}

/* ══════════════════════════════════════════════════════════
   PAGE DE RECHERCHE (quand pas de ?cp=)
══════════════════════════════════════════════════════════ */

.search-page {
  max-width: 23.125rem;
  padding: 2rem 1rem 1rem;
}

.search-header {
  text-align: center;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.search-sun {
  width: 3rem;
  height: 3rem;
}

.search-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.search-header p {
  font-size: 0.875rem;
  color: #555;
}

/* Champ de recherche */
.search-wrapper {
  position: relative;
}

#search-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid #ccc;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

#search-input:focus {
  border-color: #4a9f4a;
}

/* Liste de suggestions */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #ccc;
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  list-style: none;
  z-index: 20;
  max-height: 16rem;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.suggestions li {
  padding: 0.6rem 0.875rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0f0f0;
}

.suggestions li:last-child {
  border-bottom: none;
}

.suggestions li:hover {
  background: #f0f7f0;
}
