#remanence-chat-bubble {
  position: fixed;
  bottom: 20px;
  /* left, not right: the theme's wishlist launcher occupies the bottom-right
     corner at the same fixed position, and would otherwise sit on top of
     this bubble (verified live on editionsremanence.com, 2026-09-07). */
  left: 20px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #2b2b2b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 36px;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: remanence-bubble-pulse 3s ease-in-out infinite;
}

/* Pas d'animation tant que le chat est ouvert - le client est déjà en
   train de l'utiliser, plus besoin d'attirer son regard. */
#remanence-chat-bubble.remanence-chat-bubble--quiet {
  animation: none;
}

@keyframes remanence-bubble-pulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(200, 162, 89, 0.55);
  }
  50% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 14px rgba(200, 162, 89, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #remanence-chat-bubble {
    animation: none;
  }
}

#remanence-chat-panel {
  position: fixed;
  bottom: 120px;
  left: 20px;
  width: 420px;
  height: 600px;
  max-height: 80vh;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  display: none;
  flex-direction: column;
  z-index: 9999;
  font-family: sans-serif;
}

#remanence-chat-panel.open {
  display: flex;
}

/* Le même encadré flottant partout, juste redimensionné pour rester
   entièrement visible sur petit écran (pas de plein écran mobile). */
@media (max-width: 480px) {
  #remanence-chat-panel {
    left: 16px;
    width: calc(100vw - 32px);
    height: 70vh;
  }
}

#remanence-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  font-size: 14px;
  white-space: pre-wrap;
}

#remanence-chat-input-row {
  display: flex;
  border-top: 1px solid #eee;
}

#remanence-chat-input {
  flex: 1;
  border: none;
  padding: 10px;
  font-size: 14px;
}

#remanence-chat-send {
  border: none;
  background: #2b2b2b;
  color: white;
  padding: 0 16px;
  cursor: pointer;
}

.remanence-book-card {
  border: 1px solid #e5ddc8;
  border-radius: 8px;
  background: #f7f5f0;
  padding: 8px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.remanence-book-card-image {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  border-radius: 4px;
}

.remanence-book-card-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 14px;
  color: #1c1c1c;
}

.remanence-book-card-price {
  font-size: 13px;
  color: #1c1c1c;
}

.remanence-book-card-link {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 14px;
  background: #c8a259;
  color: #1c1c1c;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.remanence-book-card-link:hover {
  background: #b3903f;
}
