/**
 * Matching Block - Académie des Étoiles
 */

.ade-matching { margin: var(--ade-space-2xl) 0; }

.ade-matching__question-card {
    /* Removed bulky white wrapper - clean minimal style */

    margin: var(--ade-space-xl) 0;
    border: 2px solid transparent;
}

.ade-matching__question-card--correct { border-color: #10b981; }
.ade-matching__question-card--incorrect { border-color: #ef4444; }

.ade-matching__badge {
    display: inline-block;
    padding: var(--ade-space-xs) var(--ade-space-md);
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: var(--ade-white);
    border-radius: 20px;
    font-size: var(--ade-font-size-small);
    font-weight: 600;
    text-transform: uppercase;
}

.ade-matching__question {
    font-size: var(--ade-font-size-large);
    font-weight: 600;
    color: var(--ade-primary-dark);
    margin: var(--ade-space-lg) 0 var(--ade-space-xl) 0;
}

.ade-matching__pairs {
    display: flex;
    flex-direction: column;
    gap: var(--ade-space-md);
    margin-bottom: var(--ade-space-xl);
}

.ade-matching__pair {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--ade-space-md);
    padding: var(--ade-space-md);
    background: var(--ade-gray-lighter);
    border-radius: 8px;
}

.ade-matching__pair--correct { background: #d1fae5; }
.ade-matching__pair--incorrect { background: #fee2e2; }

.ade-matching__left {
    font-size: var(--ade-font-size-base);
    font-weight: 600;
    color: var(--ade-gray-dark);
}

.ade-matching__arrow {
    font-size: 20px;
    color: var(--ade-primary);
}

.ade-matching__select-wrapper { position: relative; }

.ade-matching__select {
    width: 100%;
    padding: var(--ade-space-sm) var(--ade-space-md);
    font-size: var(--ade-font-size-base);
    border: 2px solid var(--ade-gray);
    border-radius: 6px;
    background: var(--ade-white);
    cursor: pointer;
}

.ade-matching__select:focus {
    outline: none;
    border-color: var(--ade-primary);
}

.ade-matching__select:disabled {
    background: var(--ade-gray-lighter);
    cursor: not-allowed;
}

.ade-matching__select-icon {
    position: absolute;
    right: var(--ade-space-sm);
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.ade-matching__select-icon--correct { display: block; }
.ade-matching__select-icon--correct::after { content: "✓"; color: #10b981; font-weight: 700; }

.ade-matching__select-icon--incorrect { display: block; }
.ade-matching__select-icon--incorrect::after { content: "✗"; color: #ef4444; font-weight: 700; }

.ade-matching__submit {
    padding: var(--ade-space-md) var(--ade-space-2xl);
    background: linear-gradient(135deg, var(--ade-primary) 0%, var(--ade-primary-dark) 100%);
    color: var(--ade-white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--ade-shadow-sm);
}

.ade-matching__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ade-matching__feedback {
    margin-top: var(--ade-space-xl);
    padding: var(--ade-space-lg);
    border-radius: 12px;
}

.ade-matching__feedback--correct {
    background: #d1fae5;
    border-left: 4px solid #10b981;
}

.ade-matching__feedback--incorrect {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}

.ade-matching__feedback-header {
    display: flex;
    gap: var(--ade-space-sm);
}

.ade-matching__feedback-icon { font-size: 24px; }
.ade-matching__feedback--correct .ade-matching__feedback-icon::after { content: "✓"; color: #10b981; }
.ade-matching__feedback--incorrect .ade-matching__feedback-icon::after { content: "✗"; color: #ef4444; }

.ade-matching__retry {
    margin-top: var(--ade-space-md);
    padding: var(--ade-space-sm) var(--ade-space-lg);
    background: var(--ade-white);
    color: var(--ade-primary);
    border: 2px solid var(--ade-primary);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .ade-matching__pair {
        grid-template-columns: 1fr;
        gap: var(--ade-space-sm);
    }
    .ade-matching__arrow { display: none; }
}
