/* Visionneuse flipbook */
.docflip-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vh 1vw;
}
.docflip {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.docflip__close {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: 0;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    padding: 8px 14px;
    z-index: 2;
}
.docflip__stage {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 2.5rem;
    justify-content: center;
}
.docflip__book {
    max-width: 90vw;
    max-height: 100%;
}
.docflip__book img { width: 100%; height: 100%; display: block; }
.docflip__nav {
    background: rgba(255, 255, 255, .15);
    border: 0;
    color: #fff;
    font-size: 30px;
    width: 48px;
    height: 64px;
    border-radius: 6px;
    cursor: pointer;
    flex: 0 0 auto;
}
.docflip__nav:hover { background: rgba(255, 255, 255, .3); }
.docflip__status {
    color: #fff;
    min-height: 1.2em;
    font-size: .9rem;
    text-align: center;
}

/* Loader */
.docflip__loader {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border: 4px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: docflip-spin .8s linear infinite;
    z-index: 3;
}
@keyframes docflip-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.docflip-overlay.is-loading .docflip__loader { display: block; }
.docflip-overlay.is-loading .docflip__nav,
.docflip-overlay.is-loading .docflip__book,
.docflip-overlay.is-loading .docflip__thumbs { visibility: hidden; }

/* Miniatures des pages */
.docflip__thumbs {
    flex: 0 0 auto;
    width: 100%;
    max-width: 96vw;
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .75rem .25rem;
    margin-top: .5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .4) transparent;
}
.docflip__thumb {
    flex: 0 0 auto;
    position: relative;
    width: 54px;
    height: 76px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
    overflow: hidden;
    opacity: .7;
    transition: opacity .15s;
}
.docflip__thumb:hover { opacity: 1; }
.docflip__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.docflip__thumb.is-active { border-color: #fff; opacity: 1; }
.docflip__thumb-num {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    padding: 2px 4px;
}

@media (max-width: 600px) {
    .docflip__nav { width: 36px; height: 52px; font-size: 22px; }
    .docflip__thumb { width: 42px; height: 60px; }
}

/* Page document (single) + boutons (autonome, sans dépendre du CSS du bloc) */
.document-single { display: flex; gap: 2.5rem; flex-wrap: wrap; align-items: flex-start; padding: 2rem 0; }
.document-single__media { flex: 0 0 280px; max-width: 280px; }
.document-single__cover { margin: 0; aspect-ratio: 3 / 4; overflow: hidden; background: #f2f2f2; border-radius: 6px; }
.document-single__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.document-single__body { flex: 1 1 320px; }
.document-single__date { color: #777; margin: .25rem 0 1rem; }
.document-single__desc { margin-bottom: 1.5rem; }
.document-single__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.docv2-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .9rem;
    padding: .55rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1;
}
.docv2-btn-download { background: #2271b1; color: #fff; }
.docv2-btn-download:hover { background: #185a92; color: #fff; }
.docv2-btn-view { background: #fff; color: #2271b1; border-color: #2271b1; }
.docv2-btn-view:hover { background: #2271b1; color: #fff; }

@media (max-width: 600px) {
    .document-single__media { flex-basis: 100%; max-width: 220px; }
}
