/* ==========================================================================
   🕯️ L'AFFAIRE DU MANOIR BLACKWOOD — STYLE POLICIER 1928
   Ambiance Victorienne, Film Noir, Esprit La Fabrique Numérique
   ========================================================================== */

:root {
    --bg-dark-wood: #140d08;
    --bg-parchment: #f9f4ea;
    --bg-parchment-dark: #eee3ce;
    --ink-dark: #261d16;
    --gold-accent: #c59b27;
    --gold-glow: rgba(197, 155, 39, 0.35);
    --burgundy: #7a1726;
    --burgundy-glow: rgba(122, 23, 38, 0.4);
    --border-parchment: #c8b99d;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Spectral', Georgia, serif;
    --font-typewriter: 'Special Elite', monospace;
}

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

body.noir-theme {
    background-color: var(--bg-dark-wood);
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(197, 155, 39, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 10% 90%, rgba(122, 23, 38, 0.08) 0%, transparent 40%),
        repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.15) 0px, rgba(0, 0, 0, 0.15) 2px, transparent 2px, transparent 6px);
    color: #e8ded1;
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Éclair d'orage plein écran */
.lightning-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.08s ease-out;
}

.lightning-flash.flash-active {
    opacity: 0.85;
}

/* ==================== HEADER DETECTIVE ==================== */
.detective-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2.5rem;
    background: rgba(18, 10, 6, 0.95);
    border-bottom: 2px solid var(--gold-accent);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.pipe-icon {
    font-size: 2.6rem;
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.header-branding h1 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    color: var(--gold-accent);
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(197, 155, 39, 0.3);
}

.sub-lead {
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    color: #ad9a88;
    letter-spacing: 1px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.pocket-watch-timer {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--gold-accent);
    border-radius: 4px;
    padding: 0.4rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-typewriter);
    color: var(--gold-accent);
}

.time-label {
    font-size: 0.75rem;
    color: #bfa895;
}

#case-timer {
    font-size: 1.15rem;
    font-weight: bold;
    color: #fff;
}

/* Boutons de style Victorien */
.antique-btn {
    background: rgba(45, 28, 18, 0.8);
    border: 1px solid var(--border-parchment);
    color: #e8ded1;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.antique-btn:hover {
    background: rgba(80, 50, 32, 0.9);
    border-color: var(--gold-accent);
}

.antique-btn-gold {
    background: linear-gradient(135deg, var(--gold-accent), #8c6a12);
    color: #120a06;
    border: 1px solid #ffe285;
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.antique-btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--gold-glow);
}

.btn-minor {
    font-size: 0.75rem;
    color: #8c7868;
}

/* ==================== TRACKER DES 5 ACTES ==================== */
.case-acts-tracker {
    display: flex;
    justify-content: center;
    background: rgba(14, 8, 4, 0.9);
    border-bottom: 1px solid rgba(197, 155, 39, 0.2);
    padding: 0.6rem 1rem;
    gap: 0.8rem;
    overflow-x: auto;
}

.act-node {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    font-size: 0.85rem;
    color: #a39281;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.act-badge {
    font-family: var(--font-typewriter);
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
}

.act-node.active {
    border-color: var(--gold-accent);
    background: rgba(197, 155, 39, 0.12);
    color: var(--gold-accent);
    font-weight: bold;
}

.act-node.completed {
    border-color: #2ecc71;
    color: #2ecc71;
}

/* ==================== CONTENEUR PRINCIPAL & PARCHEMIN ==================== */
#case-main {
    max-width: 950px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.room-act {
    display: none;
    animation: actFade 0.4s ease forwards;
}

.room-act.active {
    display: block;
}

@keyframes actFade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.parchment-container {
    background: var(--bg-parchment);
    color: var(--ink-dark);
    border-radius: 6px;
    padding: 2.5rem;
    border: 3px double var(--border-parchment);
    box-shadow: 
        0 15px 45px rgba(0, 0, 0, 0.8),
        inset 0 0 40px rgba(180, 150, 100, 0.25);
    position: relative;
}

.act-tag {
    display: inline-block;
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    color: var(--burgundy);
    background: rgba(122, 23, 38, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    margin-bottom: 0.6rem;
    letter-spacing: 1px;
}

.act-header h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: #2e1c10;
    margin-bottom: 0.6rem;
}

.act-header p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4a382c;
    margin-bottom: 1.8rem;
}

.btn-proceed {
    background: var(--burgundy);
    color: #fff;
    border: 1px solid #aa283c;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.btn-proceed:hover:not(:disabled) {
    transform: translateY(-2px);
    background: #9e1f32;
    box-shadow: 0 6px 20px var(--burgundy-glow);
}

.btn-proceed:disabled {
    background: #c2b7a7;
    color: #8c8273;
    border-color: #b0a595;
    cursor: not-allowed;
    box-shadow: none;
}

.feedback-msg {
    min-height: 24px;
    margin: 1.2rem 0;
    font-family: var(--font-typewriter);
    font-size: 0.95rem;
    text-align: center;
    font-weight: bold;
}

.feedback-msg.success {
    color: #1b6632;
}

.feedback-msg.error {
    color: var(--burgundy);
}

/* ==================== ACTE 0 : LE HALL & ORAGE ==================== */
.thunder-window {
    background: #0d0a14;
    border: 3px solid #3d2a1b;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.9);
}

.thunder-window:hover {
    border-color: var(--gold-accent);
}

.window-panes {
    font-size: 2.5rem;
    margin-bottom: 0.4rem;
}

.window-caption {
    font-family: var(--font-typewriter);
    font-size: 0.85rem;
    color: #d1c5b4;
}

.case-stamp {
    display: inline-block;
    border: 2px solid var(--burgundy);
    color: var(--burgundy);
    font-family: var(--font-typewriter);
    font-size: 0.85rem;
    font-weight: bold;
    padding: 0.3rem 0.8rem;
    transform: rotate(-2deg);
    margin-bottom: 1rem;
}

.hero-manor h2 {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    color: #1e1208;
    margin-bottom: 0.8rem;
}

.story-lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #3b2c20;
    margin-bottom: 1.8rem;
}

.manor-interactive-secrets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.clue-card {
    background: var(--bg-parchment-dark);
    border: 1px solid var(--border-parchment);
    border-radius: 4px;
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clue-card:hover {
    border-color: var(--gold-accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.clue-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.3rem;
}

.clue-card strong {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #24160c;
    display: block;
    margin-bottom: 0.3rem;
}

.clue-card p {
    font-size: 0.85rem;
    color: #594738;
}

.telegram-decoder-box {
    background: var(--bg-parchment-dark);
    border: 1px dashed var(--border-parchment);
    padding: 1.2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.telegram-decoder-box label {
    font-family: var(--font-typewriter);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
}

.input-line {
    display: flex;
    gap: 0.8rem;
}

.input-line input {
    flex: 1;
    background: #fff;
    border: 1px solid var(--border-parchment);
    padding: 0.7rem 1rem;
    font-family: var(--font-typewriter);
    font-size: 1rem;
    color: #24160c;
}

.btn-giant-dossier {
    background: linear-gradient(135deg, #2e1a0e, #140a04);
    color: var(--gold-accent);
    border: 2px solid var(--gold-accent);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    padding: 1.1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.btn-giant-dossier:hover {
    background: #3d2313;
    transform: scale(1.02);
}

/* ==================== ACTE 1 : BUREAU DU CRIME & COFFRE ==================== */
.crime-scene-interactive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.scene-item {
    background: var(--bg-parchment-dark);
    border: 1px solid var(--border-parchment);
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
}

.item-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.item-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.6rem;
    color: #2e1c10;
}

.item-desc {
    font-size: 0.9rem;
    color: #5a483a;
    line-height: 1.5;
}

.safe-combination-dials {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 1rem 0;
}

.dial-select {
    font-family: var(--font-typewriter);
    font-size: 1.3rem;
    font-weight: bold;
    padding: 0.4rem;
    background: #fff;
    border: 2px solid var(--gold-accent);
    border-radius: 4px;
}

/* ==================== ACTE 2 : LES 5 SUSPECTS ==================== */
.suspects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin: 2rem 0;
}

.suspect-card {
    background: var(--bg-parchment-dark);
    border: 1px solid var(--border-parchment);
    border-radius: 6px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.2s ease;
}

.suspect-card.selected {
    border: 2px solid var(--burgundy);
    background: #fae8eb;
    box-shadow: 0 4px 15px var(--burgundy-glow);
}

.suspect-avatar {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.3rem;
}

.suspect-card h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: #26160c;
}

.suspect-role {
    font-family: var(--font-typewriter);
    font-size: 0.75rem;
    color: var(--burgundy);
    display: block;
    margin-bottom: 0.6rem;
}

.alibi-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4a3a2d;
    margin-bottom: 1rem;
    min-height: 60px;
}

.btn-interrogate {
    background: #fff;
    border: 1px solid var(--border-parchment);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
}

.alibi-selection-box {
    background: #fff;
    border: 1px dashed var(--border-parchment);
    padding: 1.2rem;
    border-radius: 4px;
    text-align: center;
    margin: 1.5rem 0;
}

.alibi-selection-box strong {
    color: var(--burgundy);
}

/* ==================== ACTE 3 : TOXICOLOGIE ==================== */
.chemistry-station {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

.test-tube-rack {
    display: flex;
    gap: 1rem;
}

.chemical-tube {
    background: var(--bg-parchment-dark);
    border: 1px solid var(--border-parchment);
    border-radius: 6px;
    padding: 1.2rem;
    text-align: center;
    width: 150px;
}

.tube-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 0.3rem;
}

.chemical-tube strong {
    font-family: var(--font-heading);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.2rem;
}

.chemical-tube p {
    font-size: 0.75rem;
    color: #635243;
    margin-bottom: 0.8rem;
}

.btn-pour {
    background: #fff;
    border: 1px solid var(--border-parchment);
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 3px;
}

.sample-beaker-box {
    text-align: center;
}

.beaker {
    width: 110px;
    height: 150px;
    border: 3px solid #333;
    border-top: none;
    border-radius: 0 0 16px 16px;
    margin: 0 auto;
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.beaker-fluid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: #c29547; /* Couleur thé de base */
    transition: all 0.6s ease;
}

.beaker-label {
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    margin-top: 0.6rem;
}

.toxicology-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ==================== ACTE 4 : PUZZLE DU TESTAMENT ==================== */
.parchment-puzzle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin: 2rem 0;
}

.puzzle-piece {
    background: #f0e6d2;
    border: 1px dashed #8a6c4b;
    border-radius: 4px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 15px rgba(100, 70, 40, 0.15);
}

.puzzle-piece:hover {
    transform: scale(1.02);
    border-color: var(--burgundy);
}

.puzzle-piece.selected-piece {
    background: #e0d0b4;
    border: 2px solid var(--gold-accent);
}

.piece-num {
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--burgundy);
    display: block;
    margin-bottom: 0.4rem;
}

.puzzle-piece p {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    line-height: 1.5;
    color: #2b1c10;
}

.puzzle-controls {
    text-align: center;
}

.order-preview {
    font-family: var(--font-typewriter);
    font-size: 0.95rem;
    color: var(--burgundy);
    margin-bottom: 1rem;
}

/* ==================== ACTE 5 : LE VERDICT FINAL ==================== */
.accusation-statement {
    background: var(--bg-parchment-dark);
    border-left: 4px solid var(--burgundy);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.accusation-statement h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--burgundy);
    margin-bottom: 0.8rem;
}

.accusation-statement ul {
    list-style: none;
    line-height: 1.8;
    font-size: 1rem;
}

.moral-verdict-choice {
    text-align: center;
    border-top: 1px solid var(--border-parchment);
    padding-top: 2rem;
}

.moral-verdict-choice h4 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: #24160c;
    margin-bottom: 0.5rem;
}

.verdict-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.verdict-card {
    background: var(--bg-parchment-dark);
    border: 1px solid var(--border-parchment);
    border-radius: 6px;
    padding: 1.8rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.verdict-card h5 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--burgundy);
    margin-bottom: 0.8rem;
}

.verdict-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a3a2d;
    margin-bottom: 1.5rem;
}

/* ==================== MODALES ==================== */
.modal-case {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(14, 8, 4, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
}

.modal-case.hidden {
    display: none;
}

.case-card {
    background: var(--bg-parchment);
    border: 3px double var(--gold-accent);
    color: var(--ink-dark);
    border-radius: 6px;
    padding: 2.5rem;
    max-width: 620px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.wax-seal {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.case-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--burgundy);
    margin-bottom: 1rem;
}

.verdict-text {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.dossier-summary-box {
    background: var(--bg-parchment-dark);
    border: 1px dashed var(--border-parchment);
    padding: 1.2rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.dossier-line {
    font-family: var(--font-typewriter);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.notebook-card {
    text-align: left;
}

.notebook-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--burgundy);
    margin-bottom: 1rem;
    text-align: center;
}

.notes-content {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #3b2c20;
}

.modal-actions-bar {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.toast-note {
    display: none;
    margin-top: 1rem;
    font-family: var(--font-typewriter);
    color: #1b6632;
    font-weight: bold;
}

/* ==================== FOOTER ==================== */
.detective-footer {
    text-align: center;
    padding: 2rem 1rem;
    font-family: var(--font-typewriter);
    font-size: 0.85rem;
    color: #8c7868;
    border-top: 1px solid rgba(197, 155, 39, 0.2);
    margin-top: 3rem;
}

/* Language Switcher */
.lang-switch-btn { background: rgba(212, 175, 55, 0.15); color: #d4af37; border: 1px solid #d4af37; padding: 6px 14px; border-radius: 4px; text-decoration: none; font-weight: 700; font-family: 'Special Elite', monospace; font-size: 0.85rem; transition: all 0.25s ease; display: inline-flex; align-items: center; justify-content: center; }
.lang-switch-btn:hover { background: #d4af37; color: #12100e; box-shadow: 0 0 15px rgba(212, 175, 55, 0.6); transform: scale(1.05); }

