/* per-page styles extracted from pages/college/4eme/exercices-4eme.php */
main { max-width: 1000px; margin: 0 auto; padding: 2rem; }
.header { text-align: center; margin-bottom: 40px; border-bottom: 3px solid #2E8B57; padding-bottom: 20px; }
.header h1 { color: #2E8B57; font-size: 28px; margin-bottom: 10px; }
.subtitle { color: #666; font-size: 18px; font-style: italic; }
h2 { color: #2E8B57; border-left: 5px solid #2E8B57; padding-left: 15px; margin-top: 30px; }
h3 { color: #357a32; margin-top: 25px; }
.coach-message { background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f0 100%); border-left: 4px solid #2E8B57; padding: 20px; margin: 20px 0; border-radius: 8px; font-style: italic; }
.coach-message strong { color: #2E8B57; font-size: 18px; }
.coach-preview { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border: 2px solid #e2e8f0; border-radius: 15px; padding: 2rem; text-align: center; margin: 2rem 0; }
.coach-preview h2 { color: #2E8B57; margin-bottom: 1rem; }
.coach-preview p { color: #64748b; font-size: 1.1rem; margin-bottom: 1.5rem; }
.preview-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin: 2rem 0; }
.preview-feature { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.preview-feature h3 { color: #059669; margin-bottom: 0.5rem; }
.preview-feature p { color: #64748b; font-size: 0.9rem; }
.coach-cta { background: linear-gradient(135deg, #059669 0%, #10b981 100%); color: white; border: none; padding: 1rem 2rem; border-radius: 8px; font-size: 1.1rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; margin: 0 0.5rem; transition: all 0.3s ease; }
.coach-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(5, 150, 105, 0.3); }
.coach-cta.secondary { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.coach-cta.secondary:hover { box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3); }
.exercise-card { background: #f8f9fa; border: 2px solid #e9ecef; border-radius: 10px; padding: 20px; margin: 20px 0; transition: all 0.3s ease; }
.exercise-card:hover { border-color: #2E8B57; box-shadow: 0 4px 12px rgba(46, 139, 87, 0.1); }
.exercise-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.difficulty { background: #2E8B57; color: white; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; }
.progress-bar { width: 100%; height: 8px; background: #e9ecef; border-radius: 4px; margin: 10px 0; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #357a32, #2E8B57); width: 0%; transition: width 0.5s ease; }
.motivation-box { background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%); border: 2px solid #f39c12; border-radius: 10px; padding: 15px; margin: 15px 0; text-align: center; }
.motivation-box h4 { color: #e67e22; margin-bottom: 10px; }
.btn-coach { background: #2E8B57; color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: all 0.3s ease; }
.btn-coach:hover { background: #1e5a3a; transform: translateY(-2px); }
.success-message { background: #d4edda; color: #155724; padding: 15px; border-radius: 6px; margin: 15px 0; display: none; }
.cta-actions { margin-top: 2rem; text-align: center; }
.coach-message.preview { opacity: 0.6; }
.tip-box { background: #e8f5e8; border-left: 4px solid #2E8B57; padding: 15px; margin: 15px 0; }
.tip-box h4 { color: #2E8B57; margin-bottom: 8px; }

/* Styles pour le système d'exercices dynamiques */
.exercise-subject-group {
    margin: 2rem 0;
}

.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.progress-section {
    margin-top: 1.5rem;
}

.progress-item {
    margin: 1rem 0;
}

.progress-item h5 {
    margin-bottom: 0.5rem;
    color: #2E8B57;
}

/* Styles pour exercices interactifs */
.math-container, .qcm-container, .conjugation-container {
    margin: 1.5rem 0;
}

.math-question, .qcm-question {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #2E8B57;
}

.math-question label, .qcm-question label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.math-question input[type="text"], .math-question input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.math-question input:focus {
    outline: none;
    border-color: #2E8B57;
}

.qcm-choices {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.qcm-choice {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.qcm-choice:hover {
    background: #f1f5f9;
    border-color: #2E8B57;
}

.qcm-choice input[type="radio"] {
    margin-right: 0.5rem;
}

.qcm-choice.correct {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.qcm-choice.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.conjugation-field {
    margin-bottom: 1rem;
}

.conjugation-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.conjugation-field input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
}

.math-feedback, .qcm-feedback, .conjugation-feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
}

.feedback-correct {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.feedback-incorrect {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.btn-check-math, .btn-check-qcm, .btn-check-conjugation {
    background: #2E8B57;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-check-math:hover, .btn-check-qcm:hover, .btn-check-conjugation:hover {
    background: #1e5a3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 139, 87, 0.3);
}

/* Styles pour la navigation entre niveaux */
.exercise-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.exercise-navigation .nav-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.exercise-navigation .nav-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    color: white;
}

.exercise-navigation .nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.exercise-navigation .nav-prev,
.exercise-navigation .nav-next {
    background: #2E8B57;
}

.exercise-navigation .nav-prev:hover,
.exercise-navigation .nav-next:hover {
    background: #1e5a3a;
    box-shadow: 0 4px 8px rgba(46, 139, 87, 0.3);
}

@media (max-width: 768px) {
    .exercise-navigation {
        flex-direction: column;
        align-items: stretch;
    }
    
    .exercise-navigation .nav-group {
        justify-content: center;
    }
}