/* cards & pills */
.card{
  background: rgba(120, 78, 38, .10);
  border:1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.card-title{ margin:0 0 8px; font-size: 1.15rem; }
.card-text{ margin:0; opacity:.88; line-height:1.45; }
.pill{
  padding: 12px 14px;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(120, 78, 38, .08);
  text-align:center;
  opacity:.92;
}

/* === Zoom-card: title disappears, overlay shows title+body (no layout shift) === */

.list-cards .card{
  position: relative;
  overflow: visible;
}

/* 1) On masque le titre dans la card au hover (la place reste, mais c'est ok) */
.list-cards .card:hover .card-title,
.list-cards .card:focus-within .card-title{
  opacity: 0;
}

/* 2) Le body devient un overlay plus grand */
.list-cards .card .card-text{
  position: absolute;

  /* overlay légèrement plus large que la card */
  left: -14px;
  right: -14px;

  /* overlay centré sur la card */
  top: -12px;

  margin: 0;
  padding: 16px 18px 16px;

  /* ✅ CONTRASTE + LIFT */
  background: rgba(58, 34, 18, .94);
  border: 1px solid rgba(214, 160, 92, .26);
  border-radius: 18px;

  /* double-shadow : profondeur + détachement */
  box-shadow:
    0 30px 85px rgba(0,0,0,.70),
    0 10px 28px rgba(0,0,0,.45);

  /* optionnel mais très efficace (si supporté) */
  backdrop-filter: blur(10px) saturate(1.08);

  /* on réserve de la place pour remettre un titre au-dessus du body */
  padding-top: 44px;

  font-size: 1.03rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px) scale(.985);
  pointer-events: none;
  z-index: 30;

  transition: opacity .18s ease, transform .22s ease;
}

/* 3) On réaffiche le titre (en gras) DANS l'overlay via ::before */
.list-cards .card .card-text::before{
  content: attr(data-title);
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;

  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;

  color: rgba(255,255,255,.96);
  opacity: .96;
}

/* apparition au hover */
.list-cards .card:hover .card-text,
.list-cards .card:focus-within .card-text{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* focus sur la card */
.list-cards .card:hover{
  z-index: 20;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  border-color: rgba(255,255,255,.18);
}

.list-cards .card:not([data-title]) .card-text::before{
  display: none;
}

/* Mobile: on désactive le hover fantôme */
@media (pointer: coarse){
  .list-cards .card:hover .card-text{
    opacity: 0;
    transform: translateY(8px) scale(.985);
    pointer-events: none;
  }
  .list-cards .card:hover .card-title{
    opacity: 1;
  }
}

/* === Mobile auto-active state (scroll-driven) === */
.list-cards .card.is-active .card-title{
  opacity: 0;
}

.list-cards .card.is-active .card-text{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.list-cards .card.is-active{
  z-index: 25;

  /* ✅ le bloc actif “porte” l’overlay : un peu plus de lift */
  box-shadow: 0 22px 75px rgba(0,0,0,.52);
  border-color: rgba(214, 160, 92, .22);
}