/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    transition: filter 0.5s ease; /* Pour l'effet de révélation de Lucas */
}

/* Curseur personnalisé SNK */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #a52a2a;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease;
}

.custom-cursor.shake {
    animation: cursorShake 0.3s infinite;
}

@keyframes cursorShake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
}

/* Pages */
.page {
    display: none;
    min-height: 100vh;
    width: 100%;
}

.page.active {
    display: block;
}

/* ===== PAGE D'ACCUEIL ===== */
.wall-container {
    position: relative;
    width: 100%;
    height: 100vh;
    /* UTILISEZ VOTRE IMAGE DE FOND ICI (TITAN MUR) */
    background: url('images/accueil/titan_wall_bg.png') no-repeat center center; 
    background-size: cover;
    overflow: hidden;
}

.titan-head {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.main-title {
    font-size: 4rem;
    font-weight: bold;
    color: #a52a2a;
    text-shadow: 0 0 20px rgba(165, 42, 42, 0.8),
                 0 0 40px rgba(165, 42, 42, 0.5);
    letter-spacing: 5px;
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.subtitle {
    font-size: 1.3rem;
    color: #d4a574;
    margin-top: 20px;
    opacity: 0.9;
}

/* SVG Fissures */
.cracks-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.crack {
    stroke: #8b4513;
    stroke-width: 0.5;
    fill: none;
    opacity: 0.6;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 5px rgba(139, 69, 19, 0.5));
}

.crack:hover {
    stroke: #a52a2a;
    stroke-width: 1;
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(165, 42, 42, 0.9));
    cursor: pointer;
}

/* Labels des fissures */
.crack-label {
    position: absolute;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #8b4513;
    border-radius: 5px;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    backdrop-filter: blur(5px);
    z-index: 50;
}

.crack-label.show {
    opacity: 1;
    transform: scale(1.1);
    pointer-events: auto;
    cursor: pointer;
}

.label-1 { top: 15%; left: 5%; }
.label-2 { top: 15%; right: 5%; }
.label-3 { bottom: 15%; left: 5%; }
.label-4 { bottom: 15%; right: 5%; }

.crack-label span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #d4a574;
    margin-bottom: 5px;
}

.crack-label p {
    font-size: 0.9rem;
    color: #aaa;
}

.start-quiz-btn {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 40px;
    font-size: 1.2rem;
    background: #a52a2a;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(165, 42, 42, 0.4);
    z-index: 100;
    pointer-events: auto;
}

.start-quiz-btn:hover {
    background: #8b0000;
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 20px rgba(165, 42, 42, 0.6);
}

/* ===== QUIZ (AJOUT FOND ACTIF) ===== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px;
    min-height: 100vh;
}

/* Fond de l'écran de résultat du quiz (Ombre de Lucas) */
#quiz.result-active::before {
    content: '';
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    
    /* REMPLACEZ PAR LE NOM DE VOTRE FICHIER */
    background-image: url('images/quiz/lucas_ombre_result.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    opacity: 0.15; /* Rendre l'image très subtile */
    z-index: 1; 
    transition: opacity 1s ease;
}

.quiz-container {
    position: relative;
    z-index: 10;
    /* Styles existants */
}

.quiz-container h2 {
    font-size: 2.5rem;
    text-align: center;
    color: #d4a574;
    margin-bottom: 60px;
}

.question {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.question.active {
    display: block;
}

.question p {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #fff;
}

.answer {
    display: inline-block;
    margin: 15px;
    padding: 15px 40px;
    font-size: 1.2rem;
    background: rgba(139, 69, 19, 0.3);
    border: 2px solid #8b4513;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer:hover {
    background: rgba(165, 42, 42, 0.6);
    border-color: #a52a2a;
    transform: scale(1.05);
}

.quiz-result {
    display: none;
    text-align: center;
    animation: fadeIn 0.8s ease;
}

.quiz-result.active {
    display: block;
}

.quiz-result h3 {
    font-size: 2rem;
    color: #d4a574;
    margin-bottom: 30px;
}

.result-text {
    font-size: 2.5rem;
    color: #a52a2a;
    margin: 30px 0;
    font-weight: bold;
}

.start-narrative-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: #a52a2a;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.start-narrative-btn:hover {
    background: #8b0000;
    transform: translateY(-3px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== NARRATIONS ===== */
.narrative {
    background: #0a0a0a;
}

.narrative-header {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    position: relative;
}

/* NOUVEAU: Style de l'en-tête Lucas */
.lucas-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* REMPLACEZ PAR LE NOM DE VOTRE FICHIER */
    background-image: url('images/lucas/lucas_ombre_hero.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    background-attachment: fixed; 
    filter: brightness(0.7) grayscale(0.2); 
    
    z-index: 1; 
}

.character-intro {
    text-align: center;
    padding: 40px;
    position: relative; /* NÉCESSAIRE */
    z-index: 10;
}

.character-intro h2 {
    font-size: 3.5rem;
    color: #d4a574;
    margin-bottom: 20px;
    animation: fadeInScale 1s ease;
}

.character-desc {
    font-size: 1.5rem;
    color: #aaa;
    font-style: italic;
    animation: fadeIn 1.5s ease;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.narrative-content {
    position: relative;
}

.scroll-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 100px 20px;
}

.narrative-text {
    max-width: 800px;
    font-size: 1.5rem;
    line-height: 2;
    color: #e0e0e0;
    text-align: center;
    position: relative;
    z-index: 10;
    padding: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
}

/* AJOUT POUR AFFICHER LES IMAGES DE FOND ET LE PARALLAXE */

.section-image {
    /* 1. Taille: Doit couvrir toute la section parent */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* 2. Affichage de l'image de fond */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* 3. Placement et Parallaxe (Fixe) */
    background-attachment: fixed; /* LA CLÉ DE L'EFFET PARALLAXE "FIXE" */
    
    /* 4. Ordre: Derrière le texte */
    z-index: 1;
}

/* 5. Calque noir pour lisibilité (car les images SNK peuvent être claires) */
.scroll-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Assombrissement */
    z-index: 2;
}

/* ===== MADELEINE - FILTRES (Mise à jour pour utiliser .section-image) ===== */
/* NOTE: Les filtres des styles inline du HTML (Madeleine) prendront le dessus sur ces filtres. */
#madeleine .section-image {
    transition: filter 0.5s ease;
}

#madeleine .anime-image {
    filter: blur(0px);
}

#madeleine .blur-transition {
    filter: blur(3px) grayscale(30%);
}

#madeleine .blur-heavy {
    filter: blur(6px) grayscale(60%);
}

#madeleine .historical-photo {
    filter: blur(8px) grayscale(100%);
}

#madeleine .historical-full {
    filter: grayscale(100%) sepia(30%) brightness(0.7);
}


/* ===== LUCAS - JAUGE DE PRÉJUGÉS (Non modifié) ===== */
.prejudice-gauge {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #8b4513;
}

.gauge-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1rem;
    color: #d4a574;
    margin-bottom: 15px;
    text-align: center;
}

.gauge-bar {
    width: 30px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.gauge-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #4CAF50, #FFC107, #f44336);
    transition: height 0.6s ease;
}

/* ===== THÉO - TREMBLEMENTS ET PARANOÏA (Non modifié) ===== */
.shake-light {
    animation: shakeLightAnim 0.5s ease-in-out;
}

.shake-medium {
    animation: shakeMediumAnim 0.4s ease-in-out;
}

.shake-heavy {
    animation: shakeHeavyAnim 0.3s ease-in-out infinite;
}

.shake-intense {
    animation: shakeIntenseAnim 0.2s ease-in-out infinite;
}

@keyframes shakeLightAnim {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes shakeMediumAnim {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-3px, 3px); }
    50% { transform: translate(3px, -3px); }
    75% { transform: translate(-3px, -3px); }
}

@keyframes shakeHeavyAnim {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-5px, 5px); }
    40% { transform: translate(5px, -5px); }
    60% { transform: translate(-5px, -5px); }
    80% { transform: translate(5px, 5px); }
}

@keyframes shakeIntenseAnim {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-8px, 8px) rotate(-1deg); }
    40% { transform: translate(8px, -8px) rotate(1deg); }
    60% { transform: translate(-8px, -8px) rotate(-1deg); }
    80% { transform: translate(8px, 8px) rotate(1deg); }
}

.room-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #2c3e50, #34495e);
    z-index: 1;
    transition: all 1s ease;
}

.room-light .room-bg {
    background: linear-gradient(to bottom, #87CEEB, #B0C4DE);
}

.room-dimming .room-bg {
    background: linear-gradient(to bottom, #4a5f7f, #5d7a9c);
}

.room-dark .room-bg {
    background: linear-gradient(to bottom, #1c2833, #2c3e50);
}

.room-darker .room-bg {
    background: linear-gradient(to bottom, #0a0a0a, #1a1a1a);
}

.room-nightmare .room-bg {
    background: #000;
    animation: nightmareFlicker 2s ease-in-out infinite;
}

@keyframes nightmareFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.eyes-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        transparent 20%,
        rgba(0, 0, 0, 0.3) 20%,
        rgba(0, 0, 0, 0.3) 80%,
        transparent 80%,
        transparent 100%);
    z-index: 5;
    opacity: 0;
    transition: opacity 1s ease;
}

.eyes-closing .eyes-overlay {
    opacity: 0.6;
}

.eyes-overlay.heavy {
    opacity: 0.9;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(0, 0, 0, 0.8) 30%,
        transparent 30%,
        transparent 70%,
        rgba(0, 0, 0, 0.8) 70%,
        rgba(0, 0, 0, 0.8) 100%);
}

.shadow-figure {
    position: absolute;
    top: 50%;
    right: 20%;
    width: 150px;
    height: 300px;
    background: rgba(0, 0, 0, 0.9);
    clip-path: polygon(50% 0%, 70% 30%, 100% 30%, 80% 60%, 90% 100%, 50% 80%, 10% 100%, 20% 60%, 0% 30%, 30% 30%);
    opacity: 0;
    animation: shadowAppear 3s ease-in-out infinite;
    z-index: 3;
}

@keyframes shadowAppear {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 0.7; transform: translateY(-10px); }
}

.paranoia {
    animation: paranoiaShake 0.1s infinite;
}

@keyframes paranoiaShake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
}

.room-black {
    background: #000 !important;
}

/* ===== INCEL - FORUM ET RÉTRÉCISSEMENT (Non modifié) ===== */
.forum-thread {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 20px;
    transition: max-width 1s ease, padding 1s ease;
}

.forum-post {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    transition: all 0.5s ease;
}

.forum-post.toxic {
    border-color: #8b0000;
    background: rgba(50, 0, 0, 0.4);
}

.forum-post.violent {
    border-color: #ff0000;
    background: rgba(80, 0, 0, 0.6);
    animation: pulseRed 2s ease-in-out infinite;
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.6); }
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
}

.username {
    color: #4a90e2;
    font-weight: bold;
}

.post-time {
    color: #888;
    font-size: 0.9rem;
}

.post-content {
    color: #ddd;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Rétrécissement progressif */
.forum-narrowing-1 .forum-thread {
    max-width: 750px;
    padding: 50px 40px;
}

.forum-narrowing-2 .forum-thread {
    max-width: 600px;
    padding: 50px 60px;
}

.forum-narrowing-3 .forum-thread {
    max-width: 450px;
    padding: 50px 80px;
}

.forum-tunnel .forum-thread {
    max-width: 300px;
    padding: 50px 100px;
}

.forum-tunnel {
    background: radial-gradient(circle, #0a0a0a 0%, #000 70%);
}

.forum-post.echo {
    animation: echoEffect 2s ease-in-out infinite;
    background: rgba(0, 0, 0, 0.9);
}

@keyframes echoEffect {
    0%, 100% { opacity: 0.3; transform: scale(0.95); }
    50% { opacity: 0.8; transform: scale(1); }
}

.forum-void {
    background: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.void-text {
    color: #333;
    font-size: 2rem;
    letter-spacing: 10px;
    animation: voidPulse 3s ease-in-out infinite;
}

@keyframes voidPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

.warning-text {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(165, 42, 42, 0.2);
    border: 2px solid #a52a2a;
    border-radius: 10px;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
}

/* ===== NAVIGATION FIN (Corrigé pour Z-INDEX) ===== */
.final-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.conclusion {
    font-size: 2rem;
    font-style: italic;
    color: #d4a574;
    max-width: 900px;
    margin-bottom: 60px;
}

.navigation-end {
    text-align: center;
    position: relative; /* NÉCESSAIRE pour que le z-index fonctionne */
    z-index: 20;      /* Assure que la zone est au-dessus du fond */
}

.explore-more {
    font-size: 1.2rem;
    color: #aaa;
    margin: 30px 0 20px;
}

.nav-btn {
    display: inline-block;
    margin: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    background: #a52a2a;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative; /* Assure que les boutons sont sur leur propre calque */
    z-index: 21;
}

.nav-btn:hover {
    background: #8b0000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(165, 42, 42, 0.5);
}

.nav-btn.secondary {
    background: rgba(139, 69, 19, 0.5);
    border: 2px solid #8b4513;
}

.nav-btn.secondary:hover {
    background: rgba(165, 42, 42, 0.7);
    border-color: #a52a2a;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .narrative-text {
        font-size: 1.2rem;
        padding: 20px;
    }
    
    .prejudice-gauge {
        right: 10px;
        padding: 10px;
    }
    
    .gauge-bar {
        height: 300px;
    }
}