/* ==========================================
   1. BASE & NAVIGATION (Communs à tout le site)
   ========================================== */
body, html {
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.4;
}

nav {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-bottom: 1px solid #f3f3f3;
    font-size: 11px;
}

/* Style par défaut des liens du menu */
nav a {
    text-decoration: none;
    color: #1a1a1a;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

nav a:hover {
    opacity: 1;
}

/* LA CLASSE "ACTIVE" */
nav a.active {
    opacity: 1;
    font-weight: 500;
    border-bottom: 1px solid #1a1a1a;
}

.fade-in { animation: fadeIn 1.5s ease-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Le fameux bordeaux pour tes liens */
.link-red {
    color: #7f1d1d; 
    text-decoration: underline;
    text-decoration-color: #fca5a5;
    text-underline-offset: 4px;
    transition: all 0.3s ease;
}

.link-red:hover {
    text-decoration-color: #7f1d1d;
    color: #b91c1c;
    opacity: 0.8;
}

/* ==========================================
   2. STRUCTURE DES PAGES (Grilles et Colonnes)
   ========================================== */
.main-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px;
    align-items: start;
}

.images-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.img-box img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.text-column {
    text-align: left;
    padding-top: 10px;
}

.text-block { margin-bottom: 50px; }

/* ==========================================
   3. TYPOGRAPHIE DES CONTENUS
   ========================================== */
.film-title, .page-title {
    font-size: 32px;
    letter-spacing: 0.4em;
    font-style: italic;
    line-height: 1.2;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 40px;
    margin-top: 0;
}

.section-title, .section-heading {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 13px;
    color: #999; 
    font-weight: 400;
    margin-bottom: 1.5rem;
    display: block;
}

.festival-list li, .list-style li {
    margin-bottom: 10px; 
    list-style: none;
    font-size: 14px;
}

.list-style li { position: relative; padding-left: 20px; }
.list-style li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #000;
}

/* ==========================================
   4. SECTIONS SPÉCIFIQUES (Ateliers et Lettres)
   ========================================== */
.atelier-item {
    border-bottom: 1px solid #f9f9f9;
    padding: 20px 0;
    font-size: 13px;
}

.atelier-header { display: flex; gap: 30px; margin-bottom: 8px; }

.atelier-year {
    font-size: 11px;
    color: #999;
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.atelier-name { font-weight: 500; text-transform: uppercase; display: block; }
.atelier-result { font-style: italic; margin-top: 8px; }
.prix-tag { color: #7f1d1d; font-size: 11px; text-transform: uppercase; margin-top: 4px; display: block; }

.lettre-item { border-bottom: 1px solid #f9f9f9; padding: 12px 0; font-size: 13px; }
.lettre-header { display: flex; justify-content: space-between; align-items: baseline; }
.lettre-name { font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; }
.lettre-meta { font-size: 11px; color: #999; text-transform: uppercase; }

/* ==========================================
   5. GRILLE D'ACCUEIL (Films Grid)
   ========================================== */
.films-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    height: calc(100vh - 90px); 
    width: 100%;
}

.film-item { position: relative; overflow: hidden; display: block; height: 100%; width: 100%; }
.film-image { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(0.2, 0, 0.2, 1); }

.film-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0,0,0,0.4); /* Un peu plus sombre pour mieux lire les titres */
    
    /* CENTRAGE DU TITRE */
    display: flex; 
    align-items: center; 
    justify-content: center;
    text-align: center;
    padding: 20px;
    
    opacity: 0; 
    transition: opacity 0.4s ease; 
    z-index: 10;
}

.film-item:hover .film-overlay { opacity: 1; }
.film-item:hover .film-image { transform: scale(1.05); }

/* Titre spécifique dans la grille */
.film-item .film-title {
    font-size: 14px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    margin-bottom: 0;
    letter-spacing: 0.2em; /* Pour l'élégance */
    text-transform: uppercase;
}

/*/* ==========================================
   6. ADAPTATION MOBILE (Smartphone)
   ========================================= */
/* ==========================================
   6. ADAPTATION MOBILE (Smartphone)
   ========================================= */
@media (max-width: 768px) {
    
    /* --- MENU : ON LE GARDE BIEN PRÉSENT ET FLUIDE --- */
    nav { 
        height: auto; 
        padding: 20px 0; 
        flex-direction: column; 
        gap: 15px; 
        border-bottom: 1px solid #f3f3f3;
        text-align: center;
    }

    nav h1 {
        /* Ton nom s'adapte entre 13px et 15px */
        font-size: clamp(13px, 4vw, 15px) !important;
        letter-spacing: 0.2em !important;
        margin: 0;
    }

    /* BIO & FILMS : Toujours dominants */
    nav div.space-x-12 a {
        /* S'adapte entre 11px et 12px */
        font-size: clamp(11px, 3vw, 12px) !important;
        font-weight: 500 !important;
        letter-spacing: 0.15em !important;
        opacity: 1 !important;
    }

    /* --- PAGE ACCUEIL : LA LISTE DE FILMS FLUIDE --- */
    .films-grid {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        padding: 20px !important;
    }

    .film-item { 
        height: auto !important;
        min-height: 50px; 
        border-bottom: 1px solid #f9f9f9;
        display: block !important;
    }

    .film-item .film-image { 
        display: none !important; 
    }

    .film-item .film-overlay { 
        position: relative !important;
        display: flex !important;
        opacity: 1 !important;
        background: transparent !important;
        height: 50px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* LES TITRES : PLUS PETITS ET ÉLASTIQUES (entre 10px et 11px) */
    .film-item .film-title {
        color: #1a1a1a !important; 
        opacity: 0.8 !important; 
        text-shadow: none !important; 
        font-size: clamp(10px, 2.8vw, 11px) !important; 
        letter-spacing: 0.2em !important;
        text-transform: uppercase !important;
        display: block !important;
    }

    /* --- PAGES INTERNES (BIO, FILMS, TEXTES) --- */
    .main-container {
        grid-template-columns: 1fr;
        padding: 20px; 
        gap: 30px;
    }

    /* Priorité à l'image sur les pages de films */
    .images-column { order: 1 !important; } 
    .text-column { order: 2 !important; }

    /* Le titre du film en haut de page s'adapte (entre 22px et 28px) */
    .film-title, .page-title { 
        font-size: clamp(22px, 6vw, 28px) !important; 
        letter-spacing: 0.2em; 
        margin-top: 10px;
    }

    /* TOUS LES TEXTES ÉCRITS (Synopsis, Bio, etc.) */
    body, p, .text-column {
        font-size: clamp(14px, 3.5vw, 16px);
        line-height: 1.5;
    }

    /* TOUTES LES LISTES (Festivals, Ateliers) */
    .festival-list li, .list-style li, .atelier-item, .lettre-item {
        font-size: clamp(12px, 3.2vw, 14px);
    }

    .atelier-header { flex-direction: column; gap: 5px; }
    .atelier-year { min-width: auto; }
}