/*base.css*/

@font-face {
    font-family: 'AltMono';
    src: url("/media/AltMono.otf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'etw';
    src: url("/media/etw.ttf") format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Giarek';
    src: url("/media/giarek.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
    font-family: 'Giarek', sans-serif;
    background-image: url("/media/wp2b.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
}

body {
    position: relative; /* Required for fixed position children */
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center;
}

.mobileExpandableContent {
    display: none;
}

#content {
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: top;
    padding-top: 9vh;
    padding-bottom: 60px; /* Space for mobile navbar */
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 1vh 0;
    background-color: black;
    color: white;
    text-align: center;
    font-size: 14px;
    z-index: 100;
}

#content {
    padding-bottom: calc(2vh + 30px) !important;
}

@media screen and (max-width: 768px) {
    .footer {
        padding: 8px 0;
        font-size: 12px;
    }
    
    #content {
        padding-bottom: calc(50px + 30px) !important;
    }
}


.navBar {
    display: flex;
    position: fixed;
    width: 80vw;
    height: 4vh;
    top: 4vh;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px;
    color: white;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
    padding-top: 3px;
    z-index: 100;
}

.navLinks {
    width: 35%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around; /* This will space Home, Art, Dev, Profile/Login */
}

.mainTrackInfo {
    width: 30%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mainControlBar {
    width: 35%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 10px;
}

.menuButton {
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    mix-blend-mode: screen;
}

.dot {
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.menuButton:hover .dot {
    transform: scale(2.5);
}

.timeCode{
    font-size: 0.8em;
    font-weight: bold;
    display: flex;
    gap: 2px;
    flex-direction:row ;
}

.navFavoriteButton{
    cursor: pointer ;
    background-color: transparent;
    border:none;
}

.navFavoriteIcon{
    width: 20px;
    height: 20px;
    background-color: transparent;
}

.dropdown { /* This style seems to be for a different .menuButton element, not .nav-dropdown */
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    margin-top: 10px;
}

.menuButton:hover .dropdown {
    max-height: 100px;
    opacity: 1;
}

.menuIcon {
    margin: 20px 0 0 0;
    transform: translateY(-20px);
    color: white;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    mix-blend-mode: lighten;
}

.menuButton:hover .menuIcon {
    transform: translateY(0);
    opacity: 1;
}

.icon {
    width: 20px;
    height: 20px;
    fill: white;
    transition: fill 0.3s ease;
}

.icon:hover {
    transform: scale(1.2);
    transition: transform 0.3s ease, fill 0.3s ease;
    fill: #f0f0f0;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: white;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #e0e0e0;
}

* {
    user-select: none;
}


/* Profile styles */
.profile-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.profile-pic {
    width: 30px; /* Default size, might be overridden by mobile */
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-container:hover .profile-pic {
    transform: scale(1.1);
}

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.profile-modal { /* This class name appears in the CSS but not in the HTML snippet for the modal itself. Assuming .modal is used in HTML. */
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 0px 20px 20px 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
/* Ensure modal styles apply to the actual modal if class is different */
.modal { /* As used in HTML for profile modal */
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 0px 20px 20px 20px; /* Check if header needs top padding */
    width: 90%;
    max-width: 400px;
    position: relative;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 20px; /* Added padding for header content */
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-pic-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.current-profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-pic-wrapper {
    position: relative;
    cursor: pointer;
}

.pic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-pic-wrapper:hover .pic-overlay {
    opacity: 1;
}

.pic-overlay span {
    color: white;
    font-size: 14px;
    text-align: center;
}

.user-details {
    text-align: center;
}

.user-details h3 {
    margin: 0 0 10px 0;
}

.user-details p {
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.8);
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.save-profile, .logout-button {
    padding: 8px 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.save-profile {
    background-color: #4CAF50;
    color: white;
}

.logout-button {
    background-color: #f44336;
    color: white;
    text-decoration: none;
}

.save-profile:hover, .logout-button:hover {
    opacity: 0.9;
}

/* Redundant .profile-container and .profile-pic styles removed as they are defined above */

.logout-dropdown { /* This seems to be for a different profile menu, not the modal */
    position: absolute;
    top: 100%;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    padding: 8px;
    display: none;
    z-index: 100;
    margin-top: 5px;
}

.profile-container:hover .logout-dropdown { /* Ensure this doesn't conflict with modal logic */
    display: block;
}

/* .logout-button style already defined for modal, ensure consistency if this is a different button */

.login-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

.login-link img {
    width: 20px; /* Match .icon style */
    height: 20px;
}


.mainWaveform {
    width: 100% !important;
    height: 100% !important;
    position: relative;
}

.mainWaveform > wave {
    width: 100% !important;
    height: 100% !important;
}

#mainWaveform wave {
    overflow: hidden !important;
}

#currentWaveform { /* This ID is not in base.html, probably for specific page */
    width: 100% !important;
    height: 80px !important;
    margin: 20px 0;
    position: relative;
}

/* .mainWaveform already defined */

.navBar a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-stretch: expanded; /* May need fallback if font-stretch is not widely supported */
}


.currentTrackTitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: scrollText 20s linear infinite;
    max-width: 200px; /* This could be a % or vw for responsiveness */
}

.titleBox{
    display: flex;
    height: 100%;
    overflow: hidden;
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}


.mainControlBar .controlButton {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

 .controlIcon {
    width: 25px;
    height: 25px;
}

#timeCode{
    display: none; /* Hidden by default, shown in mobile perhaps? */
}

#mainVolumeSlider{
    display: block;
}

.mainControlBar .mainVolumeSlider {
    width: 4vw;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    outline: none;
    border-radius: 5px;
    cursor: pointer;
}

.mainControlBar .mainVolumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.mainControlBar .mainVolumeSlider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}


.mainTrackCover {
    width: 25px;
    height: 25px;
    cursor: pointer;
    border-radius: 3px;
    padding-right: 10px; /* This might push it slightly left if it's the last item */
}

.controlButtons {
    display: flex;
    align-items: center;
    gap: 5px;
    /* width: ; /* width was empty */
}


.switch1 {
    display: block; /* Default for desktop */
}

.switch2 {
    display: none; /* Default for desktop */
}

#homeBtn {
    padding-left: 10px;
}

@media screen and (max-width: 768px) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    ::-webkit-scrollbar {
        display: none;
    }

    #content {
        padding-bottom: 50px; /* Height of mobile navbar container */
        padding-top: 0;
        min-height: calc(100vh - 50px - env(safe-area-inset-bottom)); /* Adjust min-height for navBar */
    }

    .navBar {
        flex-direction: column;
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        height: auto; /* Auto height for content */
        border-radius: 0;
        background-color: transparent; /* Main navBar transparent */
        backdrop-filter: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        z-index: 100;
    }

    .mobileExpandableContent {
        display: block; /* Make it part of the layout flow if it's always there but hidden/shown */
        position: absolute; /* This was absolute, check interaction with navLinks */
        bottom: 100%; /* Positioned above navLinks if navLinks is the bottom bar */
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        transform: translateY(100%);
        transition: transform 0.3s ease;
        visibility: hidden; /* Controls visibility with transform */
    }

    .mobileExpandableContent.expanded {
        transform: translateY(0);
        visibility: visible;
    }

    .expandButton { /* This button is not in the HTML provided */
        position: absolute;
        top: -35px; 
        left: 46%; /* Consider 50% and translateX(-50%) for centering */
        transform: translateX(-50%) rotate(180deg); /* Combined transform */
        width: 30px;
        height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        border: none;
        cursor: pointer;
        border-radius: 15px; /* Fully rounded */
        z-index: 101;
        padding: 5px;
    }

    .expandButton img {
        width: 20px;
        height: 20px;
        transition: transform 0.3s ease;
        filter: brightness(0) invert(1);
    }

   .expandButton.expanded {
        display: none; /* Hide when content is expanded */
    }

    .navLinks {
        width: 100%;
        /* height: 30px; */ /* Height auto might be better with padding and flex items */
        height: auto; /* Let content define height */
        display: flex;
        align-items: center;
        justify-content: space-around;
        background-color: rgba(0, 0, 0, 0.2); /* navLinks bar background */
        backdrop-filter: blur(10px);
        padding: 10px 0; /* Adjusted padding from 60px 0 5px 0, assuming 60px was for something else or a typo */
        /* padding: 60px 0 5px 0; */ /* Original padding, check visual impact */
        z-index: 100; /* Above content, below modal */
        border-radius: 10px 10px 0 0; /* Rounded top corners */
        /* position: relative; */ /* If mobileExpandableContent is absolute to navBar, navLinks is just a flex child */
    }

    /* .mainControlBar within .navBar (desktop version, likely hidden on mobile) vs .mainControlBar within .mobileExpandableContent */
    /* The following rules are for the .mainControlBar inside .mobileExpandableContent or if the desktop one is reused */
    .mobileExpandableContent .mainControlBar { /* Scope to mobile version if distinct */
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
        width: 100%; /* Take full width of expandable content */
    }
    
    .mobileExpandableContent .mainTrackInfo { /* Scope to mobile version */
        width: 100%;
        height: 35px; /* Or auto */
        padding: 0;
    }

    .mobileExpandableContent .mainWaveform {
        height: 15px !important; /* Waveform in expandable area */
    }

    /* Mobile-specific adjustments for controls inside .mobileExpandableContent .mainControlBar */
    .mobileExpandableContent .mainVolumeSlider {
        width: 60px !important;
        display: block !important; /* Show volume slider */
    }

    .mobileExpandableContent .controlButtons {
        gap: 15px;
    }

    .mobileExpandableContent .titleBox {
        max-width: 120px; /* Or flex-grow: 1 and hide overflow */
        display: flex !important; /* Show title box in expandable */
    }
    
    .mobileExpandableContent .mainTrackCover {
        width: 30px;
        height: 30px;
        display: block !important; /* Show cover in expandable */
    }

    .mobileExpandableContent #timeCode {
        display: flex !important; /* Show timecode in expandable */
        font-size: 0.7em;
    }

    .mobileExpandableContent .controlIcon {
        width: 15px;
        height: 15px;
    }

    .mobileExpandableContent .navFavoriteIcon {
        width: 16px;
        height: 16px;
    }


    /* Profile adjustments for mobile (icon in navLinks) */
    .navLinks .profile-pic { /* Target profile pic inside navLinks specifically for mobile if needed */
        width: 25px;
        height: 25px;
    }

    /* Navigation links adjustments */
    .navLinks .nav-link { /* Target nav-links inside navLinks */
        font-size: 0.9em;
        padding: 5px; /* Adjust padding for touch targets */
    }

    .navLinks .icon { /* Target icons inside navLinks */
        width: 20px;
        height: 20px;
    }

    /* The following styles for .titleBox, .mainTrackInfo, .controlButtons etc. seemed to be for a global player fixed at bottom,
       which is different from the .mobileExpandableContent.
       If there's a *separate* always-visible mobile player bar distinct from navLinks and mobileExpandableContent,
       those rules would apply there.
       The original CSS had these positioned absolutely/fixed, suggesting a bottom player bar.
       The .mobileExpandableContent contains its own .mainControlBar and .mainTrackInfo.
       The .navBar itself is the container for .navLinks and .mobileExpandableContent.
       Let's assume the specific positioning was for elements *not* in .mobileExpandableContent,
       but for a scenario where player controls are directly in .navBar or similar.
       Given .mobileExpandableContent holds these, the absolute positioning for general classes might be conflicting or redundant.
    */

    /* Original mobile absolute positioning: These might conflict if .mobileExpandableContent is the primary way to show controls */
    /* .titleBox{ display: none; } */ /* This was global for mobile, but .mobileExpandableContent .titleBox shows it. Clarify intent. */
    
    /* If mainTrackInfo and mainControlBar from DESKTOP version are shown/repositioned on mobile: */
    /* This was the original CSS for these elements, which might be for the desktop ones being visible on mobile */
    /*
    .mainTrackInfo{
        width: 100vw;
        position: fixed;
        bottom: 3.4vh;
        z-index: 200;
        height: 35px; // Added from other rule
    }

    .mainControlBar{
        width: 100vw;
        position: fixed;
        left: 0px;
        bottom: 6.2vh; // Above mainTrackInfo
        height: 4vh;
        z-index: 300;
        padding: 10px; // Added from other rule
        display: flex; // Added
        align-items: center; // Added
        justify-content: space-between; // Added
        box-sizing: border-box; // Added
    }
    .mainControlBar .controlButtons{ // Assuming these are children of the fixed mainControlBar
        position: absolute; // Relative to mainControlBar
        width: 93vw; // Centering hack?
        justify-content: center;
        left: 50%;
        transform: translateX(-50%);
    }
    .mainControlBar .navFavoriteButton{
        left: 2vw;
        position: absolute;
    }
    .mainControlBar .navFavoriteIcon{
        width: 20px;
        height: 20px;
    }
    .mainControlBar .mainTrackCover{
        position: absolute;
        right: 2vw;
        width: 20px;
        height: 20px;
    }
    */
    /* End of potentially conflicting absolute positioning for mobile player */


    .switch1 {
        display: none !important; /* Ensure desktop profile is hidden */
    }

    .switch2 {
        display: block !important; /* Ensure mobile profile is shown */
    }
}

/* Style pour les menus déroulants - Version renforcée */
.navBar .nav-dropdown {
    position: relative !important;
    display: inline-block !important; /* Keeps them in a line in navLinks */
    height: auto !important;
}

.navBar .nav-dropdown-content {
    display: none !important;
    position: absolute !important;
    top: 100% !important; /* Below the "Art" or "Dev" link */
    left: 0 !important; /* Align with the start of the "Art" or "Dev" link */
    background-color: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    min-width: 160px !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
    z-index: 1001 !important; /* Above navBar blur, below modal */
    border-radius: 4px !important;
    flex-direction: column !important; /* Stack items vertically */
    overflow: visible !important; /* Allow shadows */
}

.navBar .nav-dropdown:hover .nav-dropdown-content,
.navBar .nav-dropdown:focus-within .nav-dropdown-content { /* Added focus-within for accessibility */
    display: block !important; /* Show on hover/focus */
}

.navBar .nav-dropdown-item {
    color: white !important;
    padding: 10px 15px !important;
    text-decoration: none !important;
    display: block !important;
    white-space: nowrap !important;
    transition: background-color 0.3s !important;
    width: 100% !important; /* Make item take full width of dropdown-content */
    text-align: left !important;
    box-sizing: border-box; /* Include padding in width */
}

.navBar .nav-dropdown-item:hover,
.navBar .nav-dropdown-item:focus { /* Added focus style */
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.navBar .nav-dropdown-arrow {
    display: inline-block !important;
    margin-left: 5px !important;
    font-size: 10px !important;
    transition: transform 0.3s !important;
}

.navBar .nav-dropdown:hover .nav-dropdown-arrow,
.navBar .nav-dropdown:focus-within .nav-dropdown-arrow {
    transform: rotate(180deg) !important;
}

@media screen and (max-width: 768px) {
    body {
    padding-bottom: env(safe-area-inset-bottom);
}

::-webkit-scrollbar {
    display: none;
}

#content {
    padding-bottom: 50px; /* Height of mobile navbar */
}

.navBar {
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    top: auto;
    width: 100%;
    height: auto;
    border-radius: 0;
    background-color: transparent;
    backdrop-filter: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    z-index: 100;
}

.mobileExpandableContent {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    visibility: hidden;
}

.mobileExpandableContent.expanded {
    transform: translateY(0);
    visibility: visible;
}

.expandButton {
    position: absolute;
    top: -35px;
    left: 46%;
    transform: translateX(-50%);
    transform: rotate(180deg);
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    border-radius: 15px 15px 15px 15px;
    z-index: 101;
    padding: 5px;
}

.expandButton img {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
}

.expandButton.expanded {
    display: none;
}

.navLinks {
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 60px 0 5px 0;
    z-index: 100;
    border-radius: 10px 10px 0 0;
}

.mainControlBar {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.mainTrackInfo {
    width: 100%;
    height: 35px;
    padding: 0;
}

.mainWaveform {
    height: 15px !important;
}

/* Mobile-specific adjustments for controls */
.mainVolumeSlider {
    width: 60px !important;
}

.controlButtons {
    gap: 15px;
}

.titleBox {
    max-width: 120px;
}

.mainTrackCover {
    width: 30px;
    height: 30px;
}

.timeCode {
    font-size: 0.7em;
}

.controlIcon {
    width: 15px;
    height: 15px;
}

.navFavoriteIcon {
    width: 16px;
    height: 16px;
}

/* Ensure content doesn't get hidden */
#content {
    padding-bottom: calc(50px + env(safe-area-inset-bottom));
    min-height: calc(100vh - 50px);
}

/* Profile adjustments for mobile */
.profile-pic {
    width: 25px;
    height: 25px;
}

/* Navigation links adjustments */
.nav-link { 
    font-size: 0.9em;
    padding: 5px;
}

.icon {
    width: 20px;
    height: 20px;
}

.audioWave{
    top: 21%;
}

.titleBox{
    display: none;
}

.mainTrackInfo{
    width: 100vw;
    position: fixed;
    bottom: 3.4vh;
    z-index: 200;
}

.controlButtons{
    position: absolute;
    width: 93vw;
    justify-content: center;
}

.navFavoriteButton{
    left: 2vw;
    position: absolute;
}

..navFavoriteIcon{
    width: 20px;
    height: 20px;
}

.mainTrackCover{
    position: absolute;
    right: 2vw;
    width: 20px;
    height: 20px;
    
}



.mainControlBar{
    width: 100vw;
    position: fixed;
    left: 0px;
    bottom: 6.2vh;
    height: 4vh;
    z-index: 100;
}

.switch1{
    display: none;
}

.switch2{
    display: block;
}

}

/* --- START: Mobile Dropdown Menu Fix --- */

/* By default, the menu is hidden. JS will control its visibility. */
.navBar .nav-dropdown-content {
    display: none !important;
}

/* When JS adds the .is-open class, display the menu */
.navBar .nav-dropdown-content.is-open {
    display: block !important;
}

@media screen and (max-width: 768px) {
    /* On mobile, disable the desktop hover effect for dropdowns */
    .navBar .nav-dropdown:hover .nav-dropdown-content {
        display: none !important;
    }

    /* Key change: Position the dropdown menu ABOVE the navbar */
    .navBar .nav-dropdown-content {
        /* This positions the bottom of the menu at the top of its parent */
        bottom: 100% !important;
        /* Unset the 'top' property from the desktop style */
        top: auto !important;
        /* Center the menu above the link */
        left: 50% !important;
        transform: translateX(-50%) !important;
        /* Add a small visual gap between the menu and the navbar */
        margin-bottom: 5px; 
    }

    /* Make the dropdown menu items feel more natural when opening upwards */
    .navBar .nav-dropdown-content {
        display: none !important; /* Re-hide by default, .is-open will show it */
        flex-direction: column-reverse; /* Stacks items from bottom-to-top */
    }

    .navBar .nav-dropdown-content.is-open {
        display: flex !important; /* Use flex to respect column-reverse */
    }
}
/* --- START: Final Definitive Mobile Dropdown Styling --- */

@media screen and (max-width: 768px) {
    /* Le footer doit être sous la barre de navigation mobile */
    .footer {
      z-index: 999 !important; /* Juste en dessous de la navbar (1000) */
    }
  
    /* Rendre le conteneur du dropdown un point de référence pour le positionnement */
    .navBar .nav-dropdown {
      position: relative;
    }
  
    /* Positionner le contenu du menu AU-DESSUS du lien de la navbar.
       Il est masqué par défaut. */
    .navBar .nav-dropdown-content {
      display: none; /* Masqué par défaut */
      position: absolute !important;
      bottom: 100% !important; /* C'est la clé pour ouvrir vers le haut */
      left: 50% !important;
      transform: translateX(-50%) !important;
      margin-bottom: 8px !important; /* Espace visuel */
      background-color: rgba(20, 20, 20, 0.9) !important;
      backdrop-filter: blur(12px) !important;
      border-radius: 8px !important;
      box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5) !important;
      min-width: 140px;
      padding: 5px 0 !important;
      z-index: 1001; /* Au-dessus de la navbar elle-même */
    }
  
    /* Quand le parent .nav-dropdown a la classe .active (ajoutée par JS),
       on affiche le menu. */
    .navBar .nav-dropdown.active .nav-dropdown-content {
      display: block !important;
    }
  
    /* Optionnel : faire tourner la flèche quand le menu est actif */
    .navBar .nav-dropdown .nav-dropdown-arrow {
      transition: transform 0.2s ease-in-out;
      transform: rotate(180deg); /* Pointe vers le bas par défaut */
    }
  
    .navBar .nav-dropdown.active .nav-dropdown-arrow {
      transform: rotate(0deg) !important; /* Pointe vers le haut quand actif */
    }
  }
  /* --- END: Final Definitive Mobile Dropdown Styling --- */