/**
 * Bouton CTA Flottant - Commander Maintenant
 * Design moderne et élégant pour conversion maximale
 */

.float-cta {
    position: fixed;
    bottom: -100px; /* Caché par défaut */
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    /* Animation supprimée pour apparition directe */
}

.float-cta.visible {
    bottom: 20px;
}

.float-cta.hidden {
    bottom: -100px;
}

.float-cta-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        0 4px 20px rgba(16, 185, 129, 0.4),
        0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
    position: relative;
    overflow: visible;
}

/* Animation pulse subtile */
.float-cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.float-cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.float-cta-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 25px rgba(16, 185, 129, 0.5),
        0 10px 40px rgba(0, 0, 0, 0.2);
}

.float-cta-button:active {
    transform: translateY(0);
}

/* Icône */
.float-cta-icon {
    font-size: 22px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* Badge prix */
.float-cta-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f59e0b;
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    animation: pulse-badge 2s infinite;
    z-index: 10;
    white-space: nowrap;
}

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

/* Responsive Mobile */
@media (max-width: 768px) {
    .float-cta {
        bottom: -100px;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        padding: 12px 0 0 0;
    }

    .float-cta.visible {
        bottom: 0;
    }

    .float-cta-button {
        width: 100%;
        justify-content: center;
        padding: 11px 24px;
        font-size: 17px;
        border-radius: 0;
        line-height: 1.2;
        overflow: visible;
    }

    .float-cta-badge {
        top: -8px;
        right: 12px;
        font-size: 13px;
        padding: 4px 10px;
        font-weight: 900;
    }

    .float-cta-icon {
        font-size: 20px;
    }
}

/* Animation d'apparition - désactivée pour apparition directe */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Animation supprimée - le bouton apparaît directement */
/* .float-cta.visible {
    animation: slideUpFade 0.5s ease;
} */

/* RTL Support */
[dir="rtl"] .float-cta-button {
    flex-direction: row-reverse;
}

/* Dark mode support (optionnel) */
@media (prefers-color-scheme: dark) {
    .float-cta-button {
        box-shadow:
            0 4px 20px rgba(16, 185, 129, 0.5),
            0 8px 30px rgba(0, 0, 0, 0.4);
    }
}

/* État désactivé quand proche du formulaire */
.float-cta.near-form {
    opacity: 0;
    pointer-events: none;
}

/* Cacher WhatsApp sur mobile quand CTA est visible */
@media (max-width: 768px) {
    .float-cta.visible ~ .whatsapp-sticky,
    .float-cta.visible ~ * .whatsapp-sticky {
        opacity: 0;
        pointer-events: none;
        transform: translateY(100px);
        transition: all 0.3s ease;
    }

    /* Alternative: cibler directement par classe */
    body:has(.float-cta.visible) .whatsapp-sticky {
        opacity: 0;
        pointer-events: none;
        transform: translateY(100px);
    }
}
