/* =============================================================================
   EARTHFLOW - Production Premium
   Minimal, cohérent, performant
============================================================================= */

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #0a0e11;
    color: #e8edf0;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Variables */
:root {
    --color-dark: #0a0e11;
    --color-dark-alt: #0f1419;
    --color-dark-lighter: #1a2530;
    --color-accent: #5a8c9e;
    --color-text: #f0f4f7;
    --color-text-muted: #b0bec8;
    
    --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
    
    --space-xs: 0.75rem;
    --space-sm: 1.5rem;
    --space-md: 3rem;
    --space-lg: 6rem;
    --space-xl: 9rem;
    --space-xxl: 12rem;
    
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.5s;
}

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

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--color-text);
    margin-bottom: var(--space-xl);
}

/* ============================================================================
   Hero - Immersif et contemplatif
============================================================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--color-dark);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(1.05);
    object-fit: cover;
    z-index: 1;
    opacity: 0.7;
    filter: brightness(0.85) saturate(1.1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at center, transparent 0%, rgba(10, 14, 17, 0.4) 70%),
        linear-gradient(180deg, rgba(10, 14, 17, 0.2) 0%, rgba(10, 14, 17, 0.65) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: var(--space-md);
    max-width: 1200px;
    animation: fadeIn 2s var(--ease);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(4.5rem, 15vw, 10rem);
    font-weight: 200;
    letter-spacing: 0.18em;
    margin-bottom: var(--space-md);
    color: var(--color-text);
    text-transform: uppercase;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

.hero-tagline {
    font-size: clamp(1.15rem, 3.5vw, 1.65rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    color: rgba(232, 237, 240, 0.75);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
    opacity: 0;
    animation: fadeIn 2s var(--ease) 0.5s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-decoration: none;
    opacity: 0.3;
    transition: opacity var(--duration) var(--ease);
}

.scroll-indicator:hover {
    opacity: 0.6;
}

.scroll-arrow {
    display: block;
    width: 24px;
    height: 24px;
    border-left: 1px solid rgba(232, 237, 240, 0.4);
    border-bottom: 1px solid rgba(232, 237, 240, 0.4);
    transform: rotate(-45deg);
    animation: bounce 2.5s ease-in-out 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(-45deg) translateY(0); }
    50% { transform: rotate(-45deg) translateY(-8px); }
}

/* ============================================================================
   About - Spacieux et lisible
============================================================================ */
.about {
    padding: var(--space-xxl) 0;
    background-color: var(--color-dark-alt);
}

.about-text {
    max-width: 750px;
    margin: 0 auto;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    line-height: 2;
    color: var(--color-text-muted);
    font-weight: 300;
    letter-spacing: 0.015em;
    text-align: center;
}

/* ============================================================================
   Gallery - Grille aérée et élégante
============================================================================ */
.gallery {
    padding: var(--space-xxl) 0;
    background-color: var(--color-dark);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
    border: none;
    background: var(--color-dark-lighter);
    padding: 0;
    display: block;
    width: 100%;
    transition: box-shadow var(--duration) var(--ease);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.gallery-item:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 6px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--duration) var(--ease), filter var(--duration) var(--ease);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(10, 14, 17, 0.15) 100%);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
    pointer-events: none;
}

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

.gallery-item:hover img {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* ============================================================================
   Contact - Formulaire premium
============================================================================ */
.contact {
    padding: var(--space-xxl) 0;
    background-color: var(--color-dark-alt);
}

.contact-intro {
    max-width: 650px;
    margin: 0 auto var(--space-lg);
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    line-height: 1.9;
    color: var(--color-text-muted);
    font-weight: 300;
    text-align: center;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(26, 37, 48, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    font-size: 1rem;
    font-family: inherit;
    border-radius: 2px;
    transition: all var(--duration) var(--ease);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(176, 190, 200, 0.4);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(26, 37, 48, 0.8);
    box-shadow: 0 0 0 3px rgba(90, 140, 158, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

.form-submit {
    width: 100%;
    padding: 1.25rem 2rem;
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-accent);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    transition: left var(--duration) var(--ease);
    z-index: -1;
}

.form-submit:hover::before {
    left: 0;
}

.form-submit:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.form-submit:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

.form-submit:active {
    transform: translateY(0);
}

.submit-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.form-submit:hover .submit-icon {
    transform: translateX(4px);
}

.form-notice {
    margin-top: var(--space-md);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(176, 190, 200, 0.5);
    font-weight: 300;
}

/* Honeypot field (hidden from users, visible to bots) */
input[name="_honey"] {
    display: none !important;
}

/* ============================================================================
   Footer - Discret et équilibré
============================================================================ */
.footer {
    padding: var(--space-lg) 0 var(--space-md);
    background-color: var(--color-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-copyright {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-muted);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
    opacity: 1;
    transform: translateY(-2px);
}

.social-link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* ============================================================================
   Lightbox - Immersif
============================================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(10, 14, 17, 0.97);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration) var(--ease), visibility var(--duration) var(--ease);
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    user-select: none;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.4s var(--ease);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 2.5rem;
    cursor: pointer;
    padding: var(--space-sm);
    transition: all 0.3s ease;
    line-height: 1;
    z-index: 1001;
    opacity: 0.5;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--color-accent);
    opacity: 1;
}

.lightbox-close {
    top: var(--space-md);
    right: var(--space-md);
}

.lightbox-prev {
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) translateX(-4px);
}

.lightbox-next:hover {
    transform: translateY(-50%) translateX(4px);
}

.lightbox button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 6px;
}

/* ============================================================================
   Responsive - Desktop first
============================================================================ */

/* Tablette */
@media (max-width: 992px) {
    :root {
        --space-xl: 6rem;
        --space-xxl: 8rem;
    }
    
    .gallery-grid {
        gap: var(--space-md);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --space-md: 2rem;
        --space-lg: 4rem;
        --space-xl: 5rem;
        --space-xxl: 6rem;
    }
    
    .container,
    .container-wide {
        padding: 0 var(--space-sm);
    }
    
    .hero {
        min-height: 600px;
    }
    
    .hero-title {
        letter-spacing: 0.08em;
    }
    
    .hero-tagline {
        letter-spacing: 0.08em;
    }
    
    .section-title {
        margin-bottom: var(--space-lg);
    }
    
    .gallery-grid {
        gap: var(--space-sm);
        margin-top: var(--space-lg);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .footer-brand {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: var(--space-xs);
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    :root {
        --space-sm: 1rem;
        --space-md: 1.5rem;
    }
    
    .hero {
        min-height: 500px;
    }
    
    .scroll-indicator {
        bottom: var(--space-sm);
    }
    
    .about-text {
        line-height: 1.85;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* ============================================================================
   Accessibilité
============================================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
