/* ===== COMPOSANTS D'EXERCICES SPÉCIALISÉS ===== */

/* ===== QUIZ COMPONENTS ===== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.quiz-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.quiz-progress-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.quiz-progress-bar {
    flex: 1;
    max-width: 200px;
    height: 8px;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-soft), var(--accent-soft));
    transition: width 0.5s ease;
    border-radius: var(--radius-sm);
}

/* ===== MATH INPUT COMPONENTS ===== */
.math-input-container {
    text-align: center;
    padding: var(--spacing-lg);
}

.math-equation {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    font-family: 'Comic Neue', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.math-number {
    background: var(--bg-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    min-width: 80px;
    text-align: center;
}

.math-operator {
    font-size: 3rem;
    color: var(--primary-soft);
    font-weight: bold;
}

.math-equals {
    font-size: 3rem;
    color: var(--text-secondary);
}

.math-input {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    min-width: 120px;
    padding: var(--spacing-md);
    border: 3px solid var(--primary-soft);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
}

.math-input:focus {
    outline: none;
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 4px rgba(168, 216, 234, 0.3);
}

/* ===== VIRTUAL KEYBOARD ===== */
.virtual-keyboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    max-width: 300px;
    margin: var(--spacing-lg) auto 0;
}

.key-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-btn:hover {
    background: var(--primary-soft);
    color: white;
    transform: scale(1.05);
}

.key-btn:active {
    transform: scale(0.95);
}

.key-btn.special {
    background: var(--warning-soft);
    grid-column: span 2;
}

.key-btn.delete {
    background: #ffe6e6;
    color: #d32f2f;
}

/* ===== LEVEL INDICATOR ===== */
.level-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.level-stars {
    display: flex;
    gap: var(--spacing-xs);
}

.star {
    font-size: 1.5rem;
    color: var(--border-medium);
    transition: color 0.3s ease;
}

.star.filled {
    color: #ffd700;
    animation: pulse 0.5s ease-in-out;
}

.level-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== ACHIEVEMENT BADGES ===== */
.achievement-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
    margin: var(--spacing-md) 0;
}

.achievement-badge {
    background: var(--success-soft);
    border: 2px solid var(--accent-soft);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    animation: bounce 0.6s ease-in-out;
}

.achievement-icon {
    font-size: 1.2rem;
}

/* ===== TIMER COMPONENT ===== */
.timer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.timer-icon {
    font-size: 1.5rem;
    color: var(--primary-soft);
}

.timer-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: monospace;
}

.timer-warning {
    border-color: var(--warning-soft);
    background: #fff9e6;
    animation: pulse 1s ease-in-out infinite;
}

/* ===== HINT SYSTEM ===== */
.hint-container {
    background: var(--warning-soft);
    border: 2px solid #f0c674;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    position: relative;
}

.hint-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.hint-icon {
    font-size: 1.3rem;
    color: #f39c12;
}

.hint-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hint-content {
    color: var(--text-primary);
    line-height: 1.6;
}

.hint-toggle {
    background: transparent;
    border: none;
    color: var(--primary-soft);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: 1rem;
}

/* ===== RESPONSIVE EXERCISES ===== */
@media (max-width: 768px) {
    .math-equation {
        font-size: 2rem;
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .math-operator {
        font-size: 2rem;
    }
    
    .virtual-keyboard {
        grid-template-columns: repeat(3, 1fr);
        max-width: 250px;
    }
    
    .key-btn {
        font-size: 1.2rem;
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .math-equation {
        font-size: 1.5rem;
    }
    
    .math-input {
        font-size: 1.5rem;
        min-width: 100px;
    }
    
    .virtual-keyboard {
        max-width: 200px;
    }
    
    .key-btn {
        font-size: 1rem;
        min-height: 45px;
    }
}
