/* Styles strictement limités au lecteur partagé. */
.bd-reader {
    box-sizing: border-box;
    width: min(1200px, calc(100vw - 24px));
    max-width: none;
    height: calc(100dvh - 24px);
    max-height: none;
    padding: 0;
    border: 0;
    background: #f5f5f4;
    color: #212529;
}
.bd-reader[open] { display: flex; flex-direction: column; }
.bd-reader::backdrop { background: rgba(0, 0, 0, .35); }
.bd-reader-header,
.bd-reader-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 12px 16px;
    background: white;
    flex-shrink: 0;
}
.bd-reader-header { justify-content: space-between; }
.bd-reader-header h2 { margin: 0; font-size: 1.1rem; color: #8F1100; }
.bd-reader button {
    min-height: 44px;
    padding: 8px 14px;
    border: 0;
    background: #8F1100;
    color: white;
    font: inherit;
    cursor: pointer;
}
.bd-reader button:disabled { opacity: .4; cursor: default; }
.bd-reader button:focus-visible,
.bd-reader a:focus-visible { outline: 2px solid #8F1100; outline-offset: 3px; }
.bd-reader-download { color: #8F1100; text-decoration: underline; }
.bd-reader-stage { flex: 1; min-height: 0; overflow: auto; padding: 12px; }
.bd-reader-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 100%;
}
.bd-reader-pages canvas,
.bd-reader-pages img {
    display: block;
    max-width: none;
    flex-shrink: 0;
    background: white;
    box-shadow: 0 1px 8px rgba(1, 41, 112, .13);
}
.bd-reader-status { min-height: 32px; line-height: 24px; flex-shrink: 0; margin: 0; padding: 4px 12px; text-align: center; font-size: .9rem; }

.bd-reader-count { min-width: 76px; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 899.98px) {
    .bd-reader { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
    .bd-reader-stage { padding: 12px; }
    .bd-reader-pages { align-items: flex-start; }
    .bd-reader-controls { gap: 8px; padding: 10px; }
    .bd-reader-download { flex-basis: 100%; text-align: center; }
}
