.site-menu {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
}

.site-menu > a,
.site-menu__account > summary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    color: #172033;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
}

.site-menu__account > summary::-webkit-details-marker {
    display: none;
}

.site-menu__account > summary::after {
    margin-left: 0.45rem;
    content: "▾";
    font-size: 0.75rem;
}

.site-menu__account[open] > summary::after {
    content: "▴";
}

.site-menu > a:hover,
.site-menu > a:focus-visible,
.site-menu > a[aria-current="page"],
.site-menu__account > summary:hover,
.site-menu__account > summary:focus-visible {
    color: #176b68;
    background: #d8efec;
}

.site-menu > a:focus-visible,
.site-menu__account > summary:focus-visible,
.site-menu__panel a:focus-visible {
    outline: 3px solid #0b6bcb;
    outline-offset: 2px;
}

.site-menu__action {
    padding-right: 0.9rem !important;
    padding-left: 0.9rem !important;
    color: #ffffff !important;
    background: #176b68;
}

.site-menu__action:hover,
.site-menu__action:focus-visible {
    color: #ffffff !important;
    background: #105653 !important;
}

.site-menu__account {
    position: relative;
}

.site-menu__panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 40;
    width: 19rem;
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 7rem);
    display: grid;
    gap: 0.25rem;
    padding: 0.6rem;
    overflow-y: auto;
    border: 1px solid #d8dde5;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(23, 32, 51, 0.18);
}

.site-menu__section {
    display: grid;
    gap: 0.2rem;
    padding: 0.35rem 0;
}

.site-menu__section + .site-menu__section {
    border-top: 1px solid #e7eaee;
}

.site-menu__section-title {
    padding: 0.45rem 0.8rem 0.25rem;
    color: #53606f;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-menu__panel a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.8rem;
    border-radius: 8px;
    color: #172033;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.site-menu__panel a:hover,
.site-menu__panel a:focus-visible,
.site-menu__panel a[aria-current="page"] {
    color: #176b68;
    background: #d8efec;
}

.site-menu__footer {
    margin-top: 0.25rem;
    padding-top: 0.45rem;
    border-top: 1px solid #d8dde5;
}

.site-menu__footer a {
    color: #8f1c31;
}

.site-menu__footer a:hover,
.site-menu__footer a:focus-visible {
    color: #721526;
    background: #fbe4e8;
}

@media (max-width: 760px) {
    .site-header,
    .reading-header,
    .header-inner {
        flex-wrap: wrap;
    }

    .site-menu {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
        margin-left: 0;
    }

    .site-menu > a,
    .site-menu__account > summary {
        width: 100%;
        padding: 0.65rem 0.4rem;
        overflow-wrap: anywhere;
    }

    .site-menu__account {
        position: static;
    }

    .site-menu__panel {
        top: calc(100% + 0.45rem);
        right: 0;
        left: 0;
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 360px) {
    .site-menu {
        grid-template-columns: 1fr;
    }
}

.site-menu > .site-menu__notifications {
    position: relative;
    width: 44px;
    min-width: 44px;
    padding: 0.5rem;
}

.site-menu__notifications svg {
    width: 1.4rem;
    height: 1.4rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-menu > .site-menu__notifications.has-unread {
    color: #105653;
    background: #d8efec;
}

.site-menu__notification-badge {
    position: absolute;
    top: 0;
    right: -0.2rem;
    min-width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    color: #ffffff;
    background: #a51d3d;
    font-size: 0.65rem;
    font-weight: 850;
    line-height: 1;
}

.site-menu__notification-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 760px) {
    .site-menu > .site-menu__notifications {
        width: 44px;
        justify-self: center;
        padding: 0.5rem;
    }
}

/* Enveloppe commune du site */

.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    color: #ffffff;
    background: #172033;
    border-radius: 0.5rem;
    text-decoration: none;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: relative;
    z-index: 20;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #d8dde5;
    background: rgb(255 255 255 / 97%);
}

.header-inner,
.footer-inner {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.header-inner {
    min-height: 78px;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
}

.brand img {
    display: block;
    width: 270px;
    max-width: 48vw;
    height: auto;
}

.site-footer {
    width: 100%;
    margin: 0;
    padding: 2rem 0;
    color: #53606f;
    border-top: 1px solid #d8dde5;
    background: #ffffff;
    font-size: 0.9rem;
    text-align: left;
}

.footer-inner {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.footer-inner p {
    margin: 0.25rem 0 0;
    color: #53606f;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 0;
}

.footer-inner a {
    color: #172033;
    font-weight: 700;
    text-decoration: none;
}

.footer-inner a:hover,
.footer-inner a:focus-visible {
    color: #176b68;
    text-decoration: underline;
}

@media (max-width: 760px) {
    .header-inner {
        padding: 0.8rem 0;
    }

    .brand img {
        max-width: 78vw;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
