/**
 * PrepAI Workspace — vague 5
 * Dashboard progression, CV/lettres split-pane, questionnaire Belgique
 */

/* =============================================================================
   Dashboard — progression
   ============================================================================= */
.dash-progress-section {
    margin-bottom: clamp(28px, 5vw, 40px);
}

.dash-progress-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.dash-progress-head h2 {
    margin: 0;
}

.dash-progress-sub {
    margin: 4px 0 0;
    font-size: 0.88rem;
}

.dash-progress-ring {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.dash-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dash-progress-ring__bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3;
}

.dash-progress-ring__fill {
    fill: none;
    stroke: url(#dash-progress-gradient);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s var(--prep-ease, ease);
}

/* gradient via stroke on supporting browsers — fallback solid */
.dash-progress-ring__fill {
    stroke: var(--prep-brand-600, #2563eb);
}

.dash-progress-ring__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--prep-text, #0f172a);
}

.dash-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.dash-progress-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    background: var(--prep-bg-surface, #fff);
    border: 1px solid var(--prep-border, #e2e8f0);
    border-radius: var(--prep-radius-lg, 18px);
    box-shadow: var(--prep-shadow-xs);
    transition: transform var(--prep-duration, 220ms) var(--prep-ease, ease), box-shadow var(--prep-duration, 220ms) var(--prep-ease, ease);
}

.dash-progress-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--prep-shadow-md);
}

.dash-progress-card--done {
    border-left: 3px solid var(--prep-success, #10b981);
}

.dash-progress-card--progress {
    border-left: 3px solid var(--prep-warning, #f59e0b);
}

.dash-progress-card--todo {
    border-left: 3px solid var(--prep-border-strong, #cbd5e1);
}

.dash-progress-card__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.dash-progress-card__label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--prep-text, #0f172a);
}

.dash-progress-card__pct {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--prep-brand-700, #1d4ed8);
}

.dash-progress-bar {
    height: 5px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.dash-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--prep-brand-600), var(--prep-accent-600));
    border-radius: 3px;
    transition: width 0.5s var(--prep-ease, ease);
}

.dash-progress-card__detail {
    margin: 0;
    font-size: 0.78rem;
    color: var(--prep-text-muted, #64748b);
    line-height: 1.4;
}

.history-section {
    background: var(--prep-bg-surface, #fff);
    border: 1px solid var(--prep-border, #e2e8f0);
    border-radius: var(--prep-radius-lg, 18px);
    padding: clamp(18px, 3vw, 24px);
    box-shadow: var(--prep-shadow-xs);
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-empty {
    list-style: none;
    padding: 0;
}

.history-empty .workspace-empty-state {
    margin: 0;
}

.history-list li {
    padding: 14px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}

.history-list li strong {
    font-size: 0.9rem;
}

/* =============================================================================
   Générateur CV — split-pane
   ============================================================================= */
.template-selector-wrapper {
    background: var(--prep-bg-surface, #fff);
    border: 1px solid var(--prep-border, #e2e8f0);
    border-radius: var(--prep-radius-lg, 18px);
    padding: clamp(18px, 3vw, 24px);
    margin-bottom: 24px;
    box-shadow: var(--prep-shadow-xs);
}

.template-card {
    border-radius: var(--prep-radius-md, 14px);
    box-shadow: var(--prep-shadow-xs);
}

.template-card.active {
    box-shadow: 0 0 0 2px var(--prep-brand-600), var(--prep-shadow-sm);
}

.editor-workspace {
    gap: 20px;
}

.cv-preview-container {
    border-radius: var(--prep-radius-lg, 18px);
    background: linear-gradient(160deg, #e2e8f0, #f1f5f9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.cv-a4-viewport-frame {
    border-radius: var(--prep-radius-sm, 10px);
    box-shadow: var(--prep-shadow-md);
}

.live-editor-sidebar .editor-card {
    border-radius: var(--prep-radius-lg, 18px);
    border: 1px solid var(--prep-border, #e2e8f0);
    box-shadow: var(--prep-shadow-sm);
    background: var(--prep-bg-surface, #fff);
}

.live-editor-sidebar .editor-card h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.editor-panel-divider {
    height: 1px;
    background: var(--prep-border, #e2e8f0);
    margin: 16px 0;
}

/* =============================================================================
   Générateur lettres — split-pane
   ============================================================================= */
.prepai-motivation-free-workspace {
    background: transparent;
    padding: 0;
}

.letter-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: var(--prep-radius-pill, 9999px);
    width: fit-content;
    max-width: 100%;
}

.letter-mode-tab {
    border-radius: var(--prep-radius-pill, 9999px);
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    background: transparent;
    color: var(--prep-text-muted, #64748b);
    cursor: pointer;
    transition: background var(--prep-duration, 220ms), color var(--prep-duration, 220ms), box-shadow var(--prep-duration, 220ms);
}

.letter-mode-tab.active {
    background: var(--prep-bg-surface, #fff);
    color: var(--prep-text, #0f172a);
    box-shadow: var(--prep-shadow-sm);
}

.motivation-form-panel,
.motivation-preview-panel {
    border-radius: var(--prep-radius-xl, 24px);
    box-shadow: var(--prep-shadow-sm);
    border: 1px solid var(--prep-border, #e2e8f0);
}

.motivation-preview-panel {
    background: linear-gradient(160deg, #f8fafc, #fff);
}

.letter-paper-wrapper {
    border-radius: var(--prep-radius-md, 14px);
    box-shadow: var(--prep-shadow-md);
    overflow: hidden;
}

.letter-recent-panel {
    border-radius: var(--prep-radius-md, 14px);
    border: 1px solid var(--prep-border, #e2e8f0);
    background: #f8fafc;
}

.letter-profile-alert {
    border-radius: var(--prep-radius-md, 14px);
    margin-bottom: 16px;
}

/* =============================================================================
   Questionnaire Belgique
   ============================================================================= */
body.campus-belgium-theme .step-indicator,
.cb-profile-chip-label {
    color: var(--be-brand, #1e3a8a);
}

.btn-cb-new-generation {
    background: linear-gradient(135deg, var(--be-brand), var(--be-accent));
    border: none;
    border-radius: var(--prep-radius-pill, 9999px);
}

.btn-cb-back-form {
    border-radius: var(--prep-radius-pill, 9999px);
}

.cb-resume-banner {
    border-radius: var(--prep-radius-lg, 18px);
    background: linear-gradient(135deg, #eff6ff, #fffbeb);
    border-color: #c7d2fe;
}

.cb-profile-chip {
    border-radius: var(--prep-radius-md, 14px);
}

.prepai-cb-workspace .onboarding-card,
.prepai-cb-workspace .recap-block {
    border-radius: var(--prep-radius-lg, 18px);
    box-shadow: var(--prep-shadow-xs);
}

body.campus-belgium-theme .step-title {
    color: var(--be-brand);
}

.asp-doc-body {
    border-radius: var(--prep-radius-md, 14px);
}

.coaching-tip-box {
    border-radius: var(--prep-radius-md, 14px);
    border-left: 3px solid var(--be-accent, #ca8a04);
}

@media (max-width: 900px) {
    .motivation-workspace-grid {
        grid-template-columns: 1fr;
    }

    .letter-mode-tabs {
        width: 100%;
        flex-wrap: wrap;
        border-radius: var(--prep-radius-lg, 18px);
    }

    .letter-mode-tab {
        flex: 1 1 auto;
        text-align: center;
        min-width: 140px;
    }

    .dash-progress-grid {
        grid-template-columns: 1fr;
    }
}
