/* ═════════════════════════════════════════════════════════════════ */
/* DASHBOARD SOMMAIRE — ajouté pour chantier "Ferrari visible"       */
/* ═════════════════════════════════════════════════════════════════ */

.imp-dashboard {
    margin: 28px 0 36px;
}

.imp-standalone-title {
    margin: 20px 4px 10px !important;
}

/* ── Hero : Streak + Révisions ── */
.imp-dash-hero {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 12px;
    margin-bottom: 12px;
}

.imp-dash-streak {
    background: var(--imp-surface, #FFFFFF);
    border: 1px solid var(--imp-border, rgba(11, 37, 69, 0.12));
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}
.imp-dash-streak-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--imp-text-muted, #5A6B80);
    font-weight: 500;
}
.imp-dash-streak-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.imp-dash-streak-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #f97316;
    letter-spacing: -0.02em;
}
.imp-dash-streak-number.is-zero {
    color: var(--imp-text-muted, #5A6B80);
}
.imp-dash-streak-unit {
    font-size: 14px;
    color: var(--imp-text-muted, #5A6B80);
    font-weight: 500;
}
.imp-flame-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: -6px;
    color: #f97316;
    flex-shrink: 0;
}
.imp-dash-streak-sub {
    font-size: 13px;
    color: var(--imp-text-muted, #5A6B80);
    margin-top: auto;
    padding-top: 12px;
    line-height: 1.45;
}

.imp-dash-reviser {
    background: linear-gradient(135deg, #E1F5EE 0%, #C9F0DD 100%);
    border: 1px solid rgba(15, 110, 86, 0.2);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}
.imp-dash-reviser-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0F6E56;
    font-weight: 600;
}
.imp-dash-reviser-count {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: #04342C;
    margin-top: 8px;
    letter-spacing: -0.02em;
}
.imp-dash-reviser-text {
    font-size: 13px;
    color: #085041;
    margin: 8px 0 0;
    line-height: 1.45;
}
.imp-btn-review {
    background: #0F6E56;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
    font-family: inherit;
    margin-top: 12px;
    transition: background 0.15s;
}
.imp-btn-review:hover:not(:disabled) {
    background: #04342C;
}
.imp-btn-review:disabled {
    background: #8AB3A6;
    cursor: not-allowed;
    opacity: 0.75;
}

/* ── Progression par niveau ── */
.imp-progress-card {
    background: var(--imp-surface, #FFFFFF);
    border: 1px solid var(--imp-border, rgba(11, 37, 69, 0.12));
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 12px;
}
.imp-card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--imp-text, #0B2545);
}
.imp-lvl-row {
    display: grid;
    grid-template-columns: 32px 1fr 110px;
    gap: 14px;
    align-items: center;
    padding: 8px 0;
}
.imp-lvl-code {
    font-size: 12px;
    font-weight: 700;
    color: var(--imp-text, #0B2545);
    letter-spacing: 0.03em;
}
.imp-lvl-bar-bg {
    height: 10px;
    background: rgba(11, 37, 69, 0.06);
    border-radius: 5px;
    overflow: hidden;
}
.imp-lvl-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease-out;
}
.imp-lvl-stat {
    font-size: 12px;
    color: var(--imp-text-muted, #5A6B80);
    text-align: right;
    font-weight: 500;
}

/* ── Stats vocabulaire ── */
.imp-word-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.imp-word-stat {
    background: var(--imp-surface, #FFFFFF);
    border: 1px solid var(--imp-border, rgba(11, 37, 69, 0.12));
    border-radius: 10px;
    padding: 14px 16px;
}
.imp-word-stat-label {
    font-size: 11px;
    color: var(--imp-text-muted, #5A6B80);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.imp-word-stat-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.imp-dot-mastered { background: #1e8e3e; }
.imp-dot-learning { background: #f59e0b; }
.imp-dot-new      { background: var(--imp-text-muted, #5A6B80); }
.imp-word-stat-num {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: var(--imp-text, #0B2545);
    letter-spacing: -0.02em;
}
.imp-word-stat-hint {
    font-size: 11px;
    color: var(--imp-text-muted, #5A6B80);
    margin-top: 4px;
}

/* ── Badges ── */
.imp-badges-card {
    background: var(--imp-surface, #FFFFFF);
    border: 1px solid var(--imp-border, rgba(11, 37, 69, 0.12));
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 12px;
}
.imp-badges-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}
.imp-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 180, 216, 0.05);
    border: 1px solid rgba(0, 180, 216, 0.15);
    transition: transform 0.15s;
}
.imp-badge:hover:not(.is-locked) {
    transform: translateY(-1px);
    border-color: rgba(0, 180, 216, 0.3);
}
.imp-badge.is-locked {
    opacity: 0.35;
    background: rgba(11, 37, 69, 0.02);
    border-color: var(--imp-border, rgba(11, 37, 69, 0.08));
}
.imp-badge-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    color: #185FA5;
    background: #E6F1FB;
}
.imp-badge-flame .imp-badge-icon:not(.is-locked .imp-badge-icon) {
    background: #FAEEDA;
    color: #854F0B;
}
.imp-badge-star .imp-badge-icon:not(.is-locked .imp-badge-icon) {
    background: #EAF3DE;
    color: #3B6D11;
}
.imp-badge-shield .imp-badge-icon:not(.is-locked .imp-badge-icon) {
    background: #EEEDFE;
    color: #534AB7;
}
.imp-badge-diamond .imp-badge-icon:not(.is-locked .imp-badge-icon) {
    background: #E6F1FB;
    color: #185FA5;
}
.imp-badge.is-locked .imp-badge-icon {
    background: rgba(11, 37, 69, 0.05);
    color: var(--imp-text-muted, #5A6B80);
}
.imp-badge-txt {
    line-height: 1.25;
    min-width: 0;
}
.imp-badge-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--imp-text, #0B2545);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.imp-badge-desc {
    font-size: 11px;
    color: var(--imp-text-muted, #5A6B80);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* ── Responsive mobile ── */
@media (max-width: 720px) {
    .imp-dash-hero {
        grid-template-columns: 1fr;
    }
    .imp-word-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .imp-word-stat {
        padding: 12px 14px;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 0 12px;
    }
    .imp-word-stat-label { margin-bottom: 0; grid-column: 1; grid-row: 1; }
    .imp-word-stat-hint  { grid-column: 1; grid-row: 2; }
    .imp-word-stat-num   { grid-column: 2; grid-row: 1 / 3; font-size: 28px; align-self: center; }
    .imp-lvl-row {
        grid-template-columns: 28px 1fr 90px;
        gap: 10px;
    }
    .imp-dash-streak-number { font-size: 38px; }
    .imp-dash-reviser-count { font-size: 32px; }
    .imp-dash-streak,
    .imp-dash-reviser {
        min-height: 120px;
        padding: 16px;
    }
    .imp-progress-card,
    .imp-badges-card {
        padding: 16px 18px;
    }
    .imp-badges-row {
        grid-template-columns: 1fr;
    }
}

/* ── Mode sombre si variables disponibles ── */
@media (prefers-color-scheme: dark) {
    .imp-dash-reviser {
        background: linear-gradient(135deg, rgba(15, 110, 86, 0.15) 0%, rgba(15, 110, 86, 0.25) 100%);
        border-color: rgba(15, 110, 86, 0.4);
    }
    .imp-dash-reviser-label { color: #5DCAA5; }
    .imp-dash-reviser-count { color: #9FE1CB; }
    .imp-dash-reviser-text  { color: #5DCAA5; }
}
