* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: #0d0d42;
    background-image: radial-gradient(#ffffff1a 3px, transparent 3px);
    background-size: 30px 30px;
    animation: bgScroll 10s linear infinite;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    
    padding: 100px 20px 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
    overflow-x: hidden;
}

@keyframes bgScroll { from { background-position: 0 0; } to { background-position: -30px -30px; } }
h1, .pixel-title, .pixel-label { font-family: 'Press Start 2P', cursive; }

header { text-align: center; margin-bottom: 40px; display: flex; flex-direction: column; align-items: center; }

/* Wrapper pour englober le titre et le tampon */
.main-title-wrapper {
    position: relative; 
    display: inline-block; 
    margin-bottom: 15px;
}

.title-container {
    background: #FF0055; border: 6px solid #000; box-shadow: 8px 8px 0px #000;
    padding: 20px; display: inline-block;
}
h1 { font-size: 2.2rem; color: #FFF; text-shadow: 4px 4px 0px #000; line-height: 1.5; }

.edition-stamp {
    background: #FFEA00;
    color: #000;
    padding: 8px 12px;
    border: 4px solid #000;
    box-shadow: 4px 4px 0px #000;
    position: absolute;
    font-family: 'Press Start 2P', cursive;
    z-index: 10;
    white-space: nowrap;
    opacity: 0; 
}

/* Sur PC */
header .edition-stamp { left: 15px; top: 15px; font-size: 0.65rem; }
#splash-screen .splash-stamp { left: -40px; top: -30px; font-size: 1.1rem; }

.splash-title-container { transform: scale(1.5); margin-top: 10px; margin-bottom: 40px; }
.splash-btn-container { display: flex; gap: 20px; margin-top: 30px; }
.splash-lang-btn { background: #39FF14; font-size: 1.2rem; padding: 15px 25px; animation: blinker 1.5s infinite; display: flex; align-items: center; gap: 10px; }

.splash-active .edition-stamp,
.splatoon-animation .edition-stamp {
    animation: stampThump 0.4s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    animation-delay: 0.2s;
}
@keyframes stampThump {
    0% { transform: translate(-50%, -50%) scale(3) rotate(-30deg); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(-15deg); opacity: 1; }
}

.user-welcome { text-align: center; margin-bottom: 25px; }
.subtitle { font-family: 'Press Start 2P', cursive; font-size: 0.8rem; color: #FFFF00; }
#username-display { color: #00FFCC; font-size: 1.2rem; margin-left: 10px; }

.user-stats { font-family: 'VT323', monospace; color: #00FFCC; margin-top: 10px; font-size: 1.4rem; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.stat-sep-inner { margin: 0 5px; }

.top-bar-actions { display: flex; gap: 15px; margin-bottom: 20px; justify-content: space-between; align-items: center; width: 100%; flex-wrap: wrap; }
.lang-tuto-group { display: flex; gap: 10px; align-items: center; }

/* ========================================================================= */
/* GRILLE STRICTE POUR LES BOUTONS DU HAUT PC                                */
/* ========================================================================= */
.header-controls {
    display: grid;
    grid-template-columns: 1fr 1.8fr 1fr;
    gap: 20px;
    align-items: center;
    background: #000; 
    padding: 20px; 
    border: 4px solid #fff; 
    box-shadow: 8px 8px 0px #000; 
    margin-bottom: 20px;
    width: 100%;
}

.controls-left, .controls-center, .controls-right { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    gap: 10px; 
    min-width: 0;
}

.pomodoro-container { display: flex; flex-direction: column; align-items: center; background: transparent; padding: 5px; width: 100%; }
.timer-row { display: flex; align-items: center; justify-content: center; margin-bottom: 10px; width: 100%; }
.timer-adj { background: transparent; color: #fff; border: none; cursor: pointer; font-family: 'Press Start 2P'; font-size: 1.8rem; padding: 0 15px; }
.timer-adj:hover { color: #FFEA00; }
#timer-input { width: 100%; max-width: 150px; background: transparent; color: #FFEA00; border: none; font-family: 'Press Start 2P', cursive; font-size: 1.8rem; text-align: center; outline: none; }

.timer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.timer-actions .retro-btn { width: 100%; padding: 10px 5px; font-size: 0.65rem; text-align: center; white-space: nowrap; overflow: hidden; display: flex; justify-content: center; align-items: center; }
.timer-danger { color: #FF0055 !important; animation: blinker 0.5s infinite; }

.data-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.mini-btn { background: #fff; color: #000; border: 3px solid #000; font-family: 'VT323', monospace; font-size: 1.2rem; cursor: pointer; padding: 5px; text-align: center; display: flex; align-items: center; justify-content: center; transition: all 0.2s; width: 100%; }
.mini-btn:hover { background: #00FFCC !important; color: #000 !important; }

.retro-select { background: #222; color: #fff; border: 3px solid #00FFCC; font-family: 'Press Start 2P', cursive; font-size: 0.8rem; padding: 10px 5px; outline:none; width: 150px; text-align: center; cursor: pointer; }

/* ========================================================================= */
/* LECTEUR AUDIO Y2K */
/* ========================================================================= */
.retro-box-mini { background: #000; border: 3px solid #00FFCC; padding: 5px 10px; display: flex; align-items: center; gap: 15px; box-shadow: 4px 4px 0px #000; }
.music-player-container { flex-grow: 0; width: max-content; } 
.music-info { display: flex; align-items: center; gap: 8px; font-family: 'Press Start 2P', cursive; font-size: 0.6rem; color: #FFEA00; overflow: hidden; width: 180px; white-space: nowrap; }
.music-track-wrapper { overflow: hidden; width: 100%; position: relative; }
#music-track-name { display: inline-block; animation: scrollMusic 10s linear infinite; }
@keyframes scrollMusic { 0% { transform: translateX(180px); } 100% { transform: translateX(-100%); } }

.music-controls { display: flex; align-items: center; gap: 5px; }
.music-btn { background: #222; color: #00FFCC; border: 2px solid #00FFCC; font-family: 'Press Start 2P', cursive; font-size: 0.7rem; padding: 5px 8px; cursor: pointer; transition: all 0.1s; width: 35px; text-align: center; }
.music-btn:hover { background: #00FFCC; color: #000; transform: translateY(-2px); }
.music-btn:active { transform: translateY(0); }
.volume-container { display: flex; align-items: center; gap: 5px; margin-left: 10px; }

.retro-range { -webkit-appearance: none; appearance: none; width: 80px; background: transparent; outline: none; }
.retro-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; height: 16px; width: 8px; background: #FF0055; cursor: pointer; border: 2px solid #FFF; margin-top: -6px; }
.retro-range::-webkit-slider-runnable-track { width: 100%; height: 8px; cursor: pointer; background: #222; border: 2px solid #00FFCC; }
.retro-range::-moz-range-thumb { height: 16px; width: 8px; background: #FF0055; cursor: pointer; border: 2px solid #FFF; border-radius: 0; }
.retro-range::-moz-range-track { width: 100%; height: 8px; cursor: pointer; background: #222; border: 2px solid #00FFCC; }
.retro-range:focus::-webkit-slider-thumb { background: #FFEA00; }

/* ========================================================================= */
/* MOTEUR DE PARTICULES (CONFETTIS) */
/* ========================================================================= */
.confetti-particle { position: fixed; width: 10px; height: 10px; pointer-events: none; z-index: 10000; animation: popConfetti 1s ease-out forwards; }
@keyframes popConfetti { 0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.5) rotate(720deg); opacity: 0; } }

/* ========================================================================= */
/* OVERLAYS */
/* ========================================================================= */
#splash-screen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(13, 13, 66, 0.95); z-index: 10002; display: flex; flex-direction: column; justify-content: center; align-items: center; }
#tutorial-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.75); z-index: 9000; pointer-events: auto; }
.tutorial-highlight { position: relative; z-index: 9001 !important; border-radius: 5px; pointer-events: none; background-color: transparent; animation: pulseHighlight 1s infinite alternate !important; }
@keyframes pulseHighlight { from { box-shadow: 0 0 0 5px #0d0d42, 0 0 10px 5px #FFEA00; } to { box-shadow: 0 0 0 5px #0d0d42, 0 0 25px 12px #FFEA00; } }
#tutorial-box { position: fixed; z-index: 9002; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 450px; transition: all 0.2s ease-out; }

.gaza-don { background: #FF3333 !important; color: white !important; }
.gaza-don:hover { background: #00FFCC !important; color: #000 !important; }

.marquee-container { position: fixed; bottom: 0; left: 0; width: 100vw; z-index: 9999; background: #FF0055; color: #fff; border-top: 4px solid #000; padding: 8px 0; font-family: 'Press Start 2P', cursive; font-size: 0.7rem; white-space: nowrap; overflow: hidden; }
.marquee-content { display: inline-block; animation: scrollMarquee 500s linear infinite; will-change: transform; transform: translateZ(0); }
@keyframes scrollMarquee { 0% { transform: translate3d(100vw, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }

/* PROGRESS BAR */
.global-progress-wrapper { display: flex; align-items: flex-end; gap: 15px; width: 100%; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; width: 100%; }
#rank-container { font-family: 'Press Start 2P', cursive; font-size: 1.2rem; color: #fff; }
#rank-badge { font-size: 2rem; color: #fff; text-shadow: 3px 3px 0px #000; margin-left: 10px; display: inline-block; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.punch-shake { color: red !important; transform: scale(1.5) rotate(15deg); animation: smashPunch 0.2s cubic-bezier(.36,.07,.19,.97) forwards; }
@keyframes smashPunch { 0% { transform: translate(0) scale(1.5); } 25% { transform: translate(-10px, 5px) scale(1.5) rotate(-10deg); } 50% { transform: translate(10px, -5px) scale(1.5) rotate(10deg); } 75% { transform: translate(-5px, 10px) scale(1.5); } 100% { transform: translate(0) scale(1) rotate(0); } }
.reset-btn { background: #FF0055; color: white; border: 3px solid #000; font-family: 'Press Start 2P', cursive; font-size: 1.2rem; cursor: pointer; box-shadow: 3px 3px 0px #000; padding: 5px 10px; border-radius: 5px; flex-shrink: 0; margin-bottom: 5px;}
.reset-btn:hover { background: #FFFF00; color: #000; transform: translate(2px, 2px); box-shadow: 1px 1px 0px #000; }
.progress-bar-bg { background-color: #fff; border: 4px solid #000; height: 30px; width: 100%; box-shadow: 4px 4px 0px #000 inset; }
.global-bg { height: 40px; box-shadow: 6px 6px 0px #000; }
.progress-bar-fill { height: 100%; width: 0%; background-color: #00FFCC; transition: width 0.3s steps(10), background-color 0.5s; }
.stripe-pattern { background-image: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent); background-size: 20px 20px; }
@keyframes vibrate { 0% { transform: translate(0, 0); } 20% { transform: translate(1px, -1px); } 40% { transform: translate(-1px, 1px); } 60% { transform: translate(1px, 1px); } 80% { transform: translate(-1px, -1px); } 100% { transform: translate(0, 0); } }
.progress-level-1 { background-color: #00FFCC; }
.progress-level-2 { background-color: #FFF000; }
.progress-level-3 { background-color: #00E5FF; } 
.fire-mode { animation: fireColor 0.3s infinite alternate; } 
@keyframes fireColor { 0% { background-color: #b000ff; box-shadow: 0 0 10px #b000ff, inset 0 0 10px #fff; } 100% { background-color: #ff00ff; box-shadow: 0 0 30px #ff00ff, inset 0 0 20px #5500ff; } }

/* INTRO */
#intro-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.intro-hacker { background-color: #000; color: #00FFCC; font-family: 'VT323', monospace; font-size: 2rem; }
.intro-content { display: flex; flex-direction: column; align-items: center; text-align: center; width: 90%; max-width: 600px; z-index: 10; }
.terminal-text { width: 100%; text-align: left; }
.blink-fast { animation: blinker 0.5s linear infinite; }
.retro-input { background: #222; color: #00FFCC; border: 4px solid #fff; padding: 10px; font-family: 'Press Start 2P', cursive; font-size: 1.5rem; outline: none; margin-top: 20px; width: 100%; max-width: 400px; text-align: center; }
.retro-input:focus { border-color: #FF0055; }
@keyframes splatoonDrop { 0% { transform: translateY(-100vh); } 60% { transform: translateY(10%); } 80% { transform: translateY(-5%); } 100% { transform: translateY(0); } }
.splatoon-animation { animation: splatoonDrop 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards; }

/* CATEGORIES & NODES */
.category { margin-bottom: 25px; position: relative; cursor: grab; }
.category:active { cursor: grabbing; }
.category-header { padding: 15px 20px; border: 5px solid #000; box-shadow: 6px 6px 0px #000; position: relative; z-index: 5; }
.category-title { font-family: 'Press Start 2P', cursive; font-size: 1rem; display: flex; align-items: center; margin-bottom: 10px; text-transform: uppercase; }
.reset-cat-btn { background: transparent; border: none; font-size: 1.2rem; cursor: pointer; transition: transform 0.2s; }
.reset-cat-btn:hover { transform: scale(1.2); }
.node-list { max-height: 0; overflow: hidden; background-color: #fff; color: #000; border: 5px solid #000; border-top: none; box-shadow: 6px 6px 0px #000; margin-left: 10px; margin-right: -10px; transform: translateY(-5px); cursor: auto; }
.node-list.open { max-height: 5000px; padding: 10px; }
.node-item { display: flex; align-items: center; padding: 8px 10px; margin: 5px 0; background: #f0f0f0; border: 3px solid #000; }
.node-item:hover { background: #ffff99; }
.node-checkbox { appearance: none; -webkit-appearance: none; width: 25px; height: 25px; background-color: #fff; border: 3px solid #000; margin-right: 15px; cursor: pointer; position: relative; flex-shrink: 0; }
.node-checkbox:checked { background-color: #FF0055; }
.node-checkbox:checked::after { content: 'X'; font-family: 'Press Start 2P', cursive; color: white; font-size: 14px; position: absolute; top: 2px; left: 3px; }
.node-name { cursor: pointer; font-size: 1.6rem; flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-name:hover { text-decoration: underline; font-weight: bold; }

/* DRAWERS */
.drawer-closed.drawer-right { transform: translateX(100%); }
.drawer-closed.drawer-left { transform: translateX(-100%); }
.drawer-open { transform: translateX(0); }
#notes-drawer, #quiz-drawer { position: fixed; top: 0; width: 400px; max-width: 90vw; height: 100vh; background: #FFEA00; color: #000; z-index: 1000; padding: 20px 20px 80px 20px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; transition: transform 0.4s cubic-bezier(0.1, 0.8, 0.3, 1); }
#notes-drawer { right: 0; border-left: 8px solid #000; box-shadow: -10px 0 0px rgba(0,0,0,0.5); }
#quiz-drawer { left: 0; border-right: 8px solid #000; background: #B000FF; color: #fff; box-shadow: 10px 0 0px rgba(0,0,0,0.5); }
.drawer-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 4px solid currentColor; padding-bottom: 10px; margin-bottom: 20px; gap: 15px; }
.drawer-header h2 { flex: 1; line-height: 1.2; }
.drawer-header .close-btn { position: static; flex-shrink: 0; margin-top: 0; }
.drawer-resizer { position: absolute; top: 0; left: -8px; width: 12px; height: 100%; cursor: ew-resize; z-index: 1010; }
.drawer-resizer:hover { background: rgba(0, 255, 204, 0.5); }
.drawer-cat { margin-bottom: 15px; border: 4px solid #000; background: #fff; color: #000; box-shadow: 4px 4px 0px #000; position: relative; }
.drawer-handle { cursor: grab; font-family: 'Press Start 2P', cursive; font-size: 0.9rem; padding: 10px; background: #000; color: #fff; margin: 0; }
.drawer-handle:active { cursor: grabbing; }
.cat-notes-container { display: none; padding: 10px; }
.cat-notes-container.open { display: block; }
.subcat-handle { font-family: 'Press Start 2P', cursive; font-size: 0.7rem; padding: 8px; background: #222; margin: 0; }
.subcat-notes-container { display: none; padding: 5px; }
.subcat-notes-container.open { display: block; }
.drawer-note { background: #eee; padding: 8px; margin-bottom: 8px; font-family: 'VT323', monospace; font-size: 1.3rem; word-wrap: break-word; white-space: pre-wrap; overflow-wrap: break-word; }

/* QUIZ */
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.quiz-btn-opt { background: #fff; color: #000; border: 4px solid #000; padding: 15px; font-family: 'VT323', monospace; font-size: 1.5rem; cursor: pointer; text-align: left; }
.quiz-btn-opt:hover { background: #FFEA00; }
.quiz-correct { background: #39FF14 !important; }
.quiz-wrong { background: #FF0055 !important; color: #fff !important; }
@keyframes blinkerSoft { 50% { opacity: 0.45; } }
#quiz-feedback { text-shadow: 2px 2px 0 #000; animation: blinkerSoft 1.8s ease-in-out infinite; }
#countdown-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 9999; display: flex; justify-content: center; align-items: center; color: #FF0055; font-family: 'Press Start 2P', cursive; font-size: 15rem; text-shadow: 10px 10px 0px #00FFCC; animation: pulseScale 1s infinite; }
@keyframes pulseScale { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* MODAL & CHALLENGES */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,100,0.8); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.retro-box { background-color: #FFEA00; color: #000; border: 6px solid #000; box-shadow: 10px 10px 0px #000; margin: 5% auto; padding: 25px; width: 90%; max-width: 700px; position: relative; transform: rotate(1deg); }
.close-btn { position: absolute; right: 15px; top: 15px; font-family: 'Press Start 2P', cursive; color: inherit; font-size: 1.2rem; cursor: pointer; }
.close-btn:hover { color: #FF0055; }
#close-quiz-btn { color: #000000; }
#close-quiz-btn:hover { color: #FF0055; }
.challenge-btn { background: #FF8C00; margin: 10px 0; width: 100%; cursor: pointer;}
.challenge-complete-btn { display:none; width:100%; margin-bottom:15px; background:#39FF14; color:#000; animation: blinker 1s infinite; }
.challenge-text { font-family: 'VT323', monospace; font-size: 1.4rem; color: #00FFCC; background: #000; padding: 10px; display: none; border: 2px dashed #00FFCC; margin-bottom: 15px; cursor: pointer; }
.challenge-checklist { display: flex; flex-direction: column; gap: 12px; cursor: default; }
.challenge-item { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.challenge-item label { flex: 1; cursor: pointer; line-height: 1.3; }
.challenge-checkbox { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; min-width: 22px; flex-shrink: 0; margin-top: 3px; background: #000; border: 3px solid #00FFCC; cursor: pointer; position: relative; }
.challenge-checkbox:checked { background: #39FF14; border-color: #39FF14; }
.challenge-checkbox:checked::after { content: 'X'; font-family: 'Press Start 2P', cursive; color: #000; font-size: 11px; position: absolute; top: 2px; left: 3px; }
.challenge-intro { color: #FFEA00; font-size: 1.2rem; line-height: 1.3; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed #00FFCC; cursor: default; }
.notes-section { background: #fff; border: 4px solid #000; padding: 15px; margin: 15px 0; }
#modal-notes { width: 100%; height: 120px; font-family: 'VT323', monospace; font-size: 1.4rem; border: 2px dashed #000; padding: 10px; resize: vertical; background: #f9f9f9; color: #000; margin-bottom: 10px; }
.retro-btn { display: inline-block; background: #00FFCC; color: #000; border: 4px solid #000; padding: 10px 20px; font-family: 'Press Start 2P', cursive; font-size: 0.8rem; box-shadow: 4px 4px 0px #000; cursor: pointer; transition: transform 0.1s;}
.retro-btn:hover { background: #FF0055; color: #FFF; transform: translate(-2px, -2px); box-shadow: 6px 6px 0px #000; }
.doc-btn { background: #B000FF; color: #FFF; }
.blink { animation: blinker 1s linear infinite; }
@keyframes blinker { 50% { opacity: 0; } }

/* ========================================================================= */
/* FIX MOBILE ULTRA - RESPONSIVE DESIGN FORCÉ AU BURIN                       */
/* ========================================================================= */
@media (max-width: 768px) {
    /* Base, Typo et Marges Générales */
    body { padding: 20px 5% 80px 5% !important; font-size: 1.1rem !important; }
    h1 { font-size: 1.4rem !important; }
    
    /* Titres & Splash Screen */
    .title-container { padding: 15px !important; border-width: 4px !important; box-shadow: 4px 4px 0px #000 !important; margin-bottom: 15px !important; }
    .splash-title-container { transform: scale(1.1) !important; margin-bottom: 20px !important; margin-top: 50px !important; }
    .splash-btn-container { flex-direction: column !important; width: 80% !important; max-width: 300px !important; gap: 15px !important; }
    .splash-lang-btn { width: 100% !important; justify-content: center !important; }
    
    /* Tampons "Shader Edition" parfaitement centrés et qui superposent en dessous */
    header .edition-stamp, #splash-screen .splash-stamp { 
        left: 50% !important; 
        top: auto !important; 
        bottom: -10px !important; 
        transform: translateX(-50%) rotate(0deg) !important;
        font-size: 0.65rem !important; 
        z-index: 10 !important;
    }
    #splash-screen .splash-stamp { bottom: -15px !important; font-size: 0.8rem !important; }
    
    /* On désactive la rotation à l'apparition sur mobile */
    .splash-active .edition-stamp, .splatoon-animation .edition-stamp {
        animation: stampThumpMobile 0.4s cubic-bezier(0.1, 0.8, 0.3, 1) forwards !important;
    }
    @keyframes stampThumpMobile {
        0% { transform: translateX(-50%) scale(3) rotate(0deg); opacity: 0; }
        100% { transform: translateX(-50%) scale(1) rotate(0deg); opacity: 1; }
    }

    /* Stats : Les 3 Lignes Parfaites */
    .user-stats { flex-direction: column !important; gap: 8px !important; align-items: center !important; }
    .stat-sep { display: none !important; }
    #username-display { font-size: 1rem !important; }

    /* Réorganisation de l'Ordre (Header) */
    header { display: flex !important; flex-direction: column !important; }
    
    /* FORCAGE ABSOLU DE LA GRILLE NOIRE (Header-controls) */
    .header-controls { 
        display: flex !important; 
        flex-direction: column !important; 
        gap: 25px !important; 
        padding: 20px !important; 
        order: 3 !important; 
        width: 100% !important; 
        margin-bottom: 20px !important;
    }
    
    .controls-center { 
        order: 1 !important; 
        width: 100% !important; 
        border-bottom: 2px dashed #444 !important; 
        padding-bottom: 20px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .controls-left { 
        order: 2 !important; 
        width: 100% !important; 
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    .controls-right { 
        order: 3 !important; 
        width: 100% !important; 
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    /* Le Minuteur (Plus petit et aligné) */
    .timer-row { 
        display: flex !important; 
        flex-direction: row !important; 
        justify-content: center !important; 
        gap: 10px !important; 
        width: 100% !important;
    }
    .timer-adj { font-size: 1.8rem !important; padding: 0 15px !important; background: #222 !important; border: 2px solid #555 !important; border-radius: 8px !important; }
    #timer-input { max-width: 120px !important; font-size: 1.2rem !important; } 
    
    /* Boutons Démarrer et Réinitialiser (Empêche qu'ils soient coupés) */
    .timer-actions { 
        display: flex !important; 
        flex-direction: row !important; 
        gap: 10px !important; 
        width: 100% !important; 
    }
    .timer-actions .retro-btn { 
        flex: 1 !important; 
        font-size: 0.65rem !important; 
        padding: 12px 5px !important; 
        white-space: nowrap !important; 
    }

    /* Boutons Fund, Gaza, Export, Import */
    .data-controls { 
        display: flex !important; 
        flex-direction: row !important; 
        gap: 10px !important; 
        width: 100% !important; 
    }
    .mini-btn { 
        flex: 1 !important; 
        font-size: 1rem !important; 
        padding: 10px !important; 
    }

    /* Langue / Tuto & Musique (En dessous du gros bloc noir) */
    .top-bar-actions { order: 4 !important; margin-bottom: 20px !important; width: 100% !important; display: flex !important; flex-direction: column !important; gap: 15px !important; }
    .global-progress-wrapper { order: 5 !important; }
    .lang-tuto-group { justify-content: center !important; width: 100% !important; gap: 15px !important; }
    .retro-select { width: 100% !important; max-width: 150px !important; }
    
    /* Lecteur Musique */
    .music-player-container { width: 100% !important; max-width: none !important; flex-direction: column !important; padding: 10px !important; gap: 10px !important; }
    .music-info { width: 100% !important; justify-content: center !important; }
    .music-track-wrapper { max-width: 250px !important; }
    .music-controls { justify-content: center !important; width: 100% !important; }
    .volume-container { display: none !important; } 

    /* Barre de Progression Globale */
    .global-progress-wrapper { flex-direction: column !important; align-items: stretch !important; gap: 15px !important; }
    .progress-header { flex-direction: row !important; justify-content: space-between !important; align-items: center !important; gap: 5px !important; }
    #global-progress-text { font-size: 0.8rem !important; text-align: left !important; }
    #rank-container { margin-top: 0 !important; font-size: 1rem !important; }
    #rank-badge { font-size: 1.5rem !important; }
    #hard-reset-btn { width: 100% !important; padding: 12px !important; margin: 0 !important; }

    /* Nodes & Catégories */
    .category-title { font-size: 0.9rem !important; line-height: 1.4 !important; }
    .reset-cat-btn { font-size: 1.2rem !important; }
    .node-item { font-size: 1.1rem !important; padding: 12px 10px !important; }
    .node-checkbox { width: 30px !important; height: 30px !important; margin-right: 10px !important; }
    .node-checkbox:checked::after { font-size: 18px !important; top: 4px !important; left: 6px !important; }

    /* Tiroirs (Drawers) */
    #notes-drawer, #quiz-drawer { width: 100vw !important; max-width: 100vw !important; padding: 15px 15px 80px 15px !important; }
    .drawer-closed.drawer-right { transform: translateX(100vw) !important; }
    .drawer-closed.drawer-left { transform: translateX(-100vw) !important; }
    .drawer-header { flex-direction: column !important; align-items: flex-start !important; }
    .drawer-header h2 { font-size: 1.3rem !important; }
    .drawer-header .close-btn { align-self: flex-end !important; margin-top: -30px !important; }

    /* Modale, Défis et Tuto - FIX CENTRAGE TUTORIEL */
    .retro-box { width: 92% !important; padding: 15px !important; margin: 10% auto !important; transform: none !important; }
    
    /* On restaure explicitement la translation pour le bloc Tuto ! */
    #tutorial-box { width: 92% !important; transform: translate(-50%, -50%) !important; margin: 0 !important; top: 50% !important; left: 50% !important; }
    
    #modal-title { font-size: 1.2rem !important; line-height: 1.4 !important; }
    .challenge-text { font-size: 1.1rem !important; }
    .challenge-checkbox { width: 28px !important; height: 28px !important; }
    .challenge-checkbox:checked::after { font-size: 16px !important; top: 3px !important; left: 5px !important; }
    #modal-notes { font-size: 1rem !important; }

    /* Overlay & Intro Terminal - Ne touchent plus les bords */
    #countdown-overlay { font-size: 6rem !important; }
    .intro-content { width: 100% !important; padding: 0 10px !important; }
    #init-boot-btn { font-size: 0.85rem !important; white-space: nowrap !important; width: auto !important; padding: 12px 10px !important; }
    #intro-name-input, #intro-submit-pseudo-btn { width: 90% !important; max-width: 300px !important; font-size: 1rem !important; margin: 0 auto !important; }
    
    #custom-dialog-title { font-size: 1.2rem !important; }
    #custom-dialog-msg { font-size: 1.1rem !important; }
}