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

/* =====================
   VARIABLES
   ===================== */
:root {
    --main-color: #000;
    /* backgrounds */
    --color-primary: #9c0024; /* banner, table headers, h1 in banner */
    --color-secondary: #f27405; /* navbar, footer */
    --color-accent: #d90060; /* buttons, CTAs */
    --color-surface: #fff3dc; /* page background, button text */
    /* text on colored backgrounds */
    --color-on-primary: #ffb800; /* h1 text on banner */
    --color-on-secondary: #520013; /* text on navbar/footer */
    --color-on-accent: #fff3dc; /* text on buttons */
    /* text on light surface */
    --color-heading: #9c0024; /* h1 on page */
    --color-highlight: #ff6a00; /* h2 banner, subheadings */
}

/* =====================
   ACCESSIBILITY
   ===================== */

/* Masque un contenu tout en le laissant à disposition des lecteurs d'écran
   grâce à un positionnement en dehors de la zone d'affichage. */
.sr-only,
.skiplink:not(:focus) {
    position: fixed;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
}

.skiplink:focus {
    color: var(--main-color);
    font-weight: bolder;
}

/* =====================
   FONTS
   ===================== */
@font-face {
    font-family: "DM Sans Fallback";
    src: local("Arial");
    size-adjust: 96%;
    ascent-override: 95%;
}

@font-face {
    font-family: "Playfair Fallback";
    src: local("Georgia");
    size-adjust: 98%;
    ascent-override: 92%;
}

/* =====================
   BASE
   ===================== */
body {
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    background-color: var(--color-surface);
    color: var(--main-color);
    font-family: "DM Sans", "DM Sans Fallback", sans-serif;
    font-optical-sizing: auto;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.5;
    display: flex;
    align-items: center;
    flex-direction: column;
}

a,
a:hover,
a:focus {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid;
}

a.btn,
a.no_decoration,
a.no_decoration:hover,
a.download {
    text-decoration: none;
    border-bottom: none;
}

a.no_decoration,
a.no_decoration:hover {
    color: inherit;
}

img {
    max-width: max-content;
    padding: 0.5em 0;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.9;
}

.center {
    align-self: center;
    text-align: center;
}

/* =====================
   HEADINGS
   ===================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Playfair Display", "Playfair Fallback", serif;
    font-weight: 500;
    line-height: 1.1;
    margin-top: 0;
}

h1 {
    font-size: 2rem;
    color: var(--color-primary);
    font-weight: 600;
}

h2 {
    font-size: 1.725rem;
    color: var(--color-on-secondary);
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.4rem;
    line-height: 1.6;
}

/* =====================
   BUTTONS
   ===================== */
.btn,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    display: inline-block;
    width: fit-content;
    background: var(--color-accent);
    color: var(--color-surface);
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    letter-spacing: 0.08em;
    white-space: nowrap;
    cursor: pointer;
    margin-top: 0.6rem;
}

.btn:hover,
button:hover {
    background: var(--color-on-primary);
    color: var(--color-primary);
}

.btn:visited,
button:visited {
    color: var(--color-surface);
}

/* btn-banner — mobile: styled as underlined link */
a.btn-banner {
    display: inline;
    background: none;
    color: var(--color-surface);
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
    text-decoration-color: var(--color-accent);
    border-bottom: none;
    padding-left: 0.2em;
    margin-top: 0.6rem;
}

/* =====================
   HEADER / BANNER
   ===================== */
header[role="banner"] {
    background-color: var(--color-primary);
    color: var(--color-surface);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header[role="banner"] > div {
    width: 100%;
    display: flex;
    padding: 0.8em 1.5em 0.8em 0;
    justify-content: center;
}

div.banner_wrapper {
    cursor: pointer;
    min-width: 60%;
    margin: 0.6em 0 0.4em;
}

div.title {
    display: flex;
    flex-direction: column;
    justify-content: end;
}

div.title > h1 {
    color: var(--color-on-primary);
    font-weight: 800;
    font-size: 1.6em;
}

div.title > div {
    display: flex;
}

div.title > div > div {
    display: flex;
    flex-direction: column;
}

div.title > div > div > h2 {
    color: var(--color-surface);
    font-weight: 200;
    font-style: italic;
    line-height: 1;
    font-size: 1.2em;
    margin-bottom: 0.3em;
}

.logo {
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 0.5em 0.5em 0 0.5em;
    width: 6em;
}

.tampon {
    display: none;
}

.tampon_mobile {
    object-fit: contain;
    width: 4em;
    position: absolute;
    z-index: 101;
}

/* =====================
   NAVBAR
   ===================== */
.navbar_wrapper {
    width: 100%;
    background-color: var(--color-secondary);
    display: flex;
    justify-content: center;
}

.navbar {
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    width: 100%;
}

.navbar-toggler {
    display: block;
    margin-left: auto;
    margin-right: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-on-secondary);
    border-radius: 0.25rem;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--color-on-secondary);
    background: white;
}

.navbar-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 0.5rem;
    background-color: var(--color-secondary);
}

#tm-navbar {
    padding-bottom: 1em;
}

.nav-list {
    padding-left: 0;
    margin: 0;
    list-style: none;
    text-align: center;
}

.nav-list .nav-item {
    display: block;
}

.nav-item {
    transition: background-color 0.3s ease;
}

.nav-item:hover,
.nav-item:active {
    background-color: var(--color-on-primary);
}

.nav-list .nav-link {
    display: block;
    padding: 10px 16px;
    border: none;
    color: var(--color-on-secondary);
}

.nav-item.active .nav-link {
    text-decoration: underline;
    font-weight: bolder;
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
    text-decoration-color: var(--color-on-primary);
}

/* =====================
   MAIN
   ===================== */
main {
    flex: 1;
    width: 100%;
    padding: 2em 2.6em;
    display: flex;
    flex-direction: column;
}

/* =====================
   FOOTER
   ===================== */
footer {
    width: 100%;
    background-color: var(--color-secondary);
    color: var(--color-on-secondary);
    padding: 4em 2em;
    display: flex;
    justify-content: center;
}

footer > div.footer_wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 2em;
}

footer > div.footer_wrapper > div {
    width: 100%;
}

div.contacts-copyright {
    display: flex;
    justify-content: end;
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
}

.contact-tel,
.contact-mail,
.contact-poste {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
}

.contact-tel > svg,
.contact-mail > svg,
.contact-poste > svg {
    margin-right: 1em;
}

.contact-tel > div > a {
    color: inherit;
}

/* =====================
   TABLES
   ===================== */
.wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 1em 0;
}

.table-wrapper {
    width: 100%;
    border: 1.5px solid var(--color-primary);
    border-radius: 12px;
    overflow: scroll;
    margin-bottom: 1rem;
}

.table-wrapper:empty {
    min-height: 300px;
    background: linear-gradient(90deg, #fff8ee 25%, #fff3dc 50%, #fff8ee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.table {
    font-size: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

#caption {
    color: var(--color-primary);
}

.table th,
.table td {
    padding: 0.8rem 1.25rem;
    text-align: left;
}

.table tbody tr:not(:first-child):nth-child(odd) {
    background: #fff8ee;
}

.table tbody tr:not(:first-child):nth-child(even) {
    background: var(--color-on-accent);
}

.table tbody tr:first-child {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    font-family: "Playfair Display", serif;
    font-size: larger;
}

.table tbody tr:first-child > th {
    padding: 0.9rem 0.8rem;
}

.table tbody tr:first-child > th:first-child {
    border-radius: 10px 0 0 0;
}

.table tbody tr:first-child > th:last-child {
    border-radius: 0 10px 0 0;
}

th[scope="row"] {
    font-weight: 300;
}

th[scope="row"] > span {
    font-weight: 600;
}

/* dates table */
.dates-table td:first-child {
    white-space: nowrap;
}

.dates-table td:nth-child(2) {
    color: #1a0030;
    font-weight: 500;
}

.date-day {
    display: block;
    font-family: "Playfair Display", serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.date-month {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-top: 2px;
}

.date-weekday {
    display: block;
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--color-primary);
    font-style: italic;
}

.place {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--color-primary);
}

.city {
    color: #1a0030;
    font-weight: 500;
}

/* =====================
   PAGES
   ===================== */
.page_404 {
    padding: 4em 0;
}

.list_wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2em 4em;
}

.audio_item {
    margin-top: 3em;
}

.audio_item > div {
    display: flex;
    align-items: center;
    gap: 1em;
}

.nom_groupe {
    font-weight: bold;
    font-family: "Playfair Display", serif;
}

img.dispo {
    width: 100%;
    height: auto;
}

/* =====================
   DESKTOP — min-width: 1000px
   ===================== */
@media (min-width: 1000px) {
    /* header */

    div.banner_wrapper {
        margin: 2em 0;
    }

    div.title > h1 {
        font-size: 2.4em;
    }

    div.title > div {
        justify-content: space-around;
    }

    div.title > div > div > h2 {
        font-size: 1.4em;
        margin-bottom: 0;
    }

    .logo {
        width: 14em;
        padding: 0.5em 2em 0.5em 0;
    }

    .tampon {
        display: block;
        object-fit: contain;
        width: auto;
        height: 7em;
        padding-left: 6em;
    }

    .tampon_mobile {
        display: none;
    }

    /* btn-banner becomes a proper button on desktop */
    a.btn-banner {
        display: inline-block;
        width: fit-content;
        background: var(--color-accent);
        color: var(--color-surface);
        text-decoration: none;
        border-bottom: none;
        padding: 10px 24px;
        border-radius: 8px;
        margin-top: 0.6rem;
    }

    a.btn-banner:hover {
        background: var(--color-on-primary);
        color: var(--color-primary);
    }

    /* navbar */
    .navbar-toggler {
        display: none;
    }

    .navbar-menu {
        display: block !important;
        position: static;
        background-color: transparent;
    }

    .navbar {
        min-width: 60%;
        width: auto;
    }

    .nav-list {
        display: flex;
        text-align: left;
    }

    .nav-list .nav-item + .nav-item {
        margin-left: 1rem;
    }

    /* main */
    main {
        width: 60%;
        max-width: 1200px;
        padding: 4% 6%;
    }

    /* footer */
    footer > div.footer_wrapper {
        width: 60%;
        max-width: 1200px;
        flex-direction: row;
    }

    div.contacts-copyright {
        align-items: end;
        margin-top: 1em;
    }

    /* tables */
    .table-wrapper {
        overflow: hidden;
    }

    /* audio */
    .audio_wrapper {
        padding-left: 1em;
    }

    img.center {
        width: auto;
        min-height: 16em;
    }
}

/* =====================
   WIDE DESKTOP — min-width: 1700px
   ===================== */
@media (min-width: 1700px) {
    main {
        max-width: 1400px;
    }

    footer > div.footer_wrapper {
        max-width: 1400px;
    }

    .nav-list {
        justify-content: center;
    }
}
