:root {
    --bg-color: #0A0A0A; /* Dark background */
    --text-color: #FFFFFF; /* White text */
    --accent-cyan: #31cee7;
    --accent-pink: #FF007F;
    --secondary-text: #B3B3B3;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%; /* Ensures the body fills the viewport height */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body {
    position: relative;
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background: none; /* Remove direct background */
    padding-top: 80px; /* Match header height */
}


.background-blur {
    position: fixed;
    top: -50px;
    left: -50px;
    width: calc(100vw + 100px);
    height: calc(100vh + 100px);
    z-index: -1;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("../Photos/background.webp") no-repeat center center / cover;
    filter: blur(5px);
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
}
main {
    flex: 1; /* This makes the main content expand to push footer down */
}

h1, h2, h3, a {
    font-weight: 600; /* Bold text */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Depth effect */
    letter-spacing: 1px; /* Optional: Adds more space between letters */
    color: #fff; /* White text for contrast */
}
button{
    font-weight: 600;
}
/* General Header Styling - Fixed position for all resolutions */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 80px;
    position: fixed; /* Changed from static to fixed */
    top: 0; /* Ensure it stays at the top */
    left: 0; /* Ensure proper alignment */
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    
    /* Ensure rectangular shape */
    border-radius: 0 !important;
    overflow: visible;
    
    /* Match the background-blur without the blur effect */
    background: 
        linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
        url("../Photos/background.webp") no-repeat center top / cover;
    background-attachment: fixed;
    filter: none; /* Remove blur from the header itself */
    transition: background 0.3s ease;
}

/* Remove any pseudo-element that might be causing blur */
header::before {
    display: none !important;
}

/* Make sure the header content itself isn't blurred */
header {
    filter: none;
}

/* Update scrolled state to maintain fixed position */
header.scrolled {
    position: fixed; /* Keep it fixed when scrolled */
    /* No background change needed as we want the same background effect */
}

/* Add this class for the darkened header when menu is open */
header.menu-active {
    background: linear-gradient(rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.82)),
                url("../Photos/background.webp") no-repeat center top / cover;
    background-attachment: fixed;
    transition: background 0.3s ease;
}

/* HOME Button (Logo) */
.HOME {
    display: block;
    width: auto;
    height: auto;
    position: relative; /* Keep it in place */
    text-align: center;
    margin: 0 auto 0 0; /* Left align logo */
    padding-top: 10px; /* Keep just one padding-top */
}

/* Image Styling */
.HOME img {
    width: auto;
    height: auto;
    max-width: 200px; /* Adjust size as needed */
    object-fit: contain; /* Prevent distortion */
    transition: 
        transform 0.35s ease-in-out, /* Smooth scale transition */
        box-shadow 0.35s ease-in-out, 
        filter 0.35s ease-in-out; /* Smooth transition for glow effect */
    filter: drop-shadow(0 0 5px rgba(255, 0, 255, 0.2))
            drop-shadow(0 0 10px rgba(0, 255, 255, 0.3))
            drop-shadow(0 0 15px rgba(0, 255, 255, 0.4)); /* Softer glow effect */
}

/* Hover effect for stronger glow and scale */
.HOME img:hover {
    filter: drop-shadow(0 0 8px rgba(255, 0, 255, 0.4))
            drop-shadow(0 0 16px rgba(0, 255, 255, 0.5))
            drop-shadow(0 0 22px rgba(0, 255, 255, 0.6));
    transform: scale(1.05);
}
/* Navigation Container */
.nav-container {
    display: flex;
    justify-content: flex-end; /* Align nav links to the right */
    gap: 20px; /* Spacing between links */
    flex-grow: 1; /* Allow nav to take up remaining space */
}

nav {
    display: flex;
    gap: 20px; /* Spacing between links */
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
    padding: 10px 15px; /* Consistent padding */
    border-radius: 20px; /* Always have rounded corners */
    transition: all 0.3s ease; /* Smooth transition for all properties */
    background-color: transparent; /* Start with transparent background */
    position: relative;
}

/* Update hover effect to match current-page style */
nav a:hover {
    color: var(--accent-pink);
    background-color: white;
    transform: none; /* Remove the scale effect */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Remove the previous hover underline effect if it exists */
nav a:hover::before {
    display: none;
}

/* Current page indicator - make sure it has the same sizing */
nav a.current-page {
    background-color: white;
    color: var(--accent-pink);
    border-radius: 20px;
    padding: 10px 15px; /* Match regular link padding */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Fix Vertical Alignment */
header a, nav a {
    line-height: 1; /* Prevent text being too low */
}



/* SVG Hamburger Menu Styling */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
    position: absolute;
    top: 15px;
    right: 20px;
    padding: 0;
    outline: none;
    width: 40px;
    height: 40px;
}

/* SVG Line Styling */
.line {
    fill: none;
    transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
    stroke: var(--text-color); /* Use website text color */
    stroke-width: 8; /* Increased from 5.5 - this makes the lines thicker */
    stroke-linecap: round;
}

/* SVG Hamburger Animation */
.hamburger {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 400ms;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* hamburger specific styling */
.hamburger .top {
    stroke-dasharray: 40 172;
}
.hamburger .middle {
    stroke-dasharray: 40 111;
}
.hamburger .bottom {
    stroke-dasharray: 40 172;
}
.hamburger.active .top {
    stroke-dashoffset: -132px;
}
.hamburger.active .middle {
    stroke-dashoffset: -71px;
}
.hamburger.active .bottom {
    stroke-dashoffset: -132px;
}

/* Add hover effect */
.hamburger:hover .line {
    stroke: var(--accent-pink);
    filter: drop-shadow(0 0 2px var(--accent-pink));
}

/* Active state styling */
.hamburger.active .line {
    stroke: var(--accent-cyan);
    filter: drop-shadow(0 0 1px var(--accent-cyan));
}

/* Responsive Design */
@media (max-width: 815px) {
    body.menu-open {
        overflow: hidden; /* Prevent scrolling when menu is open */
    }
    
    header {
        flex-wrap: nowrap; /* Keep header on one line */
        justify-content: flex-start; /* Logo left */
        position: fixed; /* Changed from fixed to static */
        padding: 5px 15px; /* Smaller padding on mobile */
        background: 
            linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
            url("../Photos/background.webp") no-repeat center top / cover;
        background-attachment: fixed;
        border-radius: 0 !important; /* Explicitly rectangular on mobile */
        overflow: visible;
        filter: none;
    }
    
    header::before {
        display: none !important;
    }
    
    /* Keep the body padding to prevent content overlap */
    body {
        padding-top: 80px;
    }

    .hamburger {
        display: block; /* Show hamburger on mobile */
        transform: scale(1.35); /* Make the hamburger 35% larger */
        transform-origin: right top; /* Scale from the top-right corner */
    }

    .container {
        margin-top: 30px; /* Add space between header/hamburger and content */
    }

    /* Hide the normal navigation on mobile */
    nav {
        position: fixed; /* Fixed position covers the viewport */
        top: 80px; /* Position at bottom of navbar instead of top of viewport */
        left: 0;
        width: 100%;
        height: 40vh; /* Reduced from 45vh */
        max-height: 400px; /* Reduced from 450px */
        background-color: rgba(7, 8, 13,0.9);
        backdrop-filter: blur(4px); /* Blur background */
        z-index: 999;
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                   opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                   box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* Smooth transition */
        padding: 20px 0; /* Reduced top padding since we're not at screen top */
        box-shadow: none;
        border-top: none;

        flex-direction: column; /* Stack links vertically */
        align-items: center; /* Center links horizontally */
        gap: 15px; /* Reduced gap between items */
        overflow-y: auto; /* Allow scrolling if many items */
        transform: translateY(-100%) scaleY(0); /* Hide by collapsing upward */
        transform-origin: top; /* Scale from top edge */
        opacity: 0; /* Start invisible */
        display: flex;
        flex-direction: column;
        align-items: center; /* Center items horizontally */
        justify-content: center; /* Center items vertically */
        width: 100%;
        gap: 15px;
        text-align: center; /* Ensure text is centered */
    }

    /* Show mobile menu when active */
    nav.active {
        transform: translateY(0) scaleY(1); /* Expand down from navbar */
        opacity: 1; /* Make fully visible */

    }
    
    /* Add space for content below the hamburger */
    .search-container {
        margin-top: 20px;
    }

    nav a {
        display: inline-block;
        text-align: center;
        padding: 12px 24px; /* Increased padding */
        font-size: 22px; /* Increased from 18px */
        margin: 5px auto;
        width: auto;
        max-width: fit-content;
        border-radius: 22px; /* Slightly increased to match larger text */
        transition: all 0.3s ease;
        position: relative;
        overflow: visible;
        transform: none;
        left: 0;
    }

    nav a::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
        transition: width 0.3s ease;
        transform: translateX(-50%); /* Center the gradient */
    }

    nav a:hover {
        color: var(--accent-pink);
        transform: translateY(-5px); /* Move up on hover instead of sideways */
        background: rgba(0, 0, 0, 0.4);
    }
    
    nav a:hover::before {
        width: 70%; /* Expand from center */
    }
    
    /* Mobile menu overlay */
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 1;
        transition: opacity 0.3s ease;
    }
    
    /* Fix for horizontal scrolling */
    body {
        overflow-x: hidden; /* Prevent horizontal scrolling */
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    /* Ensure all content stays within viewport */
    header, section, footer, .container {
        max-width: 100%;
        box-sizing: border-box;

    }

    html, body {
        position: relative;
        height: 100%;
        width: 100%;
        overflow-x: hidden;
        overscroll-behavior: none; /* Prevent overscroll effects */
    }
    
    body::before {
        background-attachment: fixed;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
    }

    footer {
        padding: 10px 15px;
        font-size: 0.9em;
    }

    nav a.current-page {
        width: auto;
        padding: 12px 24px; /* Match the padding */
        font-size: 22px; /* Match the font size */
        text-align: center;
        background-color: white;
        color: var(--accent-pink);
        margin: 5px auto;
        max-width: fit-content;
        left: 0;
    }
    
    /* Update hover styles to match */
    nav a:hover {
        color: var(--accent-pink);
        background-color: white; /* Match current-page style */
        transform: translateY(-3px); /* Smaller movement */
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }
    
    /* Remove before effect when hovering */
    nav a:hover::before {
        display: none;
    }

    footer, footer.footer {
        display: block !important; /* Force display */
        visibility: visible !important; /* Ensure visibility */
        position: relative !important; /* Keep in normal flow */
        z-index: 1001 !important; /* Above other elements */
        margin-top: 50px !important; /* Add space above footer */
        width: 100% !important; /* Full width */
    }

    /* Ensure the page structure properly includes footer */
    body {
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
    }

    main {
        flex: 1 0 auto !important; /* Grow but don't shrink */
        margin-bottom: 20px !important; /* Space before footer */
    }
    
    /* Change footer positioning for mobile */
    html, body {
        height: auto !important; /* Allow body to grow naturally */
        min-height: 0 !important; /* Override min-height */
    }
    
    body {
        display: block !important; /* Switch from flex to block layout for mobile */
    }
    
    main {
        margin-bottom: 20px; /* Add space after main content */
    }
    
    footer.footer {
        position: relative !important;
        margin-top: 30px !important; /* Add space above footer */
        margin-bottom: 20px !important; /* Add space below footer */
        bottom: auto !important; /* Remove bottom positioning */
        display: block !important;
        visibility: visible !important;
    }
    
    /* Remove any rules causing footer to stick to bottom */
    .footer-wrapper {
        position: static !important;
    }

    body::before {
        position: fixed !important;
        top: -50px !important;
        left: -50px !important;
        width: calc(100% + 100px) !important;
        height: calc(100% + 100px) !important;
        min-height: 100vh !important;
        background-attachment: fixed !important;
        background-size: cover !important;
        background-position: center center !important;
        z-index: -1 !important;
        filter: blur(5px);
        transform: none !important;
        pointer-events: none;
        content: "";
    }
}

/* Prevent iOS safari viewport height issues */
/* Prevent iOS safari viewport height issues */
@media screen and (max-width: 815px) and (orientation: portrait) {
    :root {
        --vh: 1vh;
    }
    
    body::before {
        top: -50px;
        left: -50px;
        width: calc(100% + 100px);
        height: calc(100 * var(--vh, 1vh) + 100px); /* Extend further beyond the bottom */
        background-attachment: fixed;
        background-position: center center; /* Ensure proper centering */
    }
}

@media (max-width: 500px) {
    .HOME img {
        max-width: 180px; /* Smaller logo on very small screens */
    }

    nav a, nav a.current-page {
        font-size: 20px; /* Increased from 16px */
        padding: 10px 20px; /* Slightly reduce padding on smaller screens */
    }
}

@media (max-width: 387px) {
    .HOME img {
        max-width: 160px; /* Even smaller logo on tiny screens */
    }

    nav a, nav a.current-page {
        font-size: 18px; /* Increased from 15px */
        padding: 8px 18px; /* Further reduce padding on very small screens */
    }
}


footer.footer {
    color: var(--secondary-text); /* Texte gris clair */
    text-align: center;
    margin-top: auto;
    padding: 20px 10px; /* Espacement interne */
    font-size: 14px;
}

footer.footer p {
    margin: 0; /* Supprime les marges internes */
    line-height: 1.5; /* Espacement du texte */
}

/* Add at the end of the file - last resort fix for footer visibility */
@media (max-width: 815px) {
    /* Force footer to show at the bottom */
    .footer-wrapper {
        position: relative;
        width: 100%;
        margin-top: 80px;
        clear: both;
    }
    
    body::after {
        content: "";
        display: block;
        height: 100px; /* Space for footer */
        clear: both;
    }
}

