/* =========================================================
   SILENCIO PICTURES - STYLE MASTER (V5 - COMPLÈTEMENT RANGÉ)
   ========================================================= */

/* -----------------------------------------
   1. VARIABLES & RESET
   ----------------------------------------- */
:root {
    --color-bg: #000000;
    --color-text: #ffffff;
    --color-accent: #D72725;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

a { text-decoration: none; color: inherit; transition: opacity 0.3s; }
a:hover { opacity: 0.7; }

/* -----------------------------------------
   2. AMBIENT LIGHT & GLOW (ORIGINAL)
   ----------------------------------------- */
.ambient-light {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden; z-index: -2; background: #000; pointer-events: none;
}
.ambient-light::before {
    content: ''; position: absolute; width: 150vw; height: 150vw; top: -50%; left: -50%;
    background: radial-gradient(circle, rgba(215, 39, 37, 0.25) 0%, rgba(0,0,0,0) 60%);
    filter: blur(80px); animation: drift1 12s infinite alternate ease-in-out;
}
.ambient-light::after {
    content: ''; position: absolute; width: 120vw; height: 120vw; bottom: -20%; right: -20%;
    background: radial-gradient(circle, rgba(180, 20, 20, 0.2) 0%, rgba(0,0,0,0) 60%);
    filter: blur(60px); animation: drift2 15s infinite alternate-reverse ease-in-out;
}

.corner-glow {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
    z-index: 10; mix-blend-mode: screen;
    background: 
        radial-gradient(circle at bottom left, rgba(215, 39, 37, 0.5) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(215, 39, 37, 0.5) 0%, transparent 40%);
    animation: breathe 5s infinite alternate ease-in-out;
}

/* -----------------------------------------
   3. LOADER / INTRO (ORIGINAL)
   ----------------------------------------- */
#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--color-bg); display: flex; justify-content: center; align-items: center;
    z-index: 9999; animation: fadeOut 1s ease-out 3.5s forwards; pointer-events: none;
}
.loader-logo {
    font-size: clamp(2rem, 5vw, 4rem); font-weight: bold; color: var(--color-accent);
    text-transform: uppercase; letter-spacing: 2px; animation: blurPulse 3s infinite alternate;
}

/* -----------------------------------------
   4. HEADER & MENU (DESKTOP)
   ----------------------------------------- */
header {
    position: fixed; top: 0; width: 100%; padding: 2rem;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100; mix-blend-mode: exclusion;
}
a.logo { display: flex; align-items: center; height: auto; width: auto; z-index: 1001; }
.logo img { height: 120px; width: auto; display: block; transition: opacity 0.3s; }
.logo:hover img { opacity: 0.8; }
.logo { transition: all 0.4s ease-in-out; opacity: 1; transform: translateY(0); }
body.not-at-top .logo { opacity: 0 !important; pointer-events: none; transform: translateY(-20px); }

nav ul { display: flex; gap: 2rem; list-style: none; }
nav a { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }
.menu-toggle { display: none; }

nav, .menu-toggle { transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); opacity: 1; transform: translateY(0); }
body.scroll-down nav, body.scroll-down .menu-toggle { opacity: 0; transform: translateY(-20px); pointer-events: none; }

/* -----------------------------------------
   5. TYPOGRAPHIE & SECTIONS GÉNÉRALES
   ----------------------------------------- */
section {
    min-height: 100vh !important; display: flex; flex-direction: column; 
    justify-content: center; position: relative; z-index: 1; overflow: hidden; 
}
h1 {
    font-size: clamp(3rem, 10vw, 8rem); text-transform: uppercase;
    letter-spacing: -3px; line-height: 0.9; margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(215, 39, 37, 0.4);
}
.subtitle { font-size: 1rem; letter-spacing: 4px; text-transform: uppercase; opacity: 0.8; }

.section-title {
    display: flex; align-items: center; justify-content: center; width: 100%; margin: 0 auto 3rem auto;
    font-family: 'Montserrat', sans-serif; font-weight: 200; font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-transform: uppercase; letter-spacing: 0.3em; color: #ffffff; text-align: center;
}
.section-title::before, .section-title::after {
    content: ''; display: block; height: 1px; background-color: var(--color-accent);
    flex-grow: 1; max-width: 150px; margin: 0 30px; opacity: 0.8;
}

#production { align-items: center; text-align: center; }
#production .subtitle { position: relative; z-index: 2; margin-top: 0; }
.hero-logo-main {
    display: block; margin: 0 auto 2rem auto; width: clamp(300px, 60vw, 900px); height: auto;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.8)); opacity: 0;
    animation: fadeInLogo 1.5s ease-out forwards 0.5s;
}

.about-text {
    font-family: 'Montserrat', sans-serif; font-weight: 200; font-size: clamp(1.1rem, 2vw, 1.5rem); 
    line-height: 1.6; opacity: 0.9; max-width: 800px; margin: 0 auto; text-align: center;
}
.about-text p { font-weight: 200; }

#contact { text-align: center; border-top: none; }
.contact-info { padding-top: 1rem; }
.contact-info p { font-size: 1.5rem; margin-bottom: 1.5rem; font-weight: 300; }
.contact-info a[href^="mailto:"], .contact-info a[href^="tel:"] {
    font-family: 'Montserrat', sans-serif !important; font-weight: 200 !important;       
    letter-spacing: 2px !important; color: #cccccc !important;         
    font-size: clamp(1rem, 1.5vw, 1.4rem) !important; white-space: nowrap !important;    
    text-decoration: none !important; border-bottom: 1px solid rgba(215, 39, 37, 0.4); 
    padding-bottom: 8px; display: inline-block; transition: all 0.3s ease;
}
.contact-info a[href^="mailto:"]:hover, .contact-info a[href^="tel:"]:hover { 
    color: #ffffff !important; border-bottom-color: #D72725; transform: translateY(-2px); 
}

.insta-link { display: inline-block; color: #fff; transition: all 0.3s ease; margin-top: 1rem; opacity: 0.7; }
.insta-link svg { width: 40px; height: 40px; }
.insta-link:hover { color: var(--color-accent); opacity: 1; transform: scale(1.1); }

footer { margin-top: 0; padding-bottom: 2rem; font-size: 0.8rem; opacity: 0.5; border: none !important; text-align: center; width: 100%; }

/* -----------------------------------------
   6. ACCUEIL : VIDÉO ARRIÈRE-PLAN
   ----------------------------------------- */
.hero-video-container { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; 
    /* LA MAGIE : Le fondu en transparence vers le bas pour tuer la ligne de coupure */
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}
.hero-video { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }

.video-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    /* On force le dégradé à finir sur du noir 100% absolu */
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,1) 100%); 
    pointer-events: none; 
}

/* -----------------------------------------
   7. ACCUEIL : NOUVEAU MOTEUR BENTO GRID
   ----------------------------------------- */
#projects { padding: 0 2rem; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.bento-container { max-width: 1100px; margin: 0 auto; width: 100%; position: relative; z-index: 2;}

.bento-wrapper { width: 100%; position: relative; }
.bento-track { display: flex; gap: 20px; width: max-content; }

/* ADN BENTO : ITEM DE BASE (On utilise CSS Grid 'span') */
.bento-item {
    position: relative !important; background-color: #050505; overflow: hidden; 
    display: block; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s ease; cursor: pointer;
}
.bento-item img {
    position: absolute !important; top: 0; left: 0; width: 100% !important; height: 100% !important;
    object-fit: cover !important; display: block;
}
.bento-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0; transform: translateY(20px); transition: all 0.4s ease; z-index: 10;
}
.bento-overlay h3 { font-size: 1.4rem; text-transform: uppercase; margin-bottom: 0.3rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.bento-overlay p { color: var(--color-accent); font-size: 0.8rem; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; }
.bento-item:hover { border-color: var(--color-accent); box-shadow: 0 10px 30px rgba(215, 39, 37, 0.2); }
.bento-item:hover .anti-stretch-img.loaded { opacity: 1; transform: scale(1.05); }
.bento-item:hover .bento-overlay { opacity: 1; transform: translateY(0); }

/* --- MODE 1 : GRILLE STATIQUE (PC) --- */
.bento-wrapper.is-static { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    padding: 40px 0; 
    overflow: visible; 
}

.bento-grid.is-static {
    display: grid; 
    --cell-size: 250px; 
    --gap: 20px; 
    gap: var(--gap) !important;
    grid-auto-flow: dense !important; 
    width: max-content !important; 
    margin: 0 auto !important;
}

/* LE BOUCLIER : On verrouille la taille Tetris UNIQUEMENT sur écran PC ! */
@media (min-width: 1025px) {
    .bento-grid.is-static .bento-item { 
        width: var(--cell-size) !important; 
        height: var(--cell-size) !important; 
        grid-column: span 1 !important; 
        grid-row: span 1 !important; 
        aspect-ratio: unset !important; 
    }
    .bento-grid.is-static .bento-tall { 
        height: calc((var(--cell-size) * 2) + var(--gap)) !important; 
        grid-column: span 1 !important;
        grid-row: span 2 !important; 
    }
    .bento-grid.is-static .bento-wide { 
        width: calc((var(--cell-size) * 2) + var(--gap)) !important; 
        grid-column: span 2 !important; 
        grid-row: span 1 !important;
    }
    .bento-grid.is-static .bento-big  { 
        width: calc((var(--cell-size) * 2) + var(--gap)) !important; 
        height: calc((var(--cell-size) * 2) + var(--gap)) !important; 
        grid-column: span 2 !important; 
        grid-row: span 2 !important; 
    }
}

/* --- MODE 2 : SCROLL INFINI (7 projets et +) --- */
.bento-wrapper.is-scrollable {
    width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    padding: 20px 5%; scrollbar-width: none; -ms-overflow-style: none; cursor: grab;
}
.bento-wrapper.is-scrollable::-webkit-scrollbar { display: none; }
.bento-wrapper.is-scrollable:active { cursor: grabbing; }

.bento-grid.is-scrollable {
    display: grid; 
    --cell-size: 250px; 
    --gap: 20px; 
    grid-template-rows: repeat(3, var(--cell-size)) !important; 
    grid-auto-columns: var(--cell-size) !important;
    grid-auto-flow: column dense !important; 
    gap: var(--gap) !important; 
    width: max-content !important; 
    padding-right: 0 !important; 
}
.bento-grid.is-scrollable .bento-item { grid-row: span 1 !important; grid-column: span 1 !important; aspect-ratio: unset !important; width: 100%; height: 100%; }
.bento-grid.is-scrollable .bento-tall { grid-row: span 2 !important; grid-column: span 1 !important; }
.bento-grid.is-scrollable .bento-wide { grid-row: span 1 !important; grid-column: span 2 !important; }
.bento-grid.is-scrollable .bento-big  { grid-row: span 2 !important; grid-column: span 2 !important; }

/* -----------------------------------------
   8. ACCUEIL : SECTION ÉQUIPE
   ----------------------------------------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; max-width: 1100px; margin: 3rem auto 0 auto; padding: 0 2rem; width: 100%; }

/* La carte globale devient une colonne transparente */
.team-card { position: relative !important; display: flex; flex-direction: column; align-items: center; background: transparent; border: none; overflow: visible; }

/* La photo a son propre bloc carré verrouillé */
.team-photo-wrapper { 
    position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; 
    border: 1px solid rgba(255,255,255,0.1); background: #050505; transition: all 0.4s ease; 
}
.team-photo-wrapper img { filter: grayscale(100%) contrast(1.1) brightness(0.9); transition: all 0.5s ease; opacity: 0; }

/* Le texte est posé proprement en dessous avec une hauteur bloquée */
.team-info { width: 100%; padding: 1.2rem 0 0 0; text-align: center; display: flex; flex-direction: column; gap: 6px; }

.team-info h3 { 
    color: #fff; 
    font-size: 1.1rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin: 0; 
    font-weight: 300;
    line-height: 1.2;
    min-height: 2.4em; /* LE VERROU : Force toujours la hauteur de 2 lignes exactes */
}

.team-info p { 
    color: var(--color-accent); 
    font-size: 0.75rem; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    line-height: 1.5; 
    margin: 0; 
}

/* Animations au survol */
@media (hover: hover) {
    .team-card:hover .team-photo-wrapper { border-color: var(--color-accent); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(215, 39, 37, 0.2); }
    .team-card:hover .anti-stretch-img.loaded { filter: grayscale(0%) contrast(1) brightness(1); transform: scale(1.05); }
}

/* -----------------------------------------
   9. PAGE DÉTAIL PROJET
   ----------------------------------------- */
section.project-content,
section.project-video,
section.full-width-video {
    min-height: auto !important; 
    justify-content: flex-start !important;
}
.project-hero { height: 70vh; min-height: 70vh; position: relative; overflow: hidden; display: block; background-color: #050505; }
.project-hero img { 
    position: absolute !important; top: 0; left: 0; width: 100% !important; height: 100% !important; object-fit: cover !important;
    animation: none !important; opacity: 0; transition: opacity 0.5s ease;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%), linear-gradient(to right,  transparent 0%, black 20%, black 80%, transparent 100%); 
    -webkit-mask-composite: source-in; mask-composite: intersect; 
}
.project-header-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 4rem 2rem; z-index: 2; background: linear-gradient(to top, var(--color-bg), transparent); }
.project-title { font-size: clamp(3rem, 6vw, 5rem); text-transform: uppercase; line-height: 1; margin-bottom: 1rem; color: #fff; text-shadow: 0 0 30px rgba(215, 39, 37, 0.6); }

.back-btn { position: fixed; top: 2rem; left: 2rem; z-index: 1001; color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; mix-blend-mode: exclusion; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 10px 15px; border-radius: 30px; background: rgba(0,0,0,0.2); backdrop-filter: blur(5px); }
.back-btn:hover::before { transform: translateX(-5px); }
.back-btn::before { content: '←'; font-size: 1.2rem; transition: transform 0.3s; }

.project-content { max-width: 1000px; margin: 0 auto; padding: 4rem 2rem 2rem 2rem; display: grid; grid-template-columns: 2fr 1fr; gap: 4rem; position: relative; z-index: 5; }

/* Synopsis Extensible */
.synopsis { font-family: 'Montserrat', sans-serif !important; font-weight: 200 !important; font-size: 1.2rem; line-height: 1.8; color: #ddd; }
.synopsis-wrapper { position: relative; max-height: 140px; overflow: hidden; transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.synopsis-wrapper.is-expanded { max-height: 2000px; }
.synopsis-fade { position: absolute; bottom: 0; left: 0; width: 100%; height: 60px; background: linear-gradient(to bottom, rgba(5,5,5,0), rgba(0,0,0,1)); transition: opacity 0.4s ease; pointer-events: none; }
.synopsis-wrapper.is-expanded .synopsis-fade { opacity: 0; }
.btn-read-more { background: transparent; color: var(--color-accent); border: none; padding: 10px 0; font-family: inherit; font-weight: 600; font-size: 0.8rem; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; display: inline-block; margin-top: 5px; transition: color 0.3s; }
.btn-read-more:hover { color: #fff; }
.btn-read-more.hidden { display: none !important; }

.tech-specs h4 { color: var(--color-accent); text-transform: uppercase; margin-bottom: 0.5rem; font-size: 0.9rem; letter-spacing: 1px; margin-top: 1.5rem; }
.tech-specs h4:first-child { margin-top: 0; }
.tech-specs p { color: #888; margin-bottom: 0.5rem; }

/* TRAILER (CORRIGÉ AVEC LES VRAIES CLASSES HTML) */
.project-video {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto 0 auto !important;
    padding: 0 5% 50px 5%;
    position: relative;
    z-index: 10;
    min-height: auto !important; /* LA LIGNE MAGIQUE QUI TUE L'ESPACE GÉANT */
    display: block !important;
}

.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16/9 parfait */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-label {
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.7;
    display: inline-block;
    background: transparent; 
    padding: 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 9;
    margin: 0;
    -webkit-mask-image: 
        linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%),
        linear-gradient(to right,  transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: 
        linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%),
        linear-gradient(to right,  transparent 0%, black 5%, black 95%, transparent 100%);
    mask-composite: intersect;
}

.video-wrapper iframe {
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    border: none;
    display: block;
}

.project-external-links {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}

.project-link-icon {
    width: 35px;
    height: 35px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.05);
}

.project-link-icon:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-3px);
    background: rgba(215, 39, 37, 0.1);
}

.project-link-icon svg {
    width: 18px;
    height: 18px;
}

/* -----------------------------------------
   10. MENTIONS LÉGALES (ORIGINALES)
   ----------------------------------------- */
.legal-section { padding: 8rem 2rem 4rem; max-width: 800px; margin: 0 auto; color: #ccc; }
.legal-section h1 { color: #fff; text-transform: uppercase; text-align: center; margin-bottom: 4rem; font-size: clamp(2rem, 4vw, 3rem); text-shadow: 0 0 20px rgba(215, 39, 37, 0.4); }
.legal-block { margin-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 2rem; }
.legal-block:last-child { border-bottom: none; }
.legal-block h2 { color: var(--color-accent); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.legal-block p { line-height: 1.8; margin-bottom: 1rem; font-weight: 300; }
.legal-block strong { color: #fff; font-weight: 500; }
.legal-block a { text-decoration: underline; text-decoration-color: var(--color-accent); }
.legal-block a:hover { color: var(--color-accent); }

/* -----------------------------------------
   11. ANIMATIONS, TRANSITIONS & SÉCURITÉS
   ----------------------------------------- */
/* Animations Globales */
@keyframes drift1 { 0% { transform: translate(10%, 10%) scale(1); } 50% { transform: translate(40%, 20%) scale(1.1); } 100% { transform: translate(20%, 50%) scale(0.9); } }
@keyframes drift2 { 0% { transform: translate(-10%, -10%) scale(0.9); } 50% { transform: translate(-30%, -40%) scale(1.2); } 100% { transform: translate(-10%, -60%) scale(1); } }
@keyframes blurPulse { 0% { filter: blur(15px); opacity: 0.4; } 50% { filter: blur(0px); opacity: 1; } 100% { filter: blur(8px); opacity: 0.7; } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
@keyframes breathe { 0% { opacity: 0.5; transform: scale(1); } 100% { opacity: 0.8; transform: scale(1.05); } }
@keyframes fadeInLogo { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(20px); } }

/* Fondu de Navigation */
.page-transition { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; z-index: 99999; pointer-events: none; opacity: 0; transition: opacity 0.5s ease-in-out; }
.page-transition.active { opacity: 1; pointer-events: all; }

/* Blindage Absolu Images & BFCache */
.anti-stretch-img { opacity: 0; transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); -webkit-transform: translateZ(0); transform: translateZ(0); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.bento-item .anti-stretch-img.loaded, .team-card .anti-stretch-img.loaded, .project-hero .anti-stretch-img.loaded { opacity: 0.8; }

/* Image Preview Admin */
#image-preview { width: 100%; max-width: 400px; object-fit: cover; border-radius: 8px; margin: 1rem auto; display: block; transition: aspect-ratio 0.4s ease, object-position 0.4s ease, max-width 0.4s ease; aspect-ratio: 1 / 1; }
#image-preview.bento-tall { aspect-ratio: 1 / 2; max-width: 250px; }
#image-preview.bento-big { aspect-ratio: 1 / 1; max-width: 100%; }

/* =========================================================
   FIX DÉFINITIF ANTI-POP : STRUCTURE FIXE ET ANIMATION DOUCE
   ========================================================= */
/* 1. On désactive le centrage automatique qui fait bondir le titre */
section#projects, section#about {
    justify-content: flex-start !important;
    padding-top: 150px !important; /* Le titre est verrouillé en haut, il ne bougera plus jamais */
}

/* 2. On fait apparaître les grilles avec une douce lévitation au chargement */
.bento-wrapper, .team-grid {
    animation: smoothArrival 0.8s ease-out forwards;
}

@keyframes smoothArrival {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------
   12. RESPONSIVE MOBILE & TABLETTE
   ----------------------------------------- */
@media (max-width: 1024px) {
    /* Header & Navigation Menu Fixes */
    header:not(.project-hero), nav, .nav-container { position: static !important; transform: none !important; mix-blend-mode: normal !important; filter: none !important; perspective: none !important; width: 100% !important; padding: 0 !important; margin: 0 !important; height: auto !important; background: transparent !important; border: none !important; box-shadow: none !important; }
    header:not(.project-hero) { position: fixed !important; top: 0; left: 0; z-index: 1200; padding: 1.5rem 1rem !important; pointer-events: none; display: flex !important; flex-direction: column !important; align-items: center !important; gap: 20px !important; }
    
    .logo { pointer-events: auto; position: relative; z-index: 1300; display: block !important; }
    .logo img { height: 100px !important; width: auto !important; }

    .menu-toggle { display: block !important; pointer-events: auto; cursor: pointer; width: 35px; height: 30px; margin: 0 auto; position: relative; z-index: 1300; }
    .menu-toggle .bar { width: 30px; height: 2px; margin: 6px auto; background-color: #ffffff !important; display: block; transition: 0.3s; border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,0.8); }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-menu { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; background-color: #000000 !important; isolation: isolate !important; display: flex !important; flex-direction: column; justify-content: center; align-items: center; gap: 2rem; padding: 0 !important; margin: 0 !important; list-style: none !important; visibility: hidden !important; opacity: 0 !important; transition: opacity 0.3s ease-in-out; z-index: 1250 !important; }
    .nav-menu.active { visibility: visible !important; opacity: 1 !important; pointer-events: auto !important; }
    .nav-menu li { display: block !important; width: 100%; text-align: center; padding: 0; margin: 0; }
    .nav-link { font-size: 2rem !important; color: #ffffff !important; text-transform: uppercase; letter-spacing: 4px; text-decoration: none !important; display: block; text-shadow: none !important; }

    section:not(.project-hero) { padding-top: 160px !important; }
    #production { padding-top: 0 !important; }
    
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

    .project-content { display: flex !important; flex-direction: column !important; padding-bottom: 0 !important; min-height: auto !important; gap: 2rem !important; padding: 1rem 1.5rem !important; }
    .synopsis { width: 100% !important; margin-bottom: 1rem !important; font-size: 1.1rem !important; }
    .tech-specs { width: 100% !important; display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 1.5rem 1rem !important; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; margin-bottom: 0 !important; padding-bottom: 0 !important; }
    .project-hero { height: 45vh !important; min-height: 280px !important; }
    .full-width-video { min-height: auto !important; height: auto !important; display: block !important; margin-top: -2rem !important; padding-top: 0 !important; padding-bottom: 2rem !important; position: relative; z-index: 10; }
    .video-label { display: block !important; margin-top: 1rem !important; margin-bottom: 1rem !important; position: relative; z-index: 20; }

   /* --- BENTO GRID (ACCUEIL) --- */
    .bento-grid.is-static { 
        grid-template-columns: 1fr !important; 
        gap: 15px !important; 
        width: 100% !important; /* Sécurité : On force la pleine largeur */
    }
    
    .bento-grid.is-static .bento-item, 
    .bento-grid.is-static .bento-big, 
    .bento-grid.is-static .bento-tall, 
    .bento-grid.is-static .bento-wide { 
        grid-column: span 1 !important; 
        grid-row: span 1 !important; 
        aspect-ratio: 16 / 9 !important; /* Retour à tes proportions d'origine */
        width: 100% !important;
        height: auto !important;
    }

    /* Intelligence Mobile : Titres affichés par défaut (sans hover) */
    .bento-overlay {
        opacity: 1 !important; 
        transform: translateY(0) !important; 
        background: linear-gradient(to top, rgba(0,0,0,0.95) 10%, transparent) !important;
    }

    /* Intelligence Mobile : Cacher les blocs "Silencio" inutiles en 1 colonne */
    .bento-grid.is-static .silencio-placeholder {
        display: none !important;
    }

@media (max-width: 768px) {
    .section-title { font-size: 1.1rem; letter-spacing: 2px; white-space: nowrap; }
    .section-title::before, .section-title::after { max-width: 40px; min-width: 20px; margin: 0 10px; }

    .bento-grid.is-scrollable { --cell-size: 150px; --gap: 10px; }
    .bento-wrapper.is-scrollable { padding: 10px 5%; }
    .bento-grid.is-static { --cell-size: 150px; --gap: 10px; }
    .bento-grid.is-static.is-single-item .bento-item, .bento-grid.is-static.is-single-item .bento-wide, .bento-grid.is-static.is-single-item .bento-tall, .bento-grid.is-static.is-single-item .bento-big { width: 100% !important; }
    .bento-track { gap: 10px; }
    
    .team-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; padding: 0 10px !important; margin-top: 2rem !important; }
    .team-info { padding: 1rem 0 0 0 !important; }
    .team-info h3 { font-size: 0.85rem !important; white-space: normal; overflow: visible; }
    .team-info p { font-size: 0.6rem !important; letter-spacing: 1px !important; line-height: 1.4 !important; }
   
    .contact-info p:first-child { font-size: 1rem !important; line-height: 1.4 !important; margin-bottom: 0.2rem !important; }
}

@media (max-width: 600px) {
    .team-card img { filter: grayscale(100%); }
}












