

        :root {
            --primary: #4361ee;
            --primary-hover: #3a56d4;
            --success: #2ec4b6;
            --danger: #e71d36;
            --background: #f8f9fc;
            --text-main: #2b2d42;
            --text-muted: #64748b;
            --card-bg: #ffffff;
            --border-color: #f1f5f9;
            --pane-text: #475569; /* Gris foncé lisible en mode clair */
            --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
        }

        /* VARIABLES DARK MODE */
        body.dark-mode {
            --background: #0f172a;
            --card-bg: #1e293b;
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            --border-color: #334155;
            --pane-text: #e2e8f0; /* Gris très clair / blanc cassé pour le mode sombre */
            --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
        }

        * { box-sizing: border-box; }

        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background-color: var(--background);
            margin: 0;
            padding: 0;
            color: var(--text-main);
            overflow-x: hidden;
            transition: background-color 0.3s ease, color 0.3s ease;
            -webkit-user-select: none; /* Safari */
            -ms-user-select: none;     /* IE 10+ */
             user-select: none;
        }
        input, textarea {
             -webkit-user-select: text;
             user-select: text;
        }

        /* HEADER & PROGRESS */
        .header {
            background: var(--card-bg);
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            position: sticky;
            top: 0;
            z-index: 100;
            transition: background 0.3s ease;
        }

        body.dark-mode .header {
            border-bottom: 1px solid var(--border-color);
        }

        .serie-badge {
            background: #eef2ff;
            color: var(--primary);
            padding: 6px 16px;
            border-radius: 100px;
            font-weight: 700;
            font-size: 0.9rem;
        }

        body.dark-mode .serie-badge {
            background: rgba(67, 97, 238, 0.15);
        }

        .theme-btn {
            background: var(--border-color);
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            transition: all 0.3s ease;
            color: var(--text-main);
        }

        .theme-btn:hover {
            transform: scale(1.05);
        }

        #timer {
            font-variant-numeric: tabular-nums;
            font-weight: 700;
            font-size: 1.2rem;
            color: var(--danger);
            background: #fff1f2;
            padding: 8px 16px;
            border-radius: 12px;
            border: 1px solid #ffe4e6;
        }

        body.dark-mode #timer {
            background: #451a1a;
            border-color: #7f1d1d;
            color: #fca5a5;
        }

        .progress-container {
            width: 100%;
            height: 6px;
            background: var(--border-color);
            position: absolute;
            bottom: 0;
            left: 0;
        }

        #progressBar {
            height: 100%;
            background: var(--primary);
            width: 0%;
            transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* INTRO CARD */
        .intro-card {
            background: var(--card-bg);
            padding: 40px;
            margin: 50px auto;
            width: 90%;
            max-width: 700px;
            border-radius: 24px;
            box-shadow: var(--shadow);
            text-align: center;
            animation: slideUp 0.6s ease-out;
        }

        .intro-card h2 { font-size: 2rem; margin-bottom: 24px; color: var(--primary); }

        .rules-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            text-align: left;
            margin: 25px 0;
        }

        .rule-item {
            background: var(--border-color);
            padding: 15px;
            border-radius: 16px;
            font-size: 0.95rem;
            color: var(--text-main);
        }

        /* LAYOUT MAIN */
        .container {
            display: grid;
            grid-template-columns: 1.2fr 0.8fr;
            gap: 24px;
            padding: 30px;
            max-width: 1300px;
            margin: 0 auto;
        }

        .pane {
            background: var(--card-bg);
            border-radius: 24px;
            padding: 32px;
            box-shadow: var(--shadow);
            min-height: 400px;
            transition: background 0.3s ease;
        }

        /* TEXT CONTENT - C'est ici que la magie opère pour la visibilité */
        .text-pane {
            line-height: 1.8;
            font-size: 1.1rem;
            color: var(--pane-text); /* Utilise la variable adaptative */
        }

        /* Assure que le texte brut à l'intérieur du pane hérite de la bonne couleur */
        .text-pane p, .text-pane span, .text-pane div {
            color: var(--pane-text);
        }

        /* OPTIONS */
        .question-title {
            font-size: 1.25rem;
            font-weight: 700;
            margin-bottom: 24px;
            line-height: 1.4;
            color: var(--text-main);
        }

        .option-label {
            display: flex;
            align-items: center;
            padding: 16px 20px;
            margin-bottom: 12px;
            border: 2px solid var(--border-color);
            border-radius: 16px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--text-main);
        }

        .option-label:hover {
            border-color: var(--primary);
            background: rgba(67, 97, 238, 0.05);
        }

        .option-label input { display: none; }

        .custom-radio {
            width: 20px;
            height: 20px;
            border: 2px solid #cbd5e1;
            border-radius: 50%;
            margin-right: 15px;
            position: relative;
        }

        .option-label input:checked + .custom-radio {
            border-color: var(--primary);
            background: var(--primary);
        }

        .option-label input:checked + .custom-radio::after {
            content: '';
            position: absolute;
            width: 8px;
            height: 8px;
            background: white;
            border-radius: 50%;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        /* FOOTER ACTIONS */
        .footer-actions {
            position: fixed;
            bottom: 0;
            width: 100%;
            background: var(--card-bg);
            padding: 15px 30px;
            display: flex;
            justify-content: center;
            gap: 15px;
            border-top: 1px solid var(--border-color);
            transition: background 0.3s ease;
        }

        .btn {
            padding: 14px 32px;
            border-radius: 14px;
            font-weight: 700;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
        }

        .btn-next { background: var(--primary); color: white; }
        .btn-next:hover { background: var(--primary-hover); transform: translateY(-2px); }

        .btn-finish { background: #fff1f2; color: var(--danger); }
        body.dark-mode .btn-finish { background: rgba(231, 29, 54, 0.1); }

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

        @media(max-width: 968px) {
            .container { grid-template-columns: 1fr; }
            .header { padding: 1rem; }
        }


