
        :root { 
            --bg: #050508; 
            --card-bg: rgba(10, 10, 15, 0.9); 
            --text: #8ea0b1; 
            --accent: #ff4646; 
            --terminal-green: #15ff00;
            --dim-green: #0a6300;
        }

        body { 
            font-family: 'Courier New', Courier, monospace; 
            background-color: var(--bg); color: var(--text); 
            display: flex; flex-direction: column; align-items: center; 
            padding: 40px 20px; margin: 0; overflow: hidden; /* VERROUILLAGE DU SCROLL GLOBAL */
            height: 100vh;
            /* EFFET FISHEYE (Vignettage intense) */
            box-shadow: inset 0 0 200px #000, inset 0 0 100px #000;
        }

        .hidden { display: none !important; }

        /* COUCHE CRT : SCANLINES + GRAIN (COMPATIBLE LOCAL) */
        body::before {
            content: " "; display: block; position: fixed;
            top: 0; left: 0; bottom: 0; right: 0;
            background: 
                linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%),
                repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 2px);
            z-index: 20000; /* Augmenté pour être au-dessus des modales */
            pointer-events: none; 
            background-size: 100% 4px, 100% 2px;
        }

        /* EFFET DE SURCHARGE (GLITCH) */
        .glitch-surcharge { animation: glitch-sfx 0.15s ease-out; }
        @keyframes glitch-sfx {
            0% { filter: invert(1) hue-rotate(90deg); transform: translate(4px, -4px); }
            50% { filter: contrast(4) brightness(2); transform: translate(-8px, 4px); }
            100% { filter: none; transform: translate(0); }
        }

        /* --- HEADER FIXE (HUD HAUT) --- */
        .app-header {
            position: fixed;
            top: 0; left: 0; width: 100%;
            background: var(--bg);
            z-index: 2000;
            padding-top: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            border-bottom: 1px solid rgba(255, 70, 70, 0.1);
            box-shadow: 0 10px 30px rgba(0,0,0,0.9);
        }

        h1 { font-size: 2.2em; color: var(--accent); text-transform: uppercase; letter-spacing: 8px; text-shadow: 2px 2px 0px #000, 0 0 10px rgba(255, 70, 70, 0.5); margin: 0; text-align: center; }
        .status-bar { font-size: 0.8em; color: var(--dim-green); margin: 5px 0 15px 0; letter-spacing: 2px; text-transform: uppercase; text-align: center; }

        .search-container { 
            width: 100%; 
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 15px; 
            margin-top: 0;
            flex-shrink: 0; 
            z-index: 1500; 
            background: var(--bg); /* Fond noir opaque pour masquer les sons */
            padding: 20px 0; /* Espace vertical constant */
            position: sticky; 
            top: 0; 
            /* Box shadow pour lisser la transition mais garder la coupure */
            box-shadow: 0 10px 30px var(--bg); 
        }
        .search-input { 
            width: 90%; 
            max-width: 600px; 
            background: rgba(0,0,0,0.8); 
            border: 1px solid var(--dim-green); 
            padding: 15px 20px; 
            font-size: 1.1em; 
            color: var(--terminal-green); 
            font-family: inherit; 
            outline: none; 
            transition: 0.3s; 
        }
        .search-label { 
            width: 90%; 
            max-width: 600px; 
            font-size: 0.8em; 
            color: var(--dim-green); 
            text-transform: uppercase; 
            margin-bottom: 8px; 
            display: block; 
            font-weight: bold; 
        }
        /* --- SÉLECTEUR DE VUE --- */
        .view-selector {
            display: flex;
            gap: 15px;
            margin-bottom: 5px;
        }
        .view-option {
            font-size: 0.6em;
            color: var(--dim-green);
            cursor: pointer;
            transition: 0.2s;
            letter-spacing: 1px;
            white-space: nowrap; /* EMPÊCHE LE SAUT DE LIGNE DU CROCHET */
        }
        .view-option.active { color: var(--terminal-green); text-shadow: 0 0 5px var(--terminal-green); }
        .view-option:hover:not(.active) { color: #eee; }

        /* --- MODE LISTE (CORRIGÉ) --- */
        .grid.list-mode {
            display: flex;
            flex-direction: column;
            gap: 15px; /* ESPACE NOIR ENTRE CHAQUE LIGNE */
            max-width: 900px; 
            padding: 10px;
        }

        .list-mode .card {
            display: flex;
            flex-direction: row;
            align-items: center;
            height: 60px; /* LÉGÈREMENT PLUS HAUT POUR LA LISIBILITÉ */
            overflow: hidden; /* EMPÊCHE LE DÉBORDEMENT INTERNE */
            background: #000 !important;
        }

        .list-mode .card-header {
            width: 140px; /* LARGEUR FIXE POUR L'IDENTIFIANT */
            flex-shrink: 0; /* EMPÊCHE L'ÉCRASEMENT */
            border-bottom: none;
            border-right: 1px solid #301010;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding-left: 15px;
            background: rgba(255, 70, 70, 0.03); /* TEINTE TRÈS LÉGÈRE */
        }

        .list-mode .card-body {
            flex-grow: 1;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px !important;
        }

        .list-mode h3 { margin: 0; font-size: 0.85em; width: 200px; }
        .list-mode .price { margin: 0; font-size: 0.9em; width: 100px; }
        .list-mode .price::before { content: "> "; }

        .list-mode .btn-group { gap: 10px; }
        .list-mode .btn { padding: 5px 15px; min-width: 90px; }
        .list-mode .loading-container { position: absolute; bottom: 0; left: 0; }

        #system-alert { position: fixed; bottom: 20px; right: 20px; z-index: 10000; background: #440000; color: #ff0000; padding: 15px 25px; border: 2px solid #ff0000; font-weight: bold; text-transform: uppercase; box-shadow: 0 0 20px rgba(255, 0, 0, 0.5); }

        #section-login { display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 25vh; z-index: 10; }
        #login-btn { 
            border: 1px solid var(--terminal-green); 
            color: var(--terminal-green); 
            padding: 20px 60px; 
            font-size: 1.2em; 
            background: rgba(21, 255, 0, 0.05); 
            cursor: pointer; 
            font-family: inherit; 
            text-transform: uppercase; 
            transition: all 0.3s; 
            box-shadow: 0 0 15px rgba(21, 255, 0, 0.1);
            /* Alignement précis sur le "G" du logo Biohazard */
            margin-top: 205px; 
        }
        #login-btn:hover { background: var(--terminal-green); color: black; box-shadow: 0 0 30px var(--terminal-green); }

        /* --- SIDEBAR FIXE ET AGRANDIE --- */
        .sidebar {
            position: fixed;
            top: 150px;
            left: 20px;
            width: 280px;
            z-index: 1000;
        }

        .nav-tabs { display: flex; flex-direction: column; gap: 5px; border: none; margin-top: 10px; }
        
        .tab-parent-container {
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .tab-link { 
            padding: 18px 10px; cursor: pointer; color: #444; 
            background: transparent; text-transform: uppercase; font-size: 1.2em; /* Taille augmentée pour lisibilité */
            transition: 0.3s; text-align: left; font-weight: bold;
            display: flex; align-items: center; gap: 10px;
            border: none !important;
        }

        .tab-link::before { content: ""; width: 12px; height: 12px; display: inline-block; flex-shrink: 0; }
        
        /* LOGIQUE CLIGNOTEMENT NIVEAU 1 */
        .tab-link.active { color: var(--terminal-green); }
        .tab-link.active::before { 
            content: ">"; 
            color: var(--terminal-green); 
            animation: blinker 1s infinite; 
        }
        /* Le clignotement parent s'arrête UNIQUEMENT si un enfant de niveau 2 est actif */
        .tab-parent-container.has-active-child .tab-link.active::before { 
            animation: none; 
        }
        
        .sub-menu-container {
            max-height: 0;
            opacity: 0;
            transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
            display: flex;
            flex-direction: column;
            pointer-events: none;
            transform: translateY(-10px);
        }

        .tab-parent-container.open .sub-menu-container {
            max-height: 500px;
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }

        .sub-tab { 
            padding: 15px 5px 15px 45px; 
            font-size: 1em; 
            color: #444; /* Un peu plus clair que #333 */
            text-transform: uppercase;
            font-weight: bold;
            cursor: pointer;
            transition: 0.3s;
            display: flex;
            align-items: center;
        }
        .sub-tab:hover { color: #888; }
        
        /* LOGIQUE CLIGNOTEMENT NIVEAU 2 */
        .sub-tab.active { color: var(--terminal-green); }
        .sub-tab.active::before { 
            content: "↪"; 
            margin-right: 8px; 
            animation: blinker 1s infinite; 
        }
        /* Si un rapport enfant (Niveau 3) est actif, on arrête le clignotement du dossier */
        .sub-tab.active.has-active-child::before { 
            animation: none; 
        }

        /* TROISIÈME NIVEAU : Rapports individuels */
        .sub-sub-tab {
            padding: 10px 5px 10px 75px; 
            font-size: 0.85em;
            color: #666; /* Nettement plus lisible que #222 */
            text-transform: uppercase;
            font-weight: bold;
            cursor: pointer;
            transition: 0.2s;
            display: block;
        }
        .sub-sub-tab:hover { color: #aaa; }
        
        /* LOGIQUE CLIGNOTEMENT NIVEAU 3 */
        .sub-sub-tab.active { 
            color: var(--terminal-green); 
            text-shadow: 0 0 5px var(--terminal-green); 
        }
        .sub-sub-tab.active::before { 
            content: "↪"; 
            margin-right: 8px; 
            animation: blinker 1s infinite; /* Le niveau final clignote toujours */
        }

        /* CONTENEUR POUR L'EFFET ACCORDÉON */
        .sub-sub-container {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .sub-sub-container.open {
            max-height: 500px;
            opacity: 1;
            padding-bottom: 15px;
        }
        
        .tab-link:hover:not(.active) { color: #8ea0b1; }

        /* --- ZONE CENTRÉE (LAYOUT 3 COLONNES + SCROLL MAXIMISÉ) --- */
        #view-sounds, #view-archives {
            position: fixed;
            top: 130px; 
            bottom: 20px;
            left: 300px; /* Élargi au maximum jusqu'au menu gauche (280+20) */
            right: 340px; /* Élargi au maximum jusqu'à l'historique droit (320+20) */
            width: auto;
            max-width: none;
            margin: 0;
            padding-top: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            overflow-y: auto; /* LA ZONE ENTIÈRE DEVIENT SCROLLABLE */
        }

        #sounds-grid {
            width: 100%;
            flex-grow: 1;
            padding: 10px 15px 80px 15px;
            align-content: start;
        }

        /* Masquage complet de la Scrollbar (Terminal invisible) */
        #view-sounds, #view-archives { scrollbar-width: none; /* Règle pour Firefox */ }
        #view-sounds::-webkit-scrollbar, #view-archives::-webkit-scrollbar { display: none; /* Règle pour Chrome, Safari, Edge */ }

        #archive-display-area {
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            /* Suppression de la couleur opaque pour laisser voir le logo en arrière-plan */
            background-color: transparent; 
            background-image: url("https://www.transparenttextures.com/patterns/dark-matter.png");
            box-shadow: inset 0 0 150px #000;
            border: 1px solid #1a1a1e;
            margin: 20px;
            overflow: hidden;
        }
        .archive-empty-msg {
            color: #222;
            font-style: italic;
            text-transform: uppercase;
            font-size: 0.9em;
        }

        .history-panel { 
            position: fixed; top: 150px; right: 20px; width: 320px; z-index: 1000; 
            background: rgba(0, 5, 0, 0.95); border: 1px solid #301010; backdrop-filter: blur(8px); 
            max-height: calc(100vh - 170px); display: flex; flex-direction: column; box-shadow: 0 0 30px rgba(0,0,0,1); 
        }
        .history-panel::after { content: "SYSTEM_ACTIVITY_LOG"; position: absolute; top: -10px; left: 10px; background: #050508; padding: 0 8px; font-size: 0.7em; color: var(--accent); letter-spacing: 1px; }

        .history-list { padding: 15px; overflow-y: auto; font-size: 0.75em; color: #888; scrollbar-width: none; }
        .history-list::-webkit-scrollbar { display: none; }
        
        .history-entry {
            margin-bottom: 12px;
            border-bottom: 1px solid #1a0808;
            padding-bottom: 8px;
            display: flex; flex-direction: column; gap: 5px;
            animation: push-in 0.3s ease-out;
        }
        @keyframes push-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

        .history-header { display: flex; justify-content: space-between; align-items: center; }
        .history-time { 
            color: #1eb500; /* Vert phosphore plus lumineux */
            font-family: 'Courier New', monospace; 
            font-size: 0.65em; 
            letter-spacing: 1px;
            font-weight: bold;
            opacity: 0.8;
        }
        .history-action { color: #ccc; font-weight: bold; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

        /* MINI BOUTONS DANS L'HISTORIQUE */
        .history-btns { display: flex; gap: 8px; margin-top: 5px; }
        .btn-mini {
            padding: 6px 10px; font-size: 0.65em; border: 1px solid #333;
            background: rgba(255,255,255,0.02); color: #666; cursor: pointer;
            display: flex; align-items: center; gap: 6px; text-transform: uppercase;
            font-family: inherit;
        }
        .btn-mini:hover { border-color: #eee; color: #eee; background: rgba(255,255,255,0.1); }
        .btn-mini .icon-preview { width: 14px; height: 14px; filter: grayscale(1) brightness(0.5); }
        .btn-mini .icon-execute { width: 14px; height: 14px; filter: grayscale(1) brightness(0.5); }
        .btn-mini:hover .icon-preview { filter: drop-shadow(0 0 3px var(--terminal-green)) brightness(1); }
        .btn-mini:hover .icon-execute { filter: drop-shadow(0 0 3px var(--accent)) brightness(1); }

        /* --- GESTIONNAIRE DE TÉLÉCHARGEMENT (DROITE) --- */
        .download-manager {
            border-top: 1px solid #301010;
            background: rgba(0, 0, 0, 0.4);
            display: flex;
            flex-direction: column;
            height: 180px; /* Taille fixe pour le bas du panneau */
        }

        .download-body {
            padding: 15px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow: hidden;
        }

        .empty-download-msg {
            color: #222;
            font-size: 0.6em;
            text-align: center;
            margin-top: 20px;
            letter-spacing: 2px;
        }

        .download-item {
            animation: log-fade 0.3s ease-out forwards;
        }

        .download-info {
            display: flex;
            justify-content: space-between;
            font-size: 0.55em;
            color: var(--dim-green);
            margin-bottom: 4px;
            text-transform: uppercase;
        }

        .progress-container {
            width: 100%;
            height: 6px;
            background: rgba(21, 255, 0, 0.05);
            border: 1px solid rgba(21, 255, 0, 0.1);
            position: relative;
        }

        .progress-fill {
            height: 100%;
            width: 0%;
            background: var(--dim-green); /* Devient vert foncé par défaut */
            box-shadow: none; /* Supprime l'éclat pour rester discret */
            transition: width 0.1s linear;
        }

        .download-complete .progress-fill {
            background: var(--dim-green); /* Reste vert foncé une fois fini */
            opacity: 0.5; /* Devient encore plus discret une fois terminé */
        }

        .user-info { 
            background: rgba(0, 10, 0, 0.9); padding: 15px 25px; 
            border: 1px solid var(--dim-green); margin-bottom: 20px;
            backdrop-filter: blur(4px); position: relative;
            min-height: 80px; display: flex; flex-direction: column;
            justify-content: center; overflow: hidden;
        }

        #user-balance { 
            color: var(--terminal-green); font-size: 1.4em;
            font-weight: bold; white-space: nowrap;
        }

        /* BARRE DE BOOT (LOGIN) */
        #boot-loader {
            width: 300px;
            height: 4px;
            background: rgba(21, 255, 0, 0.1);
            /* Aligné sous le bouton avec une marge propre */
            margin-top: 205px;
            position: relative;
            display: none;
            border: 1px solid var(--dim-green);
        }
        #boot-progress {
            width: 0%;
            height: 100%;
            background: var(--terminal-green);
            box-shadow: 0 0 15px var(--terminal-green);
            transition: width 2s ease-in-out;
        }
        .boot-text {
            font-size: 0.7em;
            color: var(--terminal-green);
            /* Espacement entre la barre et le texte de statut */
            margin-top: 15px;
            text-transform: uppercase;
            text-align: center;
            width: 100%;
            display: block;
        }
        .label { font-size: 0.6em; color: var(--dim-green); text-transform: uppercase; margin-bottom: 2px; }

        #section-app { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; }
        /* Les définitions de largeur de #view-sounds sont désormais gérées par le Layout Fixe 3 Colonnes plus haut */
        .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; width: 100%; max-width: 960px; margin: 0 auto; justify-content: center; }

        .card { 
            /* Fond noir total pour bloquer toute transparence résiduelle */
            background: #000000 !important; 
            border: 1px solid #301010; 
            padding: 0; 
            position: relative; 
            transition: all 0.2s ease; 
            box-shadow: 5px 5px 0px rgba(0,0,0,0.5); 
            
            opacity: 0;
            transform: translateY(20px);
            animation: card-in 0.4s ease-out forwards;
        }

        @keyframes card-in {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        .card:hover { border-color: var(--accent); box-shadow: 0 0 20px rgba(255, 70, 70, 0.15); transform: scale(1.02); }
        .card-header { background: #1a0808; padding: 8px 12px; font-size: 0.7em; border-bottom: 1px solid #301010; color: #666; display: flex; justify-content: space-between; }
        .card-body { padding: 15px; }

        h3 { margin: 0 0 10px 0; font-size: 1.1em; color: #eee; text-transform: uppercase; }
        .price { color: var(--terminal-green); font-size: 1.2em; margin-bottom: 15px; display: block; font-weight: bold; }
        .price::before { content: "> COST: "; font-size: 0.7em; opacity: 0.5; }

        .btn-group { display: flex; gap: 10px; }
        .btn { font-family: inherit; font-size: 0.75em; font-weight: bold; padding: 12px 10px; cursor: pointer; border: 1px solid #444; transition: 0.3s; background: rgba(255,255,255,0.05); color: #ccc; display: flex; align-items: center; justify-content: center; gap: 10px; text-transform: uppercase; }
        .btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: #fff; }
        /* Correction du chemin car le CSS est maintenant dans /css/ et les images à la racine */
        .icon-preview { 
            width: 24px; 
            height: 24px; 
            background: url('../preview_icon.png') no-repeat center; 
            background-size: contain; 
            filter: drop-shadow(0 0 5px var(--terminal-green)); 
        }
        .icon-execute { 
            width: 24px; 
            height: 24px; 
            background: url('../execute_icon.png') no-repeat center; 
            background-size: contain; 
            filter: brightness(1.5) contrast(1.2) drop-shadow(0 0 8px var(--accent)); 
        }
        .btn-launch { flex-grow: 2; border-color: var(--accent); color: var(--accent); background: rgba(255, 70, 70, 0.05); position: relative; overflow: hidden; }
        .btn-launch:hover:not(:disabled) { background: rgba(255, 70, 70, 0.2); box-shadow: inset 0 0 10px rgba(255, 70, 70, 0.3); }
        /* Style amélioré pour le bouton verrouillé (Pas assez de crédits) */
        .btn-launch:disabled { 
            opacity: 0.5; 
            cursor: not-allowed; 
            border-color: #441111; 
            color: #552222; 
            background: rgba(255, 0, 0, 0.02);
        }
        /* On s'assure que l'icône à l'intérieur suit aussi le style sombre */
        .btn-launch:disabled .icon-execute {
            filter: grayscale(1) brightness(0.3) drop-shadow(0 0 0 transparent);
        }

        /* BARRE DE CHARGEMENT OVERRIDE */
        .loading-container {
            width: 100%;
            height: 2px;
            background: rgba(255, 255, 255, 0.1);
            margin-top: 10px;
            display: none; 
            position: relative;
        }
        .loading-bar {
            width: 0%;
            height: 100%;
            background: var(--accent);
            box-shadow: 0 0 10px var(--accent);
            transition: width 2s linear;
        }
        
        /* Correction visibilité "UPLOADING..." */
        .btn-launch.processing {
            opacity: 1 !important; /* Force l'opacité à 100% même si le bouton est disabled */
            color: var(--accent) !important;
            border-color: var(--accent) !important;
            filter: brightness(0.8);
        }

        .system-boot { animation: boot-anim 0.6s ease-out forwards; opacity: 0; }
        @keyframes boot-anim {
            0% { opacity: 0; transform: scaleY(0.005) scaleX(0); filter: brightness(5); }
            50% { opacity: 1; transform: scaleY(0.005) scaleX(1); filter: brightness(2); }
            100% { opacity: 1; transform: none; filter: none; }
        }
        .exit-anim { transition: all 0.6s ease-in !important; opacity: 0 !important; filter: blur(20px) brightness(2) !important; transform: scale(0.8) !important; pointer-events: none; }
        .blink { animation: blinker 1.5s linear infinite; }
        @keyframes blinker { 50% { opacity: 0; } }

        /* EFFET DE REFUS ACCÈS MENU */
        .tab-denied { 
            color: var(--accent) !important; 
            animation: shake-denied 0.4s cubic-bezier(.36,.07,.19,.97) both;
            text-shadow: 0 0 8px var(--accent);
        }

        @keyframes shake-denied {
            10%, 90% { transform: translate3d(-1px, 0, 0); }
            20%, 80% { transform: translate3d(2px, 0, 0); }
            30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
            40%, 60% { transform: translate3d(4px, 0, 0); }
        }

        .archive-item { border-left: 3px solid var(--dim-green); background: rgba(255,255,255,0.02); padding: 15px; margin-bottom: 10px; cursor: pointer; transition: 0.3s; }
        .archive-item:hover { background: rgba(21, 255, 0, 0.05); border-left-color: var(--terminal-green); }
        .archive-date { font-size: 0.7em; color: #555; }
        .archive-title { color: #aaa; font-weight: bold; text-transform: uppercase; }
        .modal-overlay { 
            position: fixed; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%; 
            background: rgba(0, 0, 0, 0.85); 
            z-index: 10000; /* Niveau inférieur aux couches CRT */
            display: none; 
            justify-content: center; 
            align-items: center; 
            backdrop-filter: blur(5px);
        }
        .paper-container { 
            position: relative; 
            width: 95%; 
            max-width: 1000px; 
            height: 85vh; 
            display: flex; 
            justify-content: center; 
            align-items: center; 
            perspective: 1500px; 
        }

        .report-page { 
            position: absolute; 
            width: auto; 
            height: auto; 
            max-width: 100%; 
            max-height: 100%; 
            background: #000; /* Le papier est noir par défaut (non éclairé) */
            box-shadow: 0 50px 100px rgba(0,0,0,0.9); 
            padding: 10px; 
            box-sizing: border-box; 
            transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); 
            display: flex; 
            flex-direction: column; 
            cursor: pointer; 
            flex: 0 1 auto;
            /* Variable CSS pour la position de la lumière, par défaut au milieu */
            --light-x: 50%;
            --light-y: 50%;
        }

        /* L'EFFET FLASH (Indispensable pour le look "Photo volée") */
        .report-page::after {
            content: "";
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            /* Création du faisceau lumineux circulaire */
            background: radial-gradient(
                circle at var(--light-x) var(--light-y), 
                rgba(255,255,255,0.6) 0%, 
                rgba(255,255,255,0.2) 20%,
                rgba(0,0,0,0.95) 75%
            );
            pointer-events: none;
            mix-blend-mode: hard-light; /* Mélange intense pour le côté "surexposé" */
            z-index: 10;
        }

        /* LE RUBAN ADHÉSIF (TAPE) */
        .report-page::before {
            content: "";
            position: absolute;
            top: -10px; left: 50%;
            width: 100px; height: 30px;
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(-50%) rotate(-1deg);
            backdrop-filter: blur(3px);
            border: 1px solid rgba(255,255,255,0.05);
            z-index: 100; /* Toujours au-dessus de tout */
        }

        .report-page img { 
            display: block;
            width: auto; height: auto; 
            max-width: 100%; max-height: 80vh; 
            object-fit: scale-down; 
            /* FILTRE COMBINÉ : Contraste + Aberration Chromatique via drop-shadows colorés */
            filter: brightness(0.8) contrast(1.2) grayscale(0.1)
                    drop-shadow(1px 0px 0px rgba(255,0,0,0.3)) 
                    drop-shadow(-1px 0px 0px rgba(0,0,255,0.3));
            user-select: none;
            -webkit-user-drag: none;
            pointer-events: none;
        }

        /* EFFET 5 : POUSSIÈRE STATIQUE (Visible uniquement dans le faisceau) */
        .dust-overlay {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
            opacity: 0.4;
            pointer-events: none;
            z-index: 15;
            /* On masque la poussière en dehors du flash via le même gradient que le flash */
            -webkit-mask-image: radial-gradient(circle at var(--light-x) var(--light-y), black 0%, transparent 60%);
            mask-image: radial-gradient(circle at var(--light-x) var(--light-y), black 0%, transparent 60%);
        }

        /* EFFET 8 : OMBRE DE SILHOUETTE (L'espion qui prend la photo) */
        .silhouette-shadow {
            position: absolute;
            bottom: -10%; right: -10%;
            width: 70%; height: 80%;
            background: radial-gradient(ellipse at center, rgba(0,0,0,0.8) 0%, transparent 70%);
            filter: blur(40px);
            pointer-events: none;
            z-index: 20; /* Passe par dessus tout, même le flash */
            transform: rotate(-15deg);
            opacity: 0.7;
        }

        /* PERSPECTIVE RÉALISTE (Sans distorsion de zoom) */
        .page-top { 
            z-index: 100; 
            transform: rotateX(2deg) rotateY(-1deg) rotateZ(0.5deg); 
        }

        .page-bottom { 
            z-index: 50; 
            transform: rotateX(0deg) rotateY(2deg) rotateZ(-2deg) translate(-10px, 5px); 
            filter: brightness(0.7) contrast(1.2);
            /* On retire le flou car il réagit mal au zoom navigateur */
        }
        .close-modal { position: fixed; top: 20px; left: 20px; color: var(--accent); cursor: pointer; font-weight: bold; border: 1px solid var(--accent); padding: 10px; z-index: 6000; }

        .twitch-container { position: fixed; bottom: 40px; left: 40px; z-index: 5; pointer-events: none; }
        .blood-gif { position: absolute; bottom: -20px; left: -20px; width: 180px; opacity: 0.9; pointer-events: none; filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.4)); }
        .twitch-link { position: relative; display: inline-block; transform: rotate(12deg); text-decoration: none; pointer-events: auto; transition: 0.3s; padding: 15px; animation: flicker 4s infinite; }
        .twitch-link:hover { transform: rotate(12deg) scale(1.1); filter: brightness(1.8) drop-shadow(0 0 20px red); }
        .twitch-text { font-size: 1.6em; color: #ff0000; font-weight: bold; letter-spacing: 1px; text-shadow: 2px 2px 0px #000, 0 0 10px rgba(255, 0, 0, 0.8); font-family: 'Impact', 'Arial Black', sans-serif; text-transform: uppercase; }
        .blood-hand { position: fixed; right: 8%; top: 25%; width: 350px; transform: rotate(15deg); opacity: 0.6; filter: drop-shadow(0 0 20px rgba(136, 0, 0, 0.5)); pointer-events: none; z-index: 1; }
        @keyframes flicker { 0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: 0.5; } }

        /* Styles pour forcer l'animation de déploiement sur les vues */
        #view-sounds, #view-archives {
            position: fixed;
            top: 130px; bottom: 20px;
            left: 300px; right: 340px;
            /* On ajoute un z-index pour passer devant le logo */
            z-index: 10;
            width: auto; display: flex; flex-direction: column; align-items: center;
            overflow-y: auto; scrollbar-width: none;
        }

        /* L'animation boot-anim est déjà définie plus haut dans ton fichier, 
           on s'assure juste que les vues l'utilisent proprement lors du switch */
        #mobile-menu-btn, #mobile-logs-btn, #mobile-zoom-btn {
            display: none;
        }
        /* --- MODALE DE CONFIRMATION TERMINAL --- */
        .terminal-modal {
            background: var(--bg);
            border: 2px solid var(--accent);
            width: 450px;
            padding: 0;
            box-shadow: 0 0 50px rgba(255, 70, 70, 0.2);
            position: relative;
            animation: boot-anim 0.3s ease-out;
        }

        .modal-header {
            background: var(--accent);
            color: #000;
            padding: 8px 15px;
            font-size: 0.8em;
            font-weight: bold;
            letter-spacing: 2px;
        }

        .modal-body {
            padding: 30px;
            text-align: center;
        }

        .modal-body p {
            color: var(--text);
            font-size: 0.9em;
            margin-bottom: 25px;
            line-height: 1.4;
        }

        .modal-btns {
            display: flex;
            justify-content: center;
            gap: 40px;
        }

        .btn-confirm {
            background: transparent;
            border: 1px solid var(--dim-green);
            color: var(--terminal-green);
            padding: 10px 30px;
            font-family: inherit;
            font-size: 1em;
            cursor: pointer;
            transition: 0.2s;
        }

        .btn-confirm:hover {
            background: var(--terminal-green);
            color: #000;
            box-shadow: 0 0 15px var(--terminal-green);
        }

        #confirm-n {
            border-color: #666;
            color: #666;
        }

        #confirm-n:hover {
            border-color: var(--accent);
            color: var(--accent);
            background: rgba(255, 70, 70, 0.1);
            box-shadow: 0 0 15px var(--accent);
        }

        .modal-footer {
            padding: 10px;
            font-size: 0.6em;
            color: #aa3333; /* Luminosité augmentée pour être lisible sur fond noir */
            text-align: center;
            border-top: 1px solid #1a0808;
            letter-spacing: 1px;
        }
        /* --- CONSOLE DE LOGS SYSTÈME (SIDEBAR GAUCHE) --- */
        .system-monitor {
            margin-top: 40px;
            border: 1px solid rgba(21, 255, 0, 0.1);
            background: rgba(0, 5, 0, 0.3);
            padding: 0;
            font-family: 'Courier New', Courier, monospace;
            overflow: hidden;
        }

        .monitor-header {
            background: rgba(21, 255, 0, 0.05);
            color: var(--dim-green);
            font-size: 0.55em;
            padding: 5px 8px;
            border-bottom: 1px solid rgba(21, 255, 0, 0.1);
            letter-spacing: 1px;
        }

        .monitor-body {
            padding: 10px 8px;
            height: 120px;
            overflow-y: hidden; /* Le scroll est géré par JS */
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .log-line {
            font-size: 0.55em;
            color: var(--dim-green);
            white-space: nowrap;
            opacity: 0.7;
            animation: log-fade 0.3s ease-out forwards;
        }

        /* Couleurs spécifiques selon le type de message */
        .log-info { color: var(--dim-green); }
        .log-warn { color: #887700; }
        .log-fail { color: #880000; }

        @keyframes log-fade {
            from { opacity: 0; transform: translateX(-5px); }
            to { opacity: 0.7; transform: translateX(0); }
        }
        /* --- LOGO FILIGRANE ARRIÈRE-PLAN (PNG) --- */
        #terminal-background-logo {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 50vw; 
            max-width: 600px;
            height: auto;
            object-fit: contain; 
            /* On le place à 0 pour qu'il soit derrière tout le reste */
            z-index: 0; 
            opacity: 0.3; 
            pointer-events: none;
            filter: none;
        }
        /* --- LECTEUR VIDÉO CUSTOM (TERMINAL LOOK) --- */
        #view-videos {
            position: fixed;
            top: 130px; bottom: 20px;
            left: 300px; right: 340px;
            display: flex; flex-direction: column; align-items: center;
            justify-content: center;
            z-index: 10;
        }

        .video-player-container {
            width: 90%;
            max-width: 1000px;
            /* FORCE LE RATIO 16/9 MÊME SI VIDE */
            aspect-ratio: 16 / 9; 
            background: #000;
            border: 1px solid #222;
            position: relative;
            box-shadow: 0 0 50px rgba(0,0,0,1);
            display: flex;
            flex-direction: column;
        }

        .video-hud-top {
            position: absolute;
            top: 15px; left: 0; right: 0;
            padding: 0 15px;
            display: flex; 
            align-items: center;
            color: rgba(255, 70, 70, 0.7);
            font-size: 0.7em; font-weight: bold;
            z-index: 20; pointer-events: none;
            text-transform: uppercase;
            font-family: 'Courier New', Courier, monospace;
        }

        /* On force le nom du fichier au centre exact du lecteur */
        #video-filename {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
        }

        /* On pousse les stats à droite */
        .video-stats-group {
            margin-left: auto;
            display: flex;
            gap: 20px;
        }

        .video-hud-bottom {
            position: absolute;
            /* On le positionne par rapport au bas de la zone vidéo (16/9) */
            bottom: 15px; 
            right: 15px;
            color: rgba(255, 70, 70, 0.7);
            font-size: 0.8em; font-weight: bold;
            z-index: 20; pointer-events: none;
            font-family: 'Courier New', Courier, monospace;
            text-shadow: 0 0 5px rgba(255, 70, 70, 0.5);
        }

        .video-placeholder {
            width: 100%;
            height: 100%; /* Remplit tout l'espace du container */
            display: flex; 
            justify-content: center; 
            align-items: center;
            background: repeating-linear-gradient(0deg, #050505, #050505 1px, #0a0a0a 1px, #0a0a0a 2px);
        }

        .decrypt-overlay { text-align: center; }
        .glitch-text { color: var(--accent); font-size: 1.2em; letter-spacing: 4px; margin-bottom: 10px; }
        .sub-text { color: #444; font-size: 0.7em; }

        /* Fenêtre de rognage pour masquer le bandeau streamer */
        .video-clipper {
            width: 100%;
            aspect-ratio: 16 / 9;
            overflow: hidden; 
            background: #000;
            position: relative;
            /* On s'assure que si on ajoute/retire hidden, l'affichage est net */
            display: block; 
        }

        .video-clipper.hidden {
            display: none;
        }

        #main-video-player {
            width: 100%;
            height: 100%;
            display: block;
            outline: none;
            /* ZOOM CHIRURGICAL : 1.03 (3%) suffit à masquer les 30px du bas */
            transform: scale(1.03); 
            /* On fixe le haut pour que le zoom "pousse" le bas vers l'extérieur */
            transform-origin: top center; 
            object-fit: cover;
        }

        .video-controls {
            position: absolute;
            top: 100%; /* Se place juste en dessous du bloc 16/9 */
            left: -1px; right: -1px; /* S'aligne aux bordures du container */
            background: #0a0a0a;
            padding: 15px;
            display: flex; align-items: center; gap: 20px;
            border: 1px solid #222;
            border-top: none;
        }

        .btn-video {
            background: transparent; border: 1px solid #333;
            color: #666; font-family: inherit; font-size: 0.7em;
            padding: 8px 15px; cursor: pointer; transition: 0.2s;
        }
        .btn-video:hover { border-color: var(--accent); color: var(--accent); background: rgba(255, 70, 70, 0.05); }

        .video-progress-bar {
            flex-grow: 1; height: 4px;
            background: rgba(255,255,255,0.05);
            position: relative; cursor: pointer;
        }
        .video-seek-fill {
            position: absolute; top: 0; left: 0; height: 100%;
            width: 0%; background: var(--accent);
            box-shadow: 0 0 10px var(--accent);
        }
        /* --- EFFET DE NEIGE (STATIC) --- */
        .video-static {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            z-index: 25;
            background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
            background-color: #111;
            opacity: 0.8;
            pointer-events: none;
            animation: static-noise 0.2s infinite;
        }

        @keyframes static-noise {
            0% { background-position: 0 0; }
            20% { background-position: 10% 5%; }
            40% { background-position: -5% 15%; }
            60% { background-position: 15% -10%; }
            80% { background-position: -10% 5%; }
            100% { background-position: 5% 10%; }
        }

        /* --- EFFET GLITCH (SCRUBBING) --- */
        .video-glitch-active {
            filter: contrast(2) brightness(1.5) hue-rotate(90deg) saturate(3);
            transform: skewX(2deg) scale(1.05);
            mix-blend-mode: exclusion;
        }

        /* Ligne de décalage horizontale pendant le glitch */
        .video-glitch-active::before {
            content: "";
            position: absolute;
            top: 50%; left: 0; width: 100%; height: 2px;
            background: white;
            box-shadow: 0 0 20px white;
            z-index: 30;
            opacity: 0.5;
        }
        /* EFFET 1 : Ligne de Tracking VCR */
        .vcr-tracking {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 2px;
            background: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
            z-index: 35;
            pointer-events: none;
            animation: vcr-line 8s linear infinite;
        }
        @keyframes vcr-line {
            0% { top: 100%; opacity: 0; }
            5% { opacity: 1; }
            95% { opacity: 1; }
            100% { top: 0%; opacity: 0; }
        }

        /* EFFET 2 : Mire de Test (Handshake) */
        .test-pattern {
            position: absolute;
            top: 0; left: 0; 
            width: 100%; 
            height: 100%; /* Prend 100% du container 16/9 */
            z-index: 40;
            background: linear-gradient(90deg, 
                #0a0a0a 0%, #0a0a0a 14%, 
                #1a1a1a 14%, #1a1a1a 28%, 
                #050505 28%, #050505 42%, 
                #222222 42%, #222222 56%, 
                #0f0f0f 56%, #0f0f0f 70%, 
                #151515 70%, #151515 84%, 
                #000000 84%, #000000 100%);
            display: flex; 
            justify-content: center; 
            align-items: center;
        }
        .test-pattern-text { color: var(--accent); font-weight: bold; background: #000; padding: 10px 20px; border: 2px solid var(--accent); letter-spacing: 2px; }

        /* EFFET 4 : Signal Strength */
        .video-stats-group { display: flex; gap: 20px; }
        .signal-bars { color: var(--dim-green); }

        /* EFFET 6 : Feedback Visuel */
        .video-status-feedback {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0,0,0,0.8);
            border: 2px solid var(--accent);
            color: var(--accent);
            padding: 15px 30px;
            font-size: 1.5em;
            font-weight: bold;
            z-index: 100;
            pointer-events: none;
            letter-spacing: 5px;
            animation: feedback-pop 0.8s ease-out forwards;
        }
        @keyframes feedback-pop {
            0% { opacity: 0; scale: 0.8; }
            20% { opacity: 1; scale: 1.1; }
            80% { opacity: 1; scale: 1; }
            100% { opacity: 0; scale: 1.2; }
        }
        /* EFFET CRT INTERNE (Pour Fullscreen) */
        .crt-overlay-internal {
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: 
                linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%),
                repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 2px);
            background-size: 100% 4px, 100% 2px;
            pointer-events: none;
            z-index: 1000; /* Doit être au dessus de la vidéo mais sous le HUD */
        }