/* ── Quest tabs ─────────────────────────────────────────────── */
.quest-tabs {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 12px;
}
.quest-tab {
    padding: 8px 16px;
    border: 2px solid var(--border-light, #e0e0e0);
    border-radius: 20px;
    background: var(--card-bg, #fff);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    color: inherit;
}
.quest-tab.active {
    background: var(--blue, #3b82f6);
    color: #fff;
    border-color: var(--blue, #3b82f6);
}
.quest-tab:not(.active):hover {
    background: var(--border-light, #e0e0e0);
}

/* ── Quest cards ───────────────────────────────────────────── */
.quest-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg, #fff);
    border: 2px solid var(--border-light, #e0e0e0);
    border-radius: var(--radius, 16px);
    padding: 14px 14px;
    margin-bottom: 10px;
    box-shadow: 0 3px 0 var(--border-light, #e0e0e0);
    transition: opacity 0.3s, border-color 0.3s;
}

.quest-card.quest-done {
    border-color: #6ddb8b;
    box-shadow: 0 3px 0 #2d8a4a;
    opacity: 0.75;
}

.quest-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.quest-info {
    flex: 1;
    min-width: 0;
}

.quest-title {
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--text, #111);
    margin: 0 0 2px;
}

.quest-desc {
    font-size: 0.72rem;
    color: #777;
    margin: 0 0 6px;
}

.quest-progress-bar {
    background: var(--border-light, #e0e0e0);
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 3px;
}

.quest-progress-fill {
    height: 100%;
    background: var(--blue, #1a3a9e);
    border-radius: 99px;
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quest-card.quest-done .quest-progress-fill {
    background: #6ddb8b;
}

.quest-progress-text {
    font-size: 0.68rem;
    color: #999;
    margin: 0;
    font-weight: 700;
}

.quest-card.quest-done .quest-progress-text {
    color: #2d8a4a;
}

.quest-xp {
    flex-shrink: 0;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--blue, #1a3a9e);
    background: rgba(26, 58, 158, 0.08);
    border-radius: 10px;
    padding: 6px 10px;
    line-height: 1.2;
}

.quest-xp span {
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0.7;
}

.quest-xp-done {
    background: rgba(109, 219, 139, 0.15);
    color: #2d8a4a;
}

.quest-reset-info {
    font-size: 0.72rem;
    color: #aaa;
    text-align: center;
    margin: 4px 0 14px;
}

/* Dark mode */
[data-theme="dark"] .quest-card {
    background: #1a1a2e;
    border-color: #2a2a4e;
    box-shadow: 0 3px 0 #111;
}

[data-theme="dark"] .quest-card.quest-done {
    border-color: #2d8a4a;
    box-shadow: 0 3px 0 #1a4a1a;
}

[data-theme="dark"] .quest-title {
    color: #f0f0f0;
}

[data-theme="dark"] .quest-desc {
    color: #888;
}

[data-theme="dark"] .quest-progress-bar {
    background: #2a2a4e;
}

[data-theme="dark"] .quest-xp {
    background: rgba(116, 192, 252, 0.1);
    color: #74c0fc;
}

[data-theme="dark"] .quest-xp-done {
    background: rgba(45, 138, 74, 0.15);
    color: #6ddb8b;
}
.quest-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
}

.quest-diff-badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 99px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.diff-facile     { background: #d4f5d0; color: #1a6e14; }
.diff-normal     { background: #d0e8ff; color: #1a3a9e; }
.diff-difficile  { background: #fff0cc; color: #8a5500; }
.diff-expert     { background: #ffe0cc; color: #c03000; }
.diff-legendaire { background: #f0d0ff; color: #6a00a8; }

[data-theme="dark"] .diff-facile     { background: #1a4a18; color: #6ddb8b; }
[data-theme="dark"] .diff-normal     { background: #1a2a5e; color: #6db0ff; }
[data-theme="dark"] .diff-difficile  { background: #4a3a00; color: #ffcc55; }
[data-theme="dark"] .diff-expert     { background: #4a1a00; color: #ff8855; }
[data-theme="dark"] .diff-legendaire { background: #3a0060; color: #cc88ff; }
