/**
 * Grille tarifs Learnifi — partagée (accueil, tarifs publics, mon abonnement OF).
 * Source des données : application/config/learnifi_plans.php
 */

/* —— Toggle mensuel / annuel —— */
.lf-billing-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lf-billing-toggle--compact {
  gap: 10px;
}
.lf-billing-label {
  font-size: 15px;
  font-weight: 600;
  color: #9ca3af;
  transition: color 0.2s;
}
.lf-billing-label--active {
  color: #1c1d1f;
}
.lf-plans-section .lf-billing-label--active {
  color: var(--udemy-dark, #1c1d1f);
}
.lf-save-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  font-style: normal;
}
.lf-toggle-sw {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
  margin: 0;
}
.lf-toggle-sw input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.lf-toggle-sw-track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #e9d5ff;
  transition: background 0.2s;
}
.lf-toggle-sw-thumb {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.lf-toggle-sw input:checked ~ .lf-toggle-sw-track {
  background: #a435f0;
}
.lf-toggle-sw input:checked ~ .lf-toggle-sw-thumb {
  transform: translateX(20px);
}

/* —— Grille publique (5 colonnes) —— */
.lf-plans-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 40px;
  align-items: start;
}
.lf-plan-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #e9d5ff;
  padding: 26px 18px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.lf-plan-card:hover {
  border-color: #d8b4fe;
  box-shadow: 0 8px 28px rgba(164, 53, 240, 0.1);
  transform: translateY(-3px);
}
.lf-plan-card.lf-plan-popular {
  border-color: #a435f0;
  box-shadow: 0 10px 40px rgba(164, 53, 240, 0.2);
  transform: translateY(-8px);
}
.lf-plan-card.lf-plan-enterprise {
  background: radial-gradient(ellipse 60% 40% at 0% 100%, rgba(164, 53, 240, 0.25), transparent 55%),
    linear-gradient(160deg, #1e0a3c 0%, #1a1048 100%);
  border-color: rgba(164, 53, 240, 0.35);
}
.lf-plan-popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #a435f0, #8710d8);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(164, 53, 240, 0.4);
}
.lf-plan-name {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #a435f0;
  margin-bottom: 3px;
}
.lf-plan-enterprise .lf-plan-name {
  color: #f0abfc;
}
.lf-plan-tagline {
  font-size: 11.5px;
  color: #6a6f73;
  margin-bottom: 14px;
  line-height: 1.45;
}
.lf-plan-enterprise .lf-plan-tagline {
  color: rgba(255, 255, 255, 0.5);
}
.lf-plan-price {
  font-size: 32px;
  font-weight: 900;
  color: #1c1d1f;
  line-height: 1.1;
  margin-bottom: 2px;
  letter-spacing: -1px;
}
.lf-plan-enterprise .lf-plan-price {
  color: #fff;
}
.lf-plan-price-custom {
  font-size: 22px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.lf-plan-price small {
  font-size: 12px;
  font-weight: 500;
  color: #6a6f73;
  letter-spacing: 0;
}
.lf-plan-enterprise .lf-plan-price small {
  color: rgba(255, 255, 255, 0.45);
}
.lf-plan-capacity {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  background: #faf5ff;
  color: #6b21a8;
  padding: 3px 10px;
  border-radius: 12px;
  margin: 10px 0 16px;
}
.lf-plan-enterprise .lf-plan-capacity {
  background: rgba(164, 53, 240, 0.2);
  color: #f0abfc;
}
.lf-plan-divider {
  height: 1px;
  background: #e9d5ff;
  margin-bottom: 14px;
}
.lf-plan-enterprise .lf-plan-divider {
  background: rgba(255, 255, 255, 0.1);
}
.lf-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  flex: 1;
}
.lf-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: #1c1d1f;
  padding: 4px 0;
  line-height: 1.45;
}
.lf-plan-enterprise .lf-plan-features li {
  color: rgba(255, 255, 255, 0.8);
}
.lf-plan-features li i {
  font-size: 10px;
  margin-top: 3px;
  flex-shrink: 0;
  color: #16a34a;
}
.lf-plan-enterprise .lf-plan-features li i {
  color: #a3e635;
}
.lf-plan-features li.lf-feat-na {
  color: #c4c9cf;
}
.lf-plan-features li.lf-feat-na i {
  color: #d1d5db;
}
.lf-plan-all-included {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
}
.lf-plan-all-included i {
  font-size: 12px;
}
.lf-plan-quota-line {
  font-size: 11.5px;
  color: #374151;
}
.lf-plan-quota-line strong {
  color: #6b21a8;
}
.lf-plan-cta {
  display: block;
  text-align: center;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid #e9d5ff;
  color: #6b21a8;
  background: transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.lf-plan-cta:hover {
  background: #faf5ff;
  border-color: #a435f0;
  color: #6b21a8;
  text-decoration: none;
}
.lf-plan-popular .lf-plan-cta,
.lf-plan-cta--primary {
  background: #a435f0;
  border-color: #a435f0;
  color: #fff;
  box-shadow: 0 4px 16px rgba(164, 53, 240, 0.35);
}
.lf-plan-popular .lf-plan-cta:hover,
.lf-plan-cta--primary:hover {
  background: #8710d8;
  border-color: #8710d8;
  color: #fff;
}
.lf-plan-enterprise .lf-plan-cta {
  background: rgba(164, 53, 240, 0.2);
  border-color: rgba(240, 171, 252, 0.45);
  color: #f0abfc;
}
.lf-plan-annual-note {
  font-size: 10.5px;
  color: #6a6f73;
  text-align: center;
  margin-top: 8px;
}
.lf-plan-enterprise .lf-plan-annual-note {
  color: rgba(255, 255, 255, 0.38);
}

.lf-pricing-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 40px;
}
.lf-pf-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  padding: 13px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e9d5ff;
}
.lf-pf-item i {
  color: #16a34a;
  font-size: 15px;
  margin-top: 1px;
}
.lf-pf-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.lf-pf-item span {
  font-size: 12px;
  color: #6a6f73;
}
.lf-pricing-cta {
  margin-top: 36px;
  background: linear-gradient(135deg, #faf5ff, #f3e8ff);
  border: 2px dashed #e9d5ff;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
}

/* —— Espace OF : picker mon abonnement —— */
.lf-abn-plans-picker {
  margin-top: 4px;
}
.lf-abn-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1c1d1f;
  margin: 0;
}
.lf-abn-section-title__mark {
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, #a435f0, #7c3aed);
  flex-shrink: 0;
}
.lf-abn-compare-head__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #7c3aed;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid #e9d5ff;
  background: #faf5ff;
}
.lf-abn-compare-head__link:hover {
  background: #f3e8ff;
  color: #6b21a8;
  text-decoration: none;
}
.lf-abn-compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 4px 16px;
  margin: 0 -4px;
}
.lf-abn-compare-scroll__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  min-width: min-content;
  padding-bottom: 4px;
}
.lf-abn-compare-slide {
  flex: 0 0 280px;
  max-width: 280px;
}
.lf-abn-tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1.5px solid #e9d5ff;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(164, 53, 240, 0.06);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.lf-abn-tier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(164, 53, 240, 0.12);
  border-color: #d8b4fe;
}
.lf-abn-tier-card--featured {
  border-color: #a435f0;
  box-shadow: 0 8px 36px rgba(164, 53, 240, 0.18);
}
.lf-abn-tier-card--current {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}
.lf-abn-tier-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #a435f0, #7c3aed);
  padding: 4px 10px;
  border-radius: 20px;
}
.lf-abn-tier-current-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #86efac;
  padding: 4px 10px;
  border-radius: 20px;
}
.lf-abn-tier-card__head {
  padding: 20px 18px 12px;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
  border-bottom: 1px solid #f3e8ff;
}
.lf-abn-tier-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #a435f0;
  margin-bottom: 4px;
}
.lf-abn-tier-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: #1c1d1f;
  margin: 0 0 4px;
  line-height: 1.15;
}
.lf-abn-tier-tagline {
  font-size: 12px;
  color: #6a6f73;
  margin: 0;
  line-height: 1.4;
}
.lf-abn-tier-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.lf-abn-tier-price-row {
  margin-bottom: 14px;
}
.lf-abn-tier-amount {
  font-size: 2rem;
  font-weight: 900;
  color: #1c1d1f;
  letter-spacing: -0.03em;
}
.lf-abn-tier-amount--custom {
  font-size: 1.35rem;
}
.lf-abn-tier-period {
  font-size: 12px;
  font-weight: 600;
  color: #6a6f73;
  margin-left: 4px;
}
.lf-abn-tier-annual {
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  margin-top: 6px;
}
.lf-abn-tier-feats {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  flex: 1;
}
.lf-abn-tier-feats li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #374151;
  padding: 5px 0;
  border-bottom: 1px solid #faf5ff;
}
.lf-abn-tier-feats li:last-child {
  border-bottom: none;
}
.lf-abn-tier-feats__icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f3e8ff;
  color: #a435f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
}
.lf-abn-tier-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.lf-abn-btn-current {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .lf-plans-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .lf-plan-card.lf-plan-popular {
    transform: none;
  }
}
@media (max-width: 900px) {
  .lf-plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lf-pricing-features {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .lf-plans-grid {
    grid-template-columns: 1fr;
  }
  .lf-abn-compare-slide {
    flex: 0 0 85vw;
    max-width: 85vw;
  }
}
