/* ── Historique — trace audio + lecteur ── */
.history-audio-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 3px 9px;
    font-family:var(--font-ui);
    font-size:var(--text-caption);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--text-white) 78%, var(--role-brand-text, var(--accent-red)));
    border: 1px solid color-mix(in srgb, var(--accent-red) 35%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-red) 8%, transparent);
    max-width: 100%;
}

.history-audio-badge-name {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-audio-section {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--border) 80%, var(--accent-red) 20%);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-black) 25%, var(--surface));
}

.history-audio-section-title {
    margin: 0 0 8px;
    font-family:var(--font-ui);
    font-size:var(--text-caption);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.history-audio-file {
    margin: 0 0 10px;
    font-size:var(--text-small);
    color: var(--text-muted);
    word-break: break-all;
}

.history-audio-player {
    width: 100%;
    max-width: 100%;
    height: 36px;
}

.history-audio-unavailable {
    margin: 0;
    font-size:var(--text-small);
    color: var(--text-muted);
    font-style: italic;
}

.history-audio-badge-dictation {
    border-color: color-mix(in srgb, var(--accent-red) 50%, var(--border));
    background: color-mix(in srgb, var(--accent-red) 12%, transparent);
    color: var(--role-brand-text, var(--accent-red));
}

.history-audio-badge-dictation .history-audio-badge-name {
    color: color-mix(in srgb, var(--text-white) 85%, var(--role-brand-text, var(--accent-red)));
}
