/* ===================================
   FLOATING CTA (Call-to-Action)
   Un bouton principal qui ouvre un menu
   Mobile : SMS + Téléphone
   Desktop : Téléphone + Contact
   =================================== */

.floating-cta {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 9999 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

/* Bouton principal (toggle) */
.floating-cta-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0081c9 0%, #0066a1 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(0, 129, 201, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.floating-cta-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0, 129, 201, 0.5);
}

.floating-cta-toggle:active {
    transform: scale(0.95);
}

.floating-cta-toggle svg {
    width: 26px;
    height: 26px;
    stroke: white;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

/* Rotation de l'icône quand le menu est ouvert */
.floating-cta-toggle.active svg {
    transform: rotate(45deg);
}

/* Effet de pulsation sur le bouton principal */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.floating-cta-toggle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(0, 129, 201, 0.4);
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
}

.floating-cta-toggle.active::before {
    animation: none;
}

/* Menu déroulant */
.floating-cta-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.floating-cta-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Boutons du menu */
.floating-cta-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    text-decoration: none;
    color: #1a1a1a;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.floating-cta-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.floating-cta-action:active {
    transform: translateY(0);
}

/* Icônes des boutons */
.floating-cta-action .icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.floating-cta-action .icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Couleurs spécifiques - Design harmonisé avec fond transparent */
.floating-cta-action.whatsapp .icon {
    background: white;
}

.floating-cta-action.whatsapp .icon svg {
    fill: #25D366;
    stroke: none;
}

.floating-cta-action.phone .icon {
    background: white;
}

.floating-cta-action.phone .icon svg {
    stroke: #10b981;
}

.floating-cta-action.sms .icon {
    background: white;
}

.floating-cta-action.sms .icon svg {
    stroke: #3b82f6;
}

.floating-cta-action.contact .icon {
    background: white;
}

.floating-cta-action.contact .icon svg {
    stroke: #0081c9;
}

/* Affichage conditionnel Mobile/Desktop */
.mobile-only {
    display: none;
}

.desktop-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex !important;
    }
    .desktop-only {
        display: none !important;
    }

    .floating-cta {
        bottom: 20px !important;
        right: 20px !important;
    }

    .floating-cta-button {
        width: 54px;
        height: 54px;
    }

    .floating-cta-button svg {
        width: 22px;
        height: 22px;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    .desktop-only {
        display: flex !important;
    }
}

/* Animation d'entrée */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.floating-cta {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.8s both;
}

/* Animation individuelle des boutons */
.floating-cta-button:nth-child(1) {
    animation: fadeIn 0.4s ease 0.9s both;
}

.floating-cta-button:nth-child(2) {
    animation: fadeIn 0.4s ease 1.0s both;
}

.floating-cta-button:nth-child(3) {
    animation: fadeIn 0.4s ease 1.1s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Accessibilité */
.floating-cta-button:focus {
    outline: 3px solid rgba(0, 129, 201, 0.5);
    outline-offset: 3px;
}

/* Ajustement si le cookie banner est visible */
.cookie-banner.active ~ .floating-cta,
body:has(.cookie-banner.active) .floating-cta {
    bottom: 150px !important;
}

@media (max-width: 768px) {
    .cookie-banner.active ~ .floating-cta,
    body:has(.cookie-banner.active) .floating-cta {
        bottom: 180px !important;
    }
}

/* Smooth hover effect */
.floating-cta-button {
    will-change: transform;
}

/* Tooltip au hover (optionnel) */
.floating-cta-button:hover::after {
    content: attr(title);
    position: absolute;
    right: 100%;
    margin-right: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease 0.3s forwards;
}

@keyframes tooltipFadeIn {
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    /* Désactiver le tooltip sur mobile */
    .floating-cta-button:hover::after {
        display: none;
    }
}
