/* ================================================================================
   PRICING HERO SECTION
================================================================================ */

#pricing-hero {
  position: relative;
  z-index: 10;
}

/* Gradient text (charte Bloom) */
.gradient-text-pricing {
  background: var(--brand-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Shared homepage title language for the main pricing sections. */
.pricing-page :is(.addons-title, .comparison-title, .shared-faq-title) {
  max-width: 17ch;
  margin: 0 auto;
  color: #f8f7ff;
  font-size: clamp(2.45rem, 5vw, 4.8rem);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-align: center;
  text-wrap: balance;
  white-space: normal;
}

.pricing-page :is(.gradient-text-pricing, .shared-faq-title-highlight) {
  background: var(--brand-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding: 0 0.045em 0.08em;
  margin-left: -0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@media (max-width: 640px) {
  .pricing-page :is(.addons-title, .comparison-title, .shared-faq-title) {
    font-size: clamp(2.35rem, 12vw, 3.5rem);
  }
}

/* Badge introductif */
.pricing-hero-badge {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #c4b5fd;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ================================================================================
   PRICING SELECTORS (toggle + region + licenses)
================================================================================ */

.pricing-selector-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Product selector sits above the billing/region/licenses row. */
.pricing-product-slot {
  display: flex;
  justify-content: center;
}

.pricing-selectors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 1.25rem;
}

.pricing-availability-slot {
  display: flex;
  justify-content: center;
  min-height: 1.1rem;
  margin-top: 1rem;
  text-align: center;
}

.billing-toggle-wrapper,
.region-toggle-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.billing-toggle-btn,
.region-toggle-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #cbd5e1;
  background: transparent;
  border: none;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    transform 0.2s ease;
}

.billing-toggle-btn:hover,
.region-toggle-btn:hover {
  color: #ffffff;
}

.billing-toggle-btn.is-active,
.region-toggle-btn.is-active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
}

.region-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.region-currency {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.region-toggle-btn.is-active .region-currency {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Geo-locked: only the resolved region's pill renders. The non-matching
   button receives the `hidden` attribute via JS, but the explicit
   `display: inline-flex` on `.region-toggle-btn` would otherwise
   out-specify the UA default for `[hidden]`. This rule restores the
   attribute's intent. */
.region-toggle-btn[hidden] {
  display: none;
}

/* ================================================================================
   LICENSES STEPPER
================================================================================ */

.licenses-selector {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 18px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.licenses-label {
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.licenses-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.licenses-stepper-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #c4b5fd;
  font-size: 0.9rem;
  border-radius: 9999px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.licenses-stepper-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.25);
  color: #ffffff;
}

.licenses-stepper-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.licenses-value {
  min-width: 2.2ch;
  padding: 0 6px;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.billing-discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(34, 211, 238, 0.22);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.4);
  letter-spacing: 0.02em;
}

.billing-toggle-btn.is-active .billing-discount-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #f0fdff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ================================================================================
   ANIMATIONS (réutilisables entre sections)
================================================================================ */

.animate-hero-fadein {
  animation: pricingHeroFadeIn 1s cubic-bezier(0.4, 2, 0.6, 1) 0.1s both;
}
.animate-hero-fadein-delay {
  animation: pricingHeroFadeIn 1s cubic-bezier(0.4, 2, 0.6, 1) 0.35s both;
}
.animate-hero-slidein {
  animation: pricingHeroSlideIn 1.1s cubic-bezier(0.4, 2, 0.6, 1) 0.15s both;
}
.animate-hero-cta {
  animation: pricingHeroFadeIn 1s cubic-bezier(0.4, 2, 0.6, 1) 0.55s both;
}

@keyframes pricingHeroFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pricingHeroSlideIn {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================================================================================
   RESPONSIVE
================================================================================ */

@media (max-width: 768px) {
  #pricing-hero {
    padding-top: 8rem;
    padding-bottom: 2rem;
  }

  .billing-toggle-btn,
  .region-toggle-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
    gap: 6px;
  }

  .billing-discount-badge,
  .region-currency {
    font-size: 0.62rem;
    padding: 2px 6px;
  }

  .pricing-selectors {
    gap: 10px;
  }

  .licenses-selector {
    padding: 5px 12px 5px 14px;
    gap: 8px;
  }

  .licenses-label {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-hero-fadein,
  .animate-hero-fadein-delay,
  .animate-hero-slidein,
  .animate-hero-cta {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
