.flipbook-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    min-height: 100vh;
}

/* Barre d'outils supérieure */
.flipbook-toolbar {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.flipbook-toolbar-left {
    display: flex;
    align-items: center;
}

.flipbook-toolbar-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.flipbook-back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-weight: 400;
}

.flipbook-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.flipbook-back-btn svg {
    width: 18px;
    height: 18px;
}

.flipbook-toolbar-btn {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-weight: 400;
}

.flipbook-toolbar-btn:hover, .flipbook-toolbar-btn:focus  {
    background: rgba(255, 255, 255, 0.1);
}

.flipbook-toolbar-btn svg {
    width: 18px;
    height: 18px;
}

.flipbook-loading {
    text-align: center;
    padding: 100px 20px;
    background: #000;
}

.flipbook-loading .spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.flipbook-loading p {
    color: #fff;
    font-size: 16px;
}

.flipbook-container {
    position: relative;
    background: #000;
    padding: 40px 20px 120px;
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flipbook-instance {
    margin: 0 auto;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.8);
    position: relative;
}

.flipbook-instance .page {
    background: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.flipbook-instance .page img {
    width: 100%;
    height: 100%;
    display: block;
}

/* FLÈCHES LATÉRALES - Collées au bord du flipbook */
.flipbook-side-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 50px;
    height: 120px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    color: #fff;
    padding:0!important;
}

.flipbook-side-arrow:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.flipbook-side-arrow:hover, .flipbook-side-arrow:focus {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}


.flipbook-side-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.flipbook-side-arrow svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

/* Flèches collées au flipbook */
.flipbook-side-arrow.left {
    left: -60px;
}

.flipbook-side-arrow.right {
    right: -60px;
}

/* Barre de navigation inférieure */
.flipbook-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.flipbook-nav-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: center;
}

.flipbook-nav-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding:0!important;
}

.flipbook-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.flipbook-nav-btn:hover, .flipbook-nav-btn:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}
.flipbook-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.flipbook-nav-btn svg {
    width: 20px;
    height: 20px;
}

.flipbook-page-indicator {
    font-size: 15px;
    color: #fff;
    min-width: 120px;
    text-align: center;
    user-select: none;
    font-weight: 400;
}

.flipbook-page-indicator .current {
    color: #fff;
    font-weight: 600;
}

.flipbook-fullscreen-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    position: absolute;
    right: 20px;
}

.flipbook-fullscreen-btn:hover, .flipbook-fullscreen-btn:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.flipbook-fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

/* Mode plein écran (déjà par défaut maintenant) */
.flipbook-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #000;
}

.flipbook-wrapper.fullscreen .flipbook-container {
    background: #000;
    min-height: calc(100vh - 120px);
}

/* Responsive */
@media (max-width: 768px) {
    .flipbook-toolbar {
        padding: 10px 15px;
        gap: 10px;
    }

    .flipbook-toolbar-btn span {
        display: none;
    }

    .flipbook-toolbar-btn {
        padding: 8px 10px;
    }

    .flipbook-container {
        padding: 20px 10px 100px;
    }

    .flipbook-bottom-nav {
        padding: 12px 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .flipbook-nav-group {
        gap: 10px;
        order: 1;
        width: 100%;
    }

    .flipbook-nav-btn {
        width: 36px;
        height: 36px;
    }

    .flipbook-page-indicator {
        font-size: 13px;
        min-width: 100px;
    }

    .flipbook-fullscreen-btn {
        position: relative;
        right: auto;
        order: 2;
        margin-top: 10px;
        padding: 8px 12px;
    }

    .flipbook-fullscreen-btn span {
        display: none;
    }

    /* Flèches latérales plus petites sur mobile */
    .flipbook-side-arrow {
        width: 40px;
        height: 90px;
    }

    .flipbook-side-arrow.left {
        left: -45px;
    }

    .flipbook-side-arrow.right {
        right: -45px;
    }

    .flipbook-side-arrow svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .flipbook-toolbar-buttons {
        gap: 8px;
    }

    .flipbook-side-arrow {
        width: 35px;
        height: 80px;
    }

    .flipbook-side-arrow.left {
        left: -40px;
    }

    .flipbook-side-arrow.right {
        right: -40px;
    }
}