#messe {
    position: relative;
    height: calc(100vh - var(--header-height));
    scroll-margin-top: var(--header-height);
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    background-color: #3c4d54;
    color: #fffaf5;
}

#messe .content {
    position: relative;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 100px;
}

#messe .content p {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
}

.odd {
    background: linear-gradient(
            90deg,
            #ffffff 0%,
            #fdfdfd 80%,
            #f0f0f0 94%,
            #dcdcdc 98%,
            #cccccc 100%
    );
}

.even {
    background: linear-gradient(
            270deg,
            #ffffff 0%,
            #fdfdfd 80%,
            #f0f0f0 94%,
            #dcdcdc 98%,
            #cccccc 100%
    );
}

#flipbook {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 4 / 3;
    height: auto;
}

#flipbook .page {
    background-color: white;
    color: black;
}

#flipbook .page audio {
    width: 100%;
    margin-top: 10px;
}

.page-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.page-content p {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
}

.page-content.vertical-center {
    justify-content: center;
}

.page-content.text-center {
    text-align: center;
}

.page-content h2 {
    font-weight: bold;
    font-family: 'Playfair Display', serif;
}

.page-content h3, .page-content h4, .page-content h5 {
    font-weight: bold;
    margin: 0;
    font-family: 'Playfair Display', serif;
}

.page-content .citation {
    font-size: 10px;
}

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

#mass-arrow {
    position: absolute;
    bottom: 0;
    right: 0;
}

#mass-arrow video {
    transform: rotate(180deg);
}

#mass-arrow p {
    font-size: 12px;
}

/* Le contenu prend tout l’espace disponible dans la page */
.page-content {
    box-sizing: border-box;
}

.instruction {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #222;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Ajustements pour mobile */
@media (max-width: 768px) {
    #messe {
        height: calc(100vh - var(--header-height));
        padding: 0;
    }

    #messe .content {
        display: flex;
        padding: 0 20px;
    }

    #flipbook {
        flex-grow: 1;
        max-width: 100%;
        margin-bottom: 10px;
    }

    .page-content {
        overflow-y: auto;
    }

    /* Police plus lisible sur petit écran */
    .page-content p {
        font-size: 10px;
        line-height: 1.4;
    }

    .page-content h2 {
        font-size: 18px;
    }

    .page-content h3 {
        font-size: 14px;
    }

    .page-content h4 {
        font-size: 12px;
    }

    /* Évite que les images soient déformées */
    .cover img {
        object-fit: contain;
    }
}

/* Ultra petit écran (type smartphone vertical) */
@media (max-width: 480px) {

    .page-content {
        overflow-y: auto;
    }

    .page-content p {
        font-size: 9px;
    }

    .page-content h2 {
        font-size: 16px;
    }

    .page-content h3 {
        font-size: 12px;
    }

    .odd {
        background: white;
    }

    .even {
        background: white;
    }
}