/* ==========================================================================
   WIDGET WHATSAPP PUBLIC — bouton flottant + popup (choix du besoin puis
   formulaire), génère un message WhatsApp pré-rédigé. Demande Hubert
   06/08/2026, inspiré d'un site de référence ("FJ13"). Utilisé sur le site
   Tourisme ET Business (layouts/site.blade.php + layouts/business.blade.php).
   Retour du 06/08 : le vert plein sur tout le popup ne convenait pas — la
   popup reste en gris dépoli (comme les menus déroulants des 2 sites), le
   vert WhatsApp reste réservé au bouton rond/logo/CTA d'envoi uniquement.
   Tourisme = gris plus sombre, Business = gris un peu plus clair, via
   [data-site] posé sur le widget (partials/whatsapp-widget.blade.php). */
:root {
  --wa-line: rgba(255, 255, 255, .12);
  --wa-ink: #f2f3f4;
  --wa-ink-soft: #adb2b8;
  --wa-green: #25d366;
  --wa-green-deep: #1da851;
  --wa-green-tint: rgba(37, 211, 102, .16);
}

[data-site="tourisme"] {
  --wa-bg: rgba(26, 27, 30, .88);
  --wa-card: rgba(255, 255, 255, .05);
}
[data-site="business"] {
  --wa-bg: rgba(58, 60, 65, .82);
  --wa-card: rgba(255, 255, 255, .08);
}

.wa-widget-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(155deg, var(--wa-green), var(--wa-green-deep)); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px -4px rgba(29, 168, 81, .55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wa-widget-fab:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -4px rgba(29, 168, 81, .65); }
.wa-widget-fab svg { position: relative; z-index: 1; width: 28px; height: 28px; fill: currentColor; }
.wa-widget-fab-echo {
  position: absolute; inset: 0; border-radius: 50%; background: var(--wa-green);
  opacity: 0; animation: waFabEcho 2.6s ease-out infinite;
}
@keyframes waFabEcho {
  0%   { transform: scale(1); opacity: .4; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .wa-widget-fab-echo { animation: none; display: none; } }

.wa-widget-dialog {
  position: fixed; inset: 0; margin: auto; width: 420px; max-width: 92vw; max-height: 88vh;
  padding: 0; border: 1px solid var(--wa-line); border-radius: 20px; background: var(--wa-bg); color: var(--wa-ink);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .6); opacity: 0; transform: scale(.9);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(.34, 1.56, .64, 1);
  font-family: var(--font-sans);
}
.wa-widget-dialog[open] { display: flex; flex-direction: column; }
.wa-widget-dialog.is-in { opacity: 1; transform: scale(1); }
.wa-widget-dialog::backdrop { background: rgba(0, 0, 0, 0); transition: background-color 0.2s ease; }
.wa-widget-dialog.is-in::backdrop { background: rgba(0, 0, 0, .6); }

.wa-widget-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--wa-line); flex-shrink: 0; }
.wa-widget-head-left { display: flex; align-items: center; gap: 12px; }
.wa-widget-logo {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--wa-green-tint);
  color: var(--wa-green); display: flex; align-items: center; justify-content: center;
}
.wa-widget-logo svg { width: 22px; height: 22px; fill: currentColor; }
.wa-widget-title { margin: 0; font-weight: 800; font-size: 1.05rem; }
.wa-widget-sub { margin: 2px 0 0; font-size: .85rem; color: var(--wa-ink-soft); }
.wa-widget-close {
  width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; color: var(--wa-ink-soft);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.wa-widget-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.wa-widget-close:hover { background: rgba(255, 255, 255, .06); }

.wa-widget-body { padding: 18px 20px 22px; overflow-y: auto; }
.wa-widget-question { margin: 0 0 12px; font-weight: 700; font-size: .98rem; }

.wa-choice {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-bottom: 10px;
  background: var(--wa-card); border: 1px solid var(--wa-line); border-radius: 12px; color: var(--wa-ink);
  font-family: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.wa-choice:hover { border-color: var(--wa-green); transform: translateY(-1px); }
.wa-choice-icon {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; background: var(--wa-green-tint); color: var(--wa-green);
  display: flex; align-items: center; justify-content: center;
}
.wa-choice-icon svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wa-choice span:not(.wa-choice-icon) { flex: 1; }
.wa-choice-chevron { width: 16px; height: 16px; stroke: var(--wa-ink-soft); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.wa-back { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--wa-ink-soft); font-family: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 14px; }
.wa-back svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.wa-back:hover { color: var(--wa-ink); }

.wa-tarif-box { background: var(--wa-green-tint); border: 1px solid rgba(37, 211, 102, .35); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.wa-tarif-title { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-weight: 700; font-size: .88rem; color: var(--wa-green); }
.wa-tarif-title svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.wa-tarif-values { margin: 0; font-weight: 700; font-size: .95rem; }
.wa-tarif-note { margin: 4px 0 0; font-size: .78rem; color: var(--wa-ink-soft); }

.wa-widget-body .field-label { color: var(--wa-ink-soft); }
.wa-widget-body .input, .wa-widget-body .select {
  background: var(--wa-card); border: 1px solid var(--wa-line); color: var(--wa-ink);
}
.wa-widget-body .input::placeholder { color: var(--wa-ink-soft); }
.wa-widget-body .input:focus, .wa-widget-body .select:focus { border-color: var(--wa-green); outline: none; box-shadow: 0 0 0 3px var(--wa-green-tint); }

.wa-send-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px; border: none; border-radius: 12px; background: linear-gradient(155deg, var(--wa-green), var(--wa-green-deep));
  color: #ffffff; font-family: inherit; font-weight: 800; font-size: .98rem; cursor: pointer;
}
.wa-send-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.wa-send-btn:hover { filter: brightness(1.06); }
.wa-widget-footnote { margin: 8px 0 0; text-align: center; font-size: .76rem; color: var(--wa-ink-soft); }

@media (max-width: 480px) {
  .wa-widget-fab { right: 14px; bottom: 14px; width: 52px; height: 52px; }
  .wa-widget-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
}
