/*
 * Bulle flottante bons cadeaux
 * Coin bas gauche (le coin bas droit est pris par l'icône des cookies).
 * --bcb-decalage : hauteur des barres fixées en bas de l'écran (barre de
 * réservation mobile…), calculée par js_bulle_flottante.js.
 * z-index 900 : sous le header (9500 / 9999) et les overlays (≥ 1000).
 */

.bc-bulle {
  --bcb-taille: 56px;
  position: fixed;
  left: 20px;
  bottom: calc(20px + var(--bcb-decalage, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: flex;
  align-items: center;
  height: var(--bcb-taille);
  max-width: var(--bcb-taille);
  border-radius: calc(var(--bcb-taille) / 2);
  background: #090B0B;
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(9, 11, 11, 0.25);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.8);
  transition: bottom 0.3s ease, max-width 0.35s ease, background-color 0.2s ease;
}

.bc-bulle:hover,
.bc-bulle:focus-visible {
  max-width: 280px;
  background: #909B7E;
  color: #FFFFFF;
}

.bc-bulle:focus-visible {
  outline: 2px solid #909B7E;
  outline-offset: 3px;
}

.bc-bulle__icone {
  flex: 0 0 var(--bcb-taille);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--bcb-taille);
  height: var(--bcb-taille);
  animation: bcb-coucou 8s ease-in-out 3s infinite;
}

.bc-bulle__icone svg {
  display: block;
}

.bc-bulle__texte {
  padding-right: 22px;
  font-family: "Raleway", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

/* Une fois apparue, halo discret qui s'étend autour de la bulle toutes les 8 s
   (sur la bulle elle-même : un pseudo-élément serait coupé par overflow). */
.bc-bulle {
  animation: bcb-entree 0.5s ease-out 1.5s forwards, bcb-halo 8s ease-out 3s infinite;
}

@keyframes bcb-entree {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Petit mouvement de l'icône, une fois toutes les 8 s */
@keyframes bcb-coucou {
  0%, 12%, 100% { transform: rotate(0); }
  3%  { transform: rotate(-12deg); }
  6%  { transform: rotate(10deg); }
  9%  { transform: rotate(-6deg); }
}

@keyframes bcb-halo {
  0%   { box-shadow: 0 4px 14px rgba(9, 11, 11, 0.25), 0 0 0 0 rgba(144, 155, 126, 0.6); }
  15%  { box-shadow: 0 4px 14px rgba(9, 11, 11, 0.25), 0 0 0 12px rgba(144, 155, 126, 0); }
  100% { box-shadow: 0 4px 14px rgba(9, 11, 11, 0.25), 0 0 0 0 rgba(144, 155, 126, 0); }
}

/* Tablette et mobile */
@media (max-width: 760px) {
  .bc-bulle {
    --bcb-taille: 52px;
    left: 16px;
    bottom: calc(16px + var(--bcb-decalage, 0px) + env(safe-area-inset-bottom, 0px));
  }

  /* Pas de survol au doigt : la bulle reste ronde */
  .bc-bulle:hover,
  .bc-bulle:focus-visible {
    max-width: var(--bcb-taille);
    background: #090B0B;
  }

  .bc-bulle__icone svg {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bc-bulle {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bc-bulle__icone {
    animation: none;
  }
}

@media print {
  .bc-bulle {
    display: none;
  }
}
