/* --- VARIABLES & RESET --- */
:root {
    --primary: #e50914;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-light: #252525;
    --text: #e0e0e0;
    --text-muted: #aaaaaa;
    --transition: all 0.3s ease-in-out;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://www.chromethemer.com/download/hd-wallpapers/breaking-bad-3840x2160.jpg') center 30%/cover no-repeat;
    text-align: center;
    padding: 100px 20px;
    border-bottom: 3px solid var(--primary);
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- TYPOGRAPHIE --- */
.section-title {
    text-align: center;
    color: var(--primary);
    text-transform: uppercase;
    margin: 60px 0 30px;
    font-size: 2.2rem;
}

.group-title-aligned {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 50px auto 20px;
    text-align: center;
}

a { color: var(--primary); text-decoration: none; font-weight: bold; }
a:hover { text-decoration: underline; }

main { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- GRILLES --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* --- CARTES --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid #333;
    padding: 25px;
    transition: var(--transition);
    height: 100%; /* Pour aligner les hauteurs */
}

.card:hover { transform: translateY(-5px); border-color: var(--primary); }

.mini-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    text-align: center;
    transition: var(--transition);
}

.mini-card img { width: 100%; height: 200px; object-fit: cover; }
.mini-card span { display: block; padding: 10px; font-size: 0.8rem; color: var(--text-muted); }

/* --- IMAGES & MULTIMÉDIA --- */
.poster {
    width: 100%;
    max-width: 200px;
    display: block;
    margin: 0 auto 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.img-zoom { width: 100%; border-radius: 8px; cursor: zoom-in; }

/* Correction des images flottantes pour éviter les débordements */
.img-float-left { float: left; width: 140px; margin: 0 15px 10px 0; border-radius: 6px; }
.img-float-right { float: right; width: 140px; margin: 0 0 10px 15px; border-radius: 6px; }

.card-content::after { content: ""; display: table; clear: both; } /* Clearfix indispensable */

.video-container {
    max-width: 900px;
    margin: 30px auto;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #333;
}

.video-wrapper { background: #000; border-radius: 8px; overflow: hidden; position: relative; }
video { width: 100%; display: block; }

.audio-section { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 8px; margin-top: 15px; }
audio { width: 100%; height: 30px; margin-bottom: 10px; }

/* --- SECTIONS SPÉCIFIQUES --- */
.montage-info, .montage-info2 {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--bg-light);
    padding: 30px;
    border-radius: 20px;
    margin: 40px 0;
    align-items: center;
}

.montage-text { flex: 2; min-width: 300px; border-left: 4px solid var(--primary); padding-left: 20px; }
.montage-image { flex: 1; min-width: 250px; }

.char-title { color: var(--primary); text-transform: uppercase; margin: 20px 0 10px; font-size: 1rem; }

footer {
    text-align: center;
    padding: 40px;
    background: #000;
    color: var(--text-muted);
    border-top: 1px solid #333;
}

/* --- ANIMATIONS & LIGHTBOX --- */
.reveal-init { opacity: 0; transform: translateY(20px); transition: 0.8s ease-out; }
.reveal-init.visible { opacity: 1; transform: translateY(0); }

#lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); display: none;
    justify-content: center; align-items: center; z-index: 9999;
}
#lightbox.active { display: flex; }
#lightbox img { max-width: 90%; max-height: 90%; border: 2px solid white; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .img-float-left, .img-float-right { float: none; width: 100%; margin: 10px 0; }
    .section-title { font-size: 1.6rem; }
}