.navbar {
    & .navbar-user-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        color: #333;
        border-radius: 50%;
        transition: color .15s ease, background-color .15s ease;

        &:hover {
            color: #ff8c00;
            background-color: rgba(255, 140, 0, .08);
        }

        svg {
            width: 1.55rem;
            height: 1.55rem;
        }
    }

    & .navbar-brand {
        flex-shrink: 0;

        > a:first-child {
            flex: 0 0 auto;
            line-height: 0;
        }

        img {
            width: 3.25rem;
            max-width: none;
            height: auto;
            display: block;
        }

        .dropdown {
            margin-top: 5px;
        }

        .title-site {
            padding-left: .5rem !important;
            text-transform: uppercase;
            font-size: 1.2rem;
            font-weight: 600;
        }
    }

    > .container {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        width: 100%;
        overflow: visible;
    }

    .navbar-search .global-search {
        width: 100% !important;
        max-width: none !important;
    }

    .navbar-announce {
        flex: 0 0 auto;
        flex-shrink: 0;
        width: max-content;
        max-width: 18rem;
        margin-left: .75rem;
        overflow: visible;
        border-radius: 50rem;
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
        transition: max-width .45s ease, margin-left .45s ease, transform .3s ease, box-shadow .3s ease;
    }

    .navbar-announce:hover {
        transform: scale(1.1);
    }

    .navbar-announce > a {
        display: inline-flex;
        white-space: nowrap;
        box-shadow: none !important;
        transition: transform .45s ease, opacity .3s ease;
    }

    .navbar-announce-short {
        display: none;
    }

    .navbar-announce.is-compact .navbar-announce-full {
        display: none;
    }

    .navbar-announce.is-compact .navbar-announce-short {
        display: inline;
    }

    .navbar-announce > a:hover {
        transform: none;
    }

    .navbar-user {
        flex: 0 0 auto;
        flex-shrink: 0;
        margin-left: .75rem;
    }

    /* ===== Desktop : hors .collapse Bootstrap ===== */
    @media (min-width: 992px) {
        > .container {
            display: flex !important;
            flex-wrap: nowrap !important;
            align-items: center;
        }

        .navbar-desktop {
            display: flex !important;
            flex: 1 1 0%;
            align-items: center;
            min-width: 0;
            gap: .5rem;
        }

        .navbar-mobile-toggle {
            display: none !important;
        }

        /* Spécificité > Bootstrap .navbar-expand-lg .navbar-collapse { display:flex !important } */
        &.navbar-expand-lg .collapse.navbar-collapse.navbar-mobile-panel {
            display: none !important;
        }

        .navbar-desktop-fill {
            position: relative;
            display: flex !important;
            flex: 1 1 0%;
            align-items: center;
            min-width: 0;
        }

        .navbar-desktop-search {
            position: relative;
            z-index: 2;
            flex: 1 1 0%;
            min-width: 0;
            background: #fff;
        }

        .navbar-desktop-search .global-search,
        .navbar-desktop-search .global-search form,
        .navbar-desktop-search .input-group {
            width: 100% !important;
            max-width: none !important;
            min-width: 0 !important;
        }

        .navbar-desktop-search .global-search {
            display: block !important;
        }

        .navbar-desktop-search .input-group {
            display: flex !important;
            flex-wrap: nowrap !important;
        }

        .navbar-desktop-search .global-search__field {
            flex: 1 1 0% !important;
            min-width: 0 !important;
            width: auto !important;
        }

        .navbar-desktop-search .form-control {
            width: 100% !important;
            min-width: 0 !important;
        }

        .navbar-desktop-links {
            position: relative;
            z-index: 1;
            display: flex !important;
            flex-direction: row !important;
            flex-wrap: nowrap !important;
            flex: 0 0 auto !important;
            align-items: center;
            margin: 0 0 0 .5rem !important;
            padding: 0 !important;
            white-space: nowrap;
        }

        .navbar-desktop-links .nav-link {
            padding-top: .35rem;
            padding-bottom: .35rem;
            line-height: 1.2;
        }

        .navbar-desktop-announce,
        .navbar-desktop-user {
            flex: 0 0 auto !important;
        }

        .navbar-desktop-announce {
            margin-left: 0;
        }

        .navbar-desktop-user {
            margin-left: 0;
        }

        /* Survol : recherche par-dessus Agenda/Annuaire uniquement */
        .navbar-desktop-fill:has(.navbar-desktop-search:hover) .navbar-desktop-search,
        .navbar-desktop-fill:has(.global-search:focus-within) .navbar-desktop-search {
            position: absolute;
            inset: 0 .5rem 0 0;
            z-index: 3;
            display: flex;
            align-items: center;
        }

        .navbar-desktop-fill:has(.navbar-desktop-search:hover) .navbar-desktop-links,
        .navbar-desktop-fill:has(.global-search:focus-within) .navbar-desktop-links {
            visibility: hidden;
            pointer-events: none;
        }
    }

    /* ===== Mobile ===== */
    @media (max-width: 991.98px) {
        > .container {
            position: relative;
            flex-wrap: wrap;
            justify-content: center;
        }

        .navbar-desktop {
            display: none !important;
        }

        .navbar-brand {
            flex-wrap: wrap;
            justify-content: center;
            width: 100%;
            margin: .35rem 0 .7rem !important;
            row-gap: .2rem;
        }

        .navbar-brand > a:first-child {
            flex: 1 0 100%;
            display: flex;
            justify-content: center;
        }

        .navbar-brand img {
            width: 5.5rem;
        }

        .navbar-brand .title-site {
            padding-left: 0 !important;
        }

        .navbar-mobile-toggle {
            position: absolute;
            top: .65rem;
            right: .75rem;
            z-index: 2;
        }

        .navbar-mobile-panel .navbar-search {
            width: 100%;
            margin-bottom: .75rem;
        }

        .navbar-mobile-panel .navbar-nav {
            flex-direction: row;
            justify-content: center;
        }

        .navbar-mobile-panel .navbar-announce {
            margin: .75rem auto 0;
            width: max-content;
        }

        .navbar-collapse {
            flex-basis: 100%;
            width: 100%;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .navbar-announce,
        .navbar-search {
            transition: none;
        }
    }

    & .dropdown-menu {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    & .dropdown-menu[data-bs-popper] {
        margin-top: 10px;
    }

    & .dropdown-item:hover {
        background: linear-gradient(45deg, #ff9800, #ff5722);
        color: #fff;
    }

    & .button-menu {
        margin: 5px;
    }

    & .search-city, & .text-distance {
        width: 200px;
    }

    & .search-distance {
        text-align: center;

        & .text-distance {
            color: white;
            font-size: 0.8rem;
        }

        & input[type="range"]::-webkit-slider-thumb {
            background-color: #f49f00 !important;
        }

        & input[type="range"]::-moz-range-thumb {
            background-color: #f49f00 !important;
        }

        & input[type="range"]::-ms-thumb {
            background-color: #f49f00 !important;
        }

        & .form-range {
            margin: 0 5%;
            width: 90%;
        }
    }

    .ts-control, .ts-dropdown {
        line-height: 1.3;
    }
}
