/* ============================================================
   Bouton flottant WhatsApp — AEDT
   Fichier partagé par toutes les pages publiques.
   Toutes les classes sont préfixées « wa- » afin de ne jamais
   interférer avec les styles existants du portail.
   ============================================================ */

.wa-fab{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:9990;
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  /* Le bouton ne doit jamais empiéter sur l'encoche des iPhone récents. */
  padding-bottom:env(safe-area-inset-bottom,0px);
}

/* --- Pastille circulaire verte --- */
.wa-fab__btn{
  position:relative;
  flex:0 0 auto;
  width:58px;
  height:58px;
  border-radius:50%;
  background:#25d366;
  display:grid;
  place-items:center;
  box-shadow:0 8px 24px rgba(37,211,102,.45);
  transition:transform .18s ease,background-color .18s ease,box-shadow .18s ease;
}

/* Halo pulsé discret, dessiné en fantôme derrière la pastille. */
.wa-fab__btn::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:50%;
  pointer-events:none;
  animation:wa-pulse 2.8s ease-out infinite;
}

@keyframes wa-pulse{
  0%   {box-shadow:0 0 0 0    rgba(37,211,102,.45)}
  70%  {box-shadow:0 0 0 18px rgba(37,211,102,0)}
  100% {box-shadow:0 0 0 0    rgba(37,211,102,0)}
}

.wa-fab__btn svg{
  width:32px;
  height:32px;
  fill:#fff;
  display:block;
}

/* --- Effets au survol et au focus --- */
.wa-fab:hover .wa-fab__btn,
.wa-fab:focus-visible .wa-fab__btn{
  transform:translateY(-3px) scale(1.06);
  background:#1fbe5d;
  box-shadow:0 14px 32px rgba(37,211,102,.55);
}

.wa-fab:active .wa-fab__btn{
  transform:translateY(-1px) scale(1.02);
}

.wa-fab:focus-visible{outline:none}
.wa-fab:focus-visible .wa-fab__btn{outline:3px solid #72b7f3;outline-offset:3px}

/* --- Bulle d'aide --- */
.wa-fab__bubble{
  background:#fff;
  color:#172a43;
  border:1px solid #e2eaf3;
  border-radius:14px;
  padding:10px 14px;
  font:750 14px/1.35 system-ui,-apple-system,"Segoe UI",sans-serif;
  white-space:nowrap;
  box-shadow:0 10px 28px rgba(10,39,76,.14);
  opacity:0;
  transform:translateX(10px);
  pointer-events:none;              /* la bulle ne capte jamais les clics */
  transition:opacity .2s ease,transform .2s ease;
}

.wa-fab:hover .wa-fab__bubble,
.wa-fab:focus-visible .wa-fab__bubble{
  opacity:1;
  transform:translateX(0);
}

/* --- Tablette et téléphone --- */
@media(max-width:560px){
  .wa-fab{right:14px;bottom:14px;gap:9px}
  .wa-fab__btn{width:52px;height:52px}
  .wa-fab__btn svg{width:28px;height:28px}
  /* Pas de survol sur tactile : la bulle reste visible, en texte compact. */
  .wa-fab__bubble{
    font-size:12px;
    padding:8px 11px;
    white-space:normal;
    max-width:56vw;
    opacity:1;
    transform:none;
  }
}

/* --- Respect des préférences d'accessibilité --- */
@media(prefers-reduced-motion:reduce){
  .wa-fab__btn::before{animation:none}
  .wa-fab,.wa-fab__btn,.wa-fab__bubble{transition:none}
  .wa-fab:hover .wa-fab__btn,.wa-fab:focus-visible .wa-fab__btn{transform:none}
}
