/* ── PDF Embedder Pro v1.3.0 ─────────────────────────────────────────────── */

.pep-wrapper {
    display: flex;
    flex-direction: column;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 1.5em 0;
    background: #fff;
}

/* ── Toolbar ───────────────────────────────────────────────────────────────── */
.pep-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: #1e293b;
    color: #f1f5f9;
    flex-wrap: wrap;
}
.pep-title {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e2e8f0;
}
.pep-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-left: auto;
}
.pep-page-info { color: #94a3b8; min-width: 60px; text-align: center; }
.pep-current   { font-weight: 600; color: #fff; }

/* ── Boutons ───────────────────────────────────────────────────────────────── */
.pep-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity .15s, transform .1s;
    text-decoration: none !important;
    line-height: 1;
    background: none;
    color: inherit;
}
.pep-btn:hover:not(:disabled)  { opacity: .85; transform: translateY(-1px); }
.pep-btn:active:not(:disabled) { transform: translateY(0); }
.pep-btn:disabled              { opacity: .35; cursor: default; }

.pep-prev, .pep-next { background: #334155; color: #f1f5f9; border-color: #475569; padding: 5px 9px; }
.pep-prev:hover:not(:disabled), .pep-next:hover:not(:disabled) { background: #475569; }

.pep-actions { display: flex; gap: 7px; }

.pep-print    { background: #3b5bdb; color: #fff; border-color: #3451c7; }
.pep-print:hover:not(:disabled) { background: #3451c7; }

.pep-download { background: #0f9e6e; color: #fff !important; border-color: #0d8c62; }
.pep-download:hover { background: #0d8c62; }

/* ── Canvas zone ───────────────────────────────────────────────────────────── */
.pep-canvas-wrapper {
    position: relative;
    overflow: auto;
    background: #525659;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    min-height: 80px;
    transition: height .2s ease;
}
.pep-canvas-wrapper[data-autoheight="1"] { overflow: visible; }

.pep-canvas {
    display: block;
    box-shadow: 0 2px 16px rgba(0,0,0,.35);
    max-width: 100%;
    background: #fff;
}

/* ── Loading / Erreur ──────────────────────────────────────────────────────── */
.pep-loading, .pep-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #cbd5e1;
}
.pep-loading::before {
    content: '';
    display: inline-block;
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,.2);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: pep-spin .7s linear infinite;
    margin-right: 8px;
}
.pep-error { color: #fca5a5; }
@keyframes pep-spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .pep-btn span { display: none; }
    .pep-toolbar  { gap: 6px; }
}
