/* Styles spécifiques pour les exercices */

/* Carte d'exercice */
.exercice-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.exercice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

/* Conteneur d'exercice */
.exercice-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary-color);
}

/* Question d'exercice */
.exercice-question {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

/* Zone de réponse */
.response-area {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 2px dashed #dee2e6;
}

/* Boutons d'action */
.btn-action {
    margin: 5px;
    min-width: 120px;
}

/* Feedback */
.feedback-area {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
}

.feedback-area.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.feedback-area.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

/* Grille de coordonnées */
.coord-grid {
    border-collapse: collapse;
    margin: 20px auto;
}

.coord-grid td {
    border: 1px solid #dee2e6;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.coord-grid td:hover {
    background-color: #e9ecef;
}

.coord-grid td.selected {
    background-color: #0d6efd;
    color: white;
}

/* Carré magique */
.magic-square {
    border-collapse: collapse;
    margin: 20px auto;
}

.magic-square td {
    border: 2px solid #dee2e6;
    padding: 20px;
    text-align: center;
    width: 60px;
    height: 60px;
}

.magic-square td input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.magic-square td.correct {
    background-color: #d4edda;
}

.magic-square td.incorrect {
    background-color: #f8d7da;
}

/* Exercice de suite numérique */
.number-suite {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.number-suite input {
    width: 80px;
    text-align: center;
    font-size: 1.2rem;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid #dee2e6;
}

/* Exercice de transcription */
.transcription-exercice {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.transcription-exercice button {
    padding: 10px 15px;
    margin: 5px;
    font-size: 1rem;
}

/* Exercice de calcul mental */
.mental-calc {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Timer */
.timer-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #dc3545;
    text-align: center;
    margin: 20px 0;
}

/* Niveaux de difficulté */
.difficulty-levels {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.difficulty-levels label {
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #f8f9fa;
    transition: all 0.3s;
}

.difficulty-levels input:checked + label {
    background-color: var(--primary-color);
    color: white;
}

/* Options d'exercice */
.exercice-options {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Score */
.score-display {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 20px 0;
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .exercice-question {
        font-size: 1.2rem;
    }
    
    .mental-calc {
        font-size: 1.5rem;
    }
    
    .magic-square td {
        padding: 10px;
        width: 40px;
        height: 40px;
    }
    
    .magic-square td input {
        font-size: 1rem;
    }
}

/* Animation pour les exercices */
@keyframes pulseExercise {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.exercice-highlight {
    animation: pulseExercise 2s infinite;
}
