/* Styles spécifiques au quiz */
.quiz-page {
    padding: 1rem 0;
}

/* Chronomètre circulaire */
.timer-container {
    position: fixed;
    top: 120px; /* Ajustez selon la hauteur de votre header */
    right: 2rem;
    z-index: 1000;
    width: 100px;
    height: 100px;
    background-color: white;
    border-radius: 50%;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

.timer-display {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.timer-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.timer-progress-circle {
    fill: none;
    stroke-width: 6;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.timer-progress-bg {
    stroke: #f0f0f0;
}

.timer-progress-fill {
    stroke: var(--primary-color);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-progress-fill.warning {
    stroke: var(--warning-color);
}

.timer-progress-fill.critical {
    stroke: var(--error-color);
    animation: pulse 1s infinite;
}

.time-text {
    position: relative;
    z-index: 2;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.time-minutes {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s;
}

.time-minutes.warning {
    color: var(--warning-color);
}

.time-minutes.critical {
    color: var(--error-color);
}

.time-unit {
    font-size: 0.7rem;
    color: #666;
    display: block;
}

.timer-status {
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.2rem;
    text-align: center;
}

/* Contenu du quiz */
.quiz-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    margin-top: 1rem;
}

.questions-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1rem;
}

/* Carte de question */
.question-card {
    margin-bottom: 1.5rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
}

.question-number-display {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1rem;
}

.question-category {
    background-color: #e8f4fd;
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.question-text h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    color: #333;
    margin-bottom: 1.2rem;
}

/* Options de réponse */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.option {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.option:hover {
    border-color: var(--primary-color);
    background-color: #f5f9ff;
}

.option.selected {
    border-color: var(--primary-color);
    background-color: #e8f4fd;
}

.option-letter {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: 50%;
    margin-right: 0.8rem;
    font-weight: bold;
    font-size: 0.9rem;
    color: #555;
}

.option.selected .option-letter {
    background-color: var(--primary-color);
    color: white;
}

.option-text {
    flex: 1;
    font-size: 1rem;
}

.question-note {
    font-size: 0.85rem;
    color: #777;
    font-style: italic;
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px dashed #eee;
}

/* Navigation */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    padding: 0.8rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav-button {
    padding: 0.6rem 1.2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.nav-button:hover:not(:disabled) {
    opacity: 0.9;
}

.nav-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.progress-indicator {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Actions du quiz */
.quiz-actions {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.action-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.3s;
}

.action-button.submit {
    background-color: var(--success-color);
    color: white;
}

.action-button.reset {
    background-color: var(--error-color);
    color: white;
}

.action-button:hover {
    transform: translateY(-2px);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.questions-list {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.2rem;
    box-shadow: var(--shadow);
}

.questions-list h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    text-align: center;
    font-size: 1.1rem;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.question-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.question-number:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

.question-number.active {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.question-number.answered {
    background-color: var(--success-color);
    color: white;
}

.answered-count {
    text-align: center;
    font-weight: bold;
    color: #666;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

.quiz-info {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.2rem;
    box-shadow: var(--shadow);
}

.quiz-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    text-align: center;
    font-size: 1.1rem;
}

.quiz-info ul {
    list-style-type: none;
    padding-left: 0;
}

.quiz-info li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed #eee;
    color: #666;
    font-size: 0.85rem;
}

.quiz-info li:last-child {
    border-bottom: none;
}

.quiz-info li i {
    width: 1.2rem;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Publicités */
.ad-container {
    margin: 1rem 0;
}

/* .ad-banner {
    background-color: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.ad-top {
    width: 728px;
    height: 90px;
    margin: 0 auto;
}

.ad-sidebar {
    width: 300px;
    height: 250px;
    margin: 0 auto;
}

.ad-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.ad-placeholder {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 1rem;
    height: calc(100% - 2rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ad-demo {
    color: #666;
}

.ad-demo p:first-child {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #444;
}

.ad-demo-text {
    font-size: 0.8rem;
    color: #999;
}

.ad-notice {
    font-size: 0.7rem;
    color: #888;
    margin-top: 0.5rem;
    font-style: italic;
} */

/* Responsive */
@media (max-width: 992px) {
    .quiz-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
    
    .timer-container {
        top: 110px;
        right: 1rem;
        width: 80px;
        height: 80px;
    }
    
    .timer-progress-circle {
        stroke-width: 5;
    }
    
    .time-minutes {
        font-size: 1.2rem;
    }
    
    .time-text {
        font-size: 1rem;
    }
    
    .time-unit {
        font-size: 0.6rem;
    }
    
    .timer-status {
        font-size: 0.6rem;
    }
    
    .ad-top {
        width: 100%;
        max-width: 728px;
    }
    
    .ad-sidebar {
        width: 100%;
        max-width: 300px;
        height: auto;
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .quiz-page {
        padding: 0.5rem 0;
    }
    
    .questions-section {
        padding: 1rem;
        margin-top: 0.5rem;
    }
    
    .question-text h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .option {
        padding: 0.6rem 0.8rem;
    }
    
    .option-text {
        font-size: 0.95rem;
    }
    
    .option-letter {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
        margin-right: 0.6rem;
    }

    .question-note {
        font-size: 0.7rem;
        padding-top: 0rem;
    }
    
    .navigation-buttons {
        display: flex;
        flex-direction: row;
        gap: 0.8rem;
        margin: 1.2rem 0;
    }

    .nav-button {
        width: auto;
        flex: 1;
        font-size: 0;
        padding: 0.6rem;
    }

    .nav-button::after {
        font-size: 0.7rem;
        font-weight: 600;
    }

    .nav-button.prev::after {
        content: "Précédent";
    }

    .nav-button.next::after {
        content: "Suivant";
    }

    .progress-indicator {
        flex: 1;
        text-align: center;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .quiz-actions {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
        text-align: center;
    }
    
    .questions-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .question-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .timer-container {
        position: fixed;
        top: 100px;
        right: 0.5rem;
        width: 70px;
        height: 70px;
        z-index: 1000;
    }
    
    .timer-progress-circle {
        stroke-width: 4;
    }
    
    .time-minutes {
        font-size: 1.1rem;
    }
    
    .time-text {
        font-size: 0.9rem;
    }
    
    .time-unit {
        font-size: 0.55rem;
    }
    
    .ad-top {
        height: auto;
        min-height: 90px;
    }
    
    .ad-sidebar {
        height: auto;
        min-height: 250px;
    }
}

@media (max-width: 576px) {
    .questions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .question-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .questions-list {
        padding: 1rem;
    }
    
    .quiz-info {
        padding: 1rem;
    }
    
    .quiz-info li {
        font-size: 0.8rem;
    }
    
    .timer-container {
        width: 60px;
        height: 60px;
        top: 90px;
    }
    
    .timer-progress-circle {
        stroke-width: 3;
    }
    
    .time-minutes {
        font-size: 1rem;
    }
    
    .time-text {
        font-size: 0.8rem;
    }
    
    .time-unit {
        font-size: 0.5rem;
    }
    
    .timer-status {
        display: none;
    }
    
    .ad-top {
        padding: 0.5rem;
    }
    
    .ad-sidebar {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .question-category {
        display: none;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .questions-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.3rem;
    }
    
    .question-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .option-text {
        font-size: 0.9rem;
    }
    
    .ad-demo p:first-child {
        font-size: 0.9rem;
    }
    
    .ad-demo-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 360px) {
    .questions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .question-number {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    
    .option-letter {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
        margin-right: 0.4rem;
    }
    
    .timer-container {
        width: 50px;
        height: 50px;
        top: 85px;
        right: 0.3rem;
    }
    
    .time-minutes {
        font-size: 0.9rem;
    }
    
    .time-text {
        font-size: 0.7rem;
    }
    
    .time-unit {
        font-size: 0.45rem;
    }
}

/* Animation pour le timer */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}