/* ============================================================
   GLOBAL ESSOR — CTA FINAL (bb-cta)
   ============================================================ */
.bb-cta {
  --bb-ink: #0B1B2B;
  --bb-ink-mute: #5A6B7B;
  --bb-line: #E8EEF6;
  --bb-green: #1B9B5A;
  --bb-ease: cubic-bezier(0.22, 1, 0.36, 1);

  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  padding: clamp(56px, 8vw, 100px) 24px;
}

.bb-cta,
.bb-cta * {
  box-sizing: border-box;
}

.bb-cta__card {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--bb-line);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(var(--color-blue-rgb), 0.12), 0 6px 16px rgba(11, 28, 45, 0.06);
  padding: clamp(36px, 6vw, 56px);
}

.bb-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;

  /* Visible par défaut — sur les pages sans observer JS dédié à .bb-cta,
     la section reste affichée. Sur index.html, l'observer (home-sections-v8.js)
     ajoute .is-in-view au scroll et déclenche un re-fade pour la replay. */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s var(--bb-ease), transform 0.9s var(--bb-ease);
}

/* Hook optionnel : si une page charge home-sections-v8.js (index),
   l'animation entry est rejouée à chaque entrée dans le viewport. */
.bb-cta:not(.is-in-view):not(.bb-cta--static) .bb-cta__inner {
  /* Pas de masquage par défaut — l'effet d'apparition se contente
     du toggle is-in-view qui rajoute la transition. */
}

/* 1. Le bouton : Copie conforme de .ge-kicker */
.bb-cta__label {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 16px;
  margin: 0 0 22px;
  border-radius: 999px;
  background: rgba(var(--color-blue-rgb), 0.08);
  border: 1px solid rgba(var(--color-blue-rgb), 0.16);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-blue) !important;
  width: auto;
  max-width: max-content;
  overflow: hidden;
  isolation: isolate;
}

.bb-cta__label::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(47, 123, 255, 0.25) 50%,
    transparent 100%
  );
  animation: bb-kicker-shimmer 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.bb-cta__label::before {
  content: none;
}

/* 2. Le point : Copie conforme de .ge-kicker__dot */
.bb-cta__dot {
  display: inline-block;
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-blue);
  box-shadow:
    0 0 0 0 rgba(var(--color-blue-rgb), 0.5),
    0 0 8px rgba(47, 123, 255, 0.6);
  flex-shrink: 0;
  z-index: 2;
  animation: bb-kicker-pulse 2.5s ease-out infinite;
}

.bb-cta__title {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--bb-ink);
  margin: 0;
}

.bb-cta__highlight {
  position: relative;
  display: inline-block;
  isolation: isolate;
  color: var(--color-blue);
  z-index: 1;
}
.bb-cta__highlight::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: -4px;
  right: -4px;
  height: 16px;
  background: rgba(47, 123, 255, 0.35);
  border-radius: 4px;
  z-index: 0;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.bb-cta.is-in-view .bb-cta__highlight::after {
  transform: scaleX(1);
}

.bb-cta__desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--bb-ink-mute);
  max-width: 46ch;
  margin: 0;
}

.bb-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.005em;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(15, 35, 100, 0.18);
  background: linear-gradient(180deg, var(--color-blue-bright) 0%, var(--color-blue) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 2px rgba(15, 35, 100, 0.15),
    0 8px 22px -6px rgba(var(--color-blue-rgb), 0.4);
  transition: transform 0.3s var(--bb-ease), filter 0.3s var(--bb-ease);
}

.bb-cta__btn span {
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
}

.bb-cta__btnArrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.bb-cta__btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08) saturate(1.1);
}

.bb-cta__micro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--bb-ink-mute);
}

.bb-cta__microDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bb-green);
  flex-shrink: 0;
}

/* Keyframes autonomes (au cas où home-sections-v8.css n'est pas chargé) */
@keyframes bb-kicker-shimmer {
  0%, 70%, 100% { transform: translateX(0); opacity: 0; }
  80%          { opacity: 1; }
  90%          { transform: translateX(400%); opacity: 0; }
}

@keyframes bb-kicker-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(var(--color-blue-rgb), 0.6),
      0 0 8px rgba(47, 123, 255, 0.6);
  }
  70% {
    box-shadow:
      0 0 0 8px rgba(var(--color-blue-rgb), 0),
      0 0 8px rgba(47, 123, 255, 0.6);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(var(--color-blue-rgb), 0),
      0 0 8px rgba(47, 123, 255, 0.6);
  }
}

/* Effet néon sur le petit point vert avant "Gratuit · 15 min · Sans engagement" */
.bb-cta__microDot {
  box-shadow:
    0 0 6px rgba(27, 155, 90, 0.9),
    0 0 12px rgba(27, 155, 90, 0.6),
    0 0 18px rgba(27, 155, 90, 0.35);
  animation: bb-cta-neon-pulse 2s ease-in-out infinite;
}

@keyframes bb-cta-neon-pulse {
  0%, 100% {
    box-shadow:
      0 0 6px rgba(27, 155, 90, 0.9),
      0 0 12px rgba(27, 155, 90, 0.6),
      0 0 18px rgba(27, 155, 90, 0.35);
  }
  50% {
    box-shadow:
      0 0 8px rgba(27, 155, 90, 1),
      0 0 16px rgba(27, 155, 90, 0.8),
      0 0 24px rgba(27, 155, 90, 0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-cta__inner {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bb-cta__microDot {
    animation: none;
  }
}
