/* =========================================================================
   Crop and product category pages (Figma "Fruits rouges" 1139:5831,
   "Vigne" 1139:6014, "Fongicide" 1139:5923)
   ========================================================================= */
.term-products { padding-block: 100px; background: #fff; }
/* Groups alternate white and light grey, as Fongicides / Insecticides do. */
.term-products + .term-products { background: #f9fafb; }
.term-products + .term-products + .term-products { background: #fff; }
.term-products__title {
  margin: 0 0 32px;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--syn-ink);
}
.term-products__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.term-products__empty { margin: 0; text-align: center; font-size: 1.0625rem; color: var(--syn-body); }

/* Campaign visuals fill the card's panel instead of sitting in it. */
.product-card--visual .product-card__visual { padding: 0; overflow: hidden; }
.product-card--visual .product-card__visual a { display: block; width: 100%; height: 100%; }
.product-card--visual .product-card__visual img { width: 100%; height: 100%; max-height: none; object-fit: cover; }

/* Crop pages (Figma "Fruits rouges" 1139:5831, "Vigne" 1139:6014). */
.term-page--culture .term-products { padding-block: 158px 124px; }
.term-page--culture .term-products + .term-products { padding-block: 97px 120px; background: #f9f9f9; }
.term-page--culture .term-products + .term-products + .term-products { background: #fff; }
.term-page--culture .term-products__title { margin-bottom: 36px; font-size: clamp(1.75rem, 3.4vw, 3rem); font-weight: 700; line-height: 1.2; color: #111827; }
.term-page--culture .term-products + .term-products .term-products__title { margin-bottom: 33px; }
.term-page--culture .term-products__grid { gap: 33px 31px; }
.term-page--culture .product-card { min-height: 492px; }
.term-page--culture .product-card__title { color: #2b3024; }
.term-page--culture .product-card__text { color: rgba(0, 0, 0, 0.7); }
/* Campaign visuals (Vigne): one grid, a little narrower, then the form. */
.term-page--culture .term-products:has(.product-card--visual) { padding-block: 162px 59px; }
.term-page--culture .term-products__grid:has(.product-card--visual) { max-width: 1184px; margin-inline: auto; gap: 25px 24px; }

@media (max-width: 1024px) {
  .term-page--culture .term-products,
  .term-page--culture .term-products + .term-products { padding-block: 72px; }
  .term-page--culture .term-products:has(.product-card--visual) { padding-block: 72px 40px; }
  .term-page--culture .term-products__grid { gap: 24px; }
  .term-page--culture .product-card { min-height: 0; }
}
@media (max-width: 768px) {
  .term-page--culture .term-products,
  .term-page--culture .term-products + .term-products { padding-block: 56px; }
  .term-page--culture .term-products:has(.product-card--visual) { padding-block: 56px 24px; }
  .term-page--culture .term-products__title { margin-bottom: 24px; }
}

/* "Demande d'infos" on crop pages (Figma "Vigne", 1139:6099). */
.lead-crop { padding-block: 40px 110px; background: #fff; }
.lead-crop__card {
  display: grid;
  grid-template-columns: minmax(0, 569px) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 26px;
  background: #f9f9f9;
  box-shadow: 0 4px 6.4px rgba(0, 0, 0, 0.17);
}
.lead-crop__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100%;
  position: relative;
  isolation: isolate;
  padding: 95px 58px 58px;
  /* The photo comes inline (background-image); size and position stay here. */
  background: #264701 center / cover no-repeat;
  color: #fff;
}
.lead-crop__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #264701 30.371%, rgba(38, 71, 1, 0) 61.77%);
  mix-blend-mode: overlay;
}
.lead-crop__badge {
  display: grid;
  place-items: center;
  width: 45px; height: 45px;
  margin-bottom: 30px;
  border: 1px solid rgba(245, 245, 245, 0.22);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
}
.lead-crop__eyebrow {
  margin: 0 0 15px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fa0;
}
.lead-crop__title {
  margin: 0 0 28px;
  font-size: clamp(2rem, 3.4vw, 2.95rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.06em;
  color: #fff;
}
.lead-crop__title .hl { display: block; font-weight: 400; color: #7fca3f; }
.lead-crop__text { max-width: 403px; font-family: var(--font-heading); font-size: 1.0625rem; line-height: 26px; color: rgba(255, 255, 255, 0.7); }

.lead-crop__form { padding: 70px 66px 64px; }
.lead-crop__form-eyebrow {
  margin: 0 0 11px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #df8c24;
}
.lead-crop__form-title {
  margin: 0 0 15px;
  font-size: clamp(2rem, 3.4vw, 3.07rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
  color: #264600;
}
.lead-crop__form-intro { max-width: 545px; margin: 0 0 34px; font-family: var(--font-heading); font-size: 0.89rem; line-height: 26px; color: #6e827a; }

.lead-crop__form .webform-submission-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
}
.lead-crop__form .form-item-intro,
.lead-crop__form .lead-crop__options { grid-column: 1 / -1; }
.lead-crop__form .js-form-item { margin: 0; }
.lead-crop__form label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 15.6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4c7165;
}
.lead-crop__form .form-required::after { content: " *"; color: #df8c24; }
.lead-crop__form input[type="text"],
.lead-crop__form input[type="email"],
.lead-crop__form input[type="tel"],
.lead-crop__form select {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #d9e6dd;
  border-radius: 19px;
  background: #fff;
  font-family: var(--font-heading);
  font-size: 0.89rem;
  color: #264600;
}
.lead-crop__form ::placeholder { color: #a1b0a8; opacity: 1; }
.lead-crop__form input:focus,
.lead-crop__form select:focus { outline: none; border-color: var(--syn-green-500); box-shadow: 0 0 0 3px rgba(0, 153, 51, 0.12); }
.lead-crop__form select {
  padding-inline-end: 42px;
  -webkit-appearance: none;
  appearance: none;
  background: #fff url("../../images/icon-lead-chevron.svg") right 15px center / 16px no-repeat;
}
.lead-crop__form select:invalid { color: #a1b0a8; }
/* Icons inside the e-mail, phone and city boxes. */
.lead-crop__icon input { padding-inline-start: 42px; background: #fff 15px center / 16px no-repeat; }
.lead-crop__icon--mail input { background-image: url("../../images/icon-lead-mail.svg"); }
.lead-crop__icon--phone input { background-image: url("../../images/icon-lead-phone.svg"); }
.lead-crop__icon--pin input { background-image: url("../../images/icon-lead-pin.svg"); }
/* "ha" sits inside the area box. */
.lead-crop__form .webform-has-field-suffix { position: relative; }
.lead-crop__form .webform-has-field-suffix input { padding-inline-end: 44px; }
.lead-crop__form .webform-has-field-suffix .field-suffix {
  position: absolute;
  inset-inline-end: 18px;
  bottom: 17px;
  font-size: 0.71rem;
  font-weight: 500;
  color: #789187;
}

.lead-crop__options {
  display: grid;
  gap: 11px;
  margin-top: 11px;
  padding: 19px;
  border-radius: 15px;
  background: #f0f6ef;
}
.lead-crop__options .form-type-checkbox { display: flex; align-items: flex-start; gap: 11px; }
.lead-crop__options label {
  margin: 0;
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 22.7px;
  letter-spacing: 0;
  text-transform: none;
  color: #48695f;
  cursor: pointer;
}
.lead-crop__options input[type="checkbox"] {
  flex: none;
  width: 19px; height: 19px;
  margin: 2px 0 0;
  border: 1px solid #b7cbbd;
  border-radius: 50%;
  background: #fff center / 11px no-repeat;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.lead-crop__options input[type="checkbox"]:checked {
  border-color: var(--syn-green-500);
  background-color: var(--syn-green-500);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}
.lead-crop__options input[type="checkbox"]:focus-visible { outline: 2px solid var(--syn-green-500); outline-offset: 2px; }

/* The privacy note sits beside the submit button. */
.lead-crop__form .form-item-legal { align-self: center; margin-top: 8px; }
.lead-crop__form .form-item-legal p { max-width: 302px; margin: 0; font-family: var(--font-heading); font-size: 0.65rem; line-height: 19px; color: #82948c; }
.lead-crop__form .form-actions { display: flex; justify-content: flex-end; align-self: center; margin: 8px 0 0; }
.lead-crop__form .webform-button--submit {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding-block: 13px; padding-inline: 23px 45px;
  border: 0;
  border-radius: 16px;
  background: var(--syn-green-500) url("../../images/icon-lead-arrow.svg") right 22px center / 15px no-repeat;
  box-shadow: 0 9.5px 9.5px rgba(8, 112, 82, 0.18);
  font-family: var(--font-heading);
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 19px;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.lead-crop__form .webform-button--submit:hover,
.lead-crop__form .webform-button--submit:focus-visible { background-color: var(--syn-green-600); }

@media (max-width: 1024px) {
  /* Recette: panel and form stay side by side on tablets, the form one
     field a row. */
  .lead-crop__card { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .lead-crop__form .webform-submission-form { grid-template-columns: minmax(0, 1fr); }
  .lead-crop__panel { min-height: 420px; padding: 40px 28px; }
  .lead-crop__form { padding: 40px 28px; }
}
@media (max-width: 720px) {
  .lead-crop__card { grid-template-columns: minmax(0, 1fr); }
  .lead-crop { padding-block: 24px 64px; }
  .lead-crop__form { padding: 32px 20px; }
  .lead-crop__form .webform-submission-form { grid-template-columns: minmax(0, 1fr); }
  .lead-crop__form .form-actions { justify-content: stretch; }
  .lead-crop__form .webform-button--submit { width: 100%; justify-content: center; }
}

/* Pager (Figma "Fongicide"): square buttons, current page outlined, next in
   solid green. */
.term-products .pager { margin-top: 56px; }
.term-products .pager__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.term-products .pager__item a {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d9dde1;
  border-radius: 4px;
  background: #fff;
  font-weight: 600;
  color: var(--syn-ink);
}
.term-products .pager__item a:hover { border-color: var(--syn-green-500); text-decoration: none; }
.term-products .pager__item.is-active a { border-color: var(--syn-green-500); color: var(--syn-green-500); }
.term-products .pager__item--next a,
.term-products .pager__item--last a { border-color: var(--syn-green-500); background: var(--syn-green-500); color: #fff; }

/* Recette: three products a row on tablets, two on phones, one on the
   smallest phones (≤400px). */
@media (max-width: 1024px) {
  .term-products__grid { gap: 20px; }
}
@media (max-width: 720px) {
  .term-products { padding-block: 56px; }
  .term-products__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  /* Half a phone wide: a tighter card. */
  .term-products .product-card,
  .product__related .product-card { padding: 12px; border-radius: 18px; }
  .term-products .product-card__visual,
  .product__related .product-card__visual { padding: 12px; border-radius: 0 60px 0 60px; }
  .term-products .product-card__body,
  .product__related .product-card__body { padding-top: 14px; }
  .term-products .product-card__title,
  .product__related .product-card__title { margin-bottom: 8px; font-size: 1rem; }
  .term-products .product-card__text,
  .product__related .product-card__text { font-size: 0.8rem; line-height: 1.45; }
  .term-products .product-card__link,
  .product__related .product-card__link { gap: 6px; font-size: 0.8rem; }
}
@media (max-width: 400px) {
  .term-products .product-card,
  .product__related .product-card { padding: 20px; }
  .term-products .product-card__title,
  .product__related .product-card__title { font-size: 1.2rem; }
  .term-products .product-card__text,
  .product__related .product-card__text { font-size: 0.9rem; }
  .term-products__grid { grid-template-columns: minmax(0, 1fr); }
}
