/*
 * Bloc forfaits (pages/Offres/Offres-abonnements.php) : accueil, /Offres, liste des commerçants, fiches.
 * Chargée par le bloc lui-même, donc uniquement sur les pages qui l'affichent. Tokens : css/site-chrome.css.
 */

/* Conservé de l'ancien bloc : les pages qui l'incluent (liste des commerçants, fiches) espacent leur titre ainsi */
.section-title {
  margin-bottom: 115px;
}

.lp-forfaits {
  width: 100%;
  max-width: calc(var(--lp-largeur) + 2 * var(--lp-gouttiere));
  margin: 0 auto;
  padding: 8px var(--lp-gouttiere) 0;
  box-sizing: border-box;
  font-family: var(--lp-police);
  text-align: center;
  clear: both;
}

.lp-forfaits *,
.lp-forfaits *::before,
.lp-forfaits *::after {
  box-sizing: border-box;
}

.lp-forfaits p {
  padding: 0;
}

/* ---------- Grille des cartes ---------- */
.lp-forfaits__grille {
  display: grid;
  /* colonnes de 260 à 320 px (cartes plafonnées à 320 px) : 4 par rangée dès que la place le permet */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 1340px;
  margin: 0 auto;
  justify-content: center;
  align-items: stretch;
  gap: 24px 20px;
}

.lp-forfaits__grille[data-cartes="3"] {
  max-width: 1000px;
}

.lp-forfaits__grille[data-cartes="2"] {
  max-width: 660px;
}

/* ---------- Carte (fidèle à la carte d'origine) ---------- */
.lp-forfait {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.25);
  font-family: var(--lp-police);
  text-align: center;
}

/* En-tête : visuel d'origine, titre et prix en blanc par-dessus */
.lp-forfait__tete {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.lp-forfait__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 406 / 339;
  object-fit: cover;
}

.lp-forfait__titre {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 0;
  line-height: 1.2;
  color: #fff;
}

.lp-forfait__surtitre {
  font-size: 1.5rem;
  font-weight: 400;
}

.lp-forfait__nom {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 700;
  color: #fff !important;
  text-align: center;
  overflow-wrap: anywhere;
}

.lp-forfait__prix {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
  color: #fff;
}

.lp-forfait__prix s {
  font-size: 1rem;
}

/* Bulles qui montent du prix (animation d'origine) */
.lp-forfait__bulle {
  position: absolute;
  bottom: 14%;
  left: 50%;
  z-index: 1;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: rgba(192, 192, 192, 0.81);
  opacity: 0;
  animation: lp-forfait-bulle 3s infinite ease-in-out;
}

.lp-forfait__bulle:nth-of-type(2) {
  left: 60%;
  width: 8px;
  height: 8px;
  animation-duration: 4s;
  animation-delay: 0.6s;
}

.lp-forfait__bulle:nth-of-type(3) {
  left: 42%;
  width: 6px;
  height: 6px;
  animation-duration: 3.5s;
  animation-delay: 1.4s;
}

@keyframes lp-forfait-bulle {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-80px) scale(1.2); opacity: 0.6; }
  100% { transform: translateY(-160px) scale(1.5); opacity: 0; }
}

/* Corps : validité, puis lignes à puce séparées par un trait */
.lp-forfait__corps {
  flex: 1;
  padding: 0 26px;
}

.lp-forfait__validite {
  margin: 14px 0 8px;
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.4;
  color: #6a6a6a;
}

.lp-forfait__avantages {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.lp-forfait__avantages li {
  position: relative;
  min-height: 40px;
  padding: 9px 0 9px 14px;
  border-bottom: 1px solid #6a6a6a;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: #6a6a6a;
  overflow-wrap: anywhere;
}

/* puce « ▪ » d'origine */
.lp-forfait__avantages li::before {
  content: "\25AA";
  position: absolute;
  left: 0;
  top: 9px;
}

.lp-forfait__avantages .is-fort {
  font-weight: 700;
}

/* ce qui n'est pas inclus : barré et atténué, comme à l'origine */
.lp-forfait__avantages .is-exclu {
  text-decoration: line-through;
  opacity: 0.7;
}

.lp-forfait__avantages .is-vide {
  padding-left: 0;
  text-align: center;
}

.lp-forfait__avantages .is-vide::before {
  content: none;
}

.lp-forfait__montant {
  color: var(--lp-rouge);
}

/* Pied : lien rouge souligné */
.lp-forfait__pied {
  padding: 22px 16px 26px;
}

.lp-forfait__action {
  display: inline-block;
  padding: 6px 4px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--lp-rouge) !important;
  transition: color 0.2s;
}

.lp-forfait__action:hover,
.lp-forfait__action:focus-visible {
  color: var(--lp-rouge-fonce) !important;
}

.lp-forfait__action.is-desactive {
  color: #8a8d94 !important;
  text-decoration: none;
  cursor: not-allowed;
}

/* ---------- Renvoi « * » et légende ---------- */
.lp-forfaits .offres-renvoi {
  position: relative;
  top: 0.05em;
  margin-left: 2px;
  font-size: 1.05em;
  font-weight: 800;
  line-height: 0;
  color: var(--lp-rouge);
  vertical-align: super;
}

.offres-legende {
  display: table;
  margin: 26px auto 0;
  padding: 8px 18px !important;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--lp-gris-100), 0 4px 14px -8px rgba(24, 25, 25, 0.25);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: #6a6a6a;
  text-align: center;
}

.offres-legende .offres-renvoi {
  top: 0;
  margin: 0 2px 0 0;
  vertical-align: baseline;
}

/* ---------- Rappel « … € de prestations incluses » ---------- */
/* /Offres : de l'air entre les cartes « Offre entreprises » et le pied de page */
.lp-offres-page {
  padding-bottom: clamp(56px, 7vw, 96px);
}

/* /Offres : les deux tickets de l'accueil sous les cartes (css/tickets-pass.css) */
.lp-forfaits-tickets {
  max-width: 1340px;
  margin: clamp(40px, 5vw, 64px) auto 0;
}

.lp-forfaits-rappel {
  margin: clamp(48px, 6vw, 72px) auto 0;
}

.lp-forfaits-rappel__montant {
  margin: 0;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--lp-rouge);
}

.lp-forfaits-rappel__texte {
  margin: 10px 0 0;
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.35;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--lp-encre);
}

.lp-forfaits-rappel__texte strong {
  color: var(--lp-rouge);
}

/* ---------- Offres entreprises ---------- */
.lp-forfaits-entreprises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: clamp(40px, 5vw, 56px) auto 0;
}

.lp-forfait-entreprise {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px 30px 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--lp-gris-100), 0 18px 40px -26px rgba(24, 25, 25, 0.4);
  text-align: left;
}

.lp-forfait-entreprise__icone {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--lp-rouge-clair);
  color: var(--lp-rouge);
  font-size: 20px;
}

.lp-forfait-entreprise__surtitre {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lp-rouge);
}

.lp-forfait-entreprise__cible {
  margin: 4px 0 12px;
  font-size: 22px;
  font-weight: 800;
  color: var(--lp-encre);
  text-align: left;
}

.lp-forfait-entreprise__texte {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--lp-gris-500);
}

.lp-forfait-entreprise__texte strong {
  color: var(--lp-encre);
}

.lp-forfait-entreprise__devis {
  margin-top: auto;
  padding-top: 0;
  font-size: 14px;
  /* le bouton passe sur deux lignes plutôt que de déborder sur très petit écran */
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.lp-forfait-entreprise__texte + .lp-forfait-entreprise__devis {
  margin-top: 14px;
}

/* piège à robots du formulaire de devis */
.fieldText {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .lp-forfaits-entreprises {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  /* une carte par ligne, de la plus complète à la gratuite (Famille → Découverte) */
  .lp-forfaits__grille {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
  }

  .offres-legende {
    max-width: calc(100% - 16px);
    border-radius: 16px;
  }

  .lp-forfait-entreprise {
    padding: 24px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-forfait__bulle {
    animation: none;
    display: none;
  }
}
