/*
 * Le Check'Up — Section Why
 * v1.12.0
 *
 * La diagonale n'est plus un bloc HTML indépendant : elle est générée
 * par ::before sur le wrapper full-bleed. Cela évite tout raccord
 * horizontal sur les petits et grands écrans.
 */

.page-id-2 {
  overflow-x: clip;
}

.checkup-why-wrap {
  --why-diagonal-height: 200px;
  /* Décalage vertical fluide : fort sur grand écran, réduit progressivement. */
  --why-content-shift: clamp(-65px, -3.5vw, -30px);

  position: relative;
  z-index: 20;
  isolation: isolate;

  /* Full bleed robuste, même si le shortcode est dans un conteneur centré. */
  width: 100vw;
  max-width: none !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  background: #f7f4ef;
  overflow: visible;
}

/*
 * La diagonale est le prolongement supérieur du fond beige.
 * Elle occupe exactement la même largeur que la section : aucun raccord.
 */
.checkup-why-wrap::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: calc(-1 * var(--why-diagonal-height));
  width: 100%;
  height: var(--why-diagonal-height);
  background: #f7f4ef;
  clip-path: polygon(0 0, 100% 70%, 100% 100%, 0 100%);
  -webkit-clip-path: polygon(0 0, 100% 70%, 100% 100%, 0 100%);
  pointer-events: none;
}

.why-healthtech {
  position: relative;
  z-index: 1;
  padding: 0 24px 100px;
  background: transparent;
}

.why-healthtech__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 80px;
  align-items: center;

  /* Le contenu remonte dans la zone diagonale / section précédente. */
  /* Décale uniquement les deux colonnes vers le bas, sans déplacer la diagonale. */
  transform: translateY(var(--why-content-shift));
  margin-bottom: var(--why-content-shift);
}

.why-healthtech__content {
  padding-top: 55px;
}

.why-healthtech__eyebrow {
  margin: 0 0 30px;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: #ec008c;
  letter-spacing: .04em;
}

.why-healthtech__eyebrow::after {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin-top: 14px;
  border-radius: 5px;
  background: #ec008c;
}

.why-healthtech h2 {
  margin: 0 0 40px;
  color: #071833;
  font-size: clamp(42px, 5vw, 78px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.04em;
}

/* La dernière expression reste insécable, mais seul le mot mis en avant est rose. */
.why-healthtech h2 .why-healthtech__nowrap {
  white-space: nowrap;
  color: #071833 !important;
}

.why-healthtech h2 .why-healthtech__prefix {
  color: #071833 !important;
}

.why-healthtech h2 .why-healthtech__highlight {
  color: #ec008c !important;
}

.why-healthtech__content p,
.why-healthtech__text p {
  margin: 0 0 24px;
  color: #071833;
  font-size: 18px;
  line-height: 1.6;
}

.why-healthtech__button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 28px;
  border-radius: 5px;
  background: #ec008c;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: transform .3s ease;
}

.why-healthtech__button:hover {
  transform: translateY(-2px);
}

.why-healthtech__button::after {
  content: "→";
  font-size: 18px;
}

.why-healthtech__gallery {
  position: relative;
  min-height: 700px;
}

.why-healthtech__img {
  position: absolute;
  object-fit: cover;
  border-radius: 28px;
  display: block;
  box-shadow: 0 20px 50px rgba(0,0,0,.08);
}

.why-healthtech__img--main {
  top: 0;
  right: 0;
  width: 68%;
  height: 320px;
  margin-right: 122px;
}

.why-healthtech__img--secondary {
  left: 0;
  top: 250px;
  width: 42%;
  height: 210px;
}

.why-healthtech__img--event {
  top: 300px;
  right: 20px;
  width: 60%;
  height: 270px;
}

@media (max-width: 1500px) {
  .why-healthtech__inner {
    max-width: 1260px;
  }
}

@media (max-width: 1200px) {
  .checkup-why-wrap {
    --why-diagonal-height: 170px;
    --why-content-shift: clamp(-42px, -3vw, -24px);
  }

  .why-healthtech__inner {
    gap: 60px;
  }

  .why-healthtech__content {
    padding-top: 45px;
  }

  .why-healthtech__gallery {
    min-height: 620px;
  }

  .why-healthtech__img--main {
    height: 320px;
    margin-right: 80px;
  }

  .why-healthtech__img--secondary {
    top: 280px;
    height: 180px;
  }

  .why-healthtech__img--event {
    height: 260px;
  }
}

@media (max-width: 991px) {
  .checkup-why-wrap {
    --why-diagonal-height: 130px;
    --why-content-shift: -18px;
  }

  .why-healthtech {
    padding: 0 20px 80px;
  }

  .why-healthtech__inner {
    grid-template-columns: 1fr;
  }

  .why-healthtech__content {
    padding-top: 30px;
  }

  .why-healthtech__gallery {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .why-healthtech__img {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .why-healthtech__img--main {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
    margin-right: 0;
  }
}

@media (max-width: 767px) {
  .checkup-why-wrap {
    --why-diagonal-height: 72px;
    --why-content-shift: 0px;
  }

  .why-healthtech {
    padding: 0 18px 56px;
  }

  .why-healthtech__inner {
    gap: 34px;
    transform: none;
    margin-bottom: 0;
  }

  .why-healthtech__content {
    padding-top: 28px;
  }

  .why-healthtech h2 {
    margin-bottom: 26px;
    font-size: clamp(34px, 10vw, 42px);
    line-height: 1.06;
    letter-spacing: -.035em;
  }

  .why-healthtech__content p,
  .why-healthtech__text p {
    margin-bottom: 18px;
    font-size: 16px;
    line-height: 1.62;
  }

  .why-healthtech__button {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 15px 20px;
  }

  /* Mobile : conserver une vraie composition visuelle sans empiler 3 grandes photos. */
  .why-healthtech__gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    min-height: 0;
  }

  .why-healthtech__img {
    position: static;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
  }

  .why-healthtech__img--main {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10;
  }

  .why-healthtech__img--secondary,
  .why-healthtech__img--event {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .checkup-why-wrap {
    --why-diagonal-height: 60px;
  }

  .why-healthtech {
    padding-left: 16px;
    padding-right: 16px;
  }

  .why-healthtech__content {
    padding-top: 24px;
  }

  .why-healthtech h2 {
    font-size: clamp(32px, 9.5vw, 38px);
  }

  .why-healthtech__gallery {
    gap: 10px;
  }

  .why-healthtech__img {
    border-radius: 15px;
  }
}
