:root {
    --color-bg-white: #fafafa;
    --color-bg-black: #050505;
    --color-text-dark: #1a1a1a;
    --color-text-light: #f5f5f5;
    --color-accent-gold: #d4b483;
    --font-heading: 'Bodoni Moda', serif;
    --font-body: 'Inter', sans-serif;
    --spacing-huge: 20vh;
    --spacing-large: 10vh;
    --spacing-medium: 5vh;
}

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

html {
    background-color: var(--color-bg-black);
    scroll-behavior: smooth;
    scroll-snap-type: y proximity; /* Native scroll snapping */
    scroll-padding-top: 100px; /* Espace pour le header sticky sur mobile */
}

body {
    background-color: var(--color-bg-white);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    font-weight: 300;
    margin: 0;
    overflow-x: hidden;
}

.app-wrapper {
    display: flex;
    align-items: flex-start; /* Required for sticky children */
    min-height: 100vh;
    width: 100%;
}

.main-content {
    flex: 1;
    min-height: 100vh;
    position: relative;
}

/* Typography elements */
h1, h2, h3, .logo {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: -0.01em;
}

::selection {
    background-color: var(--color-text-dark);
    color: var(--color-text-light);
}

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

.custom-cursor.hover {
    width: 50px;
    height: 50px;
    background-color: rgba(212, 180, 131, 0.2);
}

@media (pointer: fine) {
    body, a, button, input, textarea, .leaflet-container {
        cursor: none !important;
    }
}

/* --- Header --- */
.gallery-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 1.5rem calc(5rem + 320px) 1.5rem 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #222;
    color: white;
}

.logo {
    font-size: 2.4rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600; /* Bolder to show off the effect better */
    
    /* Chic Golden Shimmer Effect */
    background: linear-gradient(
        120deg,
        #ffffff 25%,
        var(--color-accent-gold) 50%,
        #ffffff 75%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: goldShimmer 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

@keyframes goldShimmer {
    0% { background-position: -100% center; }
    20% { background-position: 200% center; }
    100% { background-position: 200% center; }
}

nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    padding-bottom: 5px;
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: white;
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

nav a:hover {
    opacity: 1;
}

nav a:hover::after {
    width: 100%;
}

.login-link {
    color: var(--color-accent-gold) !important;
}

.login-link::after {
    background-color: var(--color-accent-gold) !important;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--color-bg-black);
    color: var(--color-text-light);
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

.hero-content {
    position: absolute;
    z-index: 10;
    text-align: center;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-size: clamp(4rem, 12vw, 12rem);
    line-height: 1;
    margin-bottom: 0.5rem;
    mix-blend-mode: difference;
    white-space: nowrap;
    opacity: 0;
    animation: textRise 2s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s forwards;
    transform: translateY(30px);
}

.hero-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #000;
    padding: 3rem 0;
    text-align: center;
    z-index: 20;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.8);
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.1em;
    color: var(--color-text-light);
    font-family: var(--font-heading);
    font-style: italic;
    opacity: 0;
    animation: textRise 2s cubic-bezier(0.165, 0.84, 0.44, 1) 1s forwards;
    transform: translateY(20px);
}

.hero-image-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeInImage 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-image {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
    filter: brightness(0.9) contrast(1.1); /* enhances chiaroscuro */
}

@keyframes textRise {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInImage {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

.section-title {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: var(--spacing-large);
    color: var(--color-text-dark);
}

/* --- Manifesto Section --- */
.manifesto-section {
    padding: var(--spacing-huge) 5%;
    background-color: var(--color-bg-white);
    min-height: 100vh;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    position: relative;
    border-bottom: 1px solid #eaeaea;
}

.manifesto-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 8%;
    align-items: flex-start;
    width: 100%;
}

.manifesto-title-col {
    flex: 1;
}

.manifesto-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 1.1;
    color: var(--color-text-dark);
    position: sticky;
    top: 20vh;
}

.manifesto-text-col {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.manifesto-lead {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-accent-gold);
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.manifesto-text-col p:not(.manifesto-lead) {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    font-weight: 300;
    text-align: justify;
}

@media (max-width: 1024px) {
    .manifesto-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .manifesto-title {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .manifesto-section {
        padding: var(--spacing-large) 5%;
        min-height: auto;
    }
    
    .manifesto-title {
        font-size: 3.5rem;
    }
    
    .manifesto-lead {
        font-size: 1.25rem;
    }
    
    .manifesto-text-col p:not(.manifesto-lead) {
        font-size: 1rem;
    }
}

/* --- Gallery Section (Masonry) --- */
.gallery-section {
    padding: var(--spacing-huge) 5%;
    background-color: var(--color-bg-white);
    min-height: 100vh;
    scroll-snap-align: start;
}

.collection-header {
    text-align: center;
    margin-bottom: var(--spacing-large);
}

.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    cursor: pointer;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(0.2);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.masonry-item:hover .gallery-image {
    transform: scale(1.03);
    filter: grayscale(0);
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute;
    top: 2rem;
    right: 3rem;
    color: #fff;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2010;
}

.close-lightbox:hover {
    color: var(--color-accent-gold);
}

/* --- Interactive Map Section --- */
.world-map-section {
    padding: 0 5%;
    background-color: var(--color-bg-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    scroll-snap-align: start;
}

.map-header {
    text-align: center;
    margin-bottom: var(--spacing-large);
}

.map-subtitle {
    color: #777;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 1rem;
}

.map-container {
    width: 100%;
    max-width: 1200px;
    height: 60vh;
    border: 1px solid #ddd;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

#map {
    width: 100%;
    height: 100%;
    /* Apply a grayscale/dark filter to make the map look minimal */
    filter: grayscale(1) invert(0.9) hue-rotate(180deg);
}

/* Leaflet Popup Styling Override to match aesthetic */
.leaflet-popup-content-wrapper {
    background-color: var(--color-bg-black);
    color: var(--color-text-light);
    border-radius: 0;
    border: 1px solid #333;
    font-family: var(--font-body);
}

.leaflet-popup-tip {
    background-color: var(--color-bg-black);
}

.leaflet-popup-content {
    margin: 15px;
    text-align: center;
}

.popup-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.popup-text {
    font-size: 0.8rem;
    font-style: italic;
    color: #ccc;
    font-family: var(--font-heading);
}

/* --- Recruitment Section --- */
.recruitment {
    padding: 0 5%;
    background-color: var(--color-bg-black);
    color: var(--color-text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    scroll-snap-align: start;
}

.recruitment-content {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.recruitment-subtitle {
    color: var(--color-accent-gold);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.recruitment-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    color: var(--color-text-light);
    padding: 1rem 0;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--color-accent-gold);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.btn-submit {
    background: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--color-text-light);
    padding: 1rem 2.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-top: 2rem;
}

.btn-submit:hover {
    background: var(--color-text-light);
    color: var(--color-bg-black);
}

.form-status {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    min-height: 20px;
}

/* --- Instagram Sidebar Section --- */
.instagram-sidebar {
    width: 320px;
    height: 100vh;
    background-color: var(--color-bg-black);
    color: var(--color-text-light);
    border-left: 1px solid #222;
    display: flex;
    flex-direction: column;
    z-index: 200;
    position: sticky;
    top: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sidebar-header {
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    border-bottom: 1px solid #222;
    flex-shrink: 0;
    position: relative;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.sidebar-link {
    color: var(--color-accent-gold);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 1rem;
    transition: opacity 0.3s;
}

.sidebar-link:hover {
    opacity: 0.8;
}

.sidebar-desc {
    color: #666;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    font-style: italic;
}

/* FAB and Close button hidden by default on desktop */
.instagram-fab {
    display: none;
}

.close-drawer {
    display: none;
}

/* Mobile Tabs (Hidden on desktop) */
.mobile-tabs {
    display: none;
}

/* Disable custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
}

.sidebar-feed {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.marquee-vertical {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-track-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: marquee-vertical 40s linear infinite;
}

.marquee-track-vertical:hover {
    animation-play-state: paused;
}

.sidebar-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    filter: grayscale(0.8) contrast(1.2);
    transition: filter 0.3s ease, transform 0.3s ease;
    border: 1px solid #333;
}

.sidebar-img:hover {
    filter: grayscale(0) contrast(1);
    transform: scale(1.02);
}

.mock-post {
    width: 100%;
    aspect-ratio: 1;
    background-color: #1a1a1a;
    border: 1px dashed #444;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mock-post::after {
    content: "Espace #Bend&Knuts";
    color: #555;
    font-size: 0.8rem;
    font-family: var(--font-body);
}

@keyframes marquee-vertical {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    nav { gap: 1.5rem; }
    .gallery-header { padding: 1.5rem calc(2rem + 320px) 1.5rem 2rem; }
}

@media (max-width: 1024px) {
    .gallery-header {
        padding: 1.5rem calc(2rem + 250px) 1.5rem 2rem;
        width: 100%;
    }
    .instagram-sidebar {
        width: 250px;
    }
    nav {
        gap: 1rem;
    }
    nav a {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .app-wrapper {
        flex-direction: column;
    }
    html, body {
        overflow: visible;
        height: auto;
    }
    .main-content {
        width: 100%;
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
    }
    .gallery-header {
        position: sticky;
        top: 0;
        z-index: 2000;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        padding: 1rem 5%;
        flex-direction: column;
        gap: 1rem;
        mix-blend-mode: normal;
        background-color: rgba(5, 5, 5, 0.95);
        border-bottom: 1px solid #333;
    }
    
    .logo {
        font-size: 2rem;
    }

    nav {
        width: 100%;
        box-sizing: border-box;
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 1.5rem;
        padding-bottom: 0.5rem;
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none; /* Firefox */
        justify-content: flex-start;
        text-align: left;
    }
    
    nav::-webkit-scrollbar {
        display: none;
    }
    
    nav a {
        font-size: 0.85rem;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .instagram-sidebar {
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid #333;
        border-bottom: 1px solid #333;
        margin: 2rem 0;
    }
    
    .sidebar-feed {
        height: 400px; /* Hauteur fixe pour le widget Tagembed en mode Carousel */
    }

    .manifesto-modal-content {
        padding: 2rem;
        width: 95%;
        border-left: none;
    }
    
    .close-manifesto {
        top: 0.5rem;
        right: 1rem;
    }

    /* Transformation de la grille en défilement horizontal */
    .masonry-grid {
        column-count: auto;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.5rem;
        padding-bottom: 1.5rem;
        padding-right: 2rem;
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none; /* Firefox */
    }
    
    .masonry-grid::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }
    
    .masonry-item {
        flex: 0 0 85vw; /* Chaque photo prend 85% de l'écran */
        scroll-snap-align: center;
        margin-bottom: 0;
    }

    .image-container-black {
        padding: 2rem;
    }
    
    .hero-title {
        font-size: clamp(3rem, 15vw, 6rem);
    }
}
