@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600;700&display=swap');

:root {
    --bg-color: #05070a;
    --text-color: #e2e8f0;
    --accent-color: #0284c7;
    --accent-light: #38bdf8;
    --accent-glitch: #ff007f;
    --btn-bg: rgba(15, 23, 42, 0.6);
    --btn-border: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Empêche complètement le scroll */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Fira Code', monospace, system-ui;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Fond sombre fixe sans animation */
.disco-lights {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 0, 127, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(0, 223, 216, 0.1) 0%, transparent 40%);
}

/* Overlay CRT */
body:not(.accessible-mode)::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%);
    background-size: 100% 4px;
    opacity: 0.4;
}

.thunder-flash {
    position: fixed;
    inset: 0;
    background: rgba(255, 0, 127, 0.25);
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.05s ease-out;
}
.thunder-flash.active { opacity: 1; }

/* Conteneur principal compact */
.container {
    max-width: 680px;
    width: 100%;
    margin: auto;
    padding: 1rem;
    position: relative;
    z-index: 3;
}

.post-mortem-wrapper { position: relative; }

/* Barre de progression compacte */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid var(--btn-border);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff007f, #00dfd8);
    transition: width 0.3s ease;
}

.step-badge {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent-light);
    margin-bottom: 0.4rem;
}

.intro-question {
    font-size: 1.15em;
    font-weight: 600;
    color: #f8fafc;
    margin: 0 0 1.25rem 0;
    line-height: 1.4;
    border-left: 3px solid var(--accent-glitch);
    padding-left: 12px;
}

/* Options STRICTEMENT FIXES */
.question-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.option-btn {
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    color: #cbd5e1;
    padding: 10px 16px;
    width: 100%;
    border-radius: 6px;
    font-size: 0.88em;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    /* Aucun effet de mouvement, juste de la couleur au survol */
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    position: relative;
    user-select: none;
}

.option-btn::before {
    content: "> ";
    color: var(--accent-light);
    font-weight: bold;
}

/* Survol : Simple changement de couleur (0 mouvement) */
.option-btn:hover {
    background: rgba(255, 0, 127, 0.15);
    border-color: var(--accent-glitch);
    color: #ffffff;
}

.option-btn:active {
    background: var(--accent-glitch);
    color: #000000;
}

/* Champ personnalise */
.custom-input-group {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    width: 100%;
}

.custom-input-group input[type="text"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--btn-border);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.88em;
    font-family: inherit;
    outline: none;
}

.custom-input-group input[type="text"]:focus {
    border-color: var(--accent-light);
}

.custom-input-group input[type="submit"] {
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: #ffffff;
    border: none;
    padding: 0 16px;
    border-radius: 6px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

/* Notices & Boîtes d'info compactes */
.mode-notice {
    padding: 10px 14px;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 0.8em;
    line-height: 1.4;
}

.mode-notice.notice-chaos {
    background: rgba(255, 0, 127, 0.1);
    border-left: 3px solid var(--accent-glitch);
    color: #ff99cc;
}

.mode-notice.notice-serious {
    background: rgba(2, 132, 199, 0.1);
    border-left: 3px solid var(--accent-light);
    color: #7dd3fc;
}

.result-box {
    background: rgba(0, 0, 0, 0.6);
    border-left: 3px solid var(--accent-light);
    padding: 14px;
    border-radius: 0 6px 6px 0;
    margin: 1rem 0;
    line-height: 1.6;
    font-size: 0.9em;
    color: #cbd5e1;
    max-height: 40vh;
    overflow-y: auto;
}

.loading-screen { text-align: center; }

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent-light);
    border-radius: 50%;
    margin: 0 auto 0.75rem auto;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.system-status {
    font-size: 0.75em;
    color: var(--accent-light);
    min-height: 1.2em;
    margin-bottom: 0.75rem;
}

.instructions-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--btn-border);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.8em;
    color: #94a3b8;
    line-height: 1.5;
}

.instructions-box ul { margin: 0.4rem 0 0 0; padding-left: 1.2rem; }

.btn-start, .btn-pdf {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.btn-pdf {
    background: linear-gradient(135deg, #059669, #10b981);
    margin-bottom: 8px;
}

/* Top Controls */
.top-controls {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 100;
    display: flex;
    gap: 6px;
}

.control-btn {
    background: rgba(0, 0, 0, 0.8);
    color: #94a3b8;
    border: 1px solid var(--btn-border);
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 0.7em;
    font-family: inherit;
    cursor: pointer;
}

.control-btn.active {
    color: #ffffff;
    border-color: var(--accent-light);
}

body.accessible-mode {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.accessible-mode * {
    animation: none !important;
    transition: none !important;
}

footer {
    text-align: center;
    padding: 0.75rem;
    font-size: 0.7em;
    color: #64748b;
}