/* ==========================================================================
   Verdon B2B distribution page (templates/distribution.tpl), 2026-11-06.
   Same visual language as the contact page (contact.css): white rounded cards, soft shadow, green accents.
   Everything is scoped under .vb2b; the old distribution.css (global p/h2 rules) is now an empty stub.
   ========================================================================== */
.vb2b {
  --vb2b-green: var(--green-1, #1d6f02);
  --vb2b-green-dark: var(--green-24, #25641c);
  --vb2b-accent: #7cc242;
  --vb2b-tint: #eaf5e3;
  --vb2b-radius: 1rem;
  --vb2b-shadow: 0 0.25rem 1.5rem rgb(16 40 20 / 7%);
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  margin: 1rem 0 3rem;
  color: #222;
}
.vb2b svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vb2b__card {
  border-radius: var(--vb2b-radius);
  background: #fff;
  box-shadow: var(--vb2b-shadow);
}
.vb2b__card-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1.25rem;
  color: #111;
  font-size: 1.25rem;
  font-weight: 700;
}
.vb2b__card-title svg {
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  color: var(--vb2b-green);
}
.vb2b__heading {
  margin: 0 0 1.75rem;
  color: #111;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}
.vb2b__heading::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 0.25rem;
  margin-top: 0.625rem;
  border-radius: 1rem;
  background: var(--vb2b-accent);
}
.vb2b__heading--center {
  text-align: center;
}
.vb2b__heading--center::after {
  margin-right: auto;
  margin-left: auto;
}

/* ---------- Hero ---------- */
/* The brands card gets the wider column: 10 logos in 5 columns need the room to stay legible */
.vb2b__hero {
  display: grid;
  grid-template-columns: minmax(0, 5.5fr) minmax(0, 6.5fr);
  /* Top-aligned: the text follows the title straight away instead of floating to the middle of the taller brands card */
  align-items: start;
  gap: 2.5rem;
}
.vb2b__head {
  margin-bottom: 1.25rem;
}
.vb2b__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  background: var(--vb2b-tint);
  color: var(--vb2b-green);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.vb2b__eyebrow svg {
  width: 1.125rem;
  height: 1.125rem;
}
.vb2b__title {
  margin: 1rem 0 0;
  color: #1a1a1a;
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.1;
}
.vb2b__lead {
  max-width: 38rem;
  margin: 0;
  color: #333;
  font-size: 1.125rem;
  line-height: 1.55;
}
.vb2b__perks {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.vb2b__perks li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #222;
  font-size: 1rem;
  font-weight: 600;
}
.vb2b__perks svg {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.25rem;
  border-radius: 50%;
  background: var(--vb2b-green);
  color: #fff;
  stroke-width: 3;
}
.vb2b__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.vb2b__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0 1.25rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}
.vb2b__btn svg {
  width: 1.25rem;
  height: 1.25rem;
}
.vb2b__btn--ghost {
  border-width: 1.5px;
  background: #fff;
}

/* Brand logos */
.vb2b__brands {
  padding: 1.5rem;
}
.vb2b__logos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vb2b__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 0.25rem 0.375rem;
  border: 1px solid #edf0ec;
  border-radius: 0.75rem;
  background: #fff;
}
.vb2b__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vb2b__brands-note {
  margin: 1rem 0 0;
  color: #6b6b6b;
  font-size: 0.875rem;
  text-align: center;
}

/* ---------- Audience ---------- */
/* Flex instead of grid so an incomplete last row (7 segments = 4 + 3) sits centred, not left-aligned */
.vb2b__audience {
  --vb2b-audience-columns: 4;
  --vb2b-audience-gap: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--vb2b-audience-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.vb2b__segment {
  flex: 0 0 calc((100% - (var(--vb2b-audience-columns) - 1) * var(--vb2b-audience-gap)) / var(--vb2b-audience-columns));
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem 1.25rem;
}
.vb2b__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--vb2b-tint);
  color: var(--vb2b-green);
}
.vb2b__dot svg {
  width: 1.625rem;
  height: 1.625rem;
}
.vb2b__segment-title {
  color: #111;
  font-size: 1.125rem;
  font-weight: 700;
}
.vb2b__segment-text {
  margin-top: 0.375rem;
  color: #555;
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* ---------- Steps ---------- */
.vb2b__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.vb2b__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  text-align: center;
}
/* Dashed line between the numbers (desktop and tablet, where the steps sit side by side) */
.vb2b__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.5rem;
  left: calc(50% + 2rem);
  width: calc(100% - 4rem + 1.25rem);
  border-top: 2px dashed #cfe3c4;
}
.vb2b__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--vb2b-green);
  box-shadow: 0 0 0 0.375rem var(--vb2b-tint);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
}
.vb2b__step-title {
  color: #111;
  font-size: 1.125rem;
  font-weight: 700;
}
.vb2b__step-text {
  max-width: 18rem;
  margin-top: 0.375rem;
  color: #555;
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* ---------- Form + photo ---------- */
.vb2b__contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 2rem;
  scroll-margin-top: 6rem;
}
.vb2b__form-card {
  padding: 1.5rem 1.5rem 1.75rem;
}
.vb2b__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 0.875rem;
}
/* Label inside the field like a placeholder (red star), hidden once the field has a value */
.vb2b__field {
  position: relative;
  margin-bottom: 0.875rem;
}
.vb2b__field > label {
  position: absolute;
  top: 0.75rem;
  right: 0.875rem;
  left: 0.875rem;
  overflow: hidden;
  color: #6b6b6b;
  font-size: 0.875rem;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}
.vb2b__field > label span {
  color: #d32f2f;
}
.vb2b__field > input:not(:placeholder-shown) + label,
.vb2b__field > textarea:not(:placeholder-shown) + label {
  display: none;
}
.vb2b__form .form-control {
  min-height: 2.75rem;
  border: 1px solid #d9ddd8;
  border-radius: 0.5rem;
  color: #222;
  font-size: 0.9375rem;
}
.vb2b__form textarea.form-control {
  min-height: 8rem;
  padding-top: 0.75rem;
  resize: vertical;
}
.vb2b__form .form-control:focus {
  border-color: var(--vb2b-green);
  box-shadow: 0 0 0 0.2rem rgb(29 111 2 / 15%);
}
.vb2b__honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
}
.vb2b__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3rem;
  margin-top: 0.375rem;
  border-radius: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
}
.vb2b__submit svg {
  width: 1.375rem;
  height: 1.375rem;
}
.vb2b__success {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: var(--vb2b-tint);
  color: #1d3a12;
}
.vb2b__success strong {
  display: block;
  font-size: 1.0625rem;
}
.vb2b__success p {
  margin: 0.25rem 0 0;
  font-size: 0.9375rem;
}
.vb2b__success-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--vb2b-green);
  color: #fff;
}
.vb2b__success-icon svg {
  width: 1.375rem;
  height: 1.375rem;
  stroke-width: 3;
}
.vb2b__photo {
  position: relative;
  min-height: 20rem;
  margin: 0;
  overflow: hidden;
}
.vb2b__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vb2b__photo-caption {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100% - 2rem);
  padding: 0.625rem 1rem;
  border-radius: 2rem;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--vb2b-shadow);
  color: #111;
  font-size: 0.9375rem;
  font-weight: 700;
}
.vb2b__photo-caption svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--vb2b-green);
}

/* Desktop: the title stays on one line, sized with the viewport so it always fits the text column */
@media (min-width: 1200px) {
  .vb2b__title {
    font-size: min(2.25rem, 2.45vw);
    white-space: nowrap;
  }
}

/* ---------- Tablets ---------- */
@media (max-width: 1199.98px) {
  .vb2b__hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .vb2b__audience {
    --vb2b-audience-columns: 2;
  }
}
@media (max-width: 991.98px) {
  .vb2b {
    gap: 2.75rem;
  }
  .vb2b__hero,
  .vb2b__contact {
    grid-template-columns: minmax(0, 1fr);
  }
  .vb2b__photo {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

/* ---------- Phones ---------- */
@media (max-width: 767.98px) {
  /* Steps stack: number on the left, text on the right, a vertical line linking the numbers */
  .vb2b__steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .vb2b__step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1rem;
    align-items: start;
    padding: 0;
    text-align: left;
  }
  .vb2b__step-number {
    grid-row: 1 / span 2;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    font-size: 1.0625rem;
  }
  .vb2b__step-title {
    padding-top: 0.375rem;
  }
  .vb2b__step-text {
    max-width: none;
  }
  .vb2b__step:not(:last-child)::after {
    top: 3rem;
    left: 1.25rem;
    width: 0;
    height: calc(100% - 2.25rem);
    border-top: 0;
    border-left: 2px dashed #cfe3c4;
  }
}
@media (max-width: 575.98px) {
  .vb2b {
    gap: 2.25rem;
    margin-top: 0.5rem;
  }
  .vb2b__lead {
    font-size: 1rem;
  }
  .vb2b__actions {
    flex-direction: column;
  }
  .vb2b__btn {
    width: 100%;
  }
  .vb2b__brands {
    padding: 1.125rem;
  }
  /* Phones: 5 columns would shrink the logos to thumbnails; 2 x 5 keeps them readable */
  .vb2b__logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .vb2b__logo {
    aspect-ratio: 2 / 1;
    padding: 0.5rem 0.75rem;
  }
  .vb2b__heading {
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
  }
  .vb2b__audience {
    --vb2b-audience-gap: 0.75rem;
  }
  .vb2b__segment {
    padding: 1.125rem 0.875rem;
  }
  .vb2b__dot {
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.75rem;
  }
  .vb2b__segment-title {
    font-size: 1rem;
  }
  .vb2b__segment-text {
    font-size: 0.875rem;
  }
  .vb2b__form-card {
    padding: 1.25rem 1rem 1.5rem;
  }
  .vb2b__row {
    grid-template-columns: minmax(0, 1fr);
  }
}
