/* ---------------------------------------------------------
   FOND GLOBAL (boiserie + grain papier)
--------------------------------------------------------- */
body {
    background: none;
    position: relative;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("../images/bois_clair.webp");
    background-size: cover;
    background-position: center;
    filter: brightness(0.65) contrast(1.15);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: url("../images/papier_ivoire.jpg");
    background-size: cover;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* ---------------------------------------------------------
   LAYOUT GLOBAL
--------------------------------------------------------- */
#layout {
    display: flex;
    height: 100vh;   
}

#contenu {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: auto;
    padding: 20px;
    background: rgba(245, 245, 220, 0.5);
}

/* ---------------------------------------------------------
   MENU VERTICAL
--------------------------------------------------------- */
#nav-continents {
    width: 220px;
    background: #f4ecdd;
    border-right: 3px solid #b89b6d;
    padding: 20px;
    overflow-y: auto;
    box-shadow: inset -3px 0 6px rgba(0, 0, 0, 0.25);
}

.nav-item {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 2px solid #b89b6d;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 17px;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.25);
}

.nav-item:hover {
    filter: brightness(1.08);
    transform: translateX(4px);
}

.nav-item.active {
    filter: brightness(1.15);
}

/* Couleurs par continent */
.nav-item[data-continent="EUROPE"] { background: #8ab4d9; border-color: #5f8fb8; }
.nav-item[data-continent="AFRIQUE"] { background: #d9b38a; border-color: #b88f63; }
.nav-item[data-continent="AMERIQUES"] { background: #d98a8a; border-color: #b86a6a; }
.nav-item[data-continent="ASIE"] { background: #d9cf8a; border-color: #b8a963; }
.nav-item[data-continent="OCEANIE"] { background: #8ad9b1; border-color: #63b88f; }

/* ---------------------------------------------------------
   SOUS-MENUS
--------------------------------------------------------- */
.nav-sous-menu {
    margin-left: 25px;
    margin-bottom: 10px;
    padding: 10px;
    border-left: 3px solid #b89b6d;
    border-radius: 4px;
    background: rgba(255, 247, 230, 0.6);
    display: none;
    flex-direction: column;
    gap: 6px;
}

.nav-sous-menu.active {
    display: flex;
}

.nav-item-pays,
.nav-item-categorie {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.15s ease, transform 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #b89b6d;
    background: #fff7e6;
}

.nav-item-pays:hover,
.nav-item-categorie:hover {
    background: #f0e2c8;
    transform: translateX(3px);
}

/* ---------------------------------------------------------
   CADRE VINTAGE POUR L'ALBUM
--------------------------------------------------------- */
.album-container {
    width: 90%;
    max-width: 900px;
    height: 85vh;
    border: 12px solid #d2b48c;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
    background: rgba(245, 245, 220, 0.9);
    margin: 20px auto;
    overflow: hidden;
    display: none;
}

.album-container::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px dashed rgba(139, 69, 19, 0.5);
    pointer-events: none;
}

.album-container::after {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 12px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 9px,
        #8B4513 9px,
        #8B4513 11px
    );
}

/* ---------------------------------------------------------
   DOUBLE PAGE ALBUM
--------------------------------------------------------- */
.album-spread {
    display: flex;
    width: 100%;
    height: 100%;
}

.album-page {
    flex: 1;
    background: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

/* ---------------------------------------------------------
   CONTAINER DU LIVRE PDF
--------------------------------------------------------- */
#book-container {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 1100px;
    margin: 20px auto;
    padding: 10px;
    background: #fdfdf5;
    border: 5px solid #5a3b1e;
    box-shadow: 0 0 15px rgba(0,0,0,0.25);
    border-radius: 6px;
}
#book-container.single-mode {
    justify-content: center;
    max-width: 550px;
    box-shadow: 0 0 50px rgba(0,0,0,0.35);
}

#book-container.single-mode .page {
    width: 100% !important;
    flex: 0 0 100% !important;
}
#book-container::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);    
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        #d2b48c,
        #d2b48c 4px,
        transparent 4px,
        transparent 8px
    );
    z-index: 6;
}
#book-container.single-mode::before,
#book-container.single-mode::after {
    display: none;
}


/* ---------------------------------------------------------
   PAGE STANDARD (pages intérieures)
--------------------------------------------------------- */
.page {
    width: 48%;
    background: #fffef8;
    border: 1px solid #d2b48c;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 0;
}


/* Canvas PDF : occupe correctement la page */
.page canvas {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
}


/* ---------------------------------------------------------
   COUVERTURE (page 1 ou dernière page)
--------------------------------------------------------- */
.page.single {
    width: 100% !important;      
    margin: 0 auto !important;
    flex: 0 0 100%;
}

/* ---------------------------------------------------------
   PAGE MASQUÉE (celle qu’on ne doit pas afficher)
--------------------------------------------------------- */
.page.hidden {
    display: none !important;
}


/* ---------------------------------------------------------
   BOUTONS DE NAVIGATION
--------------------------------------------------------- */
#book-controls {
    text-align: center;
    margin-top: 15px;
}

#book-controls button {
    background: #8B4513;
    color: white;
    border: 2px solid #A0522D;
    padding: 8px 18px;
    margin: 0 10px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
}

#book-controls button:hover {
    background: #A0522D;
}
/* ---------------------------------------------------------
   RELIURE CUIR (centre du livre)
--------------------------------------------------------- */
#book-container::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    
    width: 40px;

    background: linear-gradient(
        to right,
        #3b2414,
        #6b3e1f,
        #8b5a2b,
        #6b3e1f,
        #3b2414
    );

    box-shadow:
        inset 0 0 10px rgba(0,0,0,0.6),
        0 0 8px rgba(0,0,0,0.4);

    border-left: 2px solid #2a1a0f;
    border-right: 2px solid #2a1a0f;

    z-index: 5;
}

/* ===== TIROIR HORIZONTAL ===== */

.tiroir_horizontal {
    position: relative;
    top: 0;   
    left: 0;
    width: 100%;
    background: #3e2f1c;
    z-index: 1000;
}

/* bouton menu */
.tiroir_header_horizontal {
    width: 100%;
    padding: 15px;
    text-align: center;
    background: #5a4328;
    color: white;
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

/* contenu */
.tiroir_content_horizontal {
    display: flex;
    justify-content: center;  
    align-items: center;
    gap: 30px;  
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: red;
}

/* liens */
.tiroir_content_horizontal a {
    display:inline-block;
    padding: 15px;
    color: #f5e9d4;
    text-decoration: none;
}

/* hover */
.tiroir_content_horizontal a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ouvert */
.tiroir_horizontal.open .tiroir_content_horizontal {
    max-height: 100px;
}
.phrase-albums {
    text-align: center;
    font-size: 18px;
    color: #5a3b1e;  
    margin: 25px auto 30px auto; 
    font-style: italic;
    background: rgba(255, 248, 235, 0.7);
    padding: 8px 15px;
    border: 1px solid rgba(90,59,30,0.2);
    border-radius: 6px;
    display: block;
    width: fit-content;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}