/* =========================
  Section : Les bénéfices
   ========================= */

.benefits {
  --col-title: #1D3057;
  --col-text: #FFFFFF;
  --radius: 8px;
  --shadow: 0 16px 40px rgba(16, 33, 60, 0.20);
  padding-block: clamp(44px, 7vw, 82px);
}

/* Eyebrow + Titre global */
.benefits .section-eyebrow {
  font-family: Kodchasan!important;
  font-weight: 400!important;
  font-style: Regular!important;
  font-size: 14px!important;
  
  line-height: 120%!important;
  text-align: center!important;
  text-transform: uppercase!important;
}

.benefits .section-title {
  color: var(--col-title);
  font-weight: 400;
  line-height: 1.15;
  font-size: 36px;
  margin-top: 22px;
  text-align: center;
  line-height: 110.00000000000001%;
  font-family: 'InterTight';
}

@media (max-width: 520px) {
  .benefits .section-title {
    color: var(--col-title);
    font-weight: 400;
    line-height: 1.15;
    font-size: 24px;
    margin-top: 22px;
    text-align: left;
    font-family: 'InterTight';
  }
}

/* =========================
   Layout responsive
   ========================= */

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 1024px) {
  .benefits-grid {
    display: flex;
    gap: 18px;
    align-items: stretch;
  }
}

/* =========================
   Carte
   ========================= */

.benefit-card {
  position: relative;
  flex: 1 1 0;
  min-height: clamp(270px, 36vw, 440px);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  background-color: #0f1a2a;
  transition: flex 420ms cubic-bezier(.19, 1, .22, 1),
    box-shadow 320ms ease;
}

@media (min-width: 1024px) {

  .benefit-card:nth-child(1) {
    flex: 2.2 1 0;
  }

  .benefit-card:nth-child(2),
  .benefit-card:nth-child(3) {
    flex: 0.9 1 0;
  }

  .benefit-card:hover {
    flex: 2.2 1 0;
    box-shadow: var(--shadow);
  }

  .benefit-card:hover~.benefit-card,
  .benefit-card:has(~ .benefit-card:hover) {
    flex: 0.9 1 0;
  }
}

/* =========================
   Image
   ========================= */

.benefit-card .media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.benefit-card .media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 420ms ease;
}

/* Overlay image */
.benefit-card .media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(29, 48, 87, 0.32);
  z-index: 1;
}

/* Overlay texte */
.benefit-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0.25) 40%,
      rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
}

@media (min-width: 1024px) {
  .benefit-card .overlay {
    opacity: 0;
  }
}

/* =========================
   Contenu
   ========================= */

.benefit-card .card-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  /* 🔑 changement clé */
  flex-direction: column;
  padding: 24px 22px;
  color: var(--col-text);
}

.benefit-title {
  font-family: InterTight;
  font-size: 24px;
  font-weight: 400;
  margin: 0;
}

/* LISTE EN BAS */
.benefit-list {
  list-style: none;
  padding: 0;
  margin-top: auto;
  /* 🔑 pousse la liste en bas */
  display: grid;
  gap: 8px;
  font-family: InterTight;
  font-size: 16px;
  max-width: 92%;
}

.benefit-list li {
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.benefit-list li::before {
  content: "→";
  position: absolute;
  left: 0;
}

/* =========================
   Animations desktop
   ========================= */

@media (min-width: 1024px) {

  .benefit-list {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 260ms ease, transform 260ms ease;
  }

  /* .benefit-card:nth-child(1) .benefit-list {
    opacity: 1;
    transform: none;
  } */
  @media (min-width: 1024px) {

    .benefits-grid:not(:hover) .benefit-card:first-child .benefit-list {
      opacity: 1;
      transform: none;
    }

  }


  .benefit-card:hover .benefit-list,
  .benefit-card:focus-within .benefit-list {
    opacity: 1;
    transform: none;
  }

  /* Zoom image */
  .benefit-card:hover .media img,
  .benefit-card:focus-within .media img {
    transform: scale(1.12);
    filter: saturate(1.08) brightness(1.05);
  }

  /* Cartes inactives */
  .benefits-grid:hover .benefit-card:not(:hover) .media img {
    transform: scale(1);
    filter: saturate(0.85) brightness(0.92);
  }

  .benefit-card:hover .overlay {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(0, 0, 0, 0.35) 45%,
        rgba(0, 0, 0, 0.60) 100%);
  }
}

/* =========================
   Mobile / tactile
   ========================= */

@media (hover: none),
(pointer: coarse) {
  .benefit-list {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================
   Accessibilité
   ========================= */

.benefit-card:focus-visible {
  outline: 3px solid #7AA7FF;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media (hover: none),
(pointer: coarse) {

  .benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .benefit-card {
    min-height: auto;
  }

  .benefit-card .overlay {
    opacity: 1;
  }

  .benefit-list {
    opacity: 1 !important;
    transform: none !important;
  }

}

/* =========================
   Mobile – Liste en bas avec espace
   ========================= */

@media (hover: none),
(pointer: coarse) {

  .benefit-card .card-inner {
    min-height: 100%;
    padding: 26px 22px 28px;
    /* + d’espace en bas */
  }

  .benefit-title {
    margin-bottom: 18px;
    /* espace sous le titre */
  }

  .benefit-list {
    margin-top: auto;
    /* pousse la liste en bas */
    padding-top: 61px !important;
    /* espace VISUEL comme sur la photo */
  }

}