/* Reset et base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* En-tête */
header {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Contenu principal */
main {
    padding: 3rem 0;
}

/* Barre de progression */
.progress-overview {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

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

.progress-fill {
    height: 100%;
    background: #3498db;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: bold;
    text-align: center;
}

/* Grille des chapitres */
.course-grid h2 {
    margin-bottom: 2rem;
    color: #2c3e50;
}

/* Boutons */
.mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
}

.mode-toggle input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}



.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: center;
    width: 100%;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Actions rapides */
.quick-actions {
    margin-top: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Pied de page */
footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}


/* Pages de cours */
.course-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.course-content h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.course-content h2 {
    color: #34495e;
    margin: 2rem 0 1rem 0;
}

.course-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.example {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 1rem;
    margin: 1rem 0;
}

.example h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Messages de blocage */
.lock-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2rem;
}

.lock-message h3 {
    color: #856404;
    margin-bottom: 1rem;
}

/* ========== NOUVEAUX STYLES POUR LES QUESTIONS ========== */
/* Styles pour les questions */
.question-section {
    margin-bottom: 2rem;
}

.question-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    border: 1px solid #d1d5db; /* Bordure plus visible */
}

.question-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Bandeau d'en-tête - plus foncé */
.question-header {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%); /* Plus foncé */
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #94a3b8; /* Bordure plus marquée */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.question-title h3 {
    margin: 0;
    color: #1e293b; /* Texte plus foncé */
    font-size: 1.2rem;
    font-weight: 600;
}

.question-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Badge des points */
.points-badge {
    background: #2563eb; /* Bleu plus foncé */
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Bouton indication */
.hint-badge {
    background: #d97706; /* Orange plus foncé */
    color: white;
    border: none;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.hint-badge:hover {
    background: #b45309; /* Encore plus foncé au survol */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Contenu de la question */
.question-text {
    padding: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #1e293b; /* Texte plus foncé */
    background: #fefefe;
    border-bottom: 1px solid #e2e8f0;
}

/* Indication (contenu caché) */
.hint-container {
    margin: 0 1.5rem 1rem 1.5rem;
}

.hint-content {
    background: #fef3c7; /* Fond plus foncé pour l'indication */
    border-left: 4px solid #d97706;
    padding: 1rem;
    border-radius: 8px;
    color: #78350f;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.hint-content p {
    margin: 0;
}

/* Choix des réponses */
.choices {
    padding: 0 1.5rem 1rem 1.5rem;
}

.choice-option {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #cbd5e1; /* Bordure plus foncée */
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #fafafa;
}

.choice-option:hover {
    background: #f1f5f9; /* Fond plus foncé au survol */
    border-color: #3b82f6;
}

.choice-option input {
    margin-right: 0.75rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.choice-option label {
    cursor: pointer;
    color: #1e293b;
    font-size: 1rem;
}

/* Zone de réponse (texte, textarea) */
.answer-area {
    padding: 0 1.5rem 1rem 1.5rem;
}

.answer-area textarea,
.answer-area input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fefefe;
}

.answer-area textarea:focus,
.answer-area input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Actions - Bouton spécifique */
.question-actions {
    padding: 1rem 1.5rem;
    background: #f1f5f9; /* Fond plus foncé */
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Bouton vérifier */
.btn-check-answer {
    background: #2563eb; /* Bleu plus foncé */
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    width: auto !important;
    min-width: 180px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-check-answer:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.btn-check-answer:active {
    transform: translateY(0);
}

/* Feedback */
.question-actions .feedback {
    flex: 1;
    margin: 0;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
}

.feedback {
    display: none;
}

.feedback.show {
    display: block;
}

.feedback.success {
    background-color: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.feedback.error {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hint-container {
    animation: slideDown 0.3s ease;
}


.correction-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.correction-auto {
    background: #27ae60;
    color: white;
}

.correction-semi {
    background: #f39c12;
    color: white;
}

.correction-manuel {
    background: #e74c3c;
    color: white;
}

.correction-obligatoire {
    background: #3498db;
    color: white;
}

.feedback.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.feedback.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Style pour la liste déroulante */
.select-answer {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-answer:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.select-answer:hover {
    border-color: #3b82f6;
}


/* Responsive */
@media (max-width: 768px) {
    .question-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .question-meta {
        justify-content: center;
    }
    
    .question-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-check-answer {
        width: 100% !important;
    }
    
    .question-actions .feedback {
        text-align: center;
    }
}


.hidden {
    display: none !important;
}


.global-validation {
    text-align: center;
    width: 100%;
    margin: 2rem 0;
    clear: both;
}

.global-validation .btn-primary {
    display: inline-block !important;
    width: auto !important;
    min-width: 220px !important;
    margin: 0 auto !important;
    text-align: center !important;
    float: none !important;
}


.global-validation .feedback {
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.global-validation .feedback.show {
    display: block;
}


.question-feedback.unanswered {
    color: #f39c12;
    background: #fff3cd;
}

.question-feedback.pending {
    color: #3498db;
    background: #e3f2fd;
}

.feedback.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.course-validation .btn-secondary:disabled {
    background-color: #27ae60;
    cursor: default;
    opacity: 0.7;
}

/* Styles pour les statistiques */
.stats-container {
    margin: 2rem 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.stats-card {
    padding: 1.5rem;
}

.stats-card h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    border-bottom: 2px solid #3498db;
    display: inline-block;
    padding-bottom: 0.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.stat-value.high {
    color: #27ae60;
}

.stat-value.medium {
    color: #f39c12;
}

.stat-value.low {
    color: #e74c3c;
}

.stat-value.negative {
    color: #c0392b;
}

.stat-detail {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.stat-item.accuracy-item {
    cursor: help;
    position: relative;
}

