html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    background: rgba(18, 18, 18, 0.28);
    background-image: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    width: 100%;
    z-index: 2100;
}

.navbar-brand {
    font-weight: bold;
    color: white;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    position: relative;
    transition: all 0.3s;
}

.navbar-nav .nav-link::before {
    content: "";
    width: 0;
    height: 2px;
    background: white;
    border-radius: 999px;
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: white !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link:focus::before,
.navbar-nav .nav-link.active::before {
    width: calc(100% - 1rem);
}

.dropdown-menu {
    background: rgba(18, 18, 18, 0.42);
    background-image: none !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.24);
}

.dropdown-item {
    position: relative;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(255, 255, 255, 0.14);
    color: white;
}

.dropdown-item::before {
    content: "";
    width: 0;
    height: 2px;
    background: white;
    border-radius: 999px;
    position: absolute;
    left: 0.75rem;
    bottom: 0.35rem;
    transition: width 0.3s ease;
}

.dropdown-item:hover::before,
.dropdown-item:focus::before {
    width: calc(100% - 1.5rem);
}

.navbar-toggler {
    border: 0;
    box-shadow: none;
    padding: 0.35rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.mobile-menu-icon {
    width: 18px;
    height: 14px;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-menu-icon span {
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 999px;
    display: block;
}

.mobile-nav-sidebar {
    --bs-offcanvas-width: min(84vw, 330px);
    width: var(--bs-offcanvas-width);
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    z-index: 2110;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
    min-height: 100vh;
    overflow-y: auto;
}

.mobile-nav-sidebar.show {
    transform: translateX(0);
    visibility: visible;
}

.offcanvas-backdrop,
.mobile-nav-backdrop {
    z-index: 2000;
}

.mobile-nav-backdrop {
    background: rgba(0, 0, 0, 0.52);
    position: fixed;
    inset: 0;
}

.mobile-nav-sidebar .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    min-height: 74px;
    padding: 0.75rem 1.25rem;
    position: relative;
    z-index: 2;
}

.mobile-nav-sidebar .offcanvas-body {
    display: block;
    padding: 1.25rem;
    position: relative;
    z-index: 2;
}

.mobile-nav-sidebar .navbar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.mobile-nav-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.95rem 0;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 1rem;
    transform: none;
}

.mobile-nav-sidebar .nav-link::before {
    display: none;
}

.mobile-nav-sidebar .nav-link:hover,
.mobile-nav-sidebar .nav-link:focus,
.mobile-nav-sidebar .nav-link.active {
    color: white !important;
    transform: none;
}

.mobile-nav-sidebar .dropdown-menu {
    margin-top: 0.25rem;
    padding: 0.35rem 0.75rem;
    position: static;
    display: none;
    width: 100%;
}

.mobile-nav-sidebar .dropdown-menu.show {
    display: block;
}

.mobile-nav-sidebar .dropdown-item {
    padding: 0.65rem 0;
}

.mobile-nav-sidebar .dropdown-item::before {
    display: none;
}

footer {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../image/webp/Allée_de_Baobab_au_coucher_de_soleil,_Madagascar.webp');
    color: white;
    padding: 40px 0;
}

@media (max-width: 991.98px) {
    .navbar-nav .nav-link::before {
        left: 0;
        bottom: 2px;
        transform: none;
    }

    .navbar-nav .nav-link:hover::before,
    .navbar-nav .nav-link:focus::before,
    .navbar-nav .nav-link.active::before {
        width: 42px;
    }
}

@media (max-width: 575.98px) {
    .navbar {
        width: 100vw;
        max-width: 100vw;
    }
}
