/* ========================================
   STYLES POUR LE QUIZ AVANCÉ
   ======================================== */

/* Modal de sélection d'âge */
.age-selection-modal {
    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: 10000;
    animation: fadeIn 0.3s ease;
}

.age-modal-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.age-modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.age-modal-content p {
    margin: 0 0 25px 0;
    opacity: 0.9;
}

.age-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.age-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.age-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Carte de question */
.quiz-question-card {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(240, 147, 251, 0.3);
    margin: 20px auto;
    max-width: 600px;
    animation: slideInUp 0.5s ease;
}

/* Barre de progression */
.quiz-progress {
    margin-bottom: 25px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(90deg, #4CAF50, #45a049);
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8); }
}

.progress-text {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 600;
}

/* Question */
.quiz-question h3 {
    font-size: 22px;
    margin: 0 0 25px 0;
    text-align: center;
    line-height: 1.4;
}

/* Options de réponse */
.quiz-options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.quiz-option {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quiz-option:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: white;
}

.quiz-option:active {
    transform: translateY(0);
}

.quiz-option.correct {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    animation: correctAnswer 0.6s ease;
}

.quiz-option.incorrect {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    animation: incorrectAnswer 0.6s ease;
}

@keyframes correctAnswer {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Score */
.quiz-score {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    opacity: 0.9;
}

/* Explication */
.quiz-explanation {
    margin-top: 20px;
    animation: slideInUp 0.5s ease;
}

.explanation-content {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.explanation-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.explanation-content p {
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.5;
}

.next-question-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.next-question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Résultats */
.quiz-results {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    animation: slideInUp 0.5s ease;
}

.results-emoji {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.quiz-results h3 {
    margin: 0 0 25px 0;
    font-size: 28px;
}

.results-score {
    margin: 25px 0;
}

.score-circle {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.score-number {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}

.score-total {
    font-size: 18px;
    opacity: 0.8;
}

.score-percentage {
    font-size: 24px;
    font-weight: 600;
    color: #ffd700;
}

.results-message {
    font-size: 18px;
    margin: 25px 0;
    opacity: 0.9;
}

.results-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.restart-btn, .back-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.back-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.restart-btn:hover, .back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Célébration */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.celebration-content {
    text-align: center;
    animation: celebrationPop 0.6s ease;
}

.celebration-emoji {
    font-size: 100px;
    animation: celebrationBounce 0.6s ease;
}

.celebration-text {
    font-size: 36px;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
}

@keyframes celebrationPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes celebrationBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* Confettis */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confettiFall 3s linear infinite;
    pointer-events: none;
    z-index: 9998;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Message "pas de questions" */
.no-questions {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(149, 165, 166, 0.3);
}

.no-questions-emoji {
    font-size: 80px;
    margin-bottom: 20px;
}

.no-questions h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.no-questions p {
    margin: 0 0 25px 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Animations générales */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 768px) {
    .quiz-question-card {
        margin: 10px;
        padding: 20px;
    }
    
    .quiz-question h3 {
        font-size: 18px;
    }
    
    .quiz-option {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .results-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .restart-btn, .back-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-number {
        font-size: 28px;
    }
    
    .celebration-emoji {
        font-size: 80px;
    }
    
    .celebration-text {
        font-size: 28px;
    }
}


/* Styles pour les célébrations et confettis */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

.celebration-emoji {
    font-size: 80px;
    animation: bounce 0.6s ease infinite alternate;
}

.celebration-text {
    font-size: 36px;
    font-weight: bold;
    margin-top: 20px;
    animation: pulse 1s ease infinite;
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 9999;
    animation: confetti-fall linear infinite;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

@keyframes bounce {
    from { transform: translateY(0px); }
    to { transform: translateY(-20px); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Styles pour les résultats */
.quiz-results {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

.results-emoji {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s ease infinite;
}

.results-score {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
}

.score-circle {
    width: 120px;
    height: 120px;
    border: 5px solid white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
}

.score-number {
    font-size: 36px;
    font-weight: bold;
}

.score-total {
    font-size: 18px;
    opacity: 0.8;
}

.score-percentage {
    font-size: 48px;
    font-weight: bold;
    color: #ffd700;
}

.results-message {
    font-size: 18px;
    margin: 20px 0;
    opacity: 0.9;
}

.results-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.restart-btn, .back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.restart-btn:hover, .back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Styles pour les explications */
.quiz-explanation {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.5s ease;
}

.explanation-content {
    text-align: center;
}

.explanation-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.explanation-content p {
    font-size: 16px;
    margin-bottom: 20px;
    color: white;
}

.next-question-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.next-question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

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

/* Styles pour les options correctes/incorrectes */
.quiz-option.correct {
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
    border-color: #4CAF50 !important;
    animation: correctPulse 0.6s ease;
}

.quiz-option.incorrect {
    background: linear-gradient(135deg, #f44336, #d32f2f) !important;
    border-color: #f44336 !important;
    animation: incorrectShake 0.6s ease;
}

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

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

/* Responsive pour mobile */
@media (max-width: 768px) {
    .results-score {
        flex-direction: column;
        gap: 20px;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-number {
        font-size: 28px;
    }
    
    .score-percentage {
        font-size: 36px;
    }
    
    .celebration-emoji {
        font-size: 60px;
    }
    
    .celebration-text {
        font-size: 28px;
    }
    
    .results-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .restart-btn, .back-btn {
        width: 100%;
        max-width: 250px;
    }
}

