/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #09090b; /* Very dark background */
    --text-color: #f4f4f5; /* Off-white text */
    --accent-color: #ffffff;
    --muted-color: #a1a1aa;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-color);
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom one */
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.8s ease;
}

#loader.hide {
    opacity: 0;
    pointer-events: none;
}

.loader-art {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.loader-art img {
    max-height: 88vh;
    width: auto;
    opacity: 0.2;
    mix-blend-mode: screen;
}

.loader-ui {
    position: absolute;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.loader-bar-wrap {
    width: 220px;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

#loader-bar {
    height: 100%;
    width: 0;
    background: var(--text-color);
}

#loader-bar.loading {
    animation: barFill 2.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes barFill {
    0%   { width: 0%; }
    55%  { width: 68%; }
    82%  { width: 90%; }
    100% { width: 100%; }
}

#enter-btn {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    cursor: none;
}

#enter-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Mute button */
#mute-btn.muted {
    opacity: 0.4;
}

/* Custom Cursor */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, border-color 0.2s;
}

/* Links and Buttons */
a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--muted-color);
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--text-color);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-fast);
}

.btn:hover {
    color: var(--bg-color);
    border-color: var(--text-color);
}

.btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 24px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

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

.social-link {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lang-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: none;
    font-family: var(--font-body);
    font-size: 0.8rem;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
}

.hero-visual {
    display: grid;
    place-items: center;
    margin-bottom: 2.5rem;
    mix-blend-mode: screen;
}

.hero-svg {
    grid-area: 1/1;
    display: block;
    max-height: 75vh;
    width: auto;
    max-width: 92vw;
}

.hero-svg path {
    transform-box: fill-box;
    transform-origin: center;
}

.hero-title-img {
    grid-area: 1/1;
    max-height: 75vh;
    width: auto;
    max-width: 92vw;
    object-fit: contain;
    opacity: 0;
}

.hero-visual.animate .hero-title-img {
    animation: assembleTitle 1s cubic-bezier(0.16, 1, 0.3, 1) 1.4s forwards;
}

@keyframes assembleTitle {
    from {
        opacity: 0;
        transform: translateY(-18px) scale(1.03);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-description {
    max-width: 600px;
    margin: 0 auto 3rem;
    color: var(--muted-color);
    font-size: 1.1rem;
    min-height: 3.5rem;
}

.hero-description::after {
    content: '|';
    display: inline-block;
    margin-left: 2px;
    color: var(--muted-color);
    opacity: 0;
    transition: opacity 0.1s;
}

.hero-description.typing::after {
    opacity: 1;
    animation: blink 0.6s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--text-color);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Gallery Section */
.gallery-section {
    padding: 100px 5%;
    min-height: 100vh;
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-header h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 400px;
    gap: 24px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
}

/* Making some items span 2 columns for a more dynamic look */
@media (min-width: 768px) {
    .gallery-item:nth-child(4n - 3) {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: grayscale(20%) contrast(1.1);
}

.gallery-item .overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overlay span {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1.2);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item:hover .overlay span {
    transform: translateY(0);
}

/* Color Gallery Variant */
.gallery-section--color {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-subtitle {
    color: var(--muted-color);
    font-size: 1rem;
    margin-top: 12px;
    letter-spacing: 1px;
}

.gallery-section--color .gallery-item img {
    filter: saturate(1.1) contrast(1.05);
}

.gallery-section--color .gallery-item:hover img {
    filter: saturate(1.4) contrast(1.1) brightness(1.05);
    transform: scale(1.05);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-close {
    position: fixed;
    top: 24px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: none;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-content {
    position: relative;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.88);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

#lightbox-img {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Cursor pointer pour les images de la galerie */
.gallery-item {
    cursor: none;
}

/* Footer */
.footer {
    padding: 80px 5% 40px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
}

.copyright {
    color: var(--muted-color);
    font-size: 0.9rem;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay for gallery items */
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.2s; }
.gallery-item:nth-child(4) { transition-delay: 0.3s; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        gap: 16px;
    }
    .social-link {
        display: none; /* Hide on very small screens to save space, or keep them */
    }
    
    /* Show custom cursor but allow interaction on mobile */
    .cursor-dot, .cursor-outline {
        display: none;
    }
    body {
        cursor: auto;
    }
    .lang-btn {
        cursor: pointer;
    }
}
