/* per-page styles extracted from pages/college/6eme/exercices-6eme.php */
main { max-width: 1000px; margin: 0 auto; padding: 2rem; }
.header { text-align: center; margin-bottom: 40px; border-bottom: 3px solid #2e5984; padding-bottom: 20px; }
.header h1 { color: #2e5984; font-size: 28px; margin-bottom: 10px; }
.subtitle { color: #666; font-size: 18px; font-style: italic; }
h2 { color: #2e5984; border-left: 5px solid #2e5984; padding-left: 15px; margin-top: 30px; }
h3 { color: #357a32; margin-top: 25px; }
.coach-message { background: linear-gradient(135deg, #e8f4fd 0%, #f0f9ff 100%); border-left: 4px solid #2e5984; padding: 20px; margin: 20px 0; border-radius: 8px; font-style: italic; }
.coach-message strong { color: #2e5984; 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: #2e5984; margin-bottom: 1rem; }
.coach-preview p { color: #64748b; font-size: 1.1rem; margin-bottom: 1.5rem; }
.preview-features { display: grid; grid-template-columns: repeat(3, 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-column { display: flex; flex-direction: column; gap: 1rem; }

/* Responsive pour preview-features */
@media (max-width: 768px) {
    .preview-features {
        grid-template-columns: 1fr;
    }
    .preview-feature-column {
        gap: 1rem;
    }
}
.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: #2e5984; box-shadow: 0 4px 12px rgba(46, 89, 132, 0.1); }
.exercise-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.difficulty { background: #2e5984; 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, #2e5984); 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: #2e5984; color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: all 0.3s ease; }
.btn-coach:hover { background: #1e4a6a; 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; }

/* small helpers used by this page */
.text-blue { color: #2563eb; font-weight: 700; }
.text-green { color: #10b981; font-weight: 700; }
.text-red { color: #ef4444; font-weight: 700; }

/* hidden hint / corrections container */
#scepter-hint { display: none; }
.tip-box { background: #e8f4fd; border-left: 4px solid #2e5984; padding: 15px; margin: 15px 0; }
.tip-box h4 { color: #2e5984; 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;
}

.exercise-title-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exercise-icon {
    font-size: 1.5em;
}

.exercise-title {
    margin: 0;
    flex: 1;
}

.exercise-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.exercise-level,
.exercise-subject {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.exercise-content {
    margin: 1rem 0;
}

.exercise-enonce {
    line-height: 1.6;
}

.exercise-answer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.answer-title {
    color: #059669;
    margin-bottom: 1rem;
}

.answer-content {
    background: #f0fdf4;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #10b981;
}

.exercise-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-show-answer,
.btn-exercise-complete {
    background: #059669;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-show-answer:hover,
.btn-exercise-complete:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.btn-exercise-complete:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.exercise-completed {
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
}

.exercise-success-message {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 6px;
    color: #065f46;
    animation: fadeIn 0.5s ease-out;
}

.no-exercises {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   STYLES POUR EXERCICES INTERACTIFS
   ============================================ */

/* Exercice de coloriage interactif */
.word-coloring-exercise {
    margin: 1.5rem 0;
}

.word-coloring-instructions {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.word-coloring-instructions ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.word-coloring-container {
    font-size: 1.3em;
    line-height: 2;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin: 1rem 0;
    min-height: 60px;
    cursor: default;
}

.coloring-word {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border: 2px solid transparent;
}

.coloring-word:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: scale(1.05);
}

.coloring-word.colored-blue {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
    font-weight: 600;
}

.coloring-word.colored-green {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
    font-weight: 600;
}

.coloring-word.colored-red {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
    font-weight: 600;
}

.coloring-word.correct-answer {
    animation: correctPulse 0.5s ease;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.coloring-word.wrong-answer {
    animation: wrongShake 0.5s ease;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

/* Exercice de conjugaison interactif */
.conjugation-exercise {
    margin: 1.5rem 0;
}

.conjugation-question {
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.conjugation-input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

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

.conjugation-input.correct-input {
    border-color: #10b981;
    background: #f0fdf4;
}

.conjugation-input.wrong-input {
    border-color: #ef4444;
    background: #fef2f2;
}

.input-feedback {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.input-feedback.success {
    color: #059669;
}

.input-feedback.error {
    color: #dc2626;
}

.input-feedback.warning {
    color: #d97706;
}

/* Exercice de mathématiques interactif */
.math-exercise {
    margin: 1.5rem 0;
}

.math-question {
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.math-input {
    width: 150px;
    padding: 0.75rem;
    font-size: 1.1rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    margin-top: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.math-input.correct-input {
    border-color: #10b981;
    background: #f0fdf4;
}

.math-input.wrong-input {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Messages de feedback */
.coloring-feedback,
.conjugation-feedback,
.math-feedback {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.feedback-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 1rem;
    border-radius: 6px;
    color: #065f46;
}

.feedback-good {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    border-radius: 6px;
    color: #92400e;
}

.feedback-needs-work {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    padding: 1rem;
    border-radius: 6px;
    color: #991b1b;
}

.btn-show-correction {
    background: #6366f1;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.btn-show-correction:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

.full-correction {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
}

/* Animations */
@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================
   STYLES POUR QCM (Questionnaire à Choix Multiples)
   ============================================ */
.qcm-exercise {
    margin: 1.5rem 0;
}

.qcm-question {
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.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;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
    box-sizing: border-box;
}

.qcm-choice:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

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

.qcm-choice-text {
    user-select: none;
}

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

.qcm-choice.wrong-choice {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* ============================================
   STYLES POUR EXERCICES DE CHRONOLOGIE
   ============================================ */
.chronology-exercise {
    margin: 1.5rem 0;
}

.chronology-container {
    margin: 1rem 0;
}

.chronology-selects {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.chronology-select-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.chronology-select-item label {
    font-weight: 600;
    min-width: 100px;
    color: #374151;
}

.chronology-select {
    flex: 1;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.chronology-select.correct-select {
    border-color: #10b981;
    background: #f0fdf4;
}

.chronology-select.wrong-select {
    border-color: #ef4444;
    background: #fef2f2;
}

.chronology-feedback {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

/* 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: #2e5984;
}

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

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