
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    background: #f4f4f4;
    font-family: Arial, sans-serif;
    color: #333;
}

.livre-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

#livre {
    margin: 0 auto;
    width: 100%;
    max-width: 700px;
    height: 750px;
}

.page {
	position: relative;
	background: white;
	padding: 35px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border: thin solid #000;
}

.page img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Couverture */

.page.couverture {
	padding: 35px;
	background: white;
	border: thin solid #000;
}

.couverture img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.titre-couverture {
    position: absolute;
    bottom: 35px;
    left: 20px;
    right: 20px;
    padding: 15px 8px;
    background: rgba(255,255,255,0.88);
}

.titre-couverture h1 {
    font-size: 22px;
    font-weight: normal;
    margin: 0;
    color: #222;
}
.page {
    position: relative;
    padding: 35px 35px 65px;
}


.page {
    position: relative;
    background: white;
    padding: 30px 35px 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.page {
    position: relative;
    background: white;
    padding: 30px 35px 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page img {
    display: block;
    max-width: 100%;
    max-height: calc(100% - 35px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.legende-photo {
    width: 100%;
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
}


.derniere-page {
    flex-direction: column;
    color: #555;
    font-size: 16px;
    text-align: center;
}

/* Navigation */

.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 25px auto;
}

.navigation button {
    padding: 10px 18px;
    border: 1px solid #aaa;
    background: white;
    cursor: pointer;
    font-size: 14px;
}

.navigation button:hover {
    background: #e5e5e5;
}

#numeroPage {
    font-size: 14px;
}

@media (max-width: 600px) {

    body {
        padding: 10px;
    }

    #livre {
        height: 65vh;
        min-height: 350px;
    }

    .page {
        padding: 15px;
    }

    .navigation {
        gap: 10px;
    }

    .navigation button {
        padding: 9px 10px;
        font-size: 12px;
    }

    .titre-couverture h1 {
        font-size: 17px;
    }
}
