/* --- Variables & Reset --- */
:root {
    --deep-blue: #1A3A5F;
    --coral-orange: #FF7043;
    --vivid-green: #0AAD48;
    --azure-blue: #3C97E6;
    --brown: #6B2A1D;
    --tech-dark: #121212;
    --tech-grey: #F5F5F7;
    --white: #FFFFFF;
    --text-color: #333;
    --line-color: rgba(255, 255, 255, 0.2);

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* High Contrast Mode Variables */
body.high-contrast {
    --deep-blue: #000000;
    --coral-orange: #FFFF00;
    --vivid-green: #00FF00;
    --azure-blue: #00FFFF;
    --brown: #FFFFFF;
    --tech-dark: #000000;
    --tech-grey: #FFFFFF;
    --white: #FFFFFF;
    --text-color: #FFFFFF;
    --line-color: #FFFFFF;
}

body.high-contrast * {
    background-color: #000 !important;
    color: #FFF !important;
    border-color: #FFF !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.high-contrast .btn-primary {
    background: #000 !important;
    border: 2px solid #FFFF00 !important;
    color: #FFFF00 !important;
}

body.high-contrast a {
    text-decoration: underline !important;
    color: #00FFFF !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--tech-dark);
    color: var(--white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    /* Base font size for scaling */
}

/* App-like body for Home ONLY */
body.home-page {
    height: 100vh;
    overflow: hidden;
    display: block;
    /* Reset flex for home */
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- Accessibility Utilities --- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--vivid-green);
    color: white;
    padding: 8px;
    z-index: 2000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

.a11y-controls {
    display: flex;
    gap: 5px;
    margin-left: 15px;
    align-items: center;
}

.a11y-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--line-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

.a11y-controls button:hover {
    background: var(--vivid-green);
    color: var(--tech-dark);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    color: var(--azure-blue);
}

p {
    margin-bottom: 1rem;
    color: #ddd;
}

/* --- Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--coral-orange);
    color: white;
}

.btn-primary:hover {
    background-color: #e64a19;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--vivid-green);
    color: var(--vivid-green);
}

.btn-secondary:hover {
    background-color: var(--vivid-green);
    color: white;
}

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

.mt-5 {
    margin-top: 3rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

/* --- Header --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    z-index: 1000;
    transition: background 0.3s;
}

/* Navbar style for non-home pages (solid background) */
body:not(.home-page) nav {
    background: rgba(18, 18, 18, 0.95);
    border-bottom: 1px solid var(--line-color);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
    /* Above mobile menu */
}

.logo span {
    color: var(--vivid-green);
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--tech-dark);
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.3s ease, background-color 0.3s;
}

.nav-links a:hover {
    transform: scale(1.05);
    background-color: var(--vivid-green);
    color: var(--tech-dark);
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 30px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
}

/* --- Main Content Spacer for Fixed Header --- */
body:not(.home-page) main {
    margin-top: 100px;
    /* Space for fixed header */
    flex: 1;
    /* Push footer down */
}

/* --- GALERIE ACCORDÉON (Home Only) --- */
.gallery-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.slide {
    position: relative;
    flex: 1;
    height: 100%;
    transition: flex 0.8s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease;
    overflow: hidden;
    cursor: pointer;
    border-right: 1px solid var(--line-color);
    filter: grayscale(100%) brightness(0.7);
}

.slide:last-child {
    border-right: none;
}

.slide:hover {
    flex: 5;
    filter: grayscale(0%) brightness(1);
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.2s ease;
}

.slide:hover .slide-bg {
    transform: scale(1.1);
}

.content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.2s;
}

.slide:hover .content {
    opacity: 1;
    transform: translateY(0);
}

.vertical-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    white-space: nowrap;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: opacity 0.3s;
}

.slide:hover .vertical-title {
    opacity: 0;
}

.content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 10px;
    color: white;
}

.content h2 span {
    color: var(--vivid-green);
}

.desc {
    font-size: 1.1rem;
    max-width: 500px;
    color: #ddd;
    margin-bottom: 20px;
    line-height: 1.5;
}

.tags {
    display: flex;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--vivid-green);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.tag {
    border: 1px solid var(--vivid-green);
    padding: 5px 10px;
    border-radius: 4px;
}

/* --- Cursor --- */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--vivid-green);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background 0.3s;
    mix-blend-mode: difference;
}

body.hovering-slide .cursor {
    width: 80px;
    height: 80px;
    background: white;
    border-color: transparent;
    opacity: 0.1;
}

/* --- Footer --- */
footer {
    background: #0b1623;
    padding: 50px 0;
    border-top: 1px solid var(--line-color);
    margin-top: auto;
    /* Push to bottom if content is short */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--azure-blue);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    nav {
        padding: 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 80%;
        text-align: center;
        background: transparent;
        color: white;
        border: 1px solid var(--line-color);
    }

    .nav-links a:hover {
        background: var(--vivid-green);
        color: white;
    }

    /* Home Gallery Responsive */
    .gallery-container {
        flex-direction: column;
    }

    .slide {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line-color);
    }

    /* Adjust vertical title for mobile */
    .vertical-title {
        transform: translate(-50%, -50%) rotate(0deg);
        width: 100%;
        text-align: center;
    }

    .content h2 {
        font-size: 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .a11y-controls {
        margin-top: 20px;
        margin-left: 0;
    }
}