/* ====================================
   Géo-Restrictions - XTeaseCams
   Styles pour le bandeau et le floutage
   ==================================== */

/* ============================================
   BANDEAU DE RESTRICTION (Top Banner)
   ============================================ */

#user-restricted-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000; /* Au-dessus de tout */
    background: linear-gradient(135deg, #1A1A1A 0%, #0F0F0F 100%);
    border-bottom: 2px solid #E91E63;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.restriction-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.restriction-icon {
    font-size: 28px;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.restriction-text {
    font-size: 15px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 1.5;
}

.geo-restriction-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: linear-gradient(135deg, #E91E63 0%, #F06292 100%);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
    flex-shrink: 0;
}

.geo-restriction-cta:hover {
    background: linear-gradient(135deg, #F06292 0%, #E91E63 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.6);
    color: #FFFFFF;
}

/* Ajuster le padding du body pour compenser le bandeau */
body.restricted {
    padding-top: 70px; /* Hauteur approximative du bandeau */
}

/* Ajuster le header pour compenser le bandeau */
body.restricted .header {
    top: 70px;
}

/* Responsive */
@media (max-width: 768px) {
    #user-restricted-message {
        flex-direction: column;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .restriction-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .restriction-text {
        font-size: 14px;
    }
    
    .geo-restriction-cta {
        width: 100%;
        padding: 14px 24px;
        font-size: 16px;
    }
    
    body.restricted {
        padding-top: 140px; /* Plus d'espace sur mobile */
    }
    
    body.restricted .header {
        top: 140px;
    }
}

/* ============================================
   FLOUTAGE DU CONTENU (Blur Effect)
   ============================================ */

/* Floutage des images de modèles dans la grille */
body.restricted .models-grid .model-card .model-thumbnail {
    filter: blur(20px) !important;
    transition: filter 0.3s ease;
}

/* Floutage des images de modèles dans la grille (wrapper) */
body.restricted .models-grid .model-card .model-thumbnail-wrapper img {
    filter: blur(20px) !important;
}

/* Floutage des modèles reliés */
body.restricted .related-models-grid .related-model-card .related-model-thumbnail {
    filter: blur(20px) !important;
}

body.restricted .related-models-grid .related-model-card img {
    filter: blur(20px) !important;
}

/* Floutage intense du streaming (page modèle) */
body.restricted .stream-container iframe,
body.restricted .stream-container video,
body.restricted .stream-player,
body.restricted .stream-iframe,
body.restricted .stream-video {
    filter: blur(40px) !important;
    pointer-events: none !important;
}

/* Overlay sur le stream pour bloquer l'interaction */
body.restricted .stream-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 50;
    pointer-events: none;
}

/* Message sur le stream flouté */
body.restricted .stream-container::before {
    content: '🔒 Age verification required';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: rgba(26, 26, 26, 0.95);
    color: #FFFFFF;
    padding: 24px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border: 2px solid #E91E63;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/* Responsive blur message */
@media (max-width: 768px) {
    body.restricted .stream-container::before {
        font-size: 16px;
        padding: 20px 32px;
    }
}

/* ============================================
   COMPATIBILITÉ AVEC LES AUTRES ÉLÉMENTS
   ============================================ */

/* S'assurer que le bandeau est au-dessus de tout */
#user-restricted-message {
    position: fixed !important;
    z-index: 2000 !important;
}

/* Ajuster le layout pour le bandeau */
body.restricted #app {
    padding-top: 0; /* Le padding est déjà sur le body */
}

/* ============================================
   ANIMATIONS ET TRANSITIONS
   ============================================ */

/* Transition douce pour le floutage */
body.restricted .model-thumbnail,
body.restricted .related-model-thumbnail,
body.restricted .stream-container iframe,
body.restricted .stream-container video {
    transition: filter 0.5s ease-in-out;
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */

/* Focus visible pour le CTA */
.geo-restriction-cta:focus-visible {
    outline: 3px solid #F06292;
    outline-offset: 3px;
}

/* Réduire les animations si l'utilisateur préfère */
@media (prefers-reduced-motion: reduce) {
    #user-restricted-message {
        animation: none;
    }
    
    .restriction-icon {
        animation: none;
    }
    
    body.restricted .model-thumbnail,
    body.restricted .related-model-thumbnail,
    body.restricted .stream-container iframe,
    body.restricted .stream-container video {
        transition: none;
    }
}
