/* Header public élargi et navigation à menus */
.header-shell {
    width: min(1440px, calc(100% - 48px));
    margin: auto;
}

.site-header .nav-wrap {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(250px, 1fr);
    height: 100%;
    align-items: center;
}

.site-header .brand {
    grid-column: 1;
    justify-self: start;
    white-space: nowrap;
}

.site-header .site-nav {
    display: contents;
}

.nav-links {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    min-width: 0;
    font-size: 14px;
    font-weight: 650;
}

.nav-links > a,
.nav-dropdown > summary,
.nav-actions > a {
    white-space: nowrap;
}

.nav-links > a,
.nav-dropdown > summary {
    padding: 10px 0;
}

.nav-links > a:hover,
.nav-dropdown > summary:hover,
.nav-dropdown[open] > summary {
    color: var(--blue);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown > summary {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    list-style: none;
}

.nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.nav-caret {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s;
}

.nav-dropdown[open] .nav-caret {
    transform: rotate(225deg) translate(-1px, -1px);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    z-index: 120;
    top: calc(100% + 8px);
    left: 50%;
    min-width: 225px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 20px 55px rgba(15, 23, 42, .16);
    transform: translateX(-50%);
}

.nav-dropdown[open] > .nav-dropdown-menu {
    display: grid;
}

.nav-dropdown-menu a {
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
    background: #eef7ff;
    color: #075eb5;
}

.site-header .nav-actions {
    grid-column: 3;
    justify-self: end;
    gap: 18px;
    margin: 0;
}

.site-header .nav-actions .button {
    width: auto;
}

.nav-links a:focus-visible,
.nav-dropdown > summary:focus-visible,
.nav-actions a:focus-visible,
.menu-toggle:focus-visible {
    outline: 3px solid rgba(10, 132, 255, .24);
    outline-offset: 4px;
    border-radius: 8px;
}

@media (max-width: 1120px) {
    .header-shell {
        width: min(calc(100% - 32px), 1440px);
    }

    .site-header .nav-wrap {
        display: flex;
        justify-content: space-between;
    }

    .site-header .menu-toggle {
        display: grid;
        gap: 4px;
    }

    .site-header .menu-toggle > span:not(.sr-only) {
        width: 23px;
        height: 2px;
        background: var(--ink);
    }

    .site-header .site-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 16px;
        right: 16px;
        padding: 18px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow);
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .site-header .site-nav.open {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        font-size: 15px;
    }

    .nav-links > a,
    .nav-dropdown > summary {
        width: 100%;
        padding: 11px 12px;
        border-radius: 10px;
    }

    .nav-links > a:hover,
    .nav-dropdown > summary:hover,
    .nav-dropdown[open] > summary {
        background: #f5f9ff;
    }

    .nav-dropdown-menu {
        position: static;
        min-width: 0;
        margin: 2px 0 8px 12px;
        padding: 5px;
        border: 0;
        border-left: 2px solid #dbeafe;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    .nav-dropdown-menu a {
        padding: 9px 12px;
    }

    .site-header .nav-actions {
        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        margin: 6px 0 0;
        padding-top: 14px;
        border-top: 1px solid var(--line);
    }

    .site-header .nav-actions .text-link {
        padding: 9px 12px;
    }

    .site-header .nav-actions .button {
        width: 100%;
    }
}
