/* ==========================================================================
   SOS Pétanque — Assistant WhatsApp premium
   ========================================================================== */

.sos-wa {
  --sos-wa-fuchsia: #ff008c;
  --sos-wa-green: #25d366;
  --sos-wa-green-dark: #1ebe57;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  position: relative;
  z-index: 9800;
}

/* ── Popup ──────────────────────────────────────────────────────────────── */
.sos-wa__popup {
  position: fixed;
  right: 1.25rem;
  bottom: 5.75rem;
  width: min(360px, calc(100vw - 2rem));
  background: #ffffff;
  border: 2px solid var(--sos-wa-fuchsia);
  border-radius: 18px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.16),
    0 8px 24px rgba(255, 0, 140, 0.12);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition:
    opacity 350ms ease,
    transform 350ms ease,
    visibility 350ms;
}

.sos-wa__popup:not([hidden]).is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sos-wa__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: #555;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.sos-wa__close:hover {
  background: rgba(255, 0, 140, 0.1);
  color: var(--sos-wa-fuchsia);
}

.sos-wa__header {
  padding: 1.15rem 2.75rem 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, rgba(255, 0, 140, 0.04) 0%, transparent 100%);
}

.sos-wa__brand {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e1e22;
  line-height: 1.35;
}

.sos-wa__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #16a34a;
  letter-spacing: 0.02em;
}

.sos-wa__badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.sos-wa__body {
  padding: 1rem 1.15rem 0.5rem;
  color: #333;
  font-size: 0.92rem;
  line-height: 1.55;
}

.sos-wa__greeting {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e1e22;
}

.sos-wa__intro {
  margin: 0 0 0.65rem;
}

.sos-wa__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.sos-wa__list li {
  font-size: 0.88rem;
}

.sos-wa__actions {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem 1.15rem;
}

.sos-wa__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.sos-wa__btn--primary {
  background: var(--sos-wa-green);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.sos-wa__btn--primary:hover {
  background: var(--sos-wa-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.42);
}

.sos-wa__btn--secondary {
  background: #ffffff;
  color: var(--sos-wa-fuchsia);
  border: 1.5px solid rgba(255, 0, 140, 0.45);
}

.sos-wa__btn--secondary:hover {
  background: rgba(255, 0, 140, 0.06);
  transform: translateY(-1px);
}

.sos-wa__btn-icon {
  flex-shrink: 0;
}

/* ── Bouton flottant ────────────────────────────────────────────────────── */
.sos-wa__fab-wrap {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9810;
}

.sos-wa__fab-tooltip {
  position: absolute;
  right: calc(100% + 0.65rem);
  bottom: 50%;
  transform: translateY(50%) translateX(6px);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: #1e1e22;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.sos-wa__fab-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -5px;
  width: 10px;
  height: 10px;
  background: #1e1e22;
  transform: translateY(-50%) rotate(45deg);
}

.sos-wa__fab-wrap:hover .sos-wa__fab-tooltip,
.sos-wa__fab-wrap:focus-within .sos-wa__fab-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(50%) translateX(0);
}

.sos-wa__fab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: var(--sos-wa-green);
  color: #ffffff;
  text-decoration: none;
  box-shadow:
    0 12px 32px rgba(37, 211, 102, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sos-wa__fab:hover {
  transform: scale(1.06);
  box-shadow:
    0 16px 40px rgba(37, 211, 102, 0.5),
    0 6px 16px rgba(0, 0, 0, 0.14);
}

.sos-wa__fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--sos-wa-green);
  animation: sosWaPulse 2.4s ease-out infinite;
  z-index: -1;
}

@keyframes sosWaPulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.45);
    opacity: 0;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.sos-wa__fab-icon {
  display: block;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .sos-wa__popup {
    right: 1rem;
    left: 1rem;
    bottom: 5.25rem;
    width: auto;
  }

  .sos-wa__fab-wrap {
    right: 1rem;
    bottom: 1rem;
  }

  .sos-wa__fab-tooltip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sos-wa__popup,
  .sos-wa__fab,
  .sos-wa__btn,
  .sos-wa__fab-tooltip {
    transition: none;
  }

  .sos-wa__fab-pulse {
    animation: none;
  }
}
