/* 
 * Styles pour les emplacements publicitaires
 * Meet Party - Advertising Styles
 */

/* ========================================
   EMPLACEMENTS PUBLICITAIRES
======================================== */

.ad-container {
    margin: 2rem 0;
    text-align: center;
    position: relative;
}

.ad-slot {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ad-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(53, 51, 205, 0.05) 50%, transparent 100%);
    pointer-events: none;
}

/* Types d'emplacements */
.ad-slot.banner {
    min-height: 90px;
    max-height: 250px;
}

.ad-slot.rectangle {
    min-height: 250px;
    max-width: 300px;
    margin: 1rem auto;
}

.ad-slot.mobile-banner {
    min-height: 50px;
    display: none;
}

.ad-slot.leaderboard {
    min-height: 90px;
    max-height: 120px;
}

.ad-slot.sidebar {
    min-height: 600px;
    max-width: 300px;
}

/* ========================================
   MESSAGE DE CONSENTEMENT
======================================== */

.ad-consent-message {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(53, 51, 205, 0.1), rgba(53, 51, 205, 0.05));
    border-radius: 8px;
    backdrop-filter: blur(5px);
    min-height: 120px;
}

.ad-consent-content {
    text-align: center;
    color: var(--color2);
    padding: 1rem;
    max-width: 280px;
}

.ad-consent-content i {
    font-size: 2rem;
    color: var(--color3);
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.ad-consent-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--color2);
}

.ad-consent-content p {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.4;
}

.ad-consent-content button {
    font-size: 0.8rem !important;
    padding: 0.5rem 1rem !important;
    border-color: var(--color3) !important;
    color: var(--color3) !important;
}

.ad-consent-content button:hover {
    background: var(--color3) !important;
    color: white !important;
}

/* ========================================
   ÉTIQUETTES PUBLICITAIRES
======================================== */

.ad-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 1;
    font-weight: 500;
}

.ad-container::after {
    content: 'Publicité';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .ad-slot.banner {
        min-height: 50px;
        max-height: 120px;
    }

    .ad-slot.mobile-banner {
        display: flex;
    }

    .ad-slot.rectangle,
    .ad-slot.leaderboard {
        max-width: 100%;
        margin: 1rem 0;
    }

    .ad-slot.sidebar {
        min-height: 250px;
        max-width: 100%;
    }

    .ad-consent-content {
        padding: 0.8rem;
    }

    .ad-consent-content i {
        font-size: 1.5rem;
    }

    .ad-consent-content h4 {
        font-size: 0.9rem;
    }

    .ad-consent-content p {
        font-size: 0.8rem;
    }
}

/* ========================================
   INTÉGRATION ADSBYGOOGLE
======================================== */

.adsbygoogle {
    background: transparent !important;
}

/* Éviter le décalage de mise en page */
.ad-slot .adsbygoogle {
    min-height: inherit;
}

/* ========================================
   ANIMATIONS
======================================== */

.ad-slot {
    animation: adFadeIn 0.5s ease-out;
}

@keyframes adFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ad-consent-message {
    animation: adPulse 2s ease-in-out infinite;
}

@keyframes adPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ========================================
   ÉTATS DE CHARGEMENT
======================================== */

.ad-slot.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--color3);
    border-radius: 50%;
    animation: adSpinner 1s linear infinite;
}

@keyframes adSpinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   PUBLICITÉ FIXE EN BAS D'ÉCRAN
======================================== */

.bottom-ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--color4) 0%, #1a1a2e 100%);
    border-top: 2px solid var(--color3);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
}

.bottom-ad-banner.show {
    transform: translateY(0);
}

.bottom-ad-banner.hide {
    transform: translateY(100%);
}

.bottom-ad-content {
    position: relative;
    padding: 0.8rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.ad-close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.ad-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff6b6b;
    transform: scale(1.1);
}

.ad-slot.bottom-fixed {
    width: 100%;
    max-width: 728px;
    min-height: 50px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

/* Ajustement du body pour éviter que la pub cache le contenu */
body.has-bottom-ad {
    padding-bottom: 80px;
}

/* ========================================
   EMPLACEMENTS SPÉCIAUX (AUTRES)
======================================== */

/* Pub en haut de page */
.ad-header {
    background: var(--color4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
    text-align: center;
}

/* Pub dans le contenu */
.ad-content {
    margin: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.01);
}

/* Pub en fin d'article */
.ad-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(53, 51, 205, 0.2);
}

/* ========================================
   RESPONSIVE POUR PUB FIXE
======================================== */

@media (max-width: 768px) {
    .bottom-ad-content {
        padding: 0.5rem 0.8rem;
        min-height: 50px;
    }
    
    .ad-slot.bottom-fixed {
        max-width: 320px;
        min-height: 50px;
    }
    
    body.has-bottom-ad {
        padding-bottom: 70px;
    }
    
    .ad-close-btn {
        top: 3px;
        right: 8px;
        font-size: 0.9rem;
    }
}