/* ============================================================
   FAB.CSS — Perfo Maroc
   Floating Action Button — Contact rapide
============================================================ */

/* ===========================
   CONTENEUR
=========================== */
.fab-container {
  position: fixed;
  bottom: 32px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* ===========================
   ITEMS FLOTTANTS
=========================== */
.fab-items {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  /* Toujours visibles (plus besoin du clic sur le bouton principal) */
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: all !important;
  transform: translateY(0) scale(1) !important;
  transition:
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.35s;
}

.fab-items.fab-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* ===========================
   CHAQUE ITEM
=========================== */
.fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.fab-item:hover { transform: translateX(-5px); }

.fab-item--msg { transition-delay: 0s; }
.fab-item--tel { transition-delay: 0.06s; }
.fab-item--wa  { transition-delay: 0.12s; }

/* Labels */
.fab-item-label {
  background: #ffffff;
  color: #1a1f36;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0,0,0,0.08);
  white-space: nowrap;
  letter-spacing: 0.3px;
  pointer-events: none;
  transform: translateX(0);
  transition: transform 0.2s ease;
}

/* ===========================
   BOUTONS ICÔNES
=========================== */
.fab-item-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.fab-item:hover .fab-item-btn {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

/* WhatsApp */
.fab-item-btn--wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  box-shadow: 0 5px 20px rgba(37, 211, 102, 0.35);
}
.fab-item:hover .fab-item-btn--wa {
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
}

/* Téléphone */
.fab-item-btn--tel {
  background: linear-gradient(135deg, #1A6FFF, #0047CC);
  box-shadow: 0 5px 20px rgba(26, 111, 255, 0.4);
}
.fab-item:hover .fab-item-btn--tel {
  box-shadow: 0 8px 28px rgba(26, 111, 255, 0.55);
}

/* Message / Contact */
.fab-item-btn--msg {
  background: linear-gradient(135deg, #2C2F4A, #1a1f36);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35);
}
.fab-item:hover .fab-item-btn--msg {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

/* ===========================
   BOUTON PRINCIPAL (masqué : les 3 items restent affichés en permanence)
=========================== */
.fab-main {
  display: none !important;
}

/* ===========================
   RESPONSIVE — MOBILE : barre horizontale pleine largeur
=========================== */
@media (max-width: 768px) {

  .fab-container {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .fab-items {
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  .fab-item {
    flex: 1;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 64px;
    padding: 10px 6px;
    transition: none;
  }

  .fab-item:hover { transform: none; }

  /* Le fond coloré passe sur tout le bouton (plus seulement sur l'icône) */
  .fab-item--wa  { background: linear-gradient(135deg, #25D366, #128C7E); }
  .fab-item--tel { background: linear-gradient(135deg, #1A6FFF, #0047CC); }
  .fab-item--msg { background: linear-gradient(135deg, #2C2F4A, #1a1f36); }

  /* Le label n'est plus une pastille blanche séparée : il devient le texte du bouton coloré */
  .fab-item-label {
    background: transparent;
    color: #ffffff;
    box-shadow: none;
    padding: 0;
    font-size: 12px;
    white-space: normal;
    text-align: center;
  }

  /* L'icône n'a plus besoin de son propre fond/ombre, le fond est déjà sur .fab-item */
  .fab-item-btn {
    width: 32px;
    height: 32px;
    background: transparent !important;
    box-shadow: none !important;
    flex-shrink: 0;
  }

  .fab-item:hover .fab-item-btn {
    transform: none;
    box-shadow: none !important;
  }
}
