/* ==========================================================================
   Publicités & Lecteur Vidéo In-Page (Google AdSense & Rewarded Video)
   ========================================================================== */

/* Overlay Principal du Lecteur Vidéo Publicitaire */
.video-ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 30, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2500;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 15px;
    box-sizing: border-box;
}

.video-ad-modal.active {
    display: flex;
    opacity: 1;
}

/* Carte du Player Vidéo */
.video-ad-card {
    width: 100%;
    max-width: 680px;
    background: #161938;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: adCardPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

@keyframes adCardPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* En-tête de la Vidéo Publicitaire */
.video-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #1F234D;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-ad-sponsor {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ad-badge {
    background: #FFB300;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-sponsor-name {
    color: #E2E8F0;
    font-size: 13px;
    font-weight: 600;
}

.video-ad-controls-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ad-countdown-badge {
    background: rgba(255, 255, 255, 0.12);
    color: #F8FAFC;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.ad-countdown-badge.unlocked {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    animation: pulseReward 1s infinite alternate;
}

@keyframes pulseReward {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.ad-skip-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: none;
}

.ad-skip-btn.visible {
    display: block;
}

.ad-skip-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.03);
}

/* Corps de la Vidéo Publicitaire */
.video-ad-body {
    position: relative;
    width: 100%;
    height: 340px;
    background: #0D0F22;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Zone d'affichage Google AdSense / Video Player */
.ad-video-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4338CA 100%);
    user-select: none;
}

.ad-video-placeholder-content {
    text-align: center;
    padding: 20px;
    color: white;
    z-index: 2;
    animation: fadeIn 0.5s ease;
}

.ad-promo-icon {
    font-size: 54px;
    margin-bottom: 12px;
    animation: bounceIcon 2s infinite;
}

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

.ad-promo-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.ad-promo-desc {
    font-size: 14px;
    color: #E0E7FF;
    max-width: 380px;
    margin: 0 auto 16px auto;
    line-height: 1.4;
}

.ad-promo-cta-btn {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    padding: 10px 24px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ad-promo-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

/* Sound control */
.ad-sound-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
}

.ad-sound-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* Barre de progression de la vidéo */
.video-ad-progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.video-ad-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3B82F6 0%, #10B981 100%);
    transition: width 0.1s linear;
}

/* Pied de carte de l'annonce */
.video-ad-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #1F234D;
    color: #94A3B8;
    font-size: 12px;
}

.ad-footer-reward-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #CBD5E1;
    font-weight: 500;
}

.ad-footer-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #818CF8;
}

.ad-footer-logo img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

/* Animation de confirmation de récompense */
.ad-reward-claimed-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 18px 30px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.ad-reward-claimed-banner.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Responsive Mobile */
@media (max-width: 600px) {
    .video-ad-card {
        max-width: 95%;
        border-radius: 16px;
    }
    
    .video-ad-body {
        height: 280px;
    }
    
    .ad-promo-icon {
        font-size: 40px;
        margin-bottom: 8px;
    }
    
    .ad-promo-title {
        font-size: 18px;
    }
    
    .ad-promo-desc {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .ad-countdown-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}