/* Style commun des pages de cours historiques. */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    padding: 0 1rem 1rem;
    color: black;
    font-family: Helvetica, "Trebuchet MS", Arial, sans-serif;
    font-size: 1rem;
}

#bloc_page {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

section {
    overflow: hidden;
    margin: auto;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 4px grey;
}

section > h1 {
    margin: 15px auto 10px;
    padding: 0 20px;
    color: grey;
    font-size: clamp(1.45rem, 3.5vw, 2rem);
    text-align: center;
}

.img-illustration {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    padding: 0 20px 1.5rem;
}

.img-illustration img {
    width: auto;
    max-width: 100%;
    height: auto;
}

.img-illustration--wide img {
    width: 85%;
}

article {
    margin: auto;
    padding: 1.5rem 20px;
    text-align: justify;
}

article + article {
    position: relative;
}

article + article::before {
    position: absolute;
    top: 0;
    right: clamp(1.5rem, 8%, 4rem);
    left: clamp(1.5rem, 8%, 4rem);
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgb(128 128 128 / 45%) 12%,
        rgb(128 128 128 / 45%) 88%,
        transparent
    );
    content: "";
    filter: drop-shadow(0 2px 1px rgb(0 0 0 / 24%));
}

article h2 {
    margin: 0 0 0.35rem;
    color: #666666;
    font-size: 1rem;
}

article h2:not(:first-child) {
    margin-top: 1.5rem;
}

article h3 {
    margin: 1rem 0 0.35rem;
    color: #666666;
    font-size: 0.95rem;
}

article p {
    margin: 2px auto 4px;
}

article ul,
article ol {
    margin: 4px auto 2px;
}

article img {
    max-width: 100%;
    height: auto;
}

a {
    color: #7A3B32;
    overflow-wrap: anywhere;
    text-decoration: none;
}

a:hover {
    color: #7A3B32;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

a:focus-visible {
    border-radius: 0.15rem;
    outline: 0.2rem solid #e09f24;
    outline-offset: 0.15rem;
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }

    section {
        border-radius: 0;
        box-shadow: none;
    }

    section > h1 {
        padding: 0 1rem;
        text-align: left;
    }

    .img-illustration {
        padding: 0 1rem 1rem;
    }

    .img-illustration--wide img {
        width: 100%;
    }

    article {
        padding: 1rem;
        text-align: left;
    }
}

@media print {
    body {
        padding: 0;
    }

    section {
        border: 0;
        box-shadow: none;
    }
}
