/* =======================================
   CTA Section - Styles optimisés
   Animations gérées par scrollObserver
   ======================================= */

:root {
  --cta-text-color: #ffffff;
}

/* Layout et structure */
.cta-section {
  /* Lazy rendering - ne peint que lorsqu'il entre dans le viewport */
  content-visibility: auto;
  contain-intrinsic-size: 350px; /* hauteur approximative pour pré-layout */

  /* Optimisations de performance */
  contain: content; /* limite la propagation des styles */

  position: relative;
  padding: 3rem 1rem;
  z-index: 10;
  overflow: hidden;
  /* Use shared HomePage background */
  background-color: transparent;
  color: var(--cta-text-color);
  margin-top: -7rem;
}

.cta-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Style "LiquidGlass" pour le conteneur du contenu */
.cta-content {
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
  color: var(--cta-text-color);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.75rem;
  padding: 3rem 2.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  position: relative;
  overflow: hidden;
  /* MODIFICATION : L'animation est maintenant gérée par le pseudo-élément */
}

/* MODIFICATION : Création de l'effet "Aurore Boréale Liquide" */
.cta-content::before {
  content: '';
  position: absolute;
  /* Rendre le pseudo-élément plus grand pour la rotation */
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  z-index: 1;

  /* Définition de l'aurore avec les couleurs de la charte */
  background:
    radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.4), transparent 40%),
    /* Violet */ radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.4), transparent 40%); /* Bleu Indigo */

  /* La clé de l'effet : un flou très prononcé pour créer la lueur diffuse */
  filter: blur(80px);

  /* Application de l'animation unifiée */
  animation: breathing-aurora 20s ease-in-out infinite;
}

/* MODIFICATION : Une seule animation unifiée pour un effet holistique */
@keyframes breathing-aurora {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: rotate(180deg) scale(1.05);
    opacity: 1;
  }
}

/* SUPPRESSION : Les anciennes animations sont remplacées par la nouvelle */

/* Typographie (avec z-index pour rester au-dessus de l'aurore) */
.cta-title,
.cta-description,
.cta-buttons,
.cta-signup-link {
  position: relative;
  z-index: 2;
}

/* Tertiary link — reassurance path for visitors not ready to click "trial";
   deep-links to the product page signup walkthrough (#story-signup). */
.cta-signup-link {
  margin-top: 1.6rem;
  color: rgba(233, 227, 255, 0.85);
  font-size: 1.02rem;
  font-weight: 600;
}

.cta-title {
  font-size: 2.125rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.cta-description {
  font-size: 1.25rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

/* Boutons */
.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
}

/* Optimisations pour mobile et accessibilité */
@media (max-width: 768px) {
  .cta-section {
    padding: 4rem 1rem;
  }

  .cta-content {
    padding: 2rem 1.5rem;
  }

  .cta-title {
    font-size: 1.875rem;
  }

  .cta-description {
    font-size: 1.125rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }
}

/* Désactiver l'animation pour l'accessibilité */
@media (prefers-reduced-motion: reduce) {
  .cta-content::before {
    animation: none;
    /* On fige l'aurore dans un état plaisant */
    transform: rotate(45deg) scale(1.02);
    opacity: 0.8;
  }
}

/* Amélioration du contraste pour l'accessibilité */
@media (forced-colors: active) {
  .cta-buttons .btn {
    border: 2px solid transparent;
    border-color: CanvasText;
  }
}

/* Styles d'impression */
@media print {
  .cta-section {
    background: #090518 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cta-buttons .btn {
    border: 2px solid #000 !important;
    color: #000 !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Styles spécifiques pour les écrans larges */
@media (min-width: 768px) {
  .cta-section {
    padding: 6rem 2rem;
  }

  .cta-buttons {
    flex-direction: row;
    gap: 1rem;
  }

  .cta-buttons .btn {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .cta-title {
    font-size: 2.75rem;
  }

  .cta-description {
    font-size: 1.5rem;
  }
}
