/**
 * Theme Preview - Styles pour la modal sécurisée
 */

/* Modal overlay */
.theme-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.theme-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

/* Overlay de protection transparent (anti-screenshot) */
.theme-preview-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10001;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.01) 10px,
            rgba(255, 255, 255, 0.01) 20px);
}

/* Contenu de la modal */
.theme-preview-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10002;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.theme-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #E5E7EB;
}

.theme-preview-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1F2937;
}

.theme-preview-close {
    background: #F3F4F6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.25rem;
    color: #6B7280;
}

.theme-preview-close:hover {
    background: #EF4444;
    color: white;
    transform: rotate(90deg);
}

/* Body */
.theme-preview-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.theme-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #6B7280;
}

.theme-preview-loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #4F46E5;
}

/* Watermark */
.theme-preview-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 4rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

/* Images */
.theme-preview-images {
    position: relative;
    z-index: 2;
}

.theme-preview-images img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Footer */
.theme-preview-footer {
    padding: 1rem 2rem;
    border-top: 2px solid #E5E7EB;
    background: #F9FAFB;
    border-radius: 0 0 20px 20px;
}

.theme-preview-footer p {
    margin: 0;
    font-size: 0.9rem;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-preview-footer i {
    color: #4F46E5;
}

/* Responsive */
@media (max-width: 768px) {
    .theme-preview-content {
        width: 95%;
        max-height: 95vh;
    }

    .theme-preview-header {
        padding: 1rem 1.5rem;
    }

    .theme-preview-header h2 {
        font-size: 1.25rem;
    }

    .theme-preview-body {
        padding: 1rem;
    }

    .theme-preview-watermark {
        font-size: 2rem;
    }
}

/* Protection contre l'impression */
@media print {
    .theme-preview-modal {
        display: none !important;
    }
}

/* Boutons de navigation de preview */
.preview-nav-btn {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.preview-nav-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
}