/* PDF Viewer Styles for ColorMag Child Theme */

/* Container principal */
.colormag-pdf-viewer-wrapper {
    margin: 20px 0;
}

/* Visionneuse sécurisée */
.colormag-secure-pdf-viewer {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e1e1e1;
}

.pdf-viewer-header {
    background: linear-gradient(135deg, #2c3e50, #4a6572);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #34495e;
}

.pdf-viewer-header .button {
    transition: all 0.3s ease;
}

.pdf-viewer-header .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Prévisualisation PDF */
.pdf-preview-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #e74c3c;
}

.pdf-viewer-wrapper {
    background: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Bibliothèque PDF */
.colormag-pdf-library {
    max-width: 1200px;
    margin: 0 auto;
}

.pdfs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.pdf-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
    position: relative;
    overflow: hidden;
}

.pdf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.pdf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

/* Messages d'état */
.colormag-pdf-error,
.colormag-pdf-login-required,
.colormag-pdf-access-denied,
.colormag-pdf-not-found {
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.colormag-pdf-error {
    background: #e74c3c;
    color: white;
    border: 1px solid #c0392b;
}

.colormag-pdf-login-required {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.colormag-pdf-access-denied {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.colormag-pdf-not-found {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Badge produit PDF */
.pdf-product-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Commandes */
.order-pdf-downloads {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
    border: 1px solid #dee2e6;
}

.order-pdf-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    margin: 12px 0;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
    transition: all 0.3s ease;
}

.order-pdf-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 768px) {
    .pdfs-grid {
        grid-template-columns: 1fr;
    }
    
    .colormag-secure-pdf-viewer iframe {
        height: 500px !important;
    }
    
    .order-pdf-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pdf-viewer-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Animations */
@keyframes pdfFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.colormag-secure-pdf-viewer,
.pdf-card,
.order-pdf-downloads {
    animation: pdfFadeIn 0.5s ease-out;
}