/* =============================================================================
   Ta'iara Flipbook - styles
   Scopé à .flipbook-wrapper pour ne JAMAIS toucher au body/html de WordPress
   ============================================================================= */

.flipbook-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 70vh;
    padding: 24px 0;
    box-sizing: border-box;
    background: transparent;
    position: relative;
    isolation: isolate;
}

.flipbook-wrapper #flipbook-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.flipbook-wrapper #flipbook {
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.flipbook-wrapper #flipbook.is-dragging {
    cursor: grabbing;
}

.flipbook-wrapper #flipbook-controls button,
.flipbook-wrapper #flipbook-controls a {
    background-color: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 18px;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    padding: 0;
    line-height: 1;
}

.flipbook-wrapper #flipbook-controls button:hover,
.flipbook-wrapper #flipbook-controls a:hover {
    background-color: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.7);
}

.flipbook-wrapper #flipbook {
    width: auto;
    height: auto;
    max-width: 90vw;
    box-shadow: 0 0 24px rgba(0,0,0,0.8);
    background: #000;
}

.flipbook-wrapper #flipbook > div {
    background: #000;
    overflow: hidden;
}

.flipbook-wrapper:fullscreen,
.flipbook-wrapper:-webkit-full-screen {
    background: #000 !important;
    padding: 30px !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.flipbook-wrapper:fullscreen #flipbook-controls,
.flipbook-wrapper:-webkit-full-screen #flipbook-controls {
    position: absolute;
    top: 20px;
    z-index: 100;
}

.flipbook-wrapper #flipbook img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

@media (max-width: 768px) {
    .flipbook-wrapper {
        min-height: 50vh;
        padding: 12px 0;
    }
    .flipbook-wrapper #flipbook-controls button,
    .flipbook-wrapper #flipbook-controls a {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}
