/* ICDL Quizz - Styles */

.icdl-quizz-container {
    max-width: 800px;
    margin: 30px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.icdl-quizz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.icdl-quizz-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
}

.icdl-quizz-exam-id {
    font-size: 14px;
    color: #95a5a6;
    font-weight: normal;
}

.icdl-quizz-progress {
    font-size: 16px;
    color: #7f8c8d;
}

.icdl-quizz-score {
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
}

.icdl-quizz-body {
    min-height: 400px;
    margin-bottom: 30px;
}

.icdl-question {
    animation: fadeIn 0.3s ease-in;
}

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

.icdl-question-text {
    font-size: 20px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.6;
}

.icdl-question-code {
    font-size: 14px;
    color: #95a5a6;
    margin-bottom: 20px;
}

.icdl-question-image {
    margin: 20px 0;
    text-align: center;
}

.icdl-question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.icdl-answers {
    margin-top: 30px;
}

.icdl-answer {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.icdl-answer:hover {
    background: #e8f4f8;
    border-color: #3498db;
    transform: translateX(5px);
}

.icdl-answer input[type="checkbox"],
.icdl-answer input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.icdl-answer-text {
    flex: 1;
    font-size: 16px;
    color: #2c3e50;
    line-height: 1.5;
}

.icdl-answer.selected {
    background: #e8f4f8;
    border-color: #3498db;
}

.icdl-answer.correct {
    background: #d4edda;
    border-color: #28a745;
}

.icdl-answer.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
}

.icdl-answer.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.icdl-feedback {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    animation: slideDown 0.3s ease-out;
}

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

.icdl-feedback.correct {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.icdl-feedback.incorrect {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.icdl-feedback-icon {
    font-size: 24px;
    margin-right: 10px;
}

.icdl-quizz-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.icdl-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.icdl-btn-validate {
    background: #3498db;
    color: white;
}

.icdl-btn-validate:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.icdl-btn-next {
    background: #27ae60;
    color: white;
}

.icdl-btn-next:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.icdl-btn-prev {
    background: #95a5a6;
    color: white;
}

.icdl-btn-prev:hover {
    background: #7f8c8d;
}

.icdl-btn-restart {
    background: #e74c3c;
    color: white;
}

.icdl-btn-restart:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.icdl-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.icdl-results {
    text-align: center;
    padding: 40px 20px;
}

.icdl-results-score {
    font-size: 48px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 20px;
}

.icdl-results-message {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 30px;
}

.icdl-results-details {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 40px;
}

/* HotSpot questions */
.icdl-hotspot-container {
    position: relative;
    display: inline-block;
    margin: 20px 0;
}

.icdl-hotspot-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.icdl-hotspot-zone {
    position: absolute;
    border: 2px dashed #3498db;
    background: rgba(52, 152, 219, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icdl-hotspot-zone:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: #2980b9;
}

.icdl-hotspot-zone.correct {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.2);
}

.icdl-hotspot-zone.incorrect {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.2);
}

.icdl-user-click {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Messages d'erreur */
.icdl-quizz-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .icdl-quizz-container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .icdl-quizz-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .icdl-question-text {
        font-size: 18px;
    }
    
    .icdl-answer {
        padding: 12px 15px;
    }
    
    .icdl-answer-text {
        font-size: 14px;
    }
    
    .icdl-quizz-footer {
        flex-wrap: wrap;
    }
    
    .icdl-btn {
        flex: 1;
        min-width: 120px;
    }
}
