/* ==============================================
   AFCON Modal CSS - assets/css/afcon-modal.css
   ============================================== */

/* AFCON Floating Button */
#afcon-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9998;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: pulseGlow 2s ease-in-out infinite, floatButton 3s ease-in-out infinite;
}

#afcon-float:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
    animation: none;
}

#afcon-float img {
    display: block;
    height: 100px;  /* Taille augmentée à 100px */
    width: auto;
}

/* Animation de pulsation avec lueur */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.2), 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4), 0 0 20px 10px rgba(255, 215, 0, 0);
    }
}

/* Animation de flottement */
@keyframes floatButton {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation de rotation subtile */
@keyframes rotateSubtle {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

/* Effet de brillance qui passe sur le bouton */
#afcon-float::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%,
        transparent
    );
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow: hidden;
}

.modal-overlay.active {
    display: flex;
}

/* Modal Content */
.modal-content {
    position: relative;
    width: auto;
    max-width: 95%;
    max-height: 90vh;
    margin: auto;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    animation: modalFadeIn 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: contain;
}

/* Close Button */
.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10001;
}

.modal-close:hover {
    background: #ff4444;
    color: white;
    transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    #afcon-float {
        right: 16px;
        bottom: 90px;
    }
    
    #afcon-float img {
        height: 60px;  /* Taille mobile augmentée à 60px */
    }

    .modal-overlay {
        padding: 20px 10px;
    }

    .modal-content {
        max-width: 100%;
        max-height: 85vh;
    }
    
    .modal-content img {
        max-height: 85vh;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}