/* ============================================================
   floating-cta.css — Bouton CTA flottant Brannity
   ============================================================ */

:root {
  --color-accent:        #1A53FF;
  --floating-cta-bottom: 32px;
}

/* ── Wrapper ────────────────────────────────────────────────── */
#floating-cta-btn {
  position: fixed;
  bottom: var(--floating-cta-bottom);
  right: 32px;
  z-index: 900;

  display: inline-flex;
  align-items: center;
  gap: 14px;

  padding: 8px 20px 8px 4px;
  border-radius: 50px;
  overflow: visible;
  background: #0B1B3D;
  border: 1px solid rgba(26, 83, 255, 0.25);
  color: #fff;
  cursor: pointer;

  font-family: 'DM Sans', 'Space Grotesk', sans-serif;
  white-space: nowrap;
  user-select: none;

  box-shadow:
    0 4px 24px rgba(11, 27, 61, 0.30),
    0 1px 4px  rgba(11, 27, 61, 0.20),
    0 0 0 0    rgba(26, 83, 255, 0);

  /* Apparition retardée */
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  will-change: transform, opacity;
  transition:
    opacity    0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform  0.6s cubic-bezier(0.34, 1.45, 0.64, 1),
    bottom     0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.25s ease,
    border-color 0.2s ease,
    scale      0.2s ease;

  pointer-events: none;
}

#floating-cta-btn.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Pulse doux en boucle quand visible */
#floating-cta-btn.is-visible::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50px;
  border: 1.5px solid rgba(26, 83, 255, 0.25);
  animation: ctaPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ctaPulse {
  0%   { opacity: 0.7; transform: scale(1); }
  60%  { opacity: 0;   transform: scale(1.07); }
  100% { opacity: 0;   transform: scale(1.07); }
}

/* ── Avatar photo (pop-out) ─────────────────────────────────── */
.floating-cta__avatar {
  height: 84px;
  width: auto;
  margin-top: -40px;
  margin-bottom: -8px;
  align-self: flex-end;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  transition: transform 0.25s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.floating-cta__avatar-img {
  height: 100%;
  width: auto;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* ── Texte (deux lignes) ────────────────────────────────────── */
.floating-cta__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.floating-cta__label {
  font-size: 14px;
  font-weight: 500; /* Retrait du gras */
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.floating-cta__sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1;
  letter-spacing: 0.01em;
}

/* ── Flèche ─────────────────────────────────────────────────── */
.floating-cta__arrow {
  margin-left: 2px;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.40);
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
}

/* ── Hover ─────────────────────────────────────────────────── */
#floating-cta-btn:hover {
  border-color: rgba(26, 83, 255, 0.55);
  box-shadow:
    0 8px 32px rgba(11, 27, 61, 0.38),
    0 2px 8px  rgba(11, 27, 61, 0.20),
    0 0 0 3px  rgba(26, 83, 255, 0.12);
  scale: 1.03;
}

#floating-cta-btn:hover .floating-cta__avatar {
  transform: translateY(-3px);
}

#floating-cta-btn:hover .floating-cta__arrow {
  color: rgba(255, 255, 255, 0.75);
  transform: translateX(2px);
}

#floating-cta-btn:hover .floating-cta__sub {
  color: rgba(255, 255, 255, 0.65);
}

/* ── Active ────────────────────────────────────────────────── */
#floating-cta-btn:active {
  scale: 0.97;
  box-shadow:
    0 2px 12px rgba(11, 27, 61, 0.25),
    0 1px 3px  rgba(11, 27, 61, 0.15);
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #floating-cta-btn {
    width: 54px;
    height: 54px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    right: 20px;
    gap: 0;
  }

  #floating-cta-btn::after { border-radius: 50%; }
  #floating-cta-btn::before { border-radius: 50%; }

  .floating-cta__text,
  .floating-cta__arrow {
    display: none;
  }

  /* Remplacer la photo par une icône SVG calendrier */
  .floating-cta__avatar {
    height: 54px;
    width: 54px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .floating-cta__avatar-img {
    display: none;
  }

  .floating-cta__avatar::after {
    content: '';
    display: block;
    width: 26px;
    height: 26px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }
}
