/* ======================================================================
   COMPARATIF — tableau en rubans
   Balisage : index.html, <section class="reviews-section versus-section" id="comparatif">
   ====================================================================== */

.reviews-section {
  /* Same navy as the offers section: it starts on the colour that
     section ends on and ends on the colour the footer starts on, so no line shows. */
  background: linear-gradient(to bottom var(--in-oklab), var(--navy-abyss), var(--navy-bottom));
  padding-block: clamp(88px, 11vw, 140px);
  /* Overlaps the offers section by 1px: no light hairline when heights fall on fractions. */
  position: relative;
  margin-top: -1px;
}

/* Three ribbons, one per solution: a block on the left (name, line, price pill) that
   flows down through an S-curve into its band of values on the right. Each ribbon is
   tucked under the one above it (--v-tuck), so two colours always meet edge to edge:
   the page never shows between them. Under 900px each solution becomes a card. */

.versus-title {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto clamp(40px, 5vw, 64px);
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(226, 242, 254, 0.4);
  font-family: 'Outfit', 'Avenir Next', 'Century Gothic', sans-serif;
  font-size: clamp(22px, 2.9vw, 40px);
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  color: #FFFFFF;
}

.versus-title strong { font-weight: 600; }
.versus-title span { color: var(--peach); } /* second half of a title, in the site's pink */

/* Same title style above the carousel, closer to what it introduces. */
.lens-heading { margin-bottom: clamp(14px, 2.2vh, 26px); }

.versus {
  --v-head: 96px;   /* height of the criteria row */
  --v-row: 132px;   /* height of a band of values */
  --v-over: 44px;   /* how far a block runs into its own band's row */
  --v-tuck: 30px;   /* how far a ribbon slides under the one above */
  --v-left: 31%;    /* width of the blocks on the left */
  --v-link: 140px;  /* width of the S-curve */
  position: relative;
  height: calc(var(--v-head) + 3 * var(--v-row));
  color: var(--ink-dark);
}

.versus-plan--agency { --v-fill: #FFFFFF; --v-z: 3; }
.versus-plan--solo { --v-fill: #BBDCF4; --v-z: 2; }
.versus-plan--us { --v-fill: var(--peach); --v-z: 1; }

.versus-head,
.versus-band {
  position: absolute;
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* The criteria band runs left under the first ribbon's curve, so it is never cut short. */
.versus-head {
  top: 0;
  left: var(--v-left);
  height: var(--v-head);
  padding-left: var(--v-link);
  overflow: hidden;
  border-radius: 0 28px 0 0;
}

.versus-head::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v-link);
  background: rgba(255, 255, 255, 0.15);
}

.versus-head > div,
.versus-band > div {
  display: grid;
  place-items: center;
  padding: 10px 16px;
  text-align: center;
  line-height: 1.3;
}

.versus-head > div {
  background: rgba(255, 255, 255, 0.15);
  font-size: 15.5px;
  font-weight: 600;
  color: #FFFFFF;
}

.versus-head > div:nth-child(odd) { background: rgba(255, 255, 255, 0.1); }
.versus-head > .versus-corner { display: none; }

.versus-name,
.versus-link,
.versus-band {
  position: absolute;
  z-index: var(--v-z);
}

.versus-name,
.versus-band { background: var(--v-fill); }

.versus-link {
  left: calc(var(--v-left) - 1px);
  width: calc(var(--v-link) + 2px);
  fill: var(--v-fill);
}

.versus-name {
  left: 0;
  width: var(--v-left);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-inline: 34px 20px;
  border-radius: 28px 0 0 28px;
}

.versus-name strong {
  font-size: clamp(19px, 1.75vw, 25px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.versus-sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--ink-body);
}

.versus-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background-color: var(--navy-dark);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.versus-band {
  left: calc(var(--v-left) + var(--v-link));
  font-size: 16px;
  color: var(--ink-body);
}

/* First ribbon: its block is level with the criteria row. */
.versus-plan--agency .versus-name { top: 0; height: calc(var(--v-head) + var(--v-over)); }
.versus-plan--agency .versus-link { top: 0; height: calc(var(--v-head) + var(--v-row)); }
.versus-plan--agency .versus-band { top: var(--v-head); height: var(--v-row); }

/* The next two start one step lower, their top edge hidden under the ribbon above. */
.versus-plan--solo { --v-top: calc(var(--v-head) + var(--v-over)); --v-band: calc(var(--v-head) + var(--v-row)); }
.versus-plan--us { --v-top: calc(var(--v-head) + var(--v-row) + var(--v-over)); --v-band: calc(var(--v-head) + 2 * var(--v-row)); }

.versus-plan--solo .versus-name,
.versus-plan--us .versus-name {
  top: calc(var(--v-top) - var(--v-tuck));
  height: calc(var(--v-row) + var(--v-tuck));
  padding-top: var(--v-tuck);
}

.versus-plan--solo .versus-link,
.versus-plan--us .versus-link {
  top: calc(var(--v-top) - var(--v-tuck));
  height: calc(2 * var(--v-row) - var(--v-over) + var(--v-tuck));
}

.versus-plan--solo .versus-band,
.versus-plan--us .versus-band {
  top: calc(var(--v-band) - var(--v-tuck));
  height: calc(var(--v-row) + var(--v-tuck));
  padding-top: var(--v-tuck);
}

/* Log48 stands out: bold values, white pill, rounded foot of the table. */
.versus-plan--us .versus-band {
  border-radius: 0 0 28px 0;
  font-weight: 600;
  color: var(--ink-dark);
}

.versus-plan--us .versus-sub { color: var(--ink-dark); }

.versus-plan--us .versus-pill {
  background-color: #FFFFFF;
  color: var(--ink-dark);
}

@media (max-width: 899px) {
  /* One card per solution, the criteria written in front of each value. */
  .versus {
    display: grid;
    gap: 14px;
    height: auto;
  }

  .versus-head,
  .versus-link { display: none; }

  .versus-plan {
    overflow: hidden;
    border-radius: 22px;
    background: var(--v-fill);
  }

  .versus-plan .versus-name,
  .versus-plan .versus-band {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
  }

  .versus-plan .versus-name { padding: 22px 22px 18px; }
  .versus-band { grid-template-columns: 1fr; }

  .versus-band > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 22px;
    border-top: 1px solid rgba(6, 13, 34, 0.12);
    font-size: 14.5px;
    text-align: right;
  }

  .versus-band > div::before {
    content: attr(data-label);
    flex: none;
    max-width: 46%;
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
    opacity: 0.72;
  }
}
