/* TNX AGENCY — DESIGN SYSTEM (VERSION FOND BLANC) */
/* Cinématographique, Éditorial, Sobre, Premium */

/* ==================== FONTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Sans:wght@400;500&family=IBM+Plex+Mono:wght@400&display=swap');

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Couleurs principales (INVERSÉES) */
    --blanc: #FAFAFA;
    --noir: #0A0A0A;
    --gris: #666666;
    --gris-clair: #E5E5E5;
    
    /* Couleurs entités */
    --bleu: #0066FF;
    --beige: #C4A882;
    --rose: #FF3366;
    --vert: #00CC70;
    
    /* Typographies */
    --font-title: 'Space Grotesk', -apple-system, system-ui, sans-serif;
    --font-body: 'IBM Plex Sans', -apple-system, system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    
    /* Espacements (base 8px) */
    --space-xs: 16px;
    --space-sm: 24px;
    --space-md: 32px;
    --space-lg: 48px;
    --space-xl: 64px;
    --space-2xl: 96px;
    --space-3xl: 128px;
    --space-section: 160px;
    
    /* Grid */
    --gutter: 32px;
    --margin: 80px;
    
    /* Animations */
    --ease: cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--noir);
    background: var(--blanc);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 700;
}

h2 {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
}

h3 {
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 700;
}

h4 {
    font-size: 24px;
    font-weight: 500;
}

p {
    font-size: 18px;
    line-height: 1.7;
}

.metadata {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gris);
}

/* ==================== LAYOUT ==================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--margin);
}

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

/* ==================== NAVIGATION ==================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gris-clair);
    transition: transform 0.4s var(--ease);
}

.nav.hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px var(--margin);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.05em;
    color: var(--noir);
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gris);
    transition: color 0.3s var(--ease);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--noir);
    transition: width 0.3s var(--ease);
}

.nav-link:hover {
    color: var(--noir);
}

.nav-link:hover::after {
    width: 100%;
}

/* ==================== HERO ==================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #FAFAFA 0%, #F0F0F0 100%);
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(250, 250, 250, 0.8) 0%,
        rgba(250, 250, 250, 0.9) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
}

.hero-title {
    margin-bottom: var(--space-md);
    animation: fadeInUp 1s var(--ease) 0.2s both;
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 28px);
    line-height: 1.4;
    color: var(--gris);
    max-width: 800px;
    margin-bottom: var(--space-xl);
    animation: fadeInUp 1s var(--ease) 0.4s both;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    animation: fadeInUp 1s var(--ease) 0.6s both;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 16px 32px;
    border: 1px solid var(--noir);
    background: var(--noir);
    color: var(--blanc);
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--blanc);
    transition: left 0.3s var(--ease);
    z-index: -1;
}

.btn:hover {
    background: transparent;
    color: var(--noir);
}

.btn:hover::before {
    left: 0;
}

.btn-secondary {
    border: 1px solid var(--gris);
    background: transparent;
    color: var(--noir);
}

.btn-secondary::before {
    background: var(--gris-clair);
}

.btn-secondary:hover {
    background: var(--gris-clair);
    border-color: var(--gris);
}

/* ==================== PROJECTS GRID ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gutter);
    margin-top: var(--space-xl);
}

.project-card {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--gris-clair);
    transition: border-color 0.4s var(--ease);
}

.project-card:hover {
    border-color: var(--noir);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 250, 250, 0);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-lg);
    transition: background 0.4s var(--ease);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-card:hover .project-overlay {
    background: rgba(250, 250, 250, 0.95);
}

.project-category {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s var(--ease);
}

.project-title {
    font-size: 32px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s var(--ease) 0.1s;
}

.project-card:hover .project-category,
.project-card:hover .project-title {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== ENTITIES SECTION ==================== */
.entities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gutter);
    margin-top: var(--space-xl);
}

.entity-card {
    background: var(--blanc);
    border: 1px solid var(--gris-clair);
    padding: var(--space-xl) var(--space-lg);
    transition: all 0.4s var(--ease);
    position: relative;
}

.entity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--accent);
    transition: height 0.4s var(--ease);
}

.entity-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.entity-card:hover::before {
    height: 100%;
}

.entity-logo {
    width: 60px;
    height: 60px;
    margin-bottom: var(--space-md);
}

.entity-name {
    font-size: 20px;
    margin-bottom: var(--space-xs);
}

.entity-description {
    font-size: 14px;
    color: var(--gris);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.entity-link {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s var(--ease);
}

.entity-link:hover {
    gap: 16px;
}

/* Entity colors */
.entity-production { --accent: var(--bleu); }
.entity-documentary { --accent: var(--beige); }
.entity-media { --accent: var(--rose); }
.entity-intelligence { --accent: var(--vert); }

/* ==================== CLIENTS SECTION ==================== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    align-items: center;
}

.client-logo {
    opacity: 0.4;
    filter: grayscale(100%);
    transition: all 0.3s var(--ease);
}

.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* ==================== CONTACT CTA ==================== */
.contact-cta {
    text-align: center;
    padding: var(--space-3xl) 0;
    background: #F5F5F5;
    border-top: 1px solid var(--gris-clair);
    border-bottom: 1px solid var(--gris-clair);
}

.contact-cta h2 {
    margin-bottom: var(--space-md);
}

.contact-cta p {
    color: var(--gris);
    margin-bottom: var(--space-xl);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scroll animations */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== FOOTER ==================== */
.footer {
    border-top: 1px solid var(--gris-clair);
    padding: var(--space-xl) 0;
    background: var(--blanc);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 18px;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.footer-link {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gris);
    transition: color 0.3s var(--ease);
}

.footer-link:hover {
    color: var(--noir);
}

.footer-copyright {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gris);
    margin-top: 8px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    :root {
        --margin: 40px;
        --gutter: 24px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .entities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .clients-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --margin: 24px;
        --gutter: 16px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero {
        height: 80vh;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .entities-grid {
        grid-template-columns: 1fr;
    }
    
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--space-xs);
    }
}

/* ==================== SECTIONS ALTERNÉES ==================== */
.section-gray {
    background: #F8F8F8;
}

.section-white {
    background: var(--blanc);
}
