/**
 * PDF Viewer Styles
 * Dijon App Manager
 */

/* Iframe PDF */
iframe.dijon-pdf-viewer {
    margin: 0 auto;
    display: block;
    border-style: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media only screen and (max-device-width: 768px) {
    iframe.dijon-pdf-viewer {
        width: 100% !important;
        max-height: 500px;
    }
}

/* Wrapper bloc */
.wp-block-dijon-pdf__content-wrapper {
    width: 100%;
    text-align: center;
}

.wp-block-dijon-pdf__content-wrapper.alignleft {
    text-align: left;
}

.wp-block-dijon-pdf__content-wrapper.alignleft iframe {
    margin: 0;
}

.wp-block-dijon-pdf__content-wrapper.alignright {
    text-align: right;
}

.wp-block-dijon-pdf__content-wrapper.alignright iframe {
    margin: 0;
}

/* Lien de téléchargement */
.dijon-pdf-download {
    text-align: center;
    margin-top: 10px;
}

.dijon-pdf-download a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #c40000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s ease;
}

.dijon-pdf-download a:hover {
    background: #a00000;
    color: white;
}

.dijon-pdf-download a::before {
    content: "⬇";
}

/* Éditeur Gutenberg */
.editor-styles-wrapper .wp-block-dijon-pdf {
    max-width: 100%;
}

.editor-styles-wrapper .dijon-pdf-viewer {
    pointer-events: none;
}
