  /* === RESET ET BASE === */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background: linear-gradient(135deg, #004982 0%, #764ba2 100%);
            min-height: 80vh;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* === HEADER === */
        header {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 0;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: bold;
            color: #004982;
            text-decoration: none;
        }

        .text-header{
            vertical-align: 10px;
            padding-left: 20px;
        }

        /* === NAVIGATION === */
        nav ul {
            list-style: none;
            display: flex;
            gap: 2rem;
        }

        nav a {
            text-decoration: none;
            color: #333;
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            transition: all 0.3s ease;
        }

        nav a:hover, nav a.active {
            background: #004982;
            color: white;
            transform: translateY(-2px);
        }

        /* === MAIN CONTENT === */
        main {
            padding-top: 2rem;
            min-height: calc(100vh - 207px);
        }

        .page {
            display: none;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
            margin-bottom: 2rem;
        }

        .page.active {
            display: block;
            animation: fadeIn 0.5s ease-in;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* === ACCUEIL === */
        .welcome {
            text-align: center;
            padding: 1rem 0;
        }

        .welcome h1 {
            font-size: 3rem;
            color: #333;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, #004982, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .welcome p {
            font-size: 1.2rem;
            color: #333;
            margin-bottom: 1rem;
        }

        .alignLeft{
            text-align: left;
        }

        .menu-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }

        .menu-card {
            background: linear-gradient(135deg, #004982, #764ba2);
            color: white;
            padding: 2rem;
            border-radius: 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        }

        .menu-card:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
        }

        .menu-card h3 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
        }

        .menu-card p {
            opacity: 0.9;
        }

        .welcome-text-card{
            color: #f8f9fa !important;
        }

        /* === FORMULAIRE QUIZ === */
        .quiz-setup {
            background: #f8f9fa;
            padding: 2rem;
            border-radius: 15px;
            margin-bottom: 2rem;
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: #333;
        }

        .form-group select,
        .form-group input {
            width: 100%;
            padding: 0.75rem;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            font-size: 1rem;
            transition: border-color 0.3s ease;
        }

        .form-group select:focus,
        .form-group input:focus {
            outline: none;
            border-color: #004982;
        }

        .btn {
            background: linear-gradient(135deg, #004982, #764ba2);
            color: white;
            padding: 0.75rem 2rem;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-block;
            text-decoration: none;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

        /* === QUIZ === */
        .quiz-container {
            max-width: 800px;
            margin: 0 auto;
        }

        .quiz-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            padding: 1rem;
            background: #f8f9fa;
            border-radius: 10px;
        }

        .quiz-progress {
            font-weight: 600;
            color: #004982;
        }

        .timer {
            font-size: 1.5rem;
            font-weight: bold;
            color: #e74c3c;
            min-width: 80px;
            text-align: center;
        }

        .timer.warning {
            animation: pulse 1s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        .question-card {
            background: white;
            padding: 2rem;
            border-radius: 15px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
            margin-bottom: 2rem;
        }

        .question-title {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            color: #333;
            line-height: 1.4;
        }

        .answers {
            display: grid;
            gap: 1rem;
        }

        .answer-btn {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            padding: 1rem;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: left;
            font-size: 1rem;
        }

        .answer-btn:hover {
            border-color: #004982;
            background: rgba(102, 126, 234, 0.1);
        }

        .answer-btn.selected {
            border-color: #004982;
            background: rgba(102, 126, 234, 0.2);
        }

        .answer-btn.correct {
            border-color: #28a745;
            background: rgba(40, 167, 69, 0.2);
        }

        .answer-btn.incorrect {
            border-color: #dc3545;
            background: rgba(220, 53, 69, 0.2);
        }

        .explanation {
            background: #e8f5e8;
            border-left: 4px solid #28a745;
            padding: 1rem;
            margin-top: 1rem;
            border-radius: 0 8px 8px 0;
            display: none;
        }

        .explanation.show {
            display: block;
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* === RÉSULTATS === */
        .results-container {
            text-align: center;
            padding: 2rem;
        }

        .score-circle {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            background: conic-gradient(#28a745 var(--score-percentage), #e9ecef var(--score-percentage));
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 2rem auto;
            position: relative;
        }

        .score-circle::before {
            content: '';
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: white;
            position: absolute;
        }

        .score-text {
            position: relative;
            z-index: 1;
            font-size: 2rem;
            font-weight: bold;
            color: #333;
        }

        .results-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 2rem;
            margin: 2rem 0;
        }

        .stat-card {
            background: #f8f9fa;
            padding: 1.5rem;
            border-radius: 10px;
            text-align: center;
        }

        .stat-number {
            font-size: 2rem;
            font-weight: bold;
            color: #004982;
        }

        .stat-label {
            color: #666;
            margin-top: 0.5rem;
        }

        /* === LISTE DES QUESTIONS === */
        .questions-list {
            max-width: 1000px;
            margin: 0 auto;
        }

        .theme-section {
            margin-bottom: 3rem;
        }

        .theme-header {
            background: #0066cc;
            color: #ffffff;
            padding: 1.5rem 2rem;
            border-radius: 8px 8px 0 0;
            font-size: 1.4rem;
            font-weight: bold;
            border: 2px solid #0066cc;
            cursor:pointer;
        }

        .theme-content {
            background: #ffffff;
            border: 2px solid #0066cc;
            border-top: none;
            border-radius: 0 0 8px 8px;
            padding: 0;
        }

        .question-item {
            border-bottom: 2px solid #e6e6e6;
            padding: 2rem;
        }

        .question-item:last-child {
            border-bottom: none;
        }

        .question-text {
            font-weight: bold;
            color: #1a1a1a;
            margin-bottom: 1.5rem;
            font-size: 1.2rem;
            line-height: 1.6;
        }

        .question-meta{
            margin-bottom: 1.5rem;
            background: #0066cc;
            color: #ffffff;
            border: 2px solid #0066cc;
            border-radius: 8px;
            padding: 10px;
        }

        .question-answer {
            background: #f0f8f0;
            border: 2px solid #006600;
            border-left: 6px solid #006600;
            padding: 1.5rem;
            border-radius: 4px;
        }

        .correct-answer {
            font-weight: bold;
            color: #003300;
            margin-bottom: 1rem;
            font-size: 1.1rem;
        }

        .question-answer div:last-child {
            color: #1a1a1a;
            font-size: 1rem;
            line-height: 1.6;
        }

        /* === FOOTER === */
        footer {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            text-align: center;
            padding: 1.5rem 0;
            color: #666;
        }

        /* === RESPONSIVE === */
        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 1rem;
            }

            nav ul {
                gap: 1rem;
            }

            .welcome h1 {
                font-size: 2rem;
            }

            .menu-cards {
                grid-template-columns: 1fr;
            }

            .quiz-header {
                flex-direction: column;
                gap: 1rem;
            }

            .results-summary {
                grid-template-columns: 1fr;
            }
        }

        /* === UTILITAIRES === */
        .hidden { display: none !important; }
        .text-center { text-align: center; }
        .mt-2 { margin-top: 1rem; }
        .mb-2 { margin-bottom: 1rem; }

        /* === Carte Questions ==== */
        .themes-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 16px;
            margin-top: 20px;
        }

        .theme-card {
            border: 1px solid #ccc;
            border-radius: 8px;
            padding: 12px;
            background: #f9f9f9;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .theme-card:hover {
            transform: scale(1.02);
            background: #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .question-item {
            margin: 8px 0;
            padding: 8px;
            border-top: 1px solid #ddd;
        }


       .explanation-container {
            margin: 0 auto;
            border: 1px solid #ccc;
            padding: 10px;
        }

        .pre-display {
            white-space: pre-wrap;
            font-family: monospace;
            margin: 0;
            min-height: 100px; /* Taille minimale */
        }

        /* Si le conteneur est trop étroit, on garde le <pre> */
        @container (max-width: 400px) {
            .pre-display {
                display: block;
            }
        }

        /* Si le conteneur est assez large, on affiche comme une liste */
        @container (min-width: 401px) {
            .pre-display {
                white-space: normal;
                font-family: inherit;
                display: block;
            }
        }