/* full-viewer.css */
body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #FFF7EF;
    overflow: hidden;
    /* Empêche le scroll parasite pendant l'animation */
}

.viewport {
    width: 100vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#book-container {
    width: 90vw;
    height: 80vh;
    max-width: 1200px;
    /* On cache le container pendant que PDF.js injecte les pages */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#book-container.ready {
    visibility: visible;
    opacity: 1;
}

.page-content {
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    /* GARDE LE FORMAT A4 SANS DÉFORMER */
    display: block;
}

/* Boutons de navigation */
.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: rgba(214, 124, 43, 0.9);
    /* Ta couleur orange */
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.btn-prev {
    left: 10px;
}

.btn-next {
    right: 10px;
}

.page-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-family: "sonar-sans", Sans-serif;
}

.viewer-header {
    padding:10px 50px ;
    height: 10vh;
    background-color: #CD7925;
    display: flex;
    align-items: center;
}

.linkheaderviwer {
    display: inline-block;
}

.linkheaderviwer .logoviewer {
    width: 110px;
}

/* CORRECTIF MOBILE */
@media (max-width: 768px) {
    #book-container {
        width: 95vw;
        height: 70vh;
        /* On laisse de la place pour les compteurs */
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .viewer-header{
        padding: 10px 20px ;
    }
}

/*loader*/
/* --- LOADER OVERLAY --- */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFF7EF;
    /* Couleur de fond de votre site */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-content {
    text-align: center;
    width: 80%;
    max-width: 400px;
}

.loader-logo {
    width: 120px;
    margin-bottom: 20px;
}

/* La barre grise de fond */
.progress-container {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* La barre de progression orange */
.progress-bar {
    width: 0%;
    height: 100%;
    background: #CD7925;
    /* Votre couleur orange */
    transition: width 0.3s ease;
}

#loader-text {
    font-family: sans-serif;
    color: #CD7925;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* On masque le loader quand c'est prêt */
.loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}