/* Quiz Orthographe Professionnelle - Styles */
.quiz-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    color: #1a202c;
}

.quiz-container * {
    box-sizing: border-box;
}

/* Header Styles */
.quiz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.quiz-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.quiz-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quiz-logo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    backdrop-filter: blur(10px);
}

.quiz-logo-text h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-logo-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 5px;
    font-weight: 400;
}

.quiz-header-decoration {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quiz-decoration-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}

.quiz-decoration-dots {
    display: flex;
    gap: 8px;
}

.quiz-decoration-dots span {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.quiz-decoration-dots span:nth-child(2) {
    animation-delay: 0.3s;
}

.quiz-decoration-dots span:nth-child(3) {
    animation-delay: 0.6s;
}

/* Mode Selection */
.mode-selection {
    text-align: center;
    margin-bottom: 40px;
}

.mode-selection h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 40px;
    position: relative;
}

.mode-selection h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.mode-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.mode-card:hover::before {
    left: 100%;
}

.mode-card:hover {
    transform: translateY(-10px);
    border-color: #667eea;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.mode-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.mode-card:hover .mode-icon {
    transform: scale(1.1) rotate(5deg);
}

.mode-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 15px 0;
}

.mode-details {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.mode-details p {
    margin: 5px 0;
}

.difficulty-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.difficulty-badge.medium {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.difficulty-badge.hard {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
}

/* Mode Description */
.mode-description {
    margin-top: 40px;
}

.mode-description-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mode-description-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
}

.mode-description-card p {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    font-weight: 500;
    color: #2d3748;
}

.feature-item i {
    color: #667eea;
    font-size: 1.2rem;
}

/* Quiz Section */
.quiz-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.quiz-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.quiz-progress {
    flex: 1;
    max-width: 300px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.quiz-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.quiz-timer i {
    color: #667eea;
}

.quiz-score {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.quiz-score span {
    color: #667eea;
}

/* Question Styles */
.question-container {
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    background: #f7fafc;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border-left: 5px solid #667eea;
}

.question-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 500;
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 15px;
}

.question-context {
    font-size: 1rem;
    color: #718096;
    font-style: italic;
    line-height: 1.5;
}

.answers-container {
    display: grid;
    gap: 15px;
    margin-bottom: 40px;
}

.answer-option {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.answer-option:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.answer-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.answer-option.correct {
    border-color: #48bb78;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.answer-option.incorrect {
    border-color: #e53e3e;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
}

.answer-letter {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2d3748;
    flex-shrink: 0;
}

.answer-option.selected .answer-letter,
.answer-option.correct .answer-letter,
.answer-option.incorrect .answer-letter {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.answer-text {
    flex: 1;
    font-weight: 500;
}

/* Navigation */
.question-navigation {
    display: flex;
    justify-content: center;
}

.nav-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 150px;
    justify-content: center;
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Section */
.results-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.results-header {
    margin-bottom: 40px;
}

.results-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    animation: bounce 1s ease-out;
}

.results-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 10px 0;
}

.results-subtitle {
    font-size: 1.2rem;
    color: #718096;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #f7fafc;
    border-radius: 15px;
    padding: 25px;
    border-top: 4px solid #667eea;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Performance Analysis */
.performance-analysis,
.error-analysis {
    background: #f7fafc;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.performance-analysis h3,
.error-analysis h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
}

.performance-level {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.performance-details {
    color: #4a5568;
    line-height: 1.6;
}

.error-categories {
    display: grid;
    gap: 15px;
}

.error-category {
    background: white;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-name {
    font-weight: 500;
    color: #2d3748;
}

.category-count {
    background: #e53e3e;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Action Buttons */
.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 150px;
    justify-content: center;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.action-btn.secondary {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.action-btn.tertiary {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    margin-bottom: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 500;
}



/* Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-20px); }
    70% { transform: translateY(-10px); }
    90% { transform: translateY(-4px); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-container {
        padding: 15px;
    }
    
    .quiz-header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .quiz-header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .quiz-logo-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .quiz-logo-text h1 {
        font-size: 2rem;
    }
    
    .modes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mode-card {
        padding: 30px 20px;
        min-height: 250px;
    }
    
    .quiz-header-info {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .quiz-progress {
        max-width: 100%;
    }
    
    .results-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
    }
    

    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        padding: 10px;
    }
    
    .quiz-header {
        padding: 20px 15px;
    }
    
    .quiz-logo-text h1 {
        font-size: 1.8rem;
    }
    
    .quiz-logo-subtitle {
        font-size: 1rem;
    }
    
    .mode-card {
        padding: 25px 15px;
        min-height: 220px;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .answer-option {
        padding: 15px;
        font-size: 1rem;
    }
    
    .results-container {
        padding: 25px 15px;
    }
    
    .results-header h2 {
        font-size: 2rem;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .quiz-container {
        background: white;
        box-shadow: none;
    }
    
    .loading-overlay,
    .results-actions {
        display: none !important;
    }
}
