/* Styles généraux */
.quiz-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Grille de quiz */
.quiz-grid {
    display: grid;
    gap: 20px;
}

.quiz-grid.columns-1 {
    grid-template-columns: 1fr;
}

.quiz-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.quiz-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.quiz-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Liste de quiz */
.quiz-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Carte de quiz */
.quiz-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quiz-title {
    margin: 0 0 15px;
    font-size: 1.5em;
    color: #333333;
}

.quiz-excerpt {
    margin-bottom: 15px;
    color: #666666;
    line-height: 1.5;
}

.quiz-time-limit {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    color: #666666;
    font-size: 0.9em;
}

.quiz-start-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
}

.quiz-start-button:hover {
    background-color: #0056b3;
}

/* Interface du quiz */
.quiz-interface {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.quiz-progress {
    margin-bottom: 20px;
}

.progress-bar {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease-in-out;
}

.quiz-timer {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    color: #666666;
    font-size: 0.9em;
}

.quiz-timer.warning {
    color: #ffc107;
}

.quiz-timer.danger {
    color: #dc3545;
}

.quiz-question {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.question-text {
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #333333;
}

.question-type {
    display: inline-block;
    padding: 3px 8px;
    background-color: #e9ecef;
    border-radius: 3px;
    font-size: 0.8em;
    color: #666666;
    margin-bottom: 15px;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.answer-option:hover {
    background-color: #f8f9fa;
}

.answer-option.selected {
    background-color: #e3f2fd;
    border-color: #90caf9;
}

.answer-option.correct {
    background-color: #e8f5e9;
    border-color: #a5d6a7;
}

.answer-option.incorrect {
    background-color: #ffebee;
    border-color: #ef9a9a;
}

/* Glisser-déposer */
.drag-drop-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.drag-source {
    padding: 10px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    min-height: 100px;
}

.drag-target {
    padding: 10px;
    background-color: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    min-height: 100px;
}

.drag-item {
    padding: 8px;
    margin: 5px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: move;
    user-select: none;
}

.drag-item.dragging {
    opacity: 0.5;
}

/* Résultats */
.quiz-results {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-score {
    font-size: 2em;
    color: #333333;
    margin-bottom: 10px;
}

.result-status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.result-status.passed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.result-status.failed {
    background-color: #ffebee;
    color: #c62828;
}

.result-feedback {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    color: #666666;
}

.result-details {
    margin-bottom: 30px;
}

.result-details h3 {
    margin-bottom: 15px;
    color: #333333;
}

.result-answers {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.answer-review {
    padding: 15px;
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.answer-review.correct {
    border-left: 4px solid #4caf50;
}

.answer-review.incorrect {
    border-left: 4px solid #f44336;
}

.answer-question {
    margin-bottom: 10px;
    color: #333333;
}

.answer-given,
.answer-correct {
    margin-bottom: 5px;
    color: #666666;
}

.answer-feedback {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
    color: #666666;
}

/* Mode examen */
.exam-mode {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #dc3545;
    color: #ffffff;
    text-align: center;
    padding: 10px;
    z-index: 1000;
}

/* Alertes */
.quiz-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.quiz-alert.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.quiz-alert.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.quiz-alert.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Responsive */
@media (max-width: 768px) {

    .quiz-grid.columns-3,
    .quiz-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .drag-drop-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {

    .quiz-grid.columns-2,
    .quiz-grid.columns-3,
    .quiz-grid.columns-4 {
        grid-template-columns: 1fr;
    }
}