body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #333;
}

.container {
    width: 80%;
    max-width: 900px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #0056b3;
}

h3 {
    color: #333;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: block;
    padding: 10px 15px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.category-list a:hover {
    background: #0056b3;
}

/* Quiz Header */
.quiz-header {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

/* Minuteur */
.timer {
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.timer h3 {
    margin: 0;
    color: #856404;
}

/* Messages d'erreur */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
}

.question-block {
    background: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.question-text {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.question-points {
    color: #0056b3;
    font-weight: bold;
    margin-bottom: 15px;
}

.answer-input {
    width: 98%;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: Arial, sans-serif;
    transition: border-color 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.3);
}

/* Feedback en temps réel */
.realtime-feedback {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    min-height: 30px;
}

.matched-display {
    margin-bottom: 10px;
    font-weight: bold;
    color: #155724;
}

.score-display {
    font-size: 0.95em;
    color: #666;
    transition: all 0.3s ease;
}

.score-display.score-perfect {
    color: #28a745;
    font-weight: bold;
    background: #d4edda;
    padding: 8px;
    border-radius: 3px;
    border-left: 4px solid #28a745;
}

.score-display.score-partial {
    color: #ff9800;
    font-weight: bold;
    background: #fff3cd;
    padding: 8px;
    border-radius: 3px;
    border-left: 4px solid #ff9800;
}

/* Badges pour les mots-clés */
.badge-success {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    margin-right: 5px;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.badge-info {
    display: inline-block;
    background: #17a2b8;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    margin-right: 5px;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.matched-words,
.expected-words {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

button {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
}

button:hover {
    background: #218838;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Résultats */
.results-summary {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.results-summary h2 {
    color: #155724;
    margin-top: 0;
}

.results-summary h3 {
    color: #155724;
    margin-bottom: 0;
}

/* Bloc de correction */
.correction-block {
    background: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #0056b3;
    margin-bottom: 15px;
    border-radius: 4px;
}

.correction-block h3 {
    margin-top: 0;
    color: #0056b3;
}

.correction-block p {
    margin: 8px 0;
}

.correction-block strong {
    color: #333;
}

/* Liens */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }

    .answer-input {
        width: 96%;
    }

    h1 {
        font-size: 1.5em;
    }

    .badge-success,
    .badge-info {
        font-size: 0.85em;
        padding: 3px 6px;
    }
}
