/**
 * Sorting / Sequence Block - Académie des Étoiles
 */

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

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

    margin: var(--ade-space-xl) 0;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

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

.ade-sorting__header {
    margin-bottom: var(--ade-space-lg);
}

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

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

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

.ade-sorting__item {
    display: flex;
    align-items: center;
    gap: var(--ade-space-md);
    padding: var(--ade-space-md);
    background: var(--ade-gray-lighter);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.ade-sorting__item--correct {
    background: #d1fae5;
    border-color: #10b981;
}

.ade-sorting__item--incorrect {
    background: #fee2e2;
    border-color: #ef4444;
}

.ade-sorting__item-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ade-primary);
    color: var(--ade-white);
    border-radius: 50%;
    font-weight: 700;
    font-size: var(--ade-font-size-small);
}

.ade-sorting__item-content {
    flex: 1;
    font-size: var(--ade-font-size-base);
    color: var(--ade-gray-dark);
    font-weight: 500;
}

.ade-sorting__item-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ade-sorting__move-button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ade-white);
    border: 2px solid var(--ade-gray);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--ade-gray-dark);
}

.ade-sorting__move-button:hover:not(:disabled) {
    border-color: var(--ade-primary);
    color: var(--ade-primary);
    transform: scale(1.1);
}

.ade-sorting__move-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ade-sorting__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);
    transition: all 0.3s ease;
}

.ade-sorting__submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--ade-shadow-md);
}

.ade-sorting__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

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

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

.ade-sorting__feedback-header {
    display: flex;
    gap: var(--ade-space-sm);
    align-items: center;
}

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

.ade-sorting__feedback-text {
    flex: 1;
    font-size: var(--ade-font-size-base);
    color: var(--ade-gray-dark);
}

.ade-sorting__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;
    transition: all 0.2s ease;
}

.ade-sorting__retry:hover {
    background: var(--ade-primary);
    color: var(--ade-white);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .ade-sorting__card {
        padding: var(--ade-space-lg);
    }

    .ade-sorting__item {
        padding: var(--ade-space-sm);
    }

    .ade-sorting__item-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .ade-sorting__item-content {
        font-size: var(--ade-font-size-small);
    }

    .ade-sorting__move-button {
        width: 28px;
        height: 28px;
    }
}
