/* Shared layout and navigation */

body {
    background-color: rgb(223, 207, 186);
    background-repeat: no-repeat;
    background-position: center center;
    font-family: "Times New Roman", Times, serif;
    color: #181818;
}

#bloc_page {
    width: 900px;
    margin: auto;
}

header {
    background: url("separateur.png") repeat-x bottom;
}

nav {
    display: inline-block;
    width: 900px;
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    font-size: 18px;
}

nav li {
    display: inline-block;
    margin-top: 10px;
    margin-right: 30px;
}

nav a {
    display: inline-block;
    position: relative;
    padding-bottom: 6px;
    color: rgb(39, 34, 62);
    font-family: "Times New Roman", Times, serif;
    font-size: 1.3em;
}

nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: #760001;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 200ms ease;
}

nav a:hover {
    color: #760001;
}

nav a:hover::after,
nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

/* Shared animated banner */

#banniere_image {
    position: relative;
    overflow: hidden;
    width: auto;
    height: 250px;
    margin-top: -10px;
    margin-right: -8px;
    margin-left: -8px;
    background: url("banniere/photo_crete2.jpg") no-repeat;
    background-size: cover;
    box-shadow: 0 4px 4px #1c1a19;
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: block;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    animation: fondu_banniere 15s linear infinite;
}

.banner-book {
    background-image: url("banniere/photo_crete2.jpg");
}

.banner-board {
    background-image: url("banniere/bolztmann_tableau.jpg");
    animation-delay: 5s;
}

.banner-bordeaux {
    background-image: url("banniere/bordeaux-panorama.png");
    background-position: center 47%;
    animation-delay: 10s;
}

@keyframes fondu_banniere {
    0% { opacity: 0; }
    6.667%, 33.333% { opacity: 1; }
    40%, 100% { opacity: 0; }
}

@media (max-width: 768px) {
    #banniere_image {
        width: auto;
        height: 160px;
        margin-right: -8px;
    }

    #bloc_page,
    nav {
        width: 100%;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 1em 0;
        padding: 0;
    }

    nav li {
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .banner-slide {
        animation: none;
    }

    nav a::after {
        transition: none;
    }
}
