/* --- Styles généraux --- */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Special+Elite&family=Share+Tech+Mono&display=swap');
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"); /* Pour les icônes */

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

body {
    background-color: #0a0a0a;
    color: #c8c8c8;
    font-family: 'Share Tech Mono', monospace;
    background-blend-mode: multiply;
    background-size: cover;
    background-repeat: repeat;
    position: relative;
    overflow-x: hidden; /* Empêche le scroll horizontal */
    line-height: 1.4; /* Ligne de base plus serrée */
}

/* Effet lignes de scan */
body::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, rgba(10, 10, 10, 0.2), rgba(10, 10, 10, 0.2) 1px, transparent 1px, transparent 2px);
    pointer-events: none; z-index: 1;
}

/* Effet bruit statique */
.noise {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* Utilise une image SVG pour le bruit pour éviter les répétitions visibles */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04; /* Légèrement plus subtil */
    z-index: 2; pointer-events: none;
    animation: staticNoise 0.1s infinite linear; /* Animation légère */
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; position: relative; z-index: 3; }

/* --- Header --- */
.header {
    border-bottom: 2px dashed #333;
    padding-bottom: 15px; /* Réduit */
    margin-bottom: 25px; /* Réduit */
    text-align: center;
    position: relative;
}
.header::after {
    content: ""; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px;
    background-color: #a83232;
    animation: glitch 1.5s infinite steps(5); /* Animation glitch plus saccadée */
}
h1 {
    font-family: 'VT323', monospace; font-size: 2.8rem; /* Légèrement plus grand */
    color: #a83232; text-shadow: 0 0 6px rgba(168, 50, 50, 0.6);
    text-transform: uppercase; letter-spacing: 3px; /* Augmenté */
    margin-bottom: 5px; /* Réduit */
    display: inline-block; position: relative;
}
.header p {
    font-family: 'Special Elite', cursive; font-size: 0.9rem;
    margin-top: 5px; /* Réduit */
    color: #777; /* Légèrement plus sombre */
}
.eye-symbol {
    font-size: 1.7rem; /* Augmenté */
    margin: 0 12px; /* Augmenté */
    color: #666; /* Couleur de base */
    cursor: pointer; transition: color 0.3s, transform 0.1s, text-shadow 0.3s;
    vertical-align: middle;
}
.eye-symbol:hover { color: #a83232; text-shadow: 0 0 8px rgba(168, 50, 50, 0.7); }
.eye-symbol:active { transform: scale(0.9); }

/* --- Marquee / Bandeau défilant --- */
.marquee {
    background: #111; /* Plus sombre */
    color: #a83232; white-space: nowrap; overflow: hidden;
    margin: 20px 0; padding: 6px 0; /* Ajusté */
    font-family: 'Special Elite', cursive; font-size: 0.9rem; /* Taille ajustée */
    border-top: 1px solid #333; border-bottom: 1px solid #333;
    text-transform: uppercase; letter-spacing: 1px;
}
.marquee-content { display: inline-block; animation: marquee 30s linear infinite; padding-left: 100%; }
.marquee-content span { margin: 0 15px; } /* Espacement entre les éléments */

/* --- Warning Banner --- */
.warning-banner {
    background-color: #1a1a1a; border: 2px dashed #600; color: #a83232;
    padding: 12px; /* Augmenté */
    margin-bottom: 25px; /* Augmenté */
    font-size: 0.95rem; /* Augmenté */
    text-align: center; animation: pulse 2.5s infinite ease-in-out;
    font-family: 'Special Elite', cursive;
    text-transform: uppercase; letter-spacing: 0.5px;
}


/* --- Grille des Documents --- */
.documents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; min-height: 100px; }
.document-card {
    background-color: #101010; /* Légèrement plus clair */
    border: 1px solid #282828; /* Bordure plus subtile */
    padding: 15px; cursor: pointer; transition: all 0.3s ease;
    position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.document-card:hover {
    transform: translateY(-4px) scale(1.01); /* Effet de surélévation léger */
    box-shadow: 0 0 12px rgba(168, 50, 50, 0.3);
    border-color: #500; /* Rouge plus sombre pour la bordure */
}
/* Bordure rouge en haut */
.document-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: #a83232; }
/* Texte caché */
.document-card::after {
    content: "ILS NOUS CACHENT LA VÉRITÉ"; position: absolute; bottom: 4px; right: 6px;
    font-size: 0.65rem; color: rgba(168, 50, 50, 0); /* Invisible par défaut */
    transform: rotate(-3deg); font-family: 'Special Elite', cursive;
    opacity: 0; transition: opacity 0.3s ease, color 0.3s ease;
    pointer-events: none;
}
.document-card:hover::after { opacity: 1; color: rgba(168, 50, 50, 0.7); }
.document-title {
    font-family: 'VT323', monospace; font-size: 1.4rem; /* Augmenté */
    color: #d0d0d0; /* Légèrement plus clair */
    margin-bottom: 4px; /* Réduit */
    padding-left: 20px; position: relative;
}
.document-title::before {
    content: ">"; position: absolute; left: 0; top: 0; color: #a83232;
    animation: blink 1s infinite steps(1); /* Blink plus sec */
}
.document-date {
    font-size: 0.8rem; color: #666; font-style: italic;
    margin-bottom: 12px; /* Augmenté */
    font-family: 'Special Elite', cursive;
}
.document-summary { font-size: 0.9rem; line-height: 1.4; color: #999; flex-grow: 1; } /* Texte résumé plus clair */

/* --- Modale (Document & Énigme) --- */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); display: flex; justify-content: center; align-items: center; z-index: 1000; padding: 20px; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal.visible { opacity: 1; visibility: visible; }
.modal-content { background-color: #0c0c0c; border: 1px solid #333; max-width: 800px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 20px 25px; position: relative; box-shadow: 0 0 25px rgba(0, 0, 0, 0.85); scrollbar-width: thin; scrollbar-color: #a83232 #1a1a1a; animation: fadeInModal 0.3s ease forwards; }
.modal-content::-webkit-scrollbar { width: 8px; } .modal-content::-webkit-scrollbar-track { background: #1a1a1a; } .modal-content::-webkit-scrollbar-thumb { background-color: #a83232; border-radius: 4px; border: 1px solid #1a1a1a; }
/* Grille de fond subtile */
.modal-content::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(rgba(25, 25, 25, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(25, 25, 25, 0.08) 1px, transparent 1px); background-size: 15px 15px; pointer-events: none; z-index: -1; opacity: 0.5; }
.modal-header { border-bottom: 1px dashed #444; padding-bottom: 12px; margin-bottom: 18px; }
.modal-title { font-family: 'VT323', monospace; font-size: 1.9rem; color: #a83232; margin-bottom: 5px; text-shadow: 0 0 6px rgba(168, 50, 50, 0.5); }
.modal-date { font-size: 0.8rem; color: #777; margin-bottom: 15px; font-family: 'Special Elite', cursive; }
.modal-body { min-height: 50px; font-size: 0.95rem; } /* Taille police de base modale */
.modal-body p { margin-bottom: 12px; line-height: 1.5; color: #bbb; } /* Espacement paragraphes réduit */
.modal-body .fetch-error-title { color: #e74c3c; font-weight: bold; text-align: center; font-family: 'VT323', monospace; font-size: 1.5em; margin-bottom: 10px; }
.modal-body .fetch-error-details { color: #aaa; font-size: 0.9em; text-align: center; line-height: 1.5; }
.evidence-header { font-weight: bold; color: #a83232; margin-top: 18px; margin-bottom: 8px; border-left: 3px solid #a83232; padding-left: 10px; font-family: 'VT323', monospace; font-size: 1.3rem; }
.evidence-list { list-style-type: none; padding-left: 0; margin-bottom: 15px; }
.evidence-list li { margin-bottom: 10px; padding-left: 25px; position: relative; color: #bbb; }
.evidence-list li::before { content: "!»"; position: absolute; left: 0; color: #a83232; font-size: 1.1rem; font-weight: bold; top: -2px; }
.close-btn { background-color: #1f1f1f; color: #a83232; border: 1px solid #600; padding: 8px 18px; font-family: 'Share Tech Mono', monospace; cursor: pointer; transition: all 0.3s ease; margin-top: 25px; display: inline-block; font-weight: bold; font-size: 0.9rem; }
.close-btn:hover { background-color: #333; box-shadow: 0 0 10px rgba(168, 50, 50, 0.3); color: #ff5555; }
.classification-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-25deg); color: rgba(168, 50, 50, 0.08); border: 3px dashed rgba(168, 50, 50, 0.1); padding: 15px 25px; font-size: 2.5rem; font-weight: bold; text-transform: uppercase; pointer-events: none; z-index: 0; font-family: 'Special Elite', cursive; user-select: none; opacity: 0.7; }
.interactive-code { background-color: #333; color: #eee; padding: 1px 4px; border-radius: 2px; font-family: 'VT323', monospace; cursor: help; transition: background-color 0.2s, color 0.2s; }
.interactive-code:hover { background-color: #a83232; color: #fff; }

/* ----- CENSURE ----- */
.redacted {
    background: #111; /* Fond plus sombre */
    color: transparent !important; /* Force la transparence du texte */
    filter: blur(4px); /* Flou plus prononcé */
    padding: 0px 3px;
    margin: 0 1px;
    cursor: default; /* Curseur normal, pas interdit */
    user-select: none; /* Empêche la sélection */
    pointer-events: none; /* Empêche interaction */
    display: inline-block;
    /* Enlever la bordure pour que le flou suffise */
    border: none;
    /* Très léger bruit pour renforcer l'effet */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
}
/* Pour les blocs entiers censurés */
.censored-block {
    filter: blur(5px); /* Flou appliqué au bloc */
    opacity: 0.7; /* Légère transparence */
    user-select: none;
    pointer-events: none;
    position: relative; /* Nécessaire pour z-index ou pseudo-éléments si besoin */
    overflow: hidden; /* Empêche le contenu flou de "déborder" visuellement */
    border: 1px dashed rgba(168, 50, 50, 0.2); /* Bordure subtile pour délimiter */
    padding: 5px; margin: 10px 0; /* Un peu d'espace */
    background-color: rgba(20, 0, 0, 0.1); /* Teinte rouge très légère */
}
/* Assurer que les enfants héritent bien l'impossibilité d'interagir */
.censored-block * {
    pointer-events: none !important;
    cursor: default !important;
}


/* --- Footer --- */
.footer {
    margin-top: 40px; /* Réduit */
    padding-top: 15px; /* Réduit */
    border-top: 1px dashed #333;
    font-size: 0.75rem; /* Réduit */
    color: #555; /* Plus visible */
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    position: relative;
    line-height: 1.6; /* Espacement pour lisibilité */
}
.footer-text { display: block; margin-bottom: 8px; }
.footer-highlight { color: #a83232; font-weight: bold; }
.footer-note { /* Style pour les notes en bas des documents */
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
    margin-top: 15px;
    text-align: right;
    border-top: 1px dotted #444;
    padding-top: 5px;
}

/* --- Infos de Connexion (Simulation) --- */
.connection-info { position: fixed; bottom: 5px; right: 10px; font-size: 0.7rem; color: #444; text-align: right; z-index: 10; font-family: 'Share Tech Mono', monospace; pointer-events: none; user-select: none; }
.connection-info span { color: #a83232; animation: blink 1.2s infinite steps(1); } /* Blink plus lent */

/* --- État de l'Enquête --- */
.investigation-status { margin: 30px 0; border-radius: 0; /* Pas de radius */ overflow: visible; /* Permet ombres */ background: transparent; border: 1px solid #333; transition: border-color 0.3s ease; }
.investigation-status.active { border-color: #555; box-shadow: 0 0 8px rgba(168, 50, 50, 0.15); }
.investigation-header { padding: 10px 15px; background: transparent; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: 'VT323', monospace; color: #999; /* Plus clair */ font-size: 1.3rem; /* Augmenté */ user-select: none; border-bottom: 1px solid #333; transition: color 0.3s ease, background-color 0.3s ease; }
.investigation-status.active .investigation-header { border-bottom-color: transparent; }
.investigation-header:hover { color: #a83232; background-color: rgba(168, 50, 50, 0.03); }
.investigation-header .header-content { display: flex; align-items: center; gap: 10px; /* Réduit */ flex-grow: 1; }
.investigation-header .header-icon { /* Style pour l'icône terminale verte */
    font-family: 'VT323', monospace;
    color: #0f0; /* Vert terminal */
    font-size: 1.3rem;
    margin-left: 10px;
    line-height: 1;
}
.investigation-header::after { /* Flèche dropdown */
    content: '▼'; font-size: 0.8rem; /* Plus petit */ transition: transform 0.3s ease;
    color: #555; /* Plus sombre */ margin-left: 15px;
}
.investigation-status.active .investigation-header::after { transform: rotate(180deg); color: #888; }
#terminal-access-btn { font-size: 1.1rem; color: #0f0; cursor: pointer; margin-left: 15px; transition: color 0.2s, transform 0.1s; display: none; /* Caché par défaut */ }
#terminal-access-btn:hover { color: #5f5; } #terminal-access-btn:active { transform: scale(0.9); }
.potential-leads-container { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding 0.4s ease-out; padding: 0 15px; background-color: #0d0d0d; /* Fond très sombre */ }
.investigation-status.active .potential-leads-container { max-height: 300px; overflow-y: auto; padding: 15px; border-top: 1px dashed #333; scrollbar-width: thin; scrollbar-color: #a83232 #1a1a1a; }
.potential-leads-container::-webkit-scrollbar { width: 6px; } .potential-leads-container::-webkit-scrollbar-track { background: #1a1a1a; } .potential-leads-container::-webkit-scrollbar-thumb { background-color: #a83232; border-radius: 3px; }
.potential-leads { list-style: none; padding: 0; margin: 0; }
.potential-leads li { background-color: #181818; border-left: 3px solid #a83232; padding: 8px 12px; margin-bottom: 8px; font-family: 'Share Tech Mono', monospace; color: #ccc; cursor: pointer; transition: background-color 0.3s, border-color 0.3s; border-radius: 0; /* Pas de radius */ font-size: 0.9rem; }
.potential-leads li:hover { background-color: #282828; border-left-color: #ff5555; }
.potential-leads li .lead-status { font-size: 0.8em; color: #888; /* Plus clair */ margin-left: 10px; font-style: italic; display: block; margin-top: 3px; }
.potential-leads li.non-interactive { cursor: default; opacity: 0.6; background-color: #1f1f1f; border-left-color: #444; }
.potential-leads li.non-interactive:hover { background-color: #1f1f1f; border-left-color: #444; }
.progress-bar-container {
    height: 10px; /* Augmenté */ background-color: #222; /* Plus sombre */
    border-radius: 0; /* Pas de radius */ overflow: hidden; flex-grow: 1;
    max-width: 200px; border: 1px solid #444; margin: 0 10px; /* Espace autour */
}
.progress-bar-fill { height: 100%; background-color: #a83232; width: 0%; transition: width 0.5s ease-out; }
.progress-bar-text { font-size: 0.85rem; /* Augmenté */ color: #888; margin-left: 5px; /* Réduit */ white-space: nowrap; font-family: 'VT323', monospace; } /* Utilise VT323 */


/* --- Styles Modale Déblocage --- */
#unlock-modal-content { background-color: #0f0f0f; border: 1px solid #333; max-width: 500px; width: 90%; padding: 20px; position: relative; text-align: center; font-family: 'Share Tech Mono', monospace; animation: fadeInModal 0.3s ease forwards; max-height: 90vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #a83232 #1a1a1a; }
#unlock-modal-content::-webkit-scrollbar { width: 6px; } #unlock-modal-content::-webkit-scrollbar-track { background: #1a1a1a; } #unlock-modal-content::-webkit-scrollbar-thumb { background-color: #a83232; border-radius: 3px; }
#unlock-modal-content h2 { font-family: 'VT323', monospace; font-size: 1.8rem; margin-bottom: 15px; color: #a83232; }
#unlock-modal-content p { margin-bottom: 15px; color: #ccc; }
#unlock-modal-content input[type="text"], #unlock-modal-content input[type="number"], #unlock-modal-content input[type="range"] { width: 80%; padding: 8px; margin-bottom: 15px; border: 1px solid #600; background: #222; color: #fff; font-family: 'Share Tech Mono', monospace; text-align: center; transition: border-color 0.2s; display: block; margin-left: auto; margin-right: auto; }
#unlock-modal-content input[type="range"] { cursor: pointer; }
#unlock-modal-content input.input-error { border-color: #f00 !important; animation: shake 0.3s; }
#unlock-modal-content button { background-color: #1a1a1a; color: #a83232; border: 1px solid #600; padding: 8px 15px; font-family: 'Share Tech Mono', monospace; cursor: pointer; transition: all 0.3s ease; font-weight: bold; margin: 5px; }
#unlock-modal-content button:hover:not(:disabled) { background-color: #2a2a2a; box-shadow: 0 0 10px rgba(168, 50, 50, 0.3); }
#unlock-modal-content button:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Styles spécifiques aux Puzzles --- */
.simon-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
.simon-button { width: 60px; height: 60px; border: 2px solid #555; border-radius: 50%; cursor: pointer; transition: all 0.1s; }
.simon-button:active:not(:disabled) { transform: scale(0.95); } .simon-button:disabled { cursor: not-allowed; opacity: 0.6; }
.simon-button.red { background-color: #a00; border-color: #f55; } .simon-button.blue { background-color: #00a; border-color: #55f; } .simon-button.green { background-color: #0a0; border-color: #5f5; } .simon-button.yellow { background-color: #aa0; border-color: #ff5; }
.simon-button.lit { filter: brightness(2.2); box-shadow: 0 0 15px currentColor; }
#simon-status { min-height: 20px; margin-top: 10px; color: #a83232; font-weight: bold; font-size: 1.1em; }
.slider-puzzle-container { margin-bottom: 15px; } #slider-value-display { font-size: 1.2rem; color: #eee; margin-bottom: 5px; font-family: 'VT323', monospace; }
.wires-container { display: flex; justify-content: center; gap: 10px; margin-bottom: 15px; padding: 10px 0; flex-wrap: wrap;}
.wire { width: 15px; height: 80px; border-radius: 5px; cursor: pointer; transition: transform 0.1s, opacity 0.2s, box-shadow 0.2s; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.wire:hover:not(.cut) { transform: scale(1.1); box-shadow: 0 3px 5px rgba(0,0,0,0.4); }
.wire.cut { opacity: 0.3; cursor: not-allowed; transform: scaleY(0.8); background-image: repeating-linear-gradient(45deg, #333, #333 2px, #222 2px, #222 4px); box-shadow: none; }
.wire.red { background-color: #f00; } .wire.blue { background-color: #00f; } .wire.green { background-color: #0f0; } .wire.yellow { background-color: #ff0; } .wire.black { background-color: #333; }
.sequence-input p { margin-bottom: 8px; }
.sequence-input span { display: inline-block; width: 30px; height: 30px; line-height: 30px; border: 1px solid #600; background: #222; margin: 5px; text-align: center; color: #eee; cursor: pointer; transition: all 0.2s; user-select: none; font-size: 1.1rem; }
.sequence-input span:hover:not(.selected) { background-color: #444; transform: scale(1.1); }
.sequence-input span.selected { background-color: #a83232; color: #fff; cursor: default; pointer-events: none; opacity: 0.7; transform: scale(0.9); }
#sequence-display { margin-top: 10px; font-size: 1.2rem; color: #a83232; min-height: 20px; font-family: 'VT323', monospace; word-wrap: break-word; }
.drag-drop-container { display: flex; justify-content: space-around; align-items: center; margin-bottom: 15px; padding: 15px; background: #222; border: 1px dashed #444; min-height: 80px; position: relative; }
#draggable-item { width: 50px; height: 50px; background: #a83232; color: #fff; text-align: center; line-height: 50px; cursor: move; font-size: 0.8em; border: 1px solid #f55; transition: opacity 0.2s, transform 0.1s; user-select: none; }
#draggable-item:active { cursor: grabbing; transform: scale(0.95); }
#drop-zone { width: 70px; height: 70px; border: 2px dashed #a83232; display: flex; align-items: center; justify-content: center; font-size: 0.8em; color: #666; transition: all 0.2s; }
#drop-zone.over { background-color: rgba(168, 50, 50, 0.2); border-style: solid; border-color: #ff5555; color: #ccc; }
.audio-puzzle-container { padding: 10px 0; } .audio-puzzle-container button { margin: 5px; vertical-align: middle;} #audio-status { color: #aaa; font-style: italic; margin-left: 10px; } .audio-puzzle-container input[type="text"] { display: inline-block; width: 60%; margin-top: 10px; margin-left: 5px; vertical-align: middle;} #audio-submit-btn { vertical-align: middle; }
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 300px; margin: 20px auto; perspective: 1000px; }
.memory-tile { width: 60px; height: 60px; position: relative; cursor: pointer; transform-style: preserve-3d; transition: transform 0.6s ease, box-shadow 0.3s ease; border: 1px solid #444; background-color: transparent; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.4); }
.memory-tile:hover:not(.flipped):not(.matched) { box-shadow: 0 4px 10px rgba(168, 50, 50, 0.3); border-color: #666; }
.memory-tile .tile-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; align-items: center; justify-content: center; border-radius: 4px; overflow: hidden; }
.tile-back { background: linear-gradient(135deg, #2a2a2a 25%, #1f1f1f 25%, #1f1f1f 50%, #2a2a2a 50%, #2a2a2a 75%, #1f1f1f 75%, #1f1f1f 100%); background-size: 10px 10px; color: #555; }
.tile-back::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.1) 3px); pointer-events: none; }
.tile-front { background-color: #111; transform: rotateY(180deg); border: 1px solid #333; padding: 5px; }
.tile-front img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.memory-tile.flipped { transform: rotateY(180deg); box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.memory-tile.matched { cursor: default; transform: rotateY(180deg) scale(0.95); opacity: 0.6; box-shadow: 0 0 15px rgba(85, 170, 85, 0.6); border-color: #474; }
.memory-tile.matched .tile-front { background-color: #1a2a1a; } .memory-tile.matched .tile-front img { filter: brightness(0.8) contrast(1.1); }
.memory-tile.matched .tile-front::after { content: '\f00c'; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; bottom: 2px; right: 4px; font-size: 1rem; color: rgba(85, 170, 85, 0.9); text-shadow: 0 0 3px #000; }

/* --- Styles Fenêtre CMD Séparée --- */
#cmd-window { position: fixed; z-index: 1005; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 600px; max-width: 95%; height: 450px; background-color: #000; border: 2px outset #555; box-shadow: 5px 5px 15px rgba(0,0,0,0.7); font-family: 'VT323', monospace; color: #0F0; display: flex; flex-direction: column; overflow: hidden; }
#cmd-titlebar { background: #333; color: #ccc; padding: 2px 5px; cursor: move; font-weight: normal; font-size: 0.9rem; user-select: none; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #555; flex-shrink: 0; }
#cmd-titlebar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
#cmd-close-btn { background-color: #555; border: 1px outset #777; color: #ccc; font-family: 'Arial', sans-serif; font-size: 0.8rem; padding: 0 4px; cursor: pointer; font-weight: bold; line-height: 1; flex-shrink: 0; }
#cmd-close-btn:active { border-style: inset; background-color: #444; }
#cmd-content { flex-grow: 1; padding: 5px; overflow: hidden; display: flex; flex-direction: column; }
#cmd-output { flex-grow: 1; overflow-y: auto; white-space: pre-wrap; word-break: break-all; scrollbar-width: thin; scrollbar-color: #0a0 #222; margin-bottom: 5px; font-size: 1.1rem; line-height: 1.2; }
#cmd-output::-webkit-scrollbar { width: 8px; } #cmd-output::-webkit-scrollbar-track { background: #111; } #cmd-output::-webkit-scrollbar-thumb { background-color: #0a0; }
#cmd-output .terminal-line { margin-bottom: 2px; } #cmd-output .terminal-command-echo { color: #bbb; } #cmd-output .terminal-response { color: #0F0; } #cmd-output .terminal-error { color: #F00; } #cmd-output .terminal-exec-text { color: #aaa; } #cmd-output .terminal-dir-header { color: #FF0; } #cmd-output .terminal-dir-file { color: #0F0; } #cmd-output .terminal-dir-exe { color: #0F0; font-weight: bold; } #cmd-output .terminal-highlight-exe { color: #FF0; font-weight: bold; }
#cmd-input-line { display: flex; align-items: center; flex-shrink: 0; }
#cmd-prompt { color: #0F0; margin-right: 5px; user-select: none; font-size: 1.1rem; }
#cmd-input { flex-grow: 1; background: transparent; border: none; outline: none; color: #FFF; font-family: 'VT323', monospace; font-size: 1.1rem; caret-color: #0F0; padding: 0; line-height: 1.2; }
#cmd-input:disabled { background-color: #111; cursor: not-allowed; }


/* --- Styles Fenêtre de Jeu Séparée --- */
#game-window { position: fixed; z-index: 1006; left: 55%; top: 55%; transform: translate(-50%, -50%); width: 450px; max-width: 90%; background-color: #c0c0c0; border: 2px outset #fff; box-shadow: 5px 5px 15px rgba(0,0,0,0.5); font-family: 'Tahoma', 'Geneva', sans-serif; color: #000; display: flex; flex-direction: column; overflow: hidden; }
#game-window-titlebar { background: linear-gradient(to right, #000080, #1084d0); color: #fff; padding: 3px 5px; cursor: move; font-weight: bold; font-size: 0.9rem; user-select: none; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
#game-window-titlebar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
#game-window-close-btn { background-color: #c0c0c0; border: 1px outset #fff; color: #000; font-family: 'Arial Black', Gadget, sans-serif; font-size: 0.9rem; padding: 0 5px; cursor: pointer; font-weight: bold; line-height: 1.1; flex-shrink: 0; }
#game-window-close-btn:active { border-style: inset; }
#game-window-content { padding: 15px; background-color: #bbb; flex-grow: 1; position: relative; overflow-y: auto; overflow-x: hidden; border-top: 1px solid #888; }

/* --- Styles Spécifiques au JEU KNACKI --- */
#game-window-content #knacki-game-instructions { font-size: 0.8rem; color: #333; margin-bottom: 10px; text-align: center; border-bottom: 1px solid #999; padding-bottom: 8px; }
#game-window-content #knacki-belt { height: 60px; background-color: #888; border: 2px inset #777; margin-bottom: 10px; position: relative; overflow: hidden; }
#game-window-content .knacki-item { position: absolute; top: 10px; left: -80px; width: auto; padding: 5px 10px; border-radius: 15px; font-family: 'VT323', monospace; font-size: 1.4rem; cursor: pointer; border: 2px outset #666; animation: moveKnacki 4.5s linear forwards; white-space: nowrap; user-select: none; box-shadow: 2px 2px 3px rgba(0,0,0,0.3); transition: transform 0.2s ease-out, opacity 0.2s ease-out; }
#game-window-content .knacki-good { background-color: #f4c842; color: #8B4513; border-color: #d3a73a #a17e2c #a17e2c #d3a73a; }
#game-window-content .knacki-bad { background-color: #77dd77; color: #005000; border-color: #5cb85c #4cae4c #4cae4c #5cb85c; }
#game-window-content .knacki-item.clicked { transform: scale(0); opacity: 0; pointer-events: none; }
#game-window-content #knacki-game-info { text-align: center; font-size: 1rem; margin-top: 10px; }
#game-window-content #knacki-game-score { font-weight: bold; color: #000080; font-size: 1.1rem; }
#game-window-content #knacki-game-result { margin-top: 15px; font-weight: bold; font-size: 1.2rem; text-align: center; min-height: 20px; }
#game-window-content #knacki-game-result.win { color: #006400; } #game-window-content #knacki-game-result.lose { color: #8B0000; }
#game-window-content #knacki-close-game-btn { display: block; margin: 15px auto 0 auto; padding: 8px 15px; font-size: 0.9rem; background-color: #c0c0c0; border: 1px outset #fff; cursor: pointer; }
#game-window-content #knacki-close-game-btn:active { border-style: inset; }

/* --- Styles Fenêtre de Visualisation de Fichiers (File Viewer) --- */
#file-viewer-window {
    position: fixed; z-index: 1007; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 600px; max-width: 90%; height: 450px; max-height: 85vh;
    background-color: #050505; border: 2px outset #555; box-shadow: 6px 6px 18px rgba(0,0,0,0.8);
    font-family: 'Share Tech Mono', monospace; color: #b8b8b8; display: flex; flex-direction: column; overflow: hidden;
}

/* Styles pour la fenêtre en mode audio (plus compacte) */
#file-viewer-window.audio-mode {
    width: 450px; height: auto; /* Hauteur s'adapte */
    min-height: 80px; /* Hauteur minimale */
    max-height: 100px; /* Hauteur maximale */
}

#file-viewer-titlebar { background: #282828; color: #ccc; padding: 3px 6px; cursor: move; font-weight: normal; font-size: 0.9rem; user-select: none; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #4a4a4a; flex-shrink: 0; height: 28px; box-sizing: border-box; }
#file-viewer-titlebar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
#file-viewer-close-btn { background-color: #555; border: 1px outset #777; color: #ccc; font-family: 'Arial', sans-serif; font-size: 0.8rem; padding: 0 5px; cursor: pointer; font-weight: bold; line-height: 1.1; flex-shrink: 0; }
#file-viewer-close-btn:active { border-style: inset; background-color: #444; }

/* CORRECTION: Contenu aligné en haut par défaut */
#file-viewer-content {
    flex-grow: 1; padding: 10px; overflow: auto; background-color: #0a0a0a;
    scrollbar-width: thin; scrollbar-color: #888 #222; line-height: 1.4; font-size: 0.95rem;
    display: flex; flex-direction: column;
    align-items: flex-start; /* Aligne le contenu en haut */
    /* justify-content: center; <-- Supprimé */
}
#file-viewer-content::-webkit-scrollbar { width: 8px; } #file-viewer-content::-webkit-scrollbar-track { background: #111; } #file-viewer-content::-webkit-scrollbar-thumb { background-color: #666; }

/* Specific Content Styles */
#file-viewer-content .viewer-text { white-space: pre-wrap; word-wrap: break-word; color: #c8c8c8; font-family: 'Share Tech Mono', monospace; width: 100%; }
#file-viewer-content .viewer-image { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; }
#file-viewer-content .viewer-image img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; background-color: #111; border: 1px solid #333; object-fit: contain; }

/* Container pour centrer le lecteur audio custom */
#file-viewer-content .viewer-audio { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; padding: 10px 0; }
/* Element audio réel caché */
#file-viewer-content .viewer-audio audio { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* --- Styles Lecteur Audio Rétro (Rouge/Noir) --- */
.custom-audio-player {
    display: flex; align-items: center;
    background-color: #000000; /* Fond noir profond */
    border: 2px ridge #555; /* Bordure "matériel" */
    padding: 6px 10px; /* Padding réduit */
    width: 100%; max-width: 380px; /* Limite largeur */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.6), inset 1px 1px 2px rgba(255,255,255,0.05); /* Ombre + léger reflet interne */
    border-radius: 3px; /* Coins très légèrement arrondis */
}
.custom-audio-player .play-pause-btn {
    background: linear-gradient(to bottom, #3a3a3a, #1a1a1a); /* Dégradé gris foncé */
    border: 1px solid #000; border-top-color: #444; border-left-color: #444;
    color: #a83232; /* Icone rouge */
    cursor: pointer; padding: 0; margin-right: 10px; font-size: 1.3em;
    width: 32px; height: 30px; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s; flex-shrink: 0;
    border-radius: 3px; box-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}
.custom-audio-player .play-pause-btn:hover { background: linear-gradient(to bottom, #4a4a4a, #2a2a2a); border-color: #222 #777 #777 #222; color: #ff5555; }
.custom-audio-player .play-pause-btn:active { background: linear-gradient(to top, #3a3a3a, #1a1a1a); border-color: #777 #222 #222 #777; box-shadow: inset 1px 1px 3px rgba(0,0,0,0.8); color: #f00; }
.custom-audio-player .play-pause-btn i { display: block; line-height: 1; width: 1em; text-align: center; }
.custom-audio-player .controls-center { flex-grow: 1; display: flex; flex-direction: column; margin: 0 6px; }
.custom-audio-player .time-container { display: flex; justify-content: space-between; margin-bottom: 3px; }
.custom-audio-player .time-display {
    font-family: 'VT323', monospace; color: #a83232; /* Rouge LED */
    font-size: 1.4em; text-shadow: 0 0 5px rgba(168, 50, 50, 0.8);
    background: #000; padding: 0px 4px; border: 1px solid #222;
    border-radius: 2px; line-height: 1.1;
}
.custom-audio-player .progress-bar-container {
    width: 100%; height: 10px; background: #111; border: 1px solid #333;
    border-top-color: #000; border-left-color: #000; cursor: pointer; position: relative;
    overflow: hidden; border-radius: 1px; box-shadow: inset 1px 1px 3px rgba(0,0,0,0.6);
}
.custom-audio-player .progress-bar-fill {
    position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background: #a83232; /* Rouge principal */
    background: linear-gradient(to right, #600 0%, #a83232 30%, #a83232 70%, #c04040 100%);
    box-shadow: 0 0 4px rgba(168, 50, 50, 0.6); transition: width 0.1s linear;
}

#file-viewer-content .viewer-error { color: #F00; text-align: center; padding: 30px 10px; font-weight: bold; font-family: 'VT323', monospace; font-size: 1.3rem; border: 1px dashed #600; background-color: rgba(50, 0, 0, 0.2); white-space: pre-wrap; }
#file-viewer-content .viewer-loading { color: #888; text-align: center; padding: 30px 10px; font-style: italic; }

/* --- Footer Secret --- */
#footer-secret { position: absolute; bottom: 5px; right: 5px; cursor: pointer; opacity: 0.3; transition: all 0.3s; font-size: 1rem; color: #555; padding: 2px; user-select: none; display: inline-block; }
#footer-secret:hover { opacity: 1; color: #a83232; text-shadow: 0 0 8px rgba(168, 50, 50, 0.7); }
#footer-secret:active { transform: scale(0.9); }

/* --- Zone de Notification --- */
#notification-area { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 2001; width: 90%; max-width: 400px; pointer-events: none; padding-bottom: 10px; }
.game-notification { background-color: rgba(50, 50, 50, 0.9); color: #fff; padding: 10px 20px; margin-bottom: 10px; border-radius: 5px; font-family: 'Share Tech Mono', monospace; font-size: 0.9rem; box-shadow: 0 2px 10px rgba(0,0,0,0.5); opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; text-align: center; pointer-events: auto; }
.game-notification.show { opacity: 1; transform: translateY(0); }
.game-notification.success { background-color: rgba(50, 168, 50, 0.9); } .game-notification.error { background-color: rgba(168, 50, 50, 0.9); } .game-notification.info { background-color: rgba(50, 100, 168, 0.9); }

/* --- Bouton Reset --- */
#reset-progress-btn {
    background-color: #222; color: #888; border: 1px solid #444;
    padding: 6px 12px; font-size: 0.8rem; margin-top: 20px;
    cursor: pointer; transition: all 0.3s ease;
    font-family: 'Share Tech Mono', monospace;
}
#reset-progress-btn:hover { background-color: #a83232; color: #fff; border-color: #600; }


/* --- Animations --- */
@keyframes marquee { 0% { transform: translateX(0%); } 100% { transform: translateX(-100%); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; border-color: #600; box-shadow: none; } 50% { opacity: 0.8; border-color: #a83232; box-shadow: 0 0 5px rgba(168, 50, 50, 0.3); } }
@keyframes glitch { 0%, 100% { transform: translateX(0); opacity: 1;} 10% { transform: translateX(-2px); opacity: 0.8;} 20% { transform: translateX(2px); opacity: 1;} 30% { transform: translateX(-1px) skewX(-5deg); opacity: 0.6;} 40% { transform: translateX(1px) skewX(5deg); opacity: 1;} 50% { transform: translateX(0); opacity: 0.7;} 60% { transform: translateX(1px); opacity: 1;} 70% { transform: translateX(-1px) scaleY(0.98); opacity: 0.9;} 80% { transform: translateX(1px) scaleY(1.02); opacity: 1;} 90% { transform: translateX(-2px); opacity: 0.8;} }
@keyframes fadeInModal { from { opacity: 0; transform: scale(0.97) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-3px, 0, 0); } 40%, 60% { transform: translate3d(3px, 0, 0); } }
@keyframes moveKnacki { from { left: -80px; } to { left: 110%; } }
@keyframes staticNoise { 0% { transform: translate(0,0); } 10% { transform: translate(-1px,-1px); } 20% { transform: translate(1px,1px); } 30% { transform: translate(-2px,1px); } 40% { transform: translate(1px,-2px); } 50% { transform: translate(-1px,2px); } 60% { transform: translate(2px,-1px); } 70% { transform: translate(-2px,-2px); } 80% { transform: translate(1px,0); } 90% { transform: translate(0,1px); } 100% { transform: translate(0,0); } }


/* Styles spécifiques aux éléments de structure des documents HTML fournis */
.document-header h3 {
    font-family: 'VT323', monospace;
    font-size: 1.6rem;
    color: #d8d8d8;
    margin-bottom: 5px;
    text-transform: uppercase;
}
.document-meta {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 15px;
    font-family: 'Special Elite', cursive;
    border-bottom: 1px dotted #444;
    padding-bottom: 8px;
}
.document-meta span {
    margin-right: 15px;
}
.document-section {
    margin-bottom: 18px;
}
.document-section h4.section-title {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: #a83232;
    margin-bottom: 8px;
    border-bottom: 1px solid #333;
    padding-bottom: 3px;
}
.document-section p {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #b0b0b0;
    font-size: 0.95rem;
}
.document-section ul {
    list-style: none; /* Ou 'disc' si vous préférez des puces */
    padding-left: 20px;
    margin-bottom: 15px;
}
.document-section ul li {
    margin-bottom: 8px;
    color: #b0b0b0;
    position: relative;
}
.document-section ul li::before {
    content: '-'; /* Puce simple */
    position: absolute;
    left: -15px;
    color: #a83232;
}
.document-section pre {
    background-color: #111;
    border: 1px solid #333;
    padding: 10px;
    font-family: 'VT323', monospace;
    color: #87CEEB; /* Couleur tech par défaut pour pre */
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.3;
    scrollbar-width: thin;
    scrollbar-color: #444 #111;
}
.document-section pre::-webkit-scrollbar { height: 6px; }
.document-section pre::-webkit-scrollbar-track { background: #111; }
.document-section pre::-webkit-scrollbar-thumb { background-color: #444; }

/* Styles spécifiques Autopsie */
.autopsy-document header.document-header {
    border-bottom: 2px solid #500; /* Bordure plus marquée */
    margin-bottom: 20px;
}
.autopsy-document blockquote {
    border-left: 3px solid #666;
    margin: 15px 0 15px 20px;
    padding-left: 15px;
    font-style: italic;
    color: #999;
    background-color: rgba(50, 50, 50, 0.1);
}

/* Styles spécifiques aux éléments techniques/références dans les docs */
.technical {
    color: #87CEEB; /* Bleu ciel pour code/tech */
    font-family: 'VT323', monospace; /* Police différente */
    background-color: rgba(135, 206, 235, 0.1); /* Fond très léger */
    padding: 0 3px;
    border: 1px dashed rgba(135, 206, 235, 0.3);
    border-radius: 2px;
    font-size: 0.9em; /* Un peu plus petit */
}
.reference {
    color: #FFD700; /* Or pour les références */
    font-style: italic;
    font-size: 0.85em;
}
.concept-description {
    background-color: #151515;
    border-left: 3px solid #a83232;
    padding: 8px 12px;
    margin: 10px 0;
    font-style: italic;
    color: #b0b0b0;
}
.grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 15px 0;
}
.anomaly-item {
    background-color: #111;
    border: 1px solid #333;
    padding: 10px;
    font-size: 0.9rem;
}
.anomaly-item .technical { /* Spécifique pour les labels techniques dans la grille */
   display: block;
   margin-bottom: 5px;
   font-size: 0.8rem;
   color: #a83232; /* Rouge pour ces labels */
   font-family: 'Special Elite', cursive; /* Police machine à écrire */
   background: none; border: none; padding: 0;
   text-transform: uppercase;
}
.anomaly-item .value {
    color: #ccc;
    margin-bottom: 5px;
    line-height: 1.3;
}
.anomaly-item .reference { /* Spécifique pour les références dans la grille */
    display: block;
    margin-top: 5px;
    font-size: 0.75rem;
    color: #666;
}

/* ================================================================== */
/* --- Styles SPÉCIFIQUES pour KnackiBatch Phi (v9.5.8) --- */
/* ---               Préfixés pour Isolation                      --- */
/* ================================================================== */

/* Variables CSS (elles restent globales, mais ne devraient pas trop interférer) */
/* Si des conflits apparaissent, elles peuvent être redéfinies sous .kbphi-active-window */
:root {
    --kbphi-bg-color: #0a0c0e;
    --kbphi-ui-bg: rgba(10, 0, 0, 0.65);
    --kbphi-text-color: #9a9a9a;
    --kbphi-accent-color: #D32F2F;
    --kbphi-button-scan-bg: #3a3a3a;
    --kbphi-button-scan-active-bg: var(--kbphi-accent-color);
    --kbphi-button-scan-active-text: #eeeeee;
    --kbphi-button-confirm-bg: #388E3C;
    --kbphi-button-confirm-border: #1B5E20;
    --kbphi-button-anormal-bg: #b71c1c;
    --kbphi-button-anormal-border: #7f0000;
    --kbphi-wall-color-back: #1f1f1f;
    --kbphi-wall-color-side: #2a2a2a;
    --kbphi-wall-color-ceiling: #0f0f0f;
    --kbphi-xray-overlay-color: rgba(150, 255, 150, 0.04);
    --kbphi-eye-color: #FFFACD;
    --kbphi-pupil-color: #0a0a0a;
    --kbphi-teeth-color: #D7CCC8;
    --kbphi-red-light-color: #FF1010;
    --kbphi-particle-purple: #c850fa;
    --kbphi-internal-anomaly-xray-color: #FF1744;
    --kbphi-extrapart-anomaly-xray-color: #00E676;
    --kbphi-eye-anomaly-xray-color: #FFFF00;
    --kbphi-teeth-anomaly-xray-color: #F50057;
    --kbphi-anomaly-xray-opacity: 0.98;
}

/* Appliquer les styles de base à l'intérieur du conteneur du jeu */
#game-window.kbphi-active-window #game-window-content {
    margin: 0;
    overflow: hidden !important; /* Force l'overflow hidden pour le jeu 3D */
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--kbphi-bg-color);
    color: var(--kbphi-text-color);
    display: flex; /* Changé pour que le container prenne toute la place */
    justify-content: center;
    align-items: center;
    height: 100%; /* S'assurer qu'il remplit game-window-content */
    padding: 0 !important; /* Annuler le padding par défaut de game-window-content */
    position: relative; /* Pour positionner les overlays */
}

#game-window.kbphi-active-window #container { /* Cible le #container créé par le JS du jeu */
    width: 100%; /* Prend toute la largeur/hauteur du parent (#game-window-content) */
    height: 100%;
    display: block;
    position: relative; /* ou static si #game-window-content est relative */
}

#game-window.kbphi-active-window canvas { /* Cible le canvas créé par Three.js */
    display: block;
    width: 100% !important; /* Force la taille */
    height: 100% !important; /* Force la taille */
}

#game-window.kbphi-active-window #ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-shadow: 1px 1px 3px rgba(255, 0, 0, 0.35);
    z-index: 10;
}

#game-window.kbphi-active-window .ui-top {
    width: 95%;
    padding: 15px;
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(10, 0, 0, 0.8), rgba(0, 0, 0, 0));
    padding-top: 20px;
    box-sizing: border-box; /* Important */
}

#game-window.kbphi-active-window .ui-top-left,
#game-window.kbphi-active-window .ui-top-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

#game-window.kbphi-active-window .ui-middle {
    flex-grow: 1;
}

#game-window.kbphi-active-window .ui-bottom {
    width: 90%;
    padding: 15px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    background: linear-gradient(to top, rgba(10, 0, 0, 0.8), rgba(0, 0, 0, 0));
    padding-bottom: 20px;
    border-radius: 10px 10px 0 0;
    border-top: 1px solid var(--kbphi-accent-color);
    box-sizing: border-box; /* Important */
}

#game-window.kbphi-active-window #score-display,
#game-window.kbphi-active-window #level-display {
    font-size: 1.6em;
    font-weight: bold;
    background-color: var(--kbphi-ui-bg);
    padding: 8px 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(255, 0, 0, 0.4);
    border: 1px solid #444;
    transition: color 0.1s ease-out;
    color: var(--kbphi-text-color); /* Assurer la couleur du texte */
}

#game-window.kbphi-active-window #scan-buttons {
    display: flex;
    gap: 15px;
    pointer-events: auto;
}

#game-window.kbphi-active-window #action-buttons {
    display: flex;
    gap: 25px;
    pointer-events: auto;
}

#game-window.kbphi-active-window button { /* Style de base des boutons DANS ce jeu */
    cursor: pointer;
    border: 1px solid #555;
    border-radius: 4px;
    color: var(--kbphi-text-color);
    transition: all 0.15s ease-out;
    pointer-events: auto;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', Courier, monospace;
    background: none; /* Annuler fond gris potentiel héritage */
}

#game-window.kbphi-active-window button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border-color: #888;
    color: white;
}

#game-window.kbphi-active-window button:active {
    transform: translateY(0px);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
}

#game-window.kbphi-active-window #scan-buttons button {
    background-color: var(--kbphi-button-scan-bg);
    padding: 10px 20px;
    font-size: 1.0em;
    border-bottom: 2px solid #222;
}

#game-window.kbphi-active-window #scan-buttons button:hover {
    background-color: #5a5a5a;
}

#game-window.kbphi-active-window #scan-buttons button.active {
    background-color: var(--kbphi-button-scan-active-bg);
    color: var(--kbphi-button-scan-active-text);
    border-color: color-mix(in srgb, var(--kbphi-button-scan-active-bg) 50%, black);
    border-bottom-color: color-mix(in srgb, var(--kbphi-button-scan-active-bg) 40%, black);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
    transform: translateY(1px);
}

#game-window.kbphi-active-window #action-buttons button {
    padding: 14px 30px;
    font-size: 1.3em;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

#game-window.kbphi-active-window #action-buttons button:hover {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5), inset 0 -1px 2px rgba(0, 0, 0, 0.1);
}

#game-window.kbphi-active-window #action-buttons button:active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 0 2px rgba(0, 0, 0, 0.3);
}

#game-window.kbphi-active-window #conforme-button {
    background-color: var(--kbphi-button-confirm-bg);
    border-color: var(--kbphi-button-confirm-border);
    border-bottom-width: 3px;
}

#game-window.kbphi-active-window #conforme-button:hover {
    background-color: color-mix(in srgb, var(--kbphi-button-confirm-bg) 90%, white);
    color: #111;
}

#game-window.kbphi-active-window #anormal-button {
    background-color: var(--kbphi-button-anormal-bg);
    border-color: var(--kbphi-button-anormal-border);
    border-bottom-width: 3px;
}

#game-window.kbphi-active-window #anormal-button:hover {
    background-color: color-mix(in srgb, var(--kbphi-button-anormal-bg) 90%, #FFCDD2);
    color: #111;
}

#game-window.kbphi-active-window .ui-button-small {
    padding: 6px 12px;
    font-size: 0.8em;
    background-color: var(--kbphi-button-scan-bg);
    border-bottom-width: 2px;
    color: var(--kbphi-text-color); /* Assurer la couleur */
}

#game-window.kbphi-active-window .ui-button-small:hover {
    background-color: #5a5a5a;
}

#game-window.kbphi-active-window .ui-button-small.active {
    background-color: var(--kbphi-accent-color);
    color: var(--kbphi-button-scan-active-text);
    border-color: color-mix(in srgb, var(--kbphi-accent-color) 50%, black);
    border-bottom-color: color-mix(in srgb, var(--kbphi-accent-color) 40%, black);
}

#game-window.kbphi-active-window #feedback-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    font-size: 2.8em;
    font-weight: bold;
    padding: 20px 40px;
    border-radius: 2px;
    background-color: rgba(0, 0, 0, 0.96);
    border: 2px solid;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    z-index: 100;
    text-transform: uppercase;
    line-height: 1.3;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    max-width: 80%;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
    display: block; /* S'assurer qu'il est block par défaut */
}

#game-window.kbphi-active-window #feedback-message.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
}

#game-window.kbphi-active-window #feedback-message.correct {
    color: #81C784;
    border-color: #81C784;
}

#game-window.kbphi-active-window #feedback-message.error {
    color: var(--kbphi-accent-color);
    border-color: var(--kbphi-accent-color);
}

#game-window.kbphi-active-window #feedback-message.weird {
    color: #FFEB3B;
    border-color: #FFEB3B;
}

#game-window.kbphi-active-window #feedback-message br {
    content: "";
    display: block;
    margin-bottom: 8px;
}

#game-window.kbphi-active-window #loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.97);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 201;
    color: var(--kbphi-text-color);
    text-align: center;
    font-size: 1.4em;
}

#game-window.kbphi-active-window #loading-overlay p {
    margin: 10px;
}

#game-window.kbphi-active-window #loading-progress {
    width: 60%;
    height: 15px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 15px;
}

#game-window.kbphi-active-window #loading-bar {
    width: 0%;
    height: 100%;
    background-color: var(--kbphi-accent-color);
    transition: width 0.2s ease-out;
}

#game-window.kbphi-active-window #loading-error {
    color: var(--kbphi-accent-color);
    font-weight: bold;
    margin-top: 20px;
    display: none; /* Caché par défaut */
}

#game-window.kbphi-active-window #start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex; /* Affiché par JS au besoin */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    color: var(--kbphi-text-color);
    text-align: center;
}

#game-window.kbphi-active-window #start-overlay h1 {
    font-size: 2.5em;
    color: var(--kbphi-accent-color);
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

#game-window.kbphi-active-window #start-overlay h2 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    color: #ccc;
    font-weight: normal;
}

#game-window.kbphi-active-window #start-overlay p {
    font-size: 1.1em;
    margin-bottom: 25px;
    max-width: 550px;
    line-height: 1.6;
    color: #999;
}

#game-window.kbphi-active-window #start-overlay .warning {
    color: var(--kbphi-accent-color);
    font-weight: bold;
    margin-top: 20px;
    font-size: 0.9em;
}

#game-window.kbphi-active-window #start-button {
    padding: 15px 40px;
    font-size: 1.6em;
    background-color: var(--kbphi-button-confirm-bg);
    border-color: var(--kbphi-button-confirm-border);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 4px;
    color: var(--kbphi-text-color); /* Assurer couleur texte */
}

#game-window.kbphi-active-window #start-button:hover {
    background-color: color-mix(in srgb, var(--kbphi-button-confirm-bg) 90%, white);
    color: #111;
}

#game-window.kbphi-active-window #xray-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 50, 20, 0.05), rgba(0, 50, 20, 0.05)),
                repeating-linear-gradient( 0deg, transparent, transparent 1px, rgba(0, 100, 50, 0.03) 1px, rgba(0, 100, 50, 0.03) 3px );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 5;
    mix-blend-mode: screen; /* Peut nécessiter un ajustement */
}

#game-window.kbphi-active-window #xray-overlay.active {
    opacity: 0.6;
}

#game-window.kbphi-active-window #error-webgl {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #110000;
    color: #ff8888;
    display: none; /* Contrôlé par JS */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.5em;
    padding: 20px;
    box-sizing: border-box;
    z-index: 300;
}

#game-window.kbphi-active-window #error-webgl p {
    margin: 5px 0;
}

#game-window.kbphi-active-window #error-details {
    font-size: 0.8em;
    margin-top: 15px;
    color: #ffaaaa;
}