@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;0,800&display=swap');

/*
 * Tokens partagés : `.mes-taches` (page) ET `.mt-modal-sheet` (Dialogs PrimeVue
 * téléportés hors de `.mes-taches` — sinon var(--mt-navy-800) invalide → bouton
 * « Créer » texte blanc sur fond transparent, #1056).
 */
.mes-taches,
.mt-modal-sheet {
    --mt-ink: #17222f;
    --mt-text: #2b3744;
    --mt-muted: #69788a;
    --mt-faint: #9aa6b3;
    --mt-line: #e6eaf0;
    --mt-line-soft: #eef1f6;
    --mt-bg: #f4f6f9;
    --mt-surface: #fff;
    --mt-surface-2: #fafbfd;
    --mt-navy-800: #183360;
    --mt-navy-700: #1f4174;
    --mt-gold-700: #9a6e20;
    --mt-gold-tint: #fbf4e6;
    --mt-green-600: #1c8a5b;
    --mt-green-700: #146b46;
    --mt-green-tint: #e9f6ef;
    --mt-amber-500: #d3922a;
    --mt-amber-700: #a96d12;
    --mt-amber-tint: #fdf3e3;
    --mt-red-600: #cf4d35;
    --mt-red-700: #b23a24;
    --mt-red-tint: #fbece8;
    --mt-blue-500: #2f6fd0;
    --mt-blue-700: #215c9c;
    --mt-blue-tint: #ecf2fc;
    --mt-violet-700: #5d41b0;
    --mt-violet-tint: #f1ecfb;
    --mt-slate: #8794a5;
    --mt-radius: 14px;
    --mt-shadow-card: 0 1px 2px rgba(20, 40, 70, 0.05), 0 1px 3px rgba(20, 40, 70, 0.05);
}

.mes-taches {
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    color: var(--mt-text);
    max-width: 72rem;
}

.mes-taches .mt-num {
    font-variant-numeric: tabular-nums lining-nums;
}

.mes-taches .mt-phead h1 {
    font-size: 1.4375rem;
    font-weight: 800;
    color: var(--mt-ink);
    letter-spacing: -0.3px;
}

.mes-taches .mt-phead .mt-sub {
    font-size: 0.84375rem;
    color: var(--mt-muted);
    margin-top: 0.1875rem;
}

.mes-taches .mt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.78125rem;
    font-weight: 700;
    color: var(--mt-text);
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    padding: 0.3125rem 0.6875rem;
    border-radius: 9px;
}

.mes-taches .mt-chip.red {
    color: var(--mt-red-700);
    background: var(--mt-red-tint);
    border-color: #f1cdc4;
}

.mes-taches .mt-tabs {
    display: inline-flex;
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 11px;
    padding: 4px;
}

.mes-taches .mt-tabs button {
    font-family: inherit;
    font-size: 0.84375rem;
    font-weight: 700;
    color: var(--mt-muted);
    padding: 8px 18px;
    border: none;
    background: none;
    border-radius: 7px;
    cursor: pointer;
    transition: 0.15s;
}

.mes-taches .mt-tabs button:hover {
    color: var(--mt-text);
}

.mes-taches .mt-tabs button.on {
    background: var(--mt-navy-800);
    color: #fff;
}

.mes-taches .mt-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 16px 0 18px;
}

.mes-taches .mt-tgroup {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mes-taches .mt-tlabel {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--mt-faint);
}

.mes-taches .mt-seg {
    display: inline-flex;
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 9px;
    padding: 3px;
}

.mes-taches .mt-seg button {
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78125rem;
    font-weight: 700;
    color: var(--mt-muted);
    padding: 6px 12px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.15s;
}

.mes-taches .mt-seg button svg {
    width: 14px;
    height: 14px;
}

.mes-taches .mt-seg button:hover {
    color: var(--mt-text);
}

.mes-taches .mt-seg button.on {
    background: var(--mt-navy-800);
    color: #fff;
}

.mes-taches .mt-btn-new {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    font-size: 0.84375rem;
    font-weight: 700;
    color: #fff;
    background: var(--mt-green-600);
    border: none;
    padding: 9px 16px;
    border-radius: 9px;
    cursor: pointer;
    transition: 0.15s;
    box-shadow: 0 1px 2px rgba(20, 80, 50, 0.2);
}

.mes-taches .mt-btn-new:hover {
    background: var(--mt-green-700);
}

.mes-taches .mt-btn-new svg {
    width: 15px;
    height: 15px;
}

.mes-taches .mt-fab {
    display: none;
}

.mes-taches .mt-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.mes-taches .mt-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.mes-taches .imp-normal {
    background: var(--mt-surface-2);
    color: var(--mt-muted);
    border-color: var(--mt-line);
}

.mes-taches .imp-important {
    background: var(--mt-amber-tint);
    color: var(--mt-amber-700);
    border-color: #f0dcb0;
}

.mes-taches .imp-prioritaire {
    background: var(--mt-red-tint);
    color: var(--mt-red-700);
    border-color: #f1cdc4;
}

.mes-taches .st-non_demarre {
    background: var(--mt-surface-2);
    color: var(--mt-muted);
}

.mes-taches .st-a_traiter {
    background: var(--mt-blue-tint);
    color: var(--mt-blue-700);
}

.mes-taches .st-en_cours {
    background: var(--mt-blue-tint);
    color: var(--mt-blue-700);
}

.mes-taches .st-en_attente {
    background: var(--mt-amber-tint);
    color: var(--mt-amber-700);
}

.mes-taches .st-en_pause {
    background: var(--mt-amber-tint);
    color: var(--mt-amber-700);
}

.mes-taches .st-termine {
    background: var(--mt-green-tint);
    color: var(--mt-green-700);
}

.mes-taches .st-abandonne {
    background: #eef1f4;
    color: var(--mt-faint);
}

.mes-taches .late-solid {
    background: var(--mt-red-600);
    color: #fff;
}

.mes-taches .mt-tag {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
}

.mes-taches .mt-tag--green {
    background: var(--mt-green-tint);
    color: var(--mt-green-700);
    border-color: #bfe4cf;
}

.mes-taches .mt-tag--blue {
    background: var(--mt-blue-tint);
    color: var(--mt-blue-700);
    border-color: #c5dbf6;
}

.mes-taches .mt-tag--amber {
    background: var(--mt-amber-tint);
    color: var(--mt-amber-700);
    border-color: #f0dcb0;
}

.mes-taches .mt-tag--violet {
    background: var(--mt-violet-tint);
    color: var(--mt-violet-700);
    border-color: #e2d5f7;
}

.mes-taches .mt-tag--libre {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
}

.mes-taches .mt-tag--compact {
    height: 16px;
    padding: 0 5px;
    font-size: 9px;
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mes-taches .mt-kcard-etiqs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin: 2px 0 4px;
    min-width: 0;
}

.mes-taches .mt-kcard-etiq-more {
    font-size: 10px;
    font-weight: 700;
    color: var(--mt-slate);
}

.mes-taches .mt-etiq-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mes-taches .mt-etiq-editor__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mt-slate);
}

.mes-taches .mt-etiq-editor__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.mes-taches .mt-etiq-editor__chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.mes-taches .mt-etiq-editor__rm {
    border: 0;
    background: transparent;
    color: var(--mt-slate);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
}

.mes-taches .mt-etiq-editor__empty {
    font-size: 12px;
    color: var(--mt-slate);
}

.mes-taches .mt-etiq-editor__add {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mes-taches .mt-etiq-editor__create {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.mes-taches .mt-etiq-editor__input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 13px;
}

.mes-taches .mt-etiq-editor__colors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mes-taches .mt-etiq-editor__swatch {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
}

.mes-taches .mt-etiq-editor__swatch.on {
    border-color: #1b2b4b;
    box-shadow: 0 0 0 1px #fff inset;
}

.mes-taches .mt-etiq-editor__type {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.mes-taches .mt-etiq-editor__create-actions {
    display: flex;
    gap: 8px;
}

.mes-taches .mt-etiq-opt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mes-taches .mt-etiq-opt__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.mes-taches .mt-ech-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-line);
    color: var(--mt-muted);
    white-space: nowrap;
}

.mes-taches .mt-ech-chip svg {
    width: 12px;
    height: 12px;
}

.mes-taches .mt-ech-chip.late {
    background: var(--mt-red-tint);
    border-color: #f1cdc4;
    color: var(--mt-red-700);
}

.mes-taches .mt-ech-done {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mt-green-700);
    white-space: nowrap;
}

.mes-taches .mt-ech-done svg {
    width: 13px;
    height: 13px;
}

.mes-taches .mt-counts {
    display: inline-flex;
    gap: 11px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mt-faint);
}

.mes-taches .mt-counts span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mes-taches .mt-counts svg {
    width: 13px;
    height: 13px;
}

.mes-taches .mt-checklist-count {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    color: #475569;
    flex-shrink: 0;
}

.mes-taches .mt-kcard-foot .mt-checklist-count {
    margin-left: 0.35rem;
}

.mes-taches .mt-checklist-count svg {
    width: 13px;
    height: 13px;
}

.mes-taches .mt-avs {
    display: inline-flex;
    align-items: center;
}

.mes-taches .mt-av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    border: 2px solid var(--mt-surface);
    margin-left: -7px;
}

.mes-taches .mt-av:first-child {
    margin-left: 0;
}

.mes-taches .mt-av.a {
    background: linear-gradient(135deg, #b5832c, var(--mt-gold-700));
}

.mes-taches .mt-av.b {
    background: linear-gradient(135deg, #3f6fb0, var(--mt-navy-800));
}

.mes-taches .mt-av.c {
    background: linear-gradient(135deg, #7b5bd1, var(--mt-violet-700));
}

.mes-taches .mt-av.more {
    background: var(--mt-surface-2);
    color: var(--mt-muted);
    border-color: var(--mt-line);
    font-size: 9px;
}

.mes-taches .mt-ghd {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 2px 12px;
}

.mes-taches .mt-ghd:first-child {
    margin-top: 4px;
}

.mes-taches .mt-ghd .gt {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--mt-muted);
}

.mes-taches .mt-ghd .gt.red {
    color: var(--mt-red-600);
}

.mes-taches .mt-ghd .gc {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--mt-muted);
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 20px;
    padding: 1px 9px;
}

.mes-taches .mt-ghd .gl {
    flex: 1;
    height: 1px;
    background: var(--mt-line);
}

.mes-taches .mt-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mes-taches .mt-card {
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: var(--mt-radius);
    box-shadow: var(--mt-shadow-card);
    display: flex;
    overflow: hidden;
    cursor: pointer;
    transition: 0.15s;
    max-width: none;
}

.mes-taches .mt-card:hover {
    border-color: var(--mt-slate);
    box-shadow: var(--mt-shadow-card);
    transform: translateY(-1px);
}

.mes-taches .mt-card:focus-visible {
    outline: 2px solid var(--mt-navy-700);
    outline-offset: 2px;
}

.mes-taches .mt-card.late {
    border-left: 3px solid var(--mt-red-600);
}

.mes-taches .mt-flag {
    width: 46px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 18px;
    gap: 8px;
    border-right: 1px solid var(--mt-line-soft);
}

.mes-taches .mt-flag .fi {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mes-taches .mt-flag .fi svg {
    width: 15px;
    height: 15px;
}

.mes-taches .mt-flag .fl {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mes-taches .mt-flag.prio {
    background: var(--mt-red-tint);
}

.mes-taches .mt-flag.prio .fi {
    background: var(--mt-red-600);
    color: #fff;
}

.mes-taches .mt-flag.prio .fl {
    color: var(--mt-red-700);
}

.mes-taches .mt-flag.imp {
    background: var(--mt-amber-tint);
}

.mes-taches .mt-flag.imp .fi {
    background: var(--mt-amber-500);
    color: #fff;
}

.mes-taches .mt-flag.imp .fl {
    color: var(--mt-amber-700);
}

.mes-taches .mt-flag.norm {
    background: var(--mt-surface-2);
}

.mes-taches .mt-flag.norm .fi {
    background: #e7ebf1;
    color: var(--mt-faint);
}

.mes-taches .mt-flag.norm .fl {
    color: var(--mt-faint);
}

.mes-taches .mt-flag.op {
    background: var(--mt-surface-2);
}

.mes-taches .mt-flag.op .fi {
    background: var(--mt-navy-800);
    color: #fff;
}

.mes-taches .mt-flag.op .fl {
    color: var(--mt-navy-700);
}

.mes-taches .mt-cbody {
    flex: 1;
    min-width: 0;
    padding: 15px 17px;
    display: flex;
    flex-direction: column;
}

/* Cartes suivi compactées (#1007) */
.mes-taches .mt-card.csuivi .mt-stripe {
    width: 4px;
    flex-shrink: 0;
    align-self: stretch;
}

.mes-taches .mt-card.csuivi .mt-stripe.prio {
    background: var(--mt-red-600);
}

.mes-taches .mt-card.csuivi .mt-stripe.imp {
    background: var(--mt-amber-500);
}

.mes-taches .mt-card.csuivi .mt-stripe.norm {
    background: var(--mt-slate);
}

.mes-taches .mt-card.csuivi .mt-cbody {
    padding: 11px 14px;
}

.mes-taches .mt-card.csuivi .mt-ctop {
    align-items: flex-start;
    gap: 8px;
}

.mes-taches .mt-card.csuivi .mt-ctitle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.mes-taches .mt-card.csuivi .mt-obj {
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mes-taches .mt-card.csuivi .mt-desc {
    margin-top: 4px;
    display: block;
    -webkit-line-clamp: unset;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mes-taches .mt-card.csuivi .mt-ctitle .mt-badge {
    font-size: 9.5px;
    padding: 2px 7px;
}

.mes-taches .mt-card.csuivi .mt-crow {
    margin-top: 6px;
}

.mes-taches .mt-card.csuivi .mt-cfoot {
    margin-top: 9px;
    padding-top: 0;
    border-top: none;
}

.mes-taches .mt-ctop {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.mes-taches .mt-obj {
    font-size: 15px;
    font-weight: 800;
    color: var(--mt-ink);
    line-height: 1.3;
}

.mes-taches .mt-card.done .mt-obj {
    color: var(--mt-muted);
    text-decoration: line-through;
    text-decoration-color: var(--mt-faint);
}

.mes-taches .mt-desc {
    font-size: 12.5px;
    color: var(--mt-muted);
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mes-taches .mt-opmeta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--mt-muted);
    font-weight: 600;
    margin-top: 6px;
}

.mes-taches .mt-opkind {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--mt-navy-700);
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-line);
    padding: 2px 7px;
    border-radius: 5px;
}

.mes-taches .mt-opsep {
    color: var(--mt-faint);
}

.mes-taches .mt-opref {
    margin-left: auto;
    font-size: 11px;
    color: var(--mt-faint);
    font-weight: 700;
}

.mes-taches .mt-crow {
    margin-top: 11px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.mes-taches .mt-cfoot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid var(--mt-line-soft);
}

.mes-taches .mt-who {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mes-taches .mt-people {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mes-taches .mt-avs--createur .mt-av,
.mes-taches .mt-kcard-avs--createur .mt-av {
    box-shadow: 0 0 0 1.5px var(--mt-navy-700, #1e3a5f);
    z-index: 1;
}

.mes-taches .mt-task-num {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--mt-muted, #64748b);
    flex-shrink: 0;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.mes-taches .mt-ctitle .mt-task-num {
    margin-right: 2px;
}

.mes-taches .mt-rl1 .mt-task-num {
    margin-right: 6px;
}

.mes-taches .mt-obj .mt-task-num {
    margin-right: 6px;
    font-weight: 600;
}

.mes-taches .mt-stpill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 11px;
    border-radius: 20px;
    color: #fff;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.mes-taches .mt-stpill .d {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}

.mes-taches .mt-stpill.st-en_cours {
    background: var(--mt-blue-500);
}

.mes-taches .mt-stpill.st-a_traiter {
    background: var(--mt-blue-700);
}

.mes-taches .mt-stpill.st-non_demarre {
    background: var(--mt-slate);
}

.mes-taches .mt-stpill.st-en_attente {
    background: var(--mt-amber-700);
}

.mes-taches .mt-stpill.st-en_pause {
    background: var(--mt-amber-500);
}

.mes-taches .mt-stpill.st-termine {
    background: var(--mt-green-600);
}

.mes-taches .mt-stpill.st-abandonne {
    background: #aab4c0;
}

.mes-taches .mt-stpill.st-op {
    background: var(--mt-navy-700);
}

.mes-taches .mt-prio {
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 7px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mes-taches .prio-haute {
    background: var(--mt-amber-tint);
    color: var(--mt-amber-700);
}

.mes-taches .prio-urgent {
    background: var(--mt-red-tint);
    color: var(--mt-red-700);
}

.mes-taches .prio-normal {
    background: var(--mt-surface-2);
    color: var(--mt-muted);
    border: 1px solid var(--mt-line);
}

.mes-taches .prio-basse {
    background: var(--mt-surface-2);
    color: var(--mt-faint);
}

.mes-taches .mt-card.cop.compact {
    max-width: none;
}

.mes-taches .mt-card.cop.compact .mt-flag {
    width: 38px;
    padding-top: 10px;
    gap: 4px;
}

.mes-taches .mt-card.cop.compact .mt-flag .fi {
    width: 22px;
    height: 22px;
}

.mes-taches .mt-card.cop.compact .mt-flag .fl {
    font-size: 8px;
    letter-spacing: 0.6px;
}

.mes-taches .mt-card.cop.compact .mt-cbody {
    padding: 10px 12px 8px;
}

.mes-taches .mt-card.cop.compact .mt-obj {
    font-size: 14px;
    line-height: 1.25;
}

.mes-taches .mt-card.cop.compact .mt-opmeta.compact {
    margin-top: 4px;
    font-size: 11.5px;
    gap: 5px;
}

.mes-taches .mt-card.cop.compact .mt-cfoot.compact {
    margin-top: 8px;
    padding-top: 8px;
}

.mes-taches .mt-prio-inline {
    display: inline-flex;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-left: auto;
}

.mes-taches .mt-attrib {
    font-size: 11px;
    color: var(--mt-faint);
    font-weight: 600;
    white-space: nowrap;
}

.mes-taches .mt-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mes-taches .mt-row {
    display: flex;
    align-items: center;
    gap: 13px;
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 11px;
    padding: 12px 16px;
    box-shadow: var(--mt-shadow-card);
    cursor: pointer;
    transition: 0.15s;
}

.mes-taches .mt-row:hover {
    border-color: #c9d6e6;
}

.mes-taches .mt-row:focus-visible {
    outline: 2px solid var(--mt-navy-700);
    outline-offset: 2px;
}

.mes-taches .mt-row.late {
    border-left: 3px solid var(--mt-red-600);
}

.mes-taches .mt-ptick {
    width: 3px;
    height: 28px;
    border-radius: 3px;
    background: var(--mt-red-600);
    flex-shrink: 0;
    margin: -2px 0;
}

.mes-taches .mt-sdot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.03);
}

.mes-taches .mt-sdot.st-en_cours {
    background: var(--mt-blue-500);
}

.mes-taches .mt-sdot.st-a_traiter {
    background: var(--mt-blue-700);
}

.mes-taches .mt-sdot.st-non_demarre {
    background: var(--mt-slate);
}

.mes-taches .mt-sdot.st-en_attente {
    background: var(--mt-amber-700);
}

.mes-taches .mt-sdot.st-en_pause {
    background: var(--mt-amber-500);
}

.mes-taches .mt-sdot.st-termine {
    background: var(--mt-green-600);
}

.mes-taches .mt-sdot.st-abandonne {
    background: #aab4c0;
}

.mes-taches .mt-sdot.st-op {
    background: var(--mt-navy-700);
}

.mes-taches .mt-rmid {
    flex: 1;
    min-width: 0;
}

.mes-taches .mt-rl1 {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.mes-taches .mt-rl1 .mt-obj {
    font-size: 14px;
}

.mes-taches .mt-rl2 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.mes-taches .mt-meta {
    font-size: 12px;
    color: var(--mt-muted);
    font-weight: 600;
}

.mes-taches .mt-meta b {
    color: var(--mt-text);
    font-weight: 700;
}

.mes-taches .mt-rright {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.mes-taches .mt-rech {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mt-muted);
    min-width: 78px;
    justify-content: flex-end;
    white-space: nowrap;
}

.mes-taches .mt-rech svg {
    width: 13px;
    height: 13px;
}

.mes-taches .mt-rech.late {
    color: var(--mt-red-600);
}

.mes-taches .mt-rech.done {
    color: var(--mt-green-700);
}

.mes-taches .nat-op {
    background: var(--mt-surface-2);
    color: var(--mt-muted);
    border-color: var(--mt-line);
}

.mes-taches .mt-empty {
    background: var(--mt-surface);
    border: 1px dashed var(--mt-line);
    border-radius: 14px;
    padding: 44px;
    text-align: center;
    color: var(--mt-muted);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mes-taches .mt-empty svg {
    width: 34px;
    height: 34px;
    color: var(--mt-faint);
}

.mes-taches .mt-pagination {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.mes-taches .mt-pagination a,
.mes-taches .mt-pagination span {
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.mes-taches .mt-pagination a {
    background: var(--mt-surface);
    color: var(--mt-text);
    border: 1px solid var(--mt-line);
}

.mes-taches .mt-pagination a:hover {
    background: var(--mt-surface-2);
}

.mes-taches .mt-pagination a.active {
    background: var(--mt-navy-800);
    color: #fff;
    border-color: var(--mt-navy-800);
}

.mes-taches .mt-pagination span.disabled {
    color: var(--mt-faint);
}

/* Modales */
.mt-modal-sheet .p-dialog {
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    border-radius: 16px;
    overflow: hidden;
}

.mt-modal-sheet .p-dialog-header {
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--mt-line-soft);
}

.mt-modal-sheet .p-dialog-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--mt-ink);
    line-height: 1.3;
}

.mt-modal-sheet .p-dialog-content {
    padding: 18px 24px 22px;
    max-height: min(70vh, 640px);
    overflow-y: auto;
}

.mt-modal-sheet .p-dialog-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--mt-line-soft);
    background: var(--mt-surface-2);
}

/* #1057 / #1060 — deux colonnes + gouttière rail (plus de débordement hors cadre) */
.mt-modal-sheet.mt-modal-detail .p-dialog-content {
    max-height: min(78vh, 720px);
    overflow-x: hidden;
    overflow-y: auto;
}

.mt-modal-layout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--mt-text);
}

.mt-modal-layout__body {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
}

.mt-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 20px 24px;
    align-items: start;
}

.mt-modal-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.mt-modal-badges--compact {
    margin-bottom: 12px;
}

.mt-section-label {
    margin: 0 0 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.45px;
    text-transform: uppercase;
    color: var(--mt-faint);
}

.mt-modal-block {
    min-width: 0;
}

.mt-modal-link {
    margin: -6px 0 0;
    font-size: 13px;
    word-break: break-all;
}

.mt-modal-link a {
    color: var(--mt-blue-700);
    font-weight: 600;
}

.mt-meta-band {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-line-soft);
    border-radius: 10px;
}

.mt-meta-band__item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}

.mt-meta-band__k {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    color: var(--mt-faint);
    flex-shrink: 0;
}

.mt-meta-band__v {
    font-size: 13px;
    font-weight: 600;
    color: var(--mt-text);
    text-align: right;
}

.mt-meta-band__v.red {
    color: var(--mt-red-600);
}

.mt-modal-actionbar--side {
    flex-direction: column;
    align-items: stretch;
}

.mt-modal-actionbar__statut {
    width: 100%;
}

.mt-modal-actionbar__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mt-modal-cmt-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mt-modal-cmt--empty {
    color: var(--mt-faint);
}

.mt-modal-disc-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--mt-blue-700);
    font-size: 13px;
    font-weight: 600;
}

.mt-modal-comment-compose {
    margin-top: 12px;
}

.mt-modal-footer {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mt-modal-footer__left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* #1060 — rail en gouttière interne sticky (évite overflow-x:visible impossible) */
.mt-etiq-rail {
    order: 2;
    position: sticky;
    top: 0;
    flex: 0 0 auto;
    align-self: flex-start;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: max-content;
    max-width: 8.75rem;
    max-height: min(70vh, 640px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 4px;
    margin-right: -6px;
}

.mt-etiq-band {
    display: block;
    width: max-content;
    max-width: 8.75rem;
    min-width: 3.25rem;
    box-sizing: border-box;
    padding: 7px 10px;
    border-radius: 8px 0 0 8px;
    border: 1px solid transparent;
    border-right: none;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    box-shadow: 0 1px 2px rgba(20, 40, 70, 0.08);
    cursor: default;
}

.mt-etiq-band__label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mt-etiq-band.is-removable {
    cursor: pointer;
}

.mt-etiq-band.is-removable:hover:not(:disabled) {
    filter: brightness(0.96);
}

.mt-etiq-band.is-locked {
    cursor: default;
}

.mt-etiq-band.is-locked:hover {
    filter: none;
}

.mt-etiq-band--add {
    background: var(--mt-surface);
    color: var(--mt-navy-700);
    border: 1px dashed var(--mt-line);
    border-right: none;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    min-width: 2.5rem;
    max-width: 2.5rem;
    width: 2.5rem;
    padding: 6px 0;
    cursor: pointer;
}

.mt-etiq-band--add:hover:not(:disabled) {
    background: var(--mt-blue-tint);
    border-color: var(--mt-navy-700);
}

.mt-etiq-band:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 840px) {
    .mt-modal-layout {
        flex-direction: column;
        gap: 12px;
    }

    .mt-etiq-rail {
        order: -1;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
        max-width: none;
        width: 100%;
        margin-right: 0;
        overflow: visible;
    }

    .mt-etiq-band {
        border-radius: 8px;
        border: 1px solid transparent;
        max-width: 9rem;
    }

    .mt-etiq-band--add {
        border: 1px dashed var(--mt-line);
        border-right: 1px dashed var(--mt-line);
        max-width: 2.5rem;
        width: 2.5rem;
    }

    .mt-modal-grid {
        grid-template-columns: 1fr;
    }
}


.mt-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--mt-text);
}

.mt-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mt-modal-desc {
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.mt-modal-dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 22px;
    font-size: 14px;
}

.mt-modal-dl dt {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--mt-faint);
    margin-bottom: 3px;
}

.mt-modal-dl dd {
    color: var(--mt-text);
}

.mt-modal-dl dd .red {
    color: var(--mt-red-600);
    font-weight: 700;
}

.mt-modal-actionbar {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-line);
    border-radius: 11px;
    padding: 13px 15px;
    flex-wrap: wrap;
}

.mt-modal-actionbar label {
    display: block;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--mt-faint);
    margin-bottom: 5px;
}

.mt-modal-disc {
    border: 1px solid var(--mt-line-soft);
    border-radius: 11px;
    overflow: hidden;
}

.mt-modal-disc h4 {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--mt-muted);
    padding: 11px 14px;
    background: var(--mt-surface-2);
    border-bottom: 1px solid var(--mt-line-soft);
    margin: 0;
}

.mt-modal-cmt {
    display: flex;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--mt-line-soft);
    font-size: 13px;
}

.mt-modal-cmt:last-child {
    border-bottom: none;
}

.mt-modal-cmt.sys {
    font-style: italic;
    color: var(--mt-muted);
    background: var(--mt-surface-2);
}

.mt-modal-cmt .cmeta {
    font-size: 10.5px;
    color: var(--mt-faint);
    margin-top: 2px;
    font-weight: 600;
}

.mt-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mt-form-row.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mt-form-row label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--mt-faint);
}

.mt-form-inp {
    font-family: inherit;
    font-size: 14px;
    color: var(--mt-text);
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 9px;
    padding: 10px 12px;
    width: 100%;
}

.mt-pchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mt-navy-800);
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-line);
    border-radius: 20px;
    padding: 4px 6px 4px 10px;
}

.mt-pchip .rm {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--mt-line);
    color: var(--mt-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: none;
    cursor: pointer;
    padding: 0;
}

@media (max-width: 640px) {
    .mes-taches .mt-cards {
        grid-template-columns: 1fr;
    }

    .mes-taches .mt-card {
        max-width: none;
    }

    .mes-taches .mt-btn-new-desktop {
        display: none !important;
    }

    .mes-taches .mt-fab {
        display: flex;
        position: fixed;
        right: 22px;
        bottom: 22px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: var(--mt-green-600);
        color: #fff;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 20px rgba(20, 120, 70, 0.4);
        border: none;
        cursor: pointer;
        z-index: 40;
    }

    .mes-taches .mt-fab svg {
        width: 22px;
        height: 22px;
    }

    .mt-modal-sheet .p-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .mt-modal-dl {
        grid-template-columns: 1fr;
    }

    .mt-form-row.two {
        grid-template-columns: 1fr;
    }
}

/* ---- Mode Tableau / Kanban (#1007, layout Trello #1009) ---- */
.mes-taches.is-tableau {
    max-width: none;
}

.mes-taches .mt-board {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--mt-bg);
    padding: 18px 24px 24px;
    width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.mes-taches .mt-bcol {
    width: 280px;
    flex: 0 0 280px;
    box-sizing: border-box;
    background: var(--mt-line-soft);
    border: 1px solid var(--mt-line);
    border-radius: 12px;
    padding: 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mes-taches .mt-bcol-hd {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex-shrink: 0;
    padding: 2px 2px 4px;
}

.mes-taches .mt-bcol-dot {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    flex-shrink: 0;
    background: var(--mt-slate);
}

.mes-taches .mt-bcol.accent-late .mt-bcol-dot {
    background: var(--mt-red-600);
}

.mes-taches .mt-bcol.accent-week .mt-bcol-dot {
    background: var(--mt-amber-500);
}

.mes-taches .mt-bcol.accent-upcoming .mt-bcol-dot {
    background: var(--mt-blue-500);
}

.mes-taches .mt-bcol.accent-none .mt-bcol-dot {
    background: var(--mt-slate);
}

.mes-taches .mt-bcol-title {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--mt-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mes-taches .mt-bcol-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--mt-surface);
    font-size: 11px;
    font-weight: 700;
    color: var(--mt-muted);
    flex-shrink: 0;
}

.mes-taches .mt-bcol-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    padding-right: 2px;
}

.mes-taches .mt-bcol-add {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex-shrink: 0;
    margin-top: 0;
    padding: 6px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--mt-slate);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.mes-taches .mt-bcol-add:hover {
    background: var(--mt-surface);
    color: var(--mt-muted);
}

.mes-taches .mt-bcol-add:focus-visible {
    outline: 2px solid var(--mt-navy-700);
    outline-offset: 2px;
}

/* #1016 — terminées à la demande */
.mes-taches .mt-terminees-toggle {
    font-family: inherit;
    font-size: 0.78125rem;
    font-weight: 700;
    color: var(--mt-muted);
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 8px;
    padding: 7px 12px;
    cursor: pointer;
    transition: 0.15s;
}

.mes-taches .mt-terminees-toggle:hover {
    color: var(--mt-text);
    border-color: var(--mt-navy-700);
}

.mes-taches .mt-terminees-toggle.on {
    color: var(--mt-navy-700);
    background: var(--mt-blue-tint);
    border-color: var(--mt-navy-700);
}

/* #1070 — cases à cocher lisibles (remplace les boutons-bascule ambigus) */
.mes-taches .mt-check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78125rem;
    font-weight: 600;
    color: var(--mt-text);
    cursor: pointer;
    user-select: none;
    max-width: 16rem;
    line-height: 1.25;
}

.mes-taches .mt-bcol-terminees {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex-shrink: 0;
    margin-top: 2px;
    padding: 6px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--mt-faint);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.mes-taches .mt-bcol-terminees:hover {
    background: var(--mt-surface);
    color: var(--mt-muted);
}

.mes-taches .mt-kcard-terminee {
    opacity: 0.72;
}

/* #1028 — drag & drop vertical (wrapper autour de la carte) */
.mes-taches .mt-kcard-wrap {
    position: relative;
    flex-shrink: 0;
}

.mes-taches .mt-kcard-wrap.is-draggable {
    cursor: grab;
}

.mes-taches .mt-kcard-wrap.is-draggable:active {
    cursor: grabbing;
}

.mes-taches .mt-kcard-wrap.is-dragging {
    opacity: 0.55;
}

.mes-taches .mt-kcard-wrap.is-dragging .mt-kcard {
    box-shadow: 0 8px 20px rgba(27, 43, 75, 0.18);
    transform: scale(1.02);
}

.mes-taches .mt-kcard-wrap.is-drop-target::before {
    content: '';
    display: block;
    height: 3px;
    margin: 0 2px 6px;
    border-radius: 2px;
    background: var(--mt-navy-700, #1B2B4B);
}

.mes-taches .mt-kcard-wrap.is-drop-forbidden,
.mes-taches .mt-bcol-body.is-drop-forbidden {
    cursor: not-allowed;
}

.mes-taches .mt-kcard-drop-end {
    min-height: 12px;
    position: relative;
}

.mes-taches .mt-kcard-drop-end.is-drop-target::before {
    content: '';
    display: block;
    height: 3px;
    margin: 4px 2px;
    border-radius: 2px;
    background: var(--mt-navy-700, #1B2B4B);
}

.mes-taches .mt-drop-refuse-hint {
    margin: 0.35rem 0.25rem 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
    line-height: 1.3;
    color: #9B1C1C;
    background: #FEF2F2;
    border-radius: 6px;
}

.mes-taches .mt-kcard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}

.mes-taches .mt-aktor-mark {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    color: #7C3AED;
    font-size: 0.85rem;
    line-height: 1;
}

.mes-taches .mt-ctop-right {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.mes-taches .mt-rl1-aktor {
    margin-left: 0.35rem;
    color: #7C3AED;
    font-size: 0.85rem;
    vertical-align: middle;
}

.mes-taches .mt-kcard {
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 8px;
    padding: 8px 9px 7px;
    box-shadow: var(--mt-shadow-card);
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: 0.15s;
    flex-shrink: 0;
}

.mes-taches .mt-kcard:hover {
    box-shadow: var(--mt-shadow-card);
    transform: translateY(-1px);
    border-color: var(--mt-slate);
}

.mes-taches .mt-kcard:focus-visible {
    outline: 2px solid var(--mt-navy-700);
    outline-offset: 2px;
}

.mes-taches .mt-kcard.done .mt-kcard-obj {
    color: var(--mt-muted);
    text-decoration: line-through;
    text-decoration-color: var(--mt-faint);
}

.mes-taches .mt-kcard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.mes-taches .mt-kcard-tags .mt-tag {
    font-size: 9px;
    height: 16px;
    padding: 0 6px;
}

.mes-taches .mt-kcard-obj {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--mt-ink);
    line-height: 1.3;
    text-wrap: pretty;
}

.mes-taches .mt-kcard-desc {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.35;
    color: var(--mt-slate);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mes-taches .mt-kcard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 2px;
}

.mes-taches .mt-kcard-people {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mes-taches .mt-kcard-tags .mt-task-num {
    font-size: 9px;
    font-weight: 600;
    color: var(--mt-muted);
    margin-left: 2px;
}

.mes-taches .mt-kcard-ech {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    color: var(--mt-muted);
    min-width: 0;
}

.mes-taches .mt-kcard-ech.late {
    color: var(--mt-red-700);
}

.mes-taches .mt-kcard-ech svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.mes-taches .mt-kcard .mt-avs .mt-av {
    width: 18px;
    height: 18px;
    font-size: 8px;
    margin-left: -6px;
    border-width: 1.5px;
}

.mes-taches .mt-kcard .mt-avs .mt-av:first-child {
    margin-left: 0;
}


/* #1013/#1014 — Projets : bouton discret + contenu en modale (distinct de Programme) */
.mes-taches .mt-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mes-taches .mt-projets-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.84375rem;
    font-weight: 700;
    color: var(--mt-navy-700);
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 11px;
    padding: 8px 14px;
    cursor: pointer;
    transition: 0.15s;
}

.mes-taches .mt-projets-trigger:hover {
    border-color: var(--mt-navy-700);
    background: var(--mt-blue-tint);
}

.mes-taches .mt-projets-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mt-muted);
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-line);
    border-radius: 999px;
    padding: 1px 8px;
    font-variant-numeric: tabular-nums;
}

.mt-projets-dialog .mt-projets-body {
    padding: 0;
}

.mt-projets-dialog .mt-projets-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.mt-projets-dialog .mt-projets-toolbar .mt-projets-hint {
    margin: 0;
    flex: 1;
}

.mt-projets-dialog .mt-projets-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--mt-muted);
}

.mt-projets-dialog .mt-projets-error {
    margin: 0 0 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mt-red-700);
    background: var(--mt-red-tint);
    border: 1px solid #f1cdc4;
    border-radius: 8px;
    padding: 8px 10px;
}

.mt-projets-dialog .mt-projets-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mt-projets-dialog .mt-projets-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-line-soft);
    border-radius: 10px;
}

.mt-projets-dialog .mt-projets-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mt-projets-dialog .mt-projets-main {
    min-width: 0;
    flex: 1;
}

.mt-projets-dialog .mt-projets-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--mt-ink);
}

.mt-projets-dialog .mt-projets-desc {
    margin: 3px 0 0;
    font-size: 0.78125rem;
    color: var(--mt-muted);
    line-height: 1.35;
    white-space: pre-wrap;
}

.mt-projets-dialog .mt-projets-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.mt-projets-dialog .mt-projets-meta-item {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--mt-muted);
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 999px;
    padding: 2px 8px;
}

.mt-projets-dialog .mt-projets-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}

.mt-projets-dialog .mt-projets-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--mt-surface-2);
    border: 1px dashed var(--mt-line);
    border-radius: 10px;
}

.mt-projets-dialog .mt-projets-form.inline {
    margin: 0;
    width: 100%;
    border-style: solid;
}

.mt-projets-dialog .mt-projets-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mt-muted);
}

.mt-projets-dialog .mt-projets-field em {
    font-style: normal;
    font-weight: 500;
    color: var(--mt-faint);
}

.mt-projets-dialog .mt-projets-field input,
.mt-projets-dialog .mt-projets-field textarea {
    font-family: inherit;
    font-size: 0.84375rem;
    font-weight: 500;
    color: var(--mt-text);
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 8px;
    padding: 8px 10px;
    resize: vertical;
}

.mt-projets-dialog .mt-projets-field input:focus,
.mt-projets-dialog .mt-projets-field textarea:focus {
    outline: 2px solid var(--mt-navy-700);
    outline-offset: 1px;
}

.mt-projets-dialog .mt-projets-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.mt-projets-dialog .mt-projets-new {
    font-family: inherit;
    font-size: 0.78125rem;
    font-weight: 700;
    color: var(--mt-navy-700);
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.mt-projets-dialog .mt-projets-new:hover:not(:disabled) {
    border-color: var(--mt-navy-700);
    background: var(--mt-blue-tint);
}

.mt-projets-dialog .mt-projets-new:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mt-projets-dialog .mt-projets-btn {
    font-family: inherit;
    font-size: 0.78125rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    border: 1px solid var(--mt-line);
    background: var(--mt-surface);
    color: var(--mt-text);
}

.mt-projets-dialog .mt-projets-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mt-projets-dialog .mt-projets-btn.ghost:hover:not(:disabled) {
    background: var(--mt-line-soft);
}

.mt-projets-dialog .mt-projets-btn.ghost.on {
    background: var(--mt-blue-tint);
    border-color: var(--mt-navy-700);
    color: var(--mt-navy-700);
}

.mt-projets-dialog .mt-projets-membres-wrap {
    padding-top: 8px;
    border-top: 1px solid var(--mt-line-soft);
}

.mt-projets-membres {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mt-projets-membres-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mt-muted);
}

.mt-projets-membres-chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mt-projets-membres-empty {
    margin: 0;
    font-size: 0.78125rem;
    color: var(--mt-faint);
}

.mt-pchip-createur {
    padding-right: 8px;
}

.mt-pchip-role {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--mt-muted);
    background: var(--mt-surface);
    border: 1px solid var(--mt-line);
    border-radius: 999px;
    padding: 1px 6px;
}

.mt-projets-dialog .mt-projets-btn.primary {
    background: var(--mt-navy-800);
    border-color: var(--mt-navy-800);
    color: #fff;
}

.mt-projets-dialog .mt-projets-btn.primary:hover:not(:disabled) {
    background: var(--mt-navy-700);
}

.mt-projets-dialog .mt-projets-btn.danger {
    color: var(--mt-red-700);
    background: var(--mt-red-tint);
    border-color: #f1cdc4;
}

.mt-projets-dialog .mt-projets-btn.danger:hover:not(:disabled) {
    border-color: var(--mt-red-600);
}

@media (max-width: 640px) {
    .mt-projets-dialog .mt-projets-row-top {
        flex-direction: column;
        align-items: stretch;
    }

    .mt-projets-dialog .mt-projets-actions {
        justify-content: flex-end;
    }

    .mt-projets-dialog .mt-projets-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Mobile : colonnes 280px + scroll horizontal (Trello), pas d empilement etire */
@media (max-width: 780px) {
    .mes-taches .mt-board {
        padding: 12px 12px 20px;
        gap: 10px;
    }

    .mes-taches .mt-cards {
        grid-template-columns: 1fr;
    }
}