/* ==========================================================================
   VANDIA IA - SOCIAL PROOF FLOATING TOASTS (NOTIFICATIONS DYNAMIQUES)
   Positionnement : En bas à gauche (pour laisser libre le bouton WhatsApp à droite)
   ========================================================================== */

.sp-toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 998;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sp-toast-card {
  pointer-events: auto;
  position: relative;
  width: 360px;
  max-width: calc(100vw - 48px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: spSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.2s ease, opacity 0.25s ease, box-shadow 0.2s ease;
  user-select: none;
}

.sp-toast-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.65), 0 0 15px rgba(37, 211, 102, 0.2);
  border-color: rgba(37, 211, 102, 0.35);
}

.sp-toast-card.sp-toast-exit {
  animation: spSlideOut 0.35s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

/* Avatar / Icône */
.sp-toast-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.2), rgba(18, 140, 126, 0.4));
  border: 1.5px solid rgba(37, 211, 102, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #25d366;
  position: relative;
}

.sp-toast-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.sp-toast-country-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  font-size: 13px;
  line-height: 1;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 50%;
  padding: 1px;
}

/* Corps de texte */
.sp-toast-content {
  flex: 1;
  min-width: 0;
}

.sp-toast-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.sp-toast-tag {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
}

.sp-toast-tag.tag-activity {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.sp-toast-tag.tag-signup {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.sp-toast-tag.tag-payment {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.sp-toast-tag.tag-testimonial {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.sp-toast-time {
  font-size: 10.5px;
  color: #94a3b8;
  margin-left: auto;
}

.sp-toast-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
  margin: 0 0 2px 0;
  word-break: break-word;
}

.sp-toast-subtitle {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.35;
  margin: 0;
  word-break: break-word;
}

.sp-toast-quote {
  font-size: 11.5px;
  font-style: italic;
  color: #e2e8f0;
  line-height: 1.35;
  margin: 3px 0 0 0;
  border-left: 2px solid #a855f7;
  padding-left: 6px;
}

/* Bouton fermer */
.sp-toast-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  padding: 0;
  margin-left: 2px;
}

.sp-toast-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Barre de progression discrète */
.sp-toast-progress {
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  overflow: hidden;
}

.sp-toast-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #25d366, #38bdf8);
  transform-origin: left;
  animation: spProgress linear forwards;
}

/* Animations */
@keyframes spSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
}

@keyframes spProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Responsive Mobile */
@media (max-width: 640px) {
  .sp-toast-container {
    bottom: 18px;
    left: 12px;
    max-width: calc(100vw - 84px); /* Laisse libre le bouton WhatsApp rond de 54px à droite */
  }
  .sp-toast-card {
    width: 100%;
    padding: 10px 12px;
    gap: 10px;
  }
  .sp-toast-avatar {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .sp-toast-title {
    font-size: 12px;
  }
  .sp-toast-subtitle, .sp-toast-quote {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-toast-card {
    animation: none !important;
  }
  .sp-toast-progress-bar {
    animation: none !important;
    display: none;
  }
}

