/* ========================================
   DESIGN SYSTEM & VARIABLES
   ======================================== */
:root {
    --color-bg-primary: #050405;
    --color-bg-secondary: #0f0d0c;
    --color-accent-champagne: #D4B78A;
    --color-accent-red: #8B1E1E;
    --color-accent-gold: #C88F3A;
    --color-text-primary: #F5F2EE;
    --color-text-secondary: rgba(245, 242, 238, 0.7);
    
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
    
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-2xl: 64px;
    
    --radius: 4px;
    --transition: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global film grain overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /></filter><rect width="100" height="100" fill="%23000" filter="url(%23noise)" opacity="0.1"/></svg>');
    background-size: 50px 50px;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 999; /* FIX: était 9999, bloquait la lightbox (z-index: 2000) */
    filter: contrast(1.1) brightness(1.05);
}

/* Cinematic vignette */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(5, 4, 5, 0.4) 100%);
    pointer-events: none;
    z-index: 1; /* FIX: était 9998, couvrait tout le contenu sur mobile */
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: clamp(32px, 8vw, 54px);
    line-height: 1.1;
    letter-spacing: -1px;
}

h2 {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.2;
}

h3 {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(20px, 3vw, 28px);
    line-height: 1.3;
}

p {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--color-accent-champagne);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-gold);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.glow {
    box-shadow: 
        0 6px 30px rgba(200, 143, 58, 0.16),
        0 0 18px rgba(200, 143, 58, 0.10);
    transition: box-shadow var(--transition);
}

.glow:hover {
    box-shadow: 
        0 12px 50px rgba(200, 143, 58, 0.25),
        0 0 30px rgba(200, 143, 58, 0.18);
}

.section {
    padding: var(--spacing-2xl) 0;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }
.section:nth-child(5) { animation-delay: 0.5s; }

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

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-accent-champagne);
    color: var(--color-bg-primary);
    box-shadow: 0 4px 20px rgba(212, 183, 138, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 40px rgba(200, 143, 58, 0.3);
}

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

.btn-secondary:hover {
    background: rgba(212, 183, 138, 0.1);
    transform: translateY(-4px);
}

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

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: rgba(15, 13, 12, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 183, 138, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    transition: transform var(--transition);
}

.logo img {
    height: 90px;
    width: auto;
    max-width: 220px;
    display: block;
}

.logo:hover img {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
}

nav a {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent-champagne);
    transition: width var(--transition);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--color-accent-champagne);
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* FIX: translate simplifié, valeur cohérente avec gap:6px + height:2px */
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* FIX: idem */
}

@media (max-width: 768px) {
    nav ul {
        position: fixed;
        top: 100px; /* FIX: aligné sur la hauteur réelle du header (100px) */
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--color-bg-secondary);
        padding: 0 var(--spacing-lg); /* FIX: padding vertical à 0 quand fermé */
        gap: var(--spacing-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        z-index: 999;
    }

    nav ul.active {
        max-height: 400px;
        padding: var(--spacing-lg); /* FIX: padding visible seulement quand ouvert */
    }

    .hamburger {
        display: flex;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */
#home {
    height: calc(100vh - 80px); /* 80px = hauteur du header */
    margin-top: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Conteneur vidéo + overlay */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

/* Vidéo en plein écran */
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cache couleur de la DA avec opacité réglable */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(200, 143, 58, 0.25), transparent 0%),
                linear-gradient(135deg, rgba(5, 4, 5, 0.85), rgba(15, 13, 12, 0.9));
    /* Opacité globale de l’overlay */
    opacity: 0.70;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    animation: heroFadeIn 1s ease-out;
}

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

.hero-content h1 {
    color: var(--color-accent-champagne);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 4px 20px rgba(212, 183, 138, 0.2);
}

.hero-content p {
    font-size: 20px;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-accent-champagne);
    fill: none;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ========================================
   ABOUT SECTION
   ======================================== */
#about {
    background: var(--color-bg-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.about-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, rgba(212, 183, 138, 0.1), rgba(200, 143, 58, 0.05));
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h2 {
    color: var(--color-accent-champagne);
    margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   SERVICES SECTION
   ======================================== */
#services {
    background: var(--color-bg-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: rgba(15, 13, 12, 0.8);
    border: 1px solid rgba(212, 183, 138, 0.1);
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
}

.service-card:hover {
    transform: translateY(-12px);
    background: rgba(15, 13, 12, 1);
    border-color: rgba(200, 143, 58, 0.3);
    box-shadow: 0 20px 60px rgba(200, 143, 58, 0.15);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(212, 183, 138, 0.2), rgba(200, 143, 58, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    font-size: 32px;
}

.service-card h3 {
    color: var(--color-accent-champagne);
    margin-bottom: var(--spacing-sm);
}

/* ========================================
   CLIENTS SECTION
   ======================================== */
#clients {
    background: var(--color-bg-secondary);
    padding: var(--spacing-xl) 0;
}

.clients-slider {
    overflow: hidden;
    position: relative;
}

.clients-track {
    display: flex;
    gap: var(--spacing-2xl);
    animation: scroll 30s linear infinite;
}

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

.client-logo {
    flex-shrink: 0;
    width: 200px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 183, 138, 0.05);
    border: 1px solid rgba(212, 183, 138, 0.1);
    border-radius: var(--radius);
    opacity: 0.6;
    transition: all var(--transition);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
}

.client-logo:hover {
    opacity: 1;
    box-shadow: 0 6px 30px rgba(200, 143, 58, 0.16);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   TEAM SECTION
   ======================================== */
#team {
    background: var(--color-bg-primary);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
}

.team-card {
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
}

.team-card:hover {
    transform: translateY(-8px);
}

.team-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(212, 183, 138, 0.1), rgba(200, 143, 58, 0.05));
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h3 {
    color: var(--color-accent-champagne);
    margin-bottom: var(--spacing-xs);
}

.team-role {
    font-size: 14px;
    color: var(--color-accent-gold);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.team-skills {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

/* ========================================
   PORTFOLIO SECTION
   ======================================== */
#portfolio {
    background: var(--color-bg-secondary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.portfolio-item {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all var(--transition);
}

.portfolio-item img,
.portfolio-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.portfolio-item:hover img,
.portfolio-item:hover video {
    transform: scale(1.08);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 4, 5, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);        /* FIX: marge intérieure sur tous les côtés */
    opacity: 0;
    transition: opacity var(--transition);
    backdrop-filter: blur(4px);
    box-sizing: border-box;            /* FIX: padding ne déborde pas */
}

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

.portfolio-title {
    color: var(--color-accent-champagne);
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;                   /* FIX: texte long ne déborde pas */
}

/* ========================================
   PROCESS SECTION
   ======================================== */
#process {
    background: var(--color-bg-primary);
}

.process-timeline {
    position: relative;
    padding: var(--spacing-xl) 0;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.process-step {
    position: relative;
    padding: var(--spacing-lg);
    background: rgba(15, 13, 12, 0.6);
    border: 1px solid rgba(212, 183, 138, 0.1);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
}

.process-step:hover {
    background: rgba(15, 13, 12, 1);
    border-color: rgba(200, 143, 58, 0.3);
    transform: translateY(-4px);
}

.process-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-accent-champagne), var(--color-accent-gold));
    color: var(--color-bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 24px;
    margin: 0 auto var(--spacing-md);
}

.process-step h3 {
    color: var(--color-accent-champagne);
    margin-bottom: var(--spacing-sm);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
#contact {
    background: var(--color-bg-secondary);
}

.contact-grid {
    display: block; /* ou grid-template-columns: 1fr; */
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-family: var(--font-title);
    font-weight: 600;
    color: var(--color-accent-champagne);
    margin-bottom: var(--spacing-xs);
    font-size: 14px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    background: rgba(15, 13, 12, 0.8);
    border: 1px solid rgba(212, 183, 138, 0.2);
    color: var(--color-text-primary);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 16px;
    transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent-champagne);
    background: rgba(15, 13, 12, 1);
    box-shadow: 0 0 20px rgba(212, 183, 138, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.contact-item h4 {
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-accent-champagne);
    text-transform: uppercase;
}

.contact-item p {
    margin: 0;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--color-bg-primary);
    border-top: 1px solid rgba(212, 183, 138, 0.1);
    padding: var(--spacing-xl) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr; /* réseaux plus étroit à droite */
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.footer-col:last-child {
    text-align: right;
}

.footer-col:last-child .footer-socials {
    justify-content: flex-end;
}

.footer-col h4 {
    color: var(--color-accent-champagne);
    margin-bottom: var(--spacing-md);
    font-size: 14px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
}

.footer-bottom {
    border-top: 1px solid rgba(212, 183, 138, 0.1);
    padding-top: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.footer-socials {
    display: flex;
    gap: var(--spacing-md);
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(212, 183, 138, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.footer-socials a:hover {
    background: var(--color-accent-champagne);
    color: var(--color-bg-primary);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

/* ========================================
   LIGHTBOX MODAL
   ======================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 4, 5, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 90vw;           /* FIX: width explicite (était absent) */
    max-width: 960px;      /* FIX: max-width cohérent avec l'iframe */
    background: var(--color-bg-secondary);
    border: 1px solid rgba(212, 183, 138, 0.2);
    border-radius: var(--radius);
    overflow: hidden;      /* FIX: était 'auto', cassait le ratio de l'iframe */
    padding: var(--spacing-lg);
}


.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(212, 183, 138, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--color-accent-champagne);
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition);
    z-index: 2001;
}

.lightbox-close:hover {
    background: var(--color-accent-champagne);
    color: var(--color-bg-primary);
}

.lightbox img,
.lightbox video {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0 var(--spacing-md);
    }

    .logo {
        font-size: 18px;
    }

    .hero-content {
        padding: 0 var(--spacing-md);
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}
