/* ========== STYLES SPÉCIFIQUES AU QUIZ - SANS CONFLIT WORDPRESS ========== */

/* ========== VARIABLES & RESET ========== */
.quiz-wrapper {
    --primary: #2c3e50;
    --primary-light: #3c5670;
    --secondary: #27ae60;
    --secondary-light: #2ecc71;
    --gray: #95a5a6;
    --gray-light: #ecf0f1;
    --danger: #e74c3c;
    --warning: #f39c12;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

.quiz-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.quiz-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    padding: 20px;
    min-height: 100vh;
}

/* ========== QUIZ CONTAINER & LAYOUT ========== */
.quiz-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: none;
}

.quiz-container[style*="display: block"] {
    display: block !important;
}

.single-quiz-page #content,
.single-quiz-page #primary,
.single-quiz-page #main {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single-quiz-page .site-header,
.single-quiz-page .site-footer {
    display: none;
}

/* ========== ÉCRAN DE DÉMARRAGE ========== */
#start-screen {
    display: none;
}

#start-screen.active {
    display: block !important;
    animation: quizFadeIn 0.5s ease;
}

#start-screen.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.quiz-wrapper .start-wrapper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.quiz-wrapper .exam-header {
    background: var(--primary);
    padding: 40px 30px;
    color: white;
    text-align: center;
}

.quiz-wrapper .exam-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.quiz-wrapper .exam-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.quiz-wrapper .exam-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.quiz-wrapper .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
}

/* ========== CONSIGNES ========== */
.quiz-wrapper .instructions {
    padding: 40px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.quiz-wrapper .instructions h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.quiz-wrapper .instructions-list {
    list-style: none;
    padding-left: 0;
    max-width: 800px;
    margin: 0 auto;
}

.quiz-wrapper .instructions-list li {
    padding: 15px 0;
    color: #555;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 16px;
    border-bottom: 1px dashed #ddd;
}

.quiz-wrapper .instructions-list li:last-child {
    border-bottom: none;
}

.quiz-wrapper .instructions-list li::before {
    content: "✓";
    color: var(--secondary);
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

/* ========== CONTENU DE L'EXAMEN ========== */
#exam-content {
    display: none;
}

#exam-content.active {
    display: block !important;
}

.quiz-wrapper .exam-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ========== TIMER ========== */
.quiz-wrapper .timer-container {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    border: 2px solid var(--primary-light);
}

.quiz-wrapper .timer-warning {
    background: var(--danger);
    animation: quizPulse 2s infinite;
}

/* ========== BARRE DE NAVIGATION ========== */
.quiz-wrapper .nav-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    padding: 15px 30px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quiz-wrapper .questions-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
}

.quiz-wrapper .question-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.quiz-wrapper .question-btn.unanswered {
    background: var(--gray-light);
    color: var(--primary);
    border: 2px solid var(--gray);
}

.quiz-wrapper .question-btn.answered {
    background: var(--secondary);
    color: white;
    border: 2px solid var(--secondary-light);
}

.quiz-wrapper .question-btn.skipped {
    background: #f1c40f;
    color: white;
    border: 2px solid #f39c12;
}

.quiz-wrapper .question-btn.current {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary-light);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.quiz-wrapper .question-btn:hover:not(.current) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quiz-wrapper .nav-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quiz-wrapper .nav-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.quiz-wrapper .prev-btn {
    background: var(--gray-light);
    color: var(--primary);
    border: 2px solid var(--gray);
}

.quiz-wrapper .next-btn {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary-light);
}

.quiz-wrapper .skip-btn {
    background: #f39c12;
    color: white;
    border: 2px solid #e67e22;
}

.quiz-wrapper .nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

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

/* ========== CONTENU DES QUESTIONS ========== */
.quiz-wrapper .questions-container {
    padding: 30px;
    min-height: 500px;
}

.quiz-wrapper .question-block {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #e0e0e0;
    display: none;
}

.quiz-wrapper .question-block.active {
    display: block;
    animation: quizFadeIn 0.3s ease;
}

.quiz-wrapper .question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 15px;
}

.quiz-wrapper .question-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    background: #f8f9fa;
    padding: 8px 20px;
    border-radius: 20px;
}

.quiz-wrapper .question-type {
    font-size: 14px;
    color: var(--gray);
    background: #ecf0f1;
    padding: 6px 15px;
    border-radius: 15px;
    font-weight: 600;
}

.quiz-wrapper .question-points {
    font-size: 14px;
    color: var(--secondary);
    background: #e8f8f0;
    padding: 6px 15px;
    border-radius: 15px;
    font-weight: 600;
}

.quiz-wrapper .question-text {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

/* ========== TYPES DE QUESTIONS ========== */

/* Choix multiples / cases à cocher */
.quiz-wrapper .choices-container {
    margin: 20px 0;
}

.quiz-wrapper .choice-option {
    margin-bottom: 12px;
}

.quiz-wrapper .choice-option input[type="radio"],
.quiz-wrapper .choice-option input[type="checkbox"] {
    display: none !important;
}

.quiz-wrapper .choice-option label {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

.quiz-wrapper .choice-option label:hover {
    border-color: var(--primary);
    background: #f8f9fa;
}

.quiz-wrapper .choice-option input:checked + label {
    background: #e8f4fc;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.quiz-wrapper .choice-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--gray-light);
    color: var(--primary);
    border-radius: 50%;
    margin-right: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.quiz-wrapper .choice-option input:checked + label .choice-letter {
    background: var(--primary);
    color: white;
}

.quiz-wrapper .choice-text {
    flex: 1;
    font-size: 16px;
}

/* Réponse texte */
.quiz-wrapper .text-answer-container {
    margin: 20px 0;
}

.quiz-wrapper .text-answer-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

.quiz-wrapper .text-answer-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Image */
.quiz-wrapper .image-question {
    margin: 20px 0;
}

.quiz-wrapper .question-image-container {
    margin: 20px 0;
    text-align: center;
}

.quiz-wrapper .question-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ========== MATCHING CORRIGÉ AVEC LIGNES ========== */
.quiz-wrapper .matching-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.quiz-wrapper .matching-instructions {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.quiz-wrapper .matching-line-content {
    display: flex;
    justify-content: space-between;
    position: relative;
    min-height: 400px;
    margin: 20px 0;
}

.quiz-wrapper .matching-column {
    width: 45%;
    display: flex;
    flex-direction: column;
}

.quiz-wrapper .matching-column h4 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.quiz-wrapper .match-items-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-wrapper .match-item {
    padding: 15px;
    background: white;
    border: 2px solid var(--gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 60px;
    /* Assurer que l'élément ne change pas de taille lors de la sélection */
    transform-origin: center center;
}

.quiz-wrapper .match-item:hover {
    border-color: var(--primary);
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.quiz-wrapper .match-item.selected {
    border-color: var(--primary) !important;
    background: #e8f4fc !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
    z-index: 20;
    /* Ne pas déplacer l'élément verticalement */
    transform: none !important;
}

.quiz-wrapper .match-item.matched {
    border-color: var(--secondary) !important;
    background: #e8f8f0 !important;
    /* Ne pas déplacer l'élément verticalement */
    transform: none !important;
}

.quiz-wrapper .match-item.correct-match {
    border-color: var(--secondary);
    background: #d4f4dd;
}

.quiz-wrapper .match-item.incorrect-match {
    border-color: var(--danger);
    background: #fdeaea;
}

.quiz-wrapper .left-item {
    justify-content: flex-start;
    padding-right: 40px;
    text-align: right;
}

.quiz-wrapper .right-item {
    justify-content: flex-end;
    padding-left: 40px;
    text-align: left;
}

.quiz-wrapper .item-content {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    z-index: 15;
    /* S'assurer que le texte reste centré verticalement */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
}

.quiz-wrapper .item-connector {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray);
    border-radius: 50%;
    position: absolute;
    background: white;
    z-index: 25;
    transition: all 0.3s ease;
    /* Positionner au centre vertical */
    top: 50%;
    transform: translateY(-50%);
}

.quiz-wrapper .left-item .item-connector {
    right: -12px;
}

.quiz-wrapper .right-item .item-connector {
    left: -12px;
}

.quiz-wrapper .match-item.selected .item-connector {
    border-color: var(--primary);
    background: var(--primary);
    transform: translateY(-50%) scale(1.2);
}

.quiz-wrapper .match-item.matched .item-connector {
    border-color: var(--secondary);
    background: var(--secondary);
    transform: translateY(-50%) scale(1.1);
}

/* Zone des lignes - CORRIGÉ */
.quiz-wrapper .matching-lines-area {
    position: absolute;
    left: 45%;
    right: 45%;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.quiz-wrapper .matching-lines {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
}

.quiz-wrapper .matching-line {
    stroke: #4CAF50;
    stroke-width: 3;
    stroke-linecap: round;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.quiz-wrapper .matching-line:hover {
    stroke-width: 4;
    opacity: 1;
    stroke: #2E7D32;
}

.quiz-wrapper .matching-line.correct {
    stroke: var(--secondary);
    stroke-width: 4;
}

.quiz-wrapper .matching-line.incorrect {
    stroke: var(--danger);
    stroke-width: 4;
    stroke-dasharray: 5, 5;
}

/* Contrôles Matching */
.quiz-wrapper .matching-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.quiz-wrapper .matching-clear-btn,
.quiz-wrapper .matching-hint-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-wrapper .matching-clear-btn {
    background: var(--danger);
    color: white;
}

.quiz-wrapper .matching-clear-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.quiz-wrapper .matching-hint-btn {
    background: var(--warning);
    color: white;
}

.quiz-wrapper .matching-hint-btn:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

/* ========== SEQUENCE/GLISSER-DÉPOSER ========== */
.quiz-wrapper .sequence-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.quiz-wrapper .sequence-instructions {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.quiz-wrapper .sequence-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    position: relative;
}

.quiz-wrapper .sequence-items::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    top: var(--indicator-top, 0px);
    height: 4px;
    background: var(--primary);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s ease, top 0.1s ease;
    z-index: 900;
    pointer-events: none;
    display: none;
}

.quiz-wrapper .sequence-items.drop-zone-active::after {
    opacity: 1;
    animation: quizIndicatorPulse 1.5s infinite;
    display: block;
}

.quiz-wrapper .sequence-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid var(--gray);
    border-radius: 8px;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    z-index: 10;
    animation: quizSlideUp 0.3s ease;
}

.quiz-wrapper .sequence-item:hover {
    border-color: var(--primary);
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.quiz-wrapper .sequence-item.dragging {
    opacity: 0.7;
    background: #e8f4fc;
    border: 2px solid var(--primary);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
    z-index: 1000;
    transform: scale(1.02);
}

.quiz-wrapper .item-handle {
    font-size: 20px;
    color: var(--gray);
    margin-right: 15px;
    cursor: grab;
    user-select: none;
}

.quiz-wrapper .item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    margin-right: 10px;
}

.quiz-wrapper .sequence-item.dragging .item-number {
    background: var(--secondary);
}

.quiz-wrapper .item-drag-indicator {
    margin-left: 10px;
    opacity: 0.3;
}

.quiz-wrapper .sequence-item:hover .item-drag-indicator {
    opacity: 1;
}

/* Contrôles Sequence */
.quiz-wrapper .sequence-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.quiz-wrapper .sequence-reset-btn,
.quiz-wrapper .sequence-check-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-wrapper .sequence-reset-btn {
    background: var(--danger);
    color: white;
}

.quiz-wrapper .sequence-reset-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.quiz-wrapper .sequence-check-btn {
    background: var(--primary);
    color: white;
}

.quiz-wrapper .sequence-check-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* ========== DRAGDROP AMÉLIORÉ ========== */
.quiz-wrapper .dragdrop-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.quiz-wrapper .dragdrop-instructions {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    font-size: 15px;
}

.quiz-wrapper .dragdrop-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    min-height: 400px;
}

.quiz-wrapper .dragdrop-left-column,
.quiz-wrapper .dragdrop-right-column {
    display: flex;
    flex-direction: column;
}

.quiz-wrapper .column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border-bottom: 3px solid var(--primary);
}

.quiz-wrapper .column-header h4 {
    margin: 0;
    color: var(--primary);
}

.quiz-wrapper .items-counter,
.quiz-wrapper .zones-counter {
    font-size: 14px;
    color: var(--gray);
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.quiz-wrapper .items-counter span,
.quiz-wrapper .zones-counter span {
    color: var(--primary);
    font-weight: 700;
}

/* Zone des éléments draggables */
.quiz-wrapper .draggables-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 2px dashed #ccc;
    min-height: 350px;
    overflow-y: auto;
}

.quiz-wrapper .draggable-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #3498db;
    color: white;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.quiz-wrapper .draggable-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
    background: #2980b9;
}

.quiz-wrapper .draggable-item.dragging {
    background: #5dade2;
}

.quiz-wrapper .draggable-item.placed {
    opacity: 1;
    background: #95a5a6;
    cursor: not-allowed;
}

.quiz-wrapper .draggable-item.placed:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(149, 165, 166, 0.3);
}

.quiz-wrapper .draggable-item.placed-in-zone {
    background: #27ae60;
    padding: 10px;
    margin-bottom: 5px;
    transform: scale(0.95);
    animation: quizSlideIn 0.3s ease;
}

.quiz-wrapper .drag-handle {
    margin-right: 15px;
    font-size: 18px;
    opacity: 0.8;
}

.quiz-wrapper .drag-content {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.quiz-wrapper .remove-btn {
    margin-left: 10px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    font-size: 14px;
}

.quiz-wrapper .draggable-item.placed-in-zone .drag-handle {
    cursor: pointer;
    opacity: 1;
}

.quiz-wrapper .draggable-item.placed-in-zone .remove-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Zone des dropzones */
.quiz-wrapper .dropzones-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 10px;
    border: 2px solid #d0e0ff;
    min-height: 350px;
    overflow-y: auto;
}

.quiz-wrapper .dropzone {
    background: white;
    border: 3px solid var(--gray);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    min-height: 120px;
    position: relative;
}

.quiz-wrapper .dropzone:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.quiz-wrapper .dropzone.drag-over {
    border-color: var(--primary);
    background: #e8f4fc;
    border-style: dashed;
}

.quiz-wrapper .dropzone.full {
    border-color: var(--danger);
    background: #fdeaea;
}

.quiz-wrapper .dropzone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.quiz-wrapper .zone-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 16px;
}

.quiz-wrapper .zone-counter {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.quiz-wrapper .zone-count {
    color: var(--secondary);
    font-weight: 700;
    font-size: 18px;
}

.quiz-wrapper .zone-max {
    color: var(--gray);
    font-weight: 500;
}

.quiz-wrapper .dropzone-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}

.quiz-wrapper .dropzone-placeholder {
    text-align: center;
    color: var(--gray);
    font-style: italic;
    padding: 20px;
    font-size: 14px;
    opacity: 0.7;
    display: block;
}

.quiz-wrapper .dropzone:not(:has(.draggable-item)) .dropzone-placeholder {
    display: block;
}

.quiz-wrapper .dropzone:has(.draggable-item) .dropzone-placeholder {
    display: none;
}

/* Contrôles Dragdrop */
.quiz-wrapper .dragdrop-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.quiz-wrapper .dragdrop-reset-btn,
.quiz-wrapper .dragdrop-hint-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-wrapper .dragdrop-reset-btn {
    background: var(--danger);
    color: white;
}

.quiz-wrapper .dragdrop-reset-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.quiz-wrapper .dragdrop-hint-btn {
    background: var(--warning);
    color: white;
}

.quiz-wrapper .dragdrop-hint-btn:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

/* ========== FIN D'EXAMEN ========== */
#exam-end {
    display: none;
}

#exam-end.active {
    display: block !important;
}

.quiz-wrapper .end-title {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
}

.quiz-wrapper .end-message {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-wrapper .end-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.quiz-wrapper .stat-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.quiz-wrapper .stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.quiz-wrapper .stat-label {
    font-size: 14px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quiz-wrapper .end-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

/* ========== BOUTONS ========== */
.quiz-wrapper .start-button {
    padding: 18px 50px;
    font-size: 20px;
    font-weight: 600;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 40px auto 0;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.quiz-wrapper .start-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(39, 174, 96, 0.4);
    background: var(--secondary-light);
}

.quiz-wrapper .action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-wrapper .review-btn {
    background: var(--primary);
    color: white;
}

.quiz-wrapper .home-btn {
    background: var(--gray-light);
    color: var(--primary);
    border: 2px solid var(--gray);
}

/* ========== LOADING & ERROR STATES ========== */
.quiz-loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
    text-align: center;
    background: #f9f9f9;
    border-radius: 10px;
    margin: 2rem auto;
    max-width: 800px;
}

.quiz-loading-screen[style*="display: none"] {
    display: none !important;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.quiz-error {
    background: #ffe6e6;
    border: 2px solid #ff4444;
    border-radius: 10px;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.quiz-error h3 {
    color: #d32f2f;
    margin-top: 0;
    margin-bottom: 1rem;
}

.quiz-error p {
    color: #666;
    margin-bottom: 1.5rem;
}

.retry-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.retry-btn:hover {
    background: #45a049;
}

/* ========== STYLES SPÉCIFIQUES ========== */
.quiz-wrapper .question-hint {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 8px 12px;
    margin: 10px 0;
    font-size: 0.9em;
    color: #856404;
}

.quiz-wrapper .image-question-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quiz-wrapper .image-container {
    text-align: center;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 15px;
    background: #f8f9fa;
}

.quiz-wrapper .image-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.quiz-wrapper .dragdrop-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.quiz-wrapper .dragdrop-alert.warning {
    background: #ffc107;
}

.quiz-wrapper .dragdrop-alert.info {
    background: #17a2b8;
}

/* ========== UTILITY CLASSES ========== */
.hidden {
    display: none !important;
}

/* ========== ANIMATIONS ========== */
@keyframes quizFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes quizPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes quizIndicatorPulse {
    0%, 100% { 
        opacity: 0.8;
    }
    50% { 
        opacity: 1;
    }
}

@keyframes quizDrawLine {
    from {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
    }
}

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

@keyframes quizSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(0.95);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes removeLine {
    to {
        stroke-dashoffset: 1000;
        opacity: 0;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .quiz-wrapper {
        padding: 10px;
    }
    
    .quiz-wrapper .exam-wrapper {
        border-radius: 10px;
    }
    
    .quiz-wrapper .nav-bar {
        padding: 15px;
        position: relative;
    }
    
    .quiz-wrapper .questions-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .quiz-wrapper .question-btn {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .quiz-wrapper .nav-controls {
        flex-direction: column;
    }
    
    .quiz-wrapper .nav-btn {
        width: 100%;
    }
    
    .quiz-wrapper .timer-container {
        position: relative;
        top: 0;
        right: 0;
        margin: 15px auto;
        width: fit-content;
    }
    
    .quiz-wrapper .questions-container {
        padding: 20px;
    }
    
    .quiz-wrapper .question-block {
        padding: 20px;
    }
    
    .quiz-wrapper .question-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quiz-wrapper .end-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .quiz-wrapper .stat-box {
        width: 100%;
        max-width: 300px;
    }
    
    /* Responsive pour matching */
    .quiz-wrapper .matching-line-content {
        flex-direction: column;
        min-height: auto;
    }
    
    .quiz-wrapper .matching-column {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .quiz-wrapper .matching-lines-area {
        position: relative;
        left: 0;
        right: 0;
        height: 50px;
        margin: 20px 0;
    }
    
    .quiz-wrapper .match-item {
        min-height: 50px;
    }
    
    .quiz-wrapper .matching-controls,
    .quiz-wrapper .sequence-controls,
    .quiz-wrapper .dragdrop-controls {
        flex-direction: column;
    }
    
    .quiz-wrapper .matching-clear-btn,
    .quiz-wrapper .matching-hint-btn,
    .quiz-wrapper .sequence-reset-btn,
    .quiz-wrapper .sequence-check-btn,
    .quiz-wrapper .dragdrop-reset-btn,
    .quiz-wrapper .dragdrop-hint-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Responsive pour dragdrop */
    .quiz-wrapper .dragdrop-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .quiz-wrapper .draggables-container,
    .quiz-wrapper .dropzones-container {
        min-height: 250px;
    }
    
    .quiz-wrapper .image-question-container {
        flex-direction: column;
    }
    
    .quiz-wrapper .dragdrop-columns {
        flex-direction: column;
    }
    
    .quiz-wrapper .matching-line-content {
        flex-direction: column;
    }
    
    .quiz-wrapper .matching-column {
        width: 100% !important;
    }
    
    .quiz-wrapper .matching-lines-area {
        display: none;
    }
    
    .quiz-loading-screen {
        margin: 1rem;
        padding: 1rem;
    }
    
    .quiz-wrapper .quiz-error {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .quiz-wrapper .exam-header {
        padding: 20px;
    }
    
    .quiz-wrapper .exam-title {
        font-size: 24px;
    }
    
    .quiz-wrapper .exam-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .quiz-wrapper .question-text {
        font-size: 16px;
        padding: 12px;
    }
    
    .quiz-wrapper .choice-option label {
        padding: 12px 15px;
    }
    
    .quiz-wrapper .match-item {
        padding: 12px;
        font-size: 14px;
    }
    
    .quiz-wrapper .item-connector {
        width: 16px;
        height: 16px;
    }
    
    .quiz-wrapper .sequence-item {
        padding: 12px;
        font-size: 14px;
    }
    
    .quiz-wrapper .item-handle {
        font-size: 16px;
        margin-right: 10px;
    }
    
    .quiz-wrapper .item-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .quiz-wrapper .draggable-item {
        padding: 12px;
        font-size: 14px;
    }
    
    .quiz-wrapper .dropzone {
        padding: 12px;
    }
}