/**
 * CSS pour le système dynamique d'exercices
 * Boutons de matières et affichage un-exercice-à-la-fois
 */

/* Container principal */
.dynamic-exercises-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* En-tête */
.dynamic-exercises-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dynamic-exercises-header h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.dynamic-exercises-header p {
    font-size: 1.1rem;
    color: #64748b;
}

/* Grille des boutons de matières */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Boutons de matières */
.subject-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    font-family: inherit;
}

.subject-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.subject-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.subject-icon {
    font-size: 3rem;
    line-height: 1;
}

.subject-name {
    font-size: 1.2rem;
    font-weight: 600;
}

.subject-count {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Zone d'affichage de l'exercice */
.exercise-display-area {
    margin-top: 2rem;
    min-height: 400px;
}

.single-exercise-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Messages de chargement et d'erreur */
.loading-exercises,
.no-exercises,
.exercise-error {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #64748b;
}

.exercise-error {
    color: #ef4444;
}

/* Message tous complétés */
.all-completed-message {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.all-completed-message h3 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 1rem;
}

.all-completed-message p {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.btn-select-another-subject {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select-another-subject:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Messages de succès/encouragement */
.exercise-success-message,
.exercise-encouragement-message {
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20%, 80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .subjects-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .subject-btn {
        padding: 1.5rem 1rem;
    }
    
    .subject-icon {
        font-size: 2.5rem;
    }
    
    .subject-name {
        font-size: 1rem;
    }
    
    .dynamic-exercises-header h2 {
        font-size: 1.5rem;
    }
}

