/* =========================
  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', sans-serif!important;
  font-weight: 300!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: clamp(24px, 5vw, 36px);
  margin-top: 22px;
  text-align: center;
  line-height: 1.1;
  font-family: Inter Tight, sans-serif;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@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: Inter Tight, sans-serif;
  }
}

/* =========================
   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(250px, 50vw, 440px);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  transition: flex 840ms cubic-bezier(.19, 1, .22, 1),
    box-shadow 720ms 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); */
  }
 @media (hover: none), (pointer: coarse) {
  .benefit-card {
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
}

  .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;
  flex-direction: column;
  padding: clamp(16px, 4vw, 24px);
  color: var(--col-text);
}

.benefit-title {
  font-family: Inter Tight, sans-serif;
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 400;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* LISTE EN BAS */
.benefit-list {
  list-style: none;
  padding: 0;
  margin-top: auto;
  display: grid;
  gap: 5px;
  font-family: Inter Tight, sans-serif;
  font-size: clamp(14px, 2.5vw, 16px);
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.benefit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.60725 4.35721L4.25475 0.90909L5.13863 0L10 5.00004L5.13863 10L4.25475 9.09092L7.60725 5.64286H0V4.35721H7.60725Z' fill='white'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

/* =========================
   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); */
    filter: none;
  }

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

  .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 */
  }

}