/* =========================================================================
   Météo agricole (Figma "Outil — Météo agricole", 1139:8989)
   Loaded with the tool only (library syngenta_theme/meteo).
   ========================================================================= */
.meteo {
  --meteo-ink: #2b3024;
  --meteo-muted: #636e78;
  --meteo-line: #e5eaed;
  --meteo-green: #1a570d;
  --meteo-tint: #f6fbf7;
  --meteo-shadow: 0 8px 22px -8px rgba(13, 31, 13, 0.08);
}

/* Search band. */
.meteo__search { padding-block: 88px; background: #fff; text-align: center; }
.meteo__search .eyebrow { margin-bottom: 16px; }
.meteo__title,
.meteo__place {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.33;
  color: var(--meteo-ink);
}
.meteo__intro {
  max-width: 1004px;
  margin: 0 auto 28px;
  font-size: 1.0625rem;
  line-height: 28px;
  color: var(--meteo-muted);
}
.meteo__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  text-align: start;
}
.meteo__field { position: relative; }
.meteo__field-dot {
  position: absolute;
  top: 22px; inset-inline-start: 20px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--syn-orange);
  pointer-events: none;
}
.meteo__field input {
  width: 100%;
  height: 58px;
  padding-block: 0; padding-inline: 46px 20px;
  border: 1px solid var(--meteo-line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--meteo-ink);
}
.meteo__field input::placeholder { color: var(--meteo-muted); opacity: 1; }
.meteo__field input:focus {
  outline: none;
  border-color: var(--syn-orange);
  box-shadow: 0 0 0 3px rgba(235, 130, 0, 0.14);
}
.meteo__suggestions {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0; inset-inline-end: 0;
  z-index: 5;
  padding: 6px;
  border: 1px solid var(--meteo-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 32px -12px rgba(13, 31, 13, 0.2);
}
.meteo__suggestion {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.meteo__suggestion:hover,
.meteo__suggestion[aria-selected="true"] { background: var(--meteo-tint); }
.meteo__suggestion-name { font-weight: 600; color: var(--meteo-ink); }
.meteo__suggestion-region { font-size: 0.875rem; color: var(--meteo-muted); }
.meteo__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--syn-orange);
  box-shadow: 0 10px 24px -6px rgba(26, 41, 15, 0.16);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.meteo__submit:hover,
.meteo__submit:focus-visible { background: var(--syn-orange-600); }
.meteo__examples {
  margin: 16px 0 0;
  font-size: 0.875rem;
  line-height: 22px;
  color: var(--meteo-muted);
}
.meteo__example {
  padding-block: 0; padding-inline: 4px 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.meteo__example:hover,
.meteo__example:focus-visible { color: var(--syn-orange-600); text-decoration: underline; }
.meteo__status { min-height: 22px; margin: 8px 0 0; font-size: 0.875rem; color: var(--meteo-green); }

/* Forecast band. */
.meteo__forecast { padding-block: 88px 96px; background: #f4f7f9; transition: opacity 0.2s ease; }
.meteo__forecast.is-loading .meteo__today,
.meteo__forecast.is-loading .meteo__days { opacity: 0.45; }
.meteo__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.meteo__head .eyebrow { margin-bottom: 4px; }
.meteo__place { margin: 0; font-size: clamp(1.6rem, 2.8vw, 2.125rem); line-height: 46px; }
.meteo__note {
  flex: 0 1 400px;
  padding: 16px 18px;
  border: 1px solid #e0ebe3;
  border-radius: 18px;
  background: var(--meteo-tint);
  box-shadow: var(--meteo-shadow);
}
.meteo__note-title { margin: 0 0 4px; font-family: var(--font-heading); font-size: 0.875rem; font-weight: 600; line-height: 20px; color: var(--meteo-green); }
.meteo__note-text { margin: 0; font-size: 0.8125rem; line-height: 20px; color: var(--meteo-muted); }

.meteo__today {
  display: grid;
  grid-template-columns: minmax(0, 300px) repeat(4, minmax(0, 190px));
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 30px;
  padding: 30px 32px;
  border: 1px solid var(--meteo-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--meteo-shadow);
  transition: opacity 0.2s ease;
}
.meteo__now-label { margin: 0 0 4px; font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; line-height: 26px; color: var(--meteo-ink); }
.meteo__now-temp { margin: 0 0 4px; font-family: var(--font-heading); font-size: 4rem; font-weight: 600; line-height: 72px; color: var(--meteo-ink); }
.meteo__now-sky { margin: 0; font-size: 0.9375rem; line-height: 24px; color: var(--meteo-muted); }
.meteo__tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px;
  border-radius: 16px;
  background: var(--meteo-tint);
}
.meteo__dot { width: 18px; height: 18px; border-radius: 50%; background: #1f75b0; }
.meteo__tile--wind .meteo__dot { background: #056673; }
.meteo__tile--humidity .meteo__dot { background: var(--meteo-green); }
.meteo__tile--rain-chance .meteo__dot { background: var(--syn-orange); }
.meteo__tile-label { margin: 0; font-size: 0.8125rem; line-height: 20px; color: var(--meteo-muted); }
.meteo__tile-value { margin: 0; font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 600; line-height: 24px; color: var(--meteo-ink); }

.meteo__days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: opacity 0.2s ease;
}
.meteo__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 22px 28px;
  border: 1px solid var(--meteo-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.meteo__day p { margin: 0; }
.meteo__day-name { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; line-height: 26px; color: var(--meteo-ink); }
.meteo__day-temp { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; line-height: 28px; color: var(--meteo-ink); }
.meteo__day-meta { font-size: 0.875rem; line-height: 22px; color: var(--meteo-muted); }
.meteo__day-chance { font-size: 0.8125rem; line-height: 20px; color: var(--meteo-green); }
/* Sky dot: the design's sun, recoloured for other skies. */
.meteo__sky { width: 34px; height: 34px; margin-block: 4px; border-radius: 50%; background: #d7dde1; }
.meteo__sky--clear { background: #f5ad1a; }
.meteo__sky--partly { background: linear-gradient(135deg, #f5ad1a 0 50%, #c9d1d6 50% 100%); }
.meteo__sky--cloudy { background: #b4bec5; }
.meteo__sky--rain { background: #1f75b0; }
.meteo__sky--snow { background: #a9cbe3; }
.meteo__sky--storm { background: #3f4d57; }

@media (max-width: 1024px) {
  /* The temperature on its own row, the four tiles side by side under it. */
  .meteo__today { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .meteo__now { grid-column: 1 / -1; }
  .meteo__tile { padding: 18px 16px; }
  .meteo__days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .meteo__search { padding-block: 56px; }
  /* Small screens: the button stays beside the field, just narrower. */
  .meteo__form { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .meteo__forecast { padding-block: 56px 64px; }
  .meteo__head { flex-direction: column; align-items: stretch; }
  .meteo__note { flex-basis: auto; }
  /* Phones: the tiles two by two. */
  .meteo__today { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 24px 20px; gap: 14px; }
  /* Phones: the days swipe, two in view with the next one peeking in. */
  .meteo__days {
    display: flex;
    gap: 14px;
    margin: -8px calc(-1 * var(--gutter)) 0;
    padding: 8px var(--gutter) 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .meteo__days::-webkit-scrollbar { display: none; }
  .meteo__day { flex: 0 0 calc((100% - 28px) / 2.15); scroll-snap-align: start; }
}
/* Extra-small screens: the button goes under the field, full width, and the
   "Aujourd'hui" tiles and the day cards stack one per row. */
@media (max-width: 480px) {
  .meteo__form { grid-template-columns: minmax(0, 1fr); }
  .meteo__today { grid-template-columns: minmax(0, 1fr); }
  .meteo__day { flex-basis: 82%; }
}
