/**
 * Styles Frontend - Quiz Prompt Master
 * Chemin: public/quiz-style.css
 * Optimisé pour la performance (minifier en production)
 * Ne se charge QUE sur les pages avec le shortcode
 */

/* Container principal */
.qpm-quiz-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 40px;
    max-width: 800px;
    margin: 40px auto;
}

/* Titre */
.qpm-quiz-title {
    color: #667eea;
    margin: 0 0 10px 0;
    text-align: center;
    font-size: 2em;
    font-weight: 700;
}

.qpm-quiz-subtitle {
    text-align: center;
    color: #666;
    margin: 0 0 30px 0;
    font-size: 1em;
}

/* Barre de progression */
.qpm-progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 30px;
    overflow: hidden;
}

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

/* Compteur de questions */
.qpm-question-counter {
    text-align: center;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1em;
}

/* Section de question */
.qpm-quiz-section {
    display: none;
}

.qpm-quiz-section.active {
    display: block;
    animation: qpmFadeIn 0.3s ease;
}

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

/* Texte de la question */
.qpm-question-text {
    font-size: 1.25em;
    color: #333;
    margin-bottom: 25px;
    font-weight: 600;
    line-height: 1.6;
}

/* Options */
.qpm-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

/* Options Vrai/Faux spécifiques */
.qpm-options-tf {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

.qpm-option-tf {
    flex: 1;
    max-width: 200px;
    flex-direction: column;
    padding: 25px 20px;
    justify-content: center;
}

.qpm-tf-icon {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.qpm-tf-text {
    font-size: 1.2em;
    font-weight: 700;
}

.qpm-option {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.qpm-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(5px);
}

.qpm-option.selected {
    border-color: #667eea;
    background: #f0f3ff;
}

.qpm-option.correct {
    border-color: #4caf50;
    background: #e8f5e9;
    cursor: default;
    transform: none;
}

.qpm-option.incorrect {
    border-color: #f44336;
    background: #ffebee;
    cursor: default;
    transform: none;
}

.qpm-option.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Lettre de l'option */
.qpm-option-letter {
    background: #667eea;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.qpm-option.correct .qpm-option-letter {
    background: #4caf50;
}

.qpm-option.incorrect .qpm-option-letter {
    background: #f44336;
}

/* Boutons */
.qpm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.qpm-btn-primary {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #667eea;
    color: #fff;
}

.qpm-btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.qpm-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Section Résultats */
.qpm-results-section {
    display: none;
    text-align: center;
}

.qpm-results-section.active {
    display: block;
    animation: qpmFadeIn 0.5s ease;
}

.qpm-score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.qpm-score-number {
    font-size: 3em;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.qpm-score-total {
    font-size: 1.25em;
    color: rgba(255,255,255,0.9);
}

.qpm-score-message {
    font-size: 1.5em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 20px;
}

.qpm-score-details {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.qpm-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.qpm-detail-row:last-child {
    border-bottom: none;
}

.qpm-detail-label {
    color: #666;
}

.qpm-detail-value {
    font-weight: 600;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .qpm-quiz-container {
        padding: 25px 20px;
        margin: 20px 10px;
    }

    .qpm-quiz-title {
        font-size: 1.5em;
    }

    .qpm-question-text {
        font-size: 1.1em;
    }

    .qpm-option {
        padding: 15px;
    }

    .qpm-score-circle {
        width: 150px;
        height: 150px;
    }

    .qpm-score-number {
        font-size: 2.5em;
    }
    
    .qpm-options-tf {
        flex-direction: column;
    }
    
    .qpm-option-tf {
        max-width: 100%;
    }
}

/* Optimisation print */
@media print {
    .qpm-buttons {
        display: none;
    }
}