/* =========================================================================
   Product landing pages (Figma "Vixeran", 1139:6815)
   ========================================================================= */

/* "Triple mode d'action" (Figma Mode card, 767:3983).
   At rest the photo fills the tile with the caption over it; on hover the
   photo shrinks to the top and a white panel reveals the description. */
.card-grid--modes .card-grid__items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card-grid--modes .card {
  position: relative;
  aspect-ratio: 387 / 500;
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 19px rgba(26, 58, 42, 0.08);
}
.card-grid--modes .card__media {
  position: absolute;
  inset: 0;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  transition: height 0.35s ease;
}
.card-grid--modes .card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The scrim only belongs to the state where text sits over the photo. */
.card-grid--modes .card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 37%, rgba(0, 0, 0, 0.84) 100%);
  transition: opacity 0.35s ease;
}
.card-grid--modes .card__body {
  position: absolute;
  top: auto;
  inset-inline-end: 0;
  bottom: 0;
  inset-inline-start: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: baseline;
  justify-content: center;
  gap: 0 12px;
  padding: 32px 26px;
  text-align: center;
  transition: top 0.35s ease, background-color 0.35s ease;
}
.card-grid--modes .card__number,
.card-grid--modes .card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: #fff;
  transition: color 0.35s ease;
}
.card-grid--modes .card__number::after { content: " •"; }
/* The description is only part of the hovered state. */
.card-grid--modes .card__text {
  flex-basis: 100%;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  font-size: 0.825rem;
  line-height: 23px;
  color: #000;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
}
.card-grid--modes .card:hover .card__media,
.card-grid--modes .card:focus-within .card__media { height: 52.4%; }
.card-grid--modes .card:hover .card__media::after,
.card-grid--modes .card:focus-within .card__media::after { opacity: 0; }
.card-grid--modes .card:hover .card__body,
.card-grid--modes .card:focus-within .card__body { top: 52.4%; background: #fff; }
.card-grid--modes .card:hover .card__number,
.card-grid--modes .card:hover .card__title,
.card-grid--modes .card:focus-within .card__number,
.card-grid--modes .card:focus-within .card__title { color: #000; }
.card-grid--modes .card:hover .card__text,
.card-grid--modes .card:focus-within .card__text { max-height: 220px; margin-top: 11px; opacity: 1; }

/* "Outils d'aide à la décision" (Figma Tool card, 767:3432): same reveal as
   the mode tiles, with the call to action visible in both states. */
.card-grid--tools .card-grid__items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.card-grid--tools .card {
  position: relative;
  aspect-ratio: 589 / 724;
  border-radius: 23px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 29px rgba(26, 58, 42, 0.08);
}
.card-grid--tools .card__media {
  position: absolute;
  inset: 0;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  transition: height 0.35s ease;
}
.card-grid--tools .card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-grid--tools .card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 31%, rgba(0, 0, 0, 0.68) 100%);
  transition: opacity 0.35s ease;
}
.card-grid--tools .card__body {
  position: absolute;
  top: auto;
  inset-inline-end: 0;
  bottom: 0;
  inset-inline-start: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  transition: top 0.35s ease, background-color 0.35s ease;
}
.card-grid--tools .card__title {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  color: #fff;
  transition: color 0.35s ease;
}
.card-grid--tools .card__text {
  max-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  font-size: 1.05rem;
  line-height: 35px;
  color: #000;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-bottom 0.35s ease;
}
.card-grid--tools .card__link {
  align-self: flex-start;
  padding-bottom: 6px;
  border-bottom: 3px solid #e8a800;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  transition: color 0.35s ease;
}
.card-grid--tools .card__link .card__arrow { background: #fff; transition: background-color 0.35s ease; }
.card-grid--tools .card:hover .card__media,
.card-grid--tools .card:focus-within .card__media { height: 49%; }
.card-grid--tools .card:hover .card__media::after,
.card-grid--tools .card:focus-within .card__media::after { opacity: 0; }
.card-grid--tools .card:hover .card__body,
.card-grid--tools .card:focus-within .card__body { top: 49%; background: #fff; }
.card-grid--tools .card:hover .card__title,
.card-grid--tools .card:hover .card__link,
.card-grid--tools .card:focus-within .card__title,
.card-grid--tools .card:focus-within .card__link { color: #000; }
.card-grid--tools .card:hover .card__link .card__arrow,
.card-grid--tools .card:focus-within .card__link .card__arrow { background: #000; }
.card-grid--tools .card:hover .card__text,
.card-grid--tools .card:focus-within .card__text { max-height: 260px; margin-bottom: 22px; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .card-grid--modes .card__media,
  .card-grid--modes .card__body,
  .card-grid--modes .card__text,
  .card-grid--tools .card__media,
  .card-grid--tools .card__body,
  .card-grid--tools .card__text { transition: none; }
}

/* "Solution fertilisation azotée": bordered boxes, the last one full width. */
.features--boxes .features__items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.features--boxes .feature {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px;
  border: 1px solid #d1e8d6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 12px rgba(13, 46, 23, 0.08);
  height: 100%;
}
/* Each item sits in its own wrapper, so the count happens on those. */
.features--boxes .features__items > div > div:nth-child(3) .feature { grid-column: 1 / -1; }
/* Icon badge: the artwork comes from the design, one per card. */
.features--boxes .feature__badge {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 13px;
  background: var(--syn-green-500);
}
.features--boxes .feature__badge::before {
  content: "";
  width: 22px; height: 22px;
  background: #fff;
  -webkit-mask: var(--icon-box) center / contain no-repeat;
  mask: var(--icon-box) center / contain no-repeat;
}
.features--boxes .features__items > div > div:nth-child(1) .feature { --icon-box: url("../../images/icon-box-1.svg"); }
.features--boxes .features__items > div > div:nth-child(2) .feature { --icon-box: url("../../images/icon-box-2.svg"); }
.features--boxes .features__items > div > div:nth-child(3) .feature { --icon-box: url("../../images/icon-box-3.svg"); }
.features--boxes .feature__title { margin: 0; font-size: 1.15rem; font-weight: 600; color: #1b3a2a; }
.features--boxes .feature__text { font-size: 0.92rem; line-height: 23.8px; color: #4a6657; }
/* Point lists keep their bullets, as the design draws them. */
.features--boxes .feature__text ul { display: flex; flex-direction: column; gap: 16px; }
.features--boxes .feature__text li { position: relative; padding-inline-start: 20px; }
.features--boxes .feature__text li::before {
  content: "•";
  position: absolute;
  inset-inline-start: 2px;
  color: var(--syn-green-500);
}

/* Lead-gen block: a green panel beside the form. */
.lead-gen { padding-block: var(--section-y); }
.lead-gen__inner {
  display: grid;
  grid-template-columns: minmax(0, 569px) minmax(0, 1fr);
  gap: 66px;
  align-items: start;
}
.lead-gen__panel {
  display: flex;
  flex-direction: column;
  gap: 32px;
  height: 100%;
  padding: 53px 58px;
  border-radius: var(--r-xl);
  background: var(--syn-green-800) center / cover no-repeat;
  color: #fff;
}
/* The editor's photo, under the green veil of the design. */
.lead-gen__panel--photo {
  background-image: linear-gradient(rgba(38, 70, 0, 0.82), rgba(38, 70, 0, 0.82)), var(--lead-gen-photo);
}
.lead-gen__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.lead-gen__icon::before {
  content: "";
  width: 23px; height: 23px;
  background: #fff;
  -webkit-mask: var(--icon-download) center / contain no-repeat;
  mask: var(--icon-download) center / contain no-repeat;
}
.lead-gen__panel-text {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.35;
}
.lead-gen__eyebrow {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--syn-orange);
}
.lead-gen__title {
  margin: 0 0 28px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 600;
  line-height: 1.2;
}

/* Webform fields inside the block. */
.lead-gen__form .webform-submission-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 19px 20px; }
.lead-gen__form .js-form-item { margin: 0; }
.lead-gen__form .js-form-item-culture,
.lead-gen__form .js-form-item-deja-client { grid-column: 1 / -1; }
/* The privacy note sits beside the submit button, as in the design. */
.lead-gen__form .form-item-legal { grid-column: 1 / 2; align-self: center; }
.lead-gen__form .form-item-legal p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--syn-gray-500);
}
.lead-gen__form .form-actions { grid-column: 2 / -1; justify-content: flex-end; }
.lead-gen__form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--syn-ink);
}
.lead-gen__form .form-required::after { content: " *"; color: var(--syn-ink); }
.lead-gen__form input[type="text"],
.lead-gen__form input[type="email"],
.lead-gen__form input[type="tel"],
.lead-gen__form select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid #d5e0d1;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.94rem;
  color: var(--syn-ink);
}
.lead-gen__form select {
  padding-inline-end: 40px;
  -webkit-appearance: none;
  appearance: none;
  background: #fff var(--icon-chevron) right 16px center / 16px no-repeat;
}
.lead-gen__form input:focus,
.lead-gen__form select:focus { outline: none; border-color: var(--syn-green-500); }
/* "ha" sits inside the field, as in the design. */
.lead-gen__form .webform-has-field-suffix { position: relative; }
.lead-gen__form .webform-has-field-suffix input { padding-inline-end: 44px; }
.lead-gen__form .webform-has-field-suffix .field-suffix {
  position: absolute;
  inset-inline-end: 16px;
  bottom: 15px;
  font-size: 0.875rem;
  color: var(--syn-gray-500);
}
.lead-gen__form .form-type-checkbox { display: flex; align-items: center; gap: 12px; }
.lead-gen__form .form-type-checkbox label { margin: 0; font-weight: 400; color: var(--syn-gray-500); }
.lead-gen__form .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
}
.lead-gen__form .webform-button--submit {
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: var(--syn-green-500);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.lead-gen__form .webform-button--submit:hover { background: var(--syn-green-600); }
.lead-gen__legal { margin: 0; max-width: 302px; font-size: 0.8125rem; line-height: 1.5; color: var(--syn-gray-500); }

@media (max-width: 1024px) {
  .card-grid--modes .card-grid__items { grid-template-columns: repeat(2, 1fr); }
  .lead-gen__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 720px) {
  .card-grid--modes .card-grid__items,
  .card-grid--tools .card-grid__items { grid-template-columns: minmax(0, 1fr); }
  .features--boxes .features__items { grid-template-columns: minmax(0, 1fr); }
  .lead-gen__panel { padding: 32px 24px; }
  .lead-gen__form .webform-submission-form { grid-template-columns: minmax(0, 1fr); }
}
