.menu-toggle-button,
.menu-close-button {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #2d3748;
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

/* Augmente la zone de clic technique sans changer le visuel */
.menu-toggle-button::before,
.menu-close-button::before {
    content: "";
    position: absolute;
    inset: -12px;
}

body.js-loaded .menu-toggle-button,
body.js-loaded .menu-close-button {
    opacity: 1;
}

.menu-toggle-button .material-symbols-outlined,
.menu-close-button .material-symbols-outlined {
    font-size: 22px;
}

.menu-toggle-button:hover,
.menu-close-button:hover {
    background: #edf2f7;
}

.menu-toggle-button.hidden,
.menu-close-button.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.menu-toggle-button.visible,
.menu-close-button.visible {
    opacity: 1;
    transform: scale(1);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-menu {
    position: fixed;
    top: calc(var(--header-total-height) - 1px);
    left: 0;
    right: 0;
    z-index: 55;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-110%);
    transition: transform 0.22s ease;
    padding: 0.35rem 0;
}

.mobile-nav-menu.open {
    transform: translateY(0);
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0.75rem;
    display: grid;
    gap: 0.2rem;
}

.mobile-nav-item {
    display: block;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-color-primary);
    font-weight: 700;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus-visible {
    color: var(--accent-color-dark);
    background: var(--accent-color-light);
}

.desktop-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.desktop-nav-item {
    position: relative;
    text-decoration: none;
    color: var(--text-color-secondary);
    font-weight: 700;
    font-size: 0.94rem;
}

/* Expansion de la zone de clic pour la navigation desktop */
.desktop-nav-item::before {
    content: "";
    position: absolute;
    inset: -10px -5px;
}

.desktop-nav-item:hover,
.desktop-nav-item:focus-visible {
    color: var(--accent-color-dark);
}

@media (min-width: 768px) {
    .desktop-nav {
        display: block;
    }

    .header-buttons,
    .mobile-nav-menu,
    .mobile-nav-overlay {
        display: none !important;
    }
}

.site-footer {
    margin-top: auto;
    background: #181717;
    color: #f4f7f4;
    padding: 2.6rem 0 1.75rem;
}

.footer-content {
    display: grid;
    gap: 0.85rem;
}

.footer-text {
    margin: 0;
    color: rgba(244, 247, 244, 0.92);
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-nav {
    margin: 0;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
}

.footer-link {
    color: rgba(244, 247, 244, 0.9);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.1em;
}

.footer-link:hover,
.footer-link:focus-visible {
    text-decoration: underline;
    color: #ffffff;
}

@media (min-width: 900px) {
    .footer-content {
        grid-template-columns: auto 1fr;
        align-items: center;
        justify-content: space-between;
    }

    .footer-links {
        justify-content: flex-end;
    }
}
