/* ==========================================
   BOUTON D'APPEL TÉLÉPHONIQUE FIXE
   Bouton flottant pour contact téléphonique
   ========================================== */

/* Bouton principal - masqué partout */
.phone-button-fixed {
  display: none !important;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(0, 168, 232, 0.35);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  border: none;
  outline: none;
  overflow: hidden;
}

/* Effet de pulsation */
.phone-button-fixed::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
  animation: phone-pulse 2s ease-out infinite;
  opacity: 0;
}

@keyframes phone-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* Conteneur de l'icône */
.phone-button-icon {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: phone-ring 1.5s ease-in-out infinite;
  animation-delay: 2s;
}

/* Animation de sonnerie */
@keyframes phone-ring {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30% {
    transform: rotate(-15deg);
  }
  20%, 40% {
    transform: rotate(15deg);
  }
  50% {
    transform: rotate(0deg);
  }
}

/* SVG de l'icône téléphone */
.phone-button-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--color-white);
  transition: transform var(--transition-fast);
}

/* Effet au survol */
.phone-button-fixed:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 168, 232, 0.45);
}

.phone-button-fixed:hover .phone-button-icon svg {
  transform: scale(1.1);
}

/* Effet au clic */
.phone-button-fixed:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 168, 232, 0.3);
}

/* Tooltip avec le numéro */
.phone-button-tooltip {
  position: absolute;
  right: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  pointer-events: none;
}

/* Flèche du tooltip */
.phone-button-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 10px;
  border-color: transparent transparent transparent var(--color-dark);
}

/* Affichage du tooltip au survol (desktop uniquement) */
@media (min-width: 1024px) {
  .phone-button-fixed:hover .phone-button-tooltip {
    opacity: 1;
    visibility: visible;
    right: calc(100% + 12px);
  }
}

/* Badge indicateur (optionnel) */
.phone-button-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background-color: #FF4444;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-white);
  animation: badge-bounce 2s ease-in-out infinite;
}

@keyframes badge-bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* Masquer sur mobile et tablette */
@media (max-width: 1024px) {
  .phone-button-fixed {
    display: none !important;
  }
}

/* État focus pour l'accessibilité */
.phone-button-fixed:focus {
  outline: 3px solid rgba(0, 168, 232, 0.5);
  outline-offset: 3px;
}

/* Animation d'entrée au chargement de la page */
@keyframes phone-button-enter {
  0% {
    opacity: 0;
    transform: scale(0) translateY(50px);
  }
  50% {
    transform: scale(1.1) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.phone-button-fixed.animate-in {
  animation: phone-button-enter 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Version alternative - Bouton étendu avec texte (optionnel) */
.phone-button-fixed.expanded {
  width: auto;
  padding: 0 24px;
  border-radius: var(--radius-full);
}

.phone-button-text {
  margin-left: 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
  display: none;
}

.phone-button-fixed.expanded .phone-button-text {
  display: block;
}

/* Mode sombre (si implémenté) */
@media (prefers-color-scheme: dark) {
  .phone-button-tooltip {
    background-color: var(--color-white);
    color: var(--color-dark);
  }

  .phone-button-tooltip::after {
    border-color: transparent transparent transparent var(--color-white);
  }
}

/* Impression - Masquer le bouton */
@media print {
  .phone-button-fixed {
    display: none !important;
  }
}
