/* ==========================================================
   GANTT_CHART // Style principal
   ========================================================== */

@font-face {
    font-family: 'SKCuber';
    src: url('../fonts/SKCuber-ExpandedRounded.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Palette */
    --bg:           #E5E5E5;
    --bg-soft:      #EDEDED;
    --surface:      #FFFFFF;
    --surface-alt:  #F6F6F6;
    --border:       #1A1A1A;
    --border-soft:  #C8C8C8;
    --border-grid:  #D5D5D5;

    --ink:          #0A0A0A;
    --ink-soft:     #4A4A4A;
    --ink-muted:    #8A8A8A;

    --accent:       #FF5A1F;
    --accent-soft:  #FFE4D6;
    --accent-dark:  #D94912;

    --status-todo:     #B8B8B8;
    --status-progress: #FF5A1F;
    --status-done:     #16A34A;
    --status-blocked:  #DC2626;

    /* Typography */
    --font-display: 'SKCuber', 'Major Mono Display', 'JetBrains Mono', monospace;
    --font-mono:    'JetBrains Mono', 'Space Mono', monospace;

    /* Layout */
    --radius:    4px;
    --radius-lg: 14px;
    --gap:       16px;

    /* Gantt */
    --gantt-row-height: 44px;
    --gantt-col-width:  44px;
    --sidebar-width:    340px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Trame de fond technique */
body {
    background-image:
        linear-gradient(to right, rgba(0,0,0,.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,.03) 1px, transparent 1px);
    background-size: 80px 80px;
}

/* ============ CADRE DECORATIF ============ */
.frame-decoration {
    position: fixed;
    inset: 24px;
    pointer-events: none;
    z-index: 1;
}
.corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--ink);
}
.corner-tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.corner-tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.corner-bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.corner-br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* ============ SHELL ============ */
.app-shell {
    max-width: min(1800px, 96vw);
    margin: 0 auto;
    padding: 48px 56px 64px;
    position: relative;
    z-index: 2;
}

/* La timeline prend tout l'espace dispo : on étire le wrapper au-delà du shell */
.app-shell > .gantt-wrapper {
    margin-left:  -32px;
    margin-right: -32px;
}

/* ============ TOPBAR ============ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
    width: 38px;
    height: 38px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    gap: 4px;
}
.logo-dot {
    width: 5px; height: 5px;
    background: var(--ink);
    border-radius: 50%;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
}
.logo-sub {
    font-family: var(--font-display);
    font-size: 16px;
    margin-top: 2px;
    letter-spacing: 1px;
}

.active-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-alt);
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    padding: 8px 14px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    transition: background .15s, transform .15s, box-shadow .15s;
}
.active-project:hover { background: var(--ink); color: var(--surface); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--accent); }
.active-project .ap-icon { font-size: 14px; }
.active-project .ap-name { letter-spacing: .5px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-project .ap-caret { color: var(--ink-muted); font-size: 10px; }
.active-project:hover .ap-caret { color: var(--surface); }

.nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-link {
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color .2s;
    position: relative;
}
.nav-link:hover { color: var(--accent); }
.bracket { color: var(--ink-muted); font-weight: 400; }

/* ============ BUTTONS ============ */
.btn {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 18px;
    border: 2px solid var(--ink);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    border-radius: var(--radius);
    transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(0, 0); box-shadow: 1px 1px 0 var(--ink); }

.btn-primary { background: var(--accent); border-color: var(--ink); color: var(--ink); }
.btn-primary:hover { background: var(--accent-dark); color: var(--surface); }

.btn-outline { background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--surface); }

.btn-ghost { border-color: transparent; background: var(--surface-alt); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-danger:hover { background: var(--status-blocked); color: var(--surface); border-color: var(--status-blocked); }

/* ============ HERO ============ */
.hero { margin-bottom: 36px; }
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 88px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -1px;
    color: var(--ink);
    margin-bottom: 20px;
    user-select: none;
}

.hero-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: end;
    border-top: 1px solid var(--border-soft);
    padding-top: 22px;
}

.hero-block { display: flex; align-items: flex-start; gap: 12px; }
.hero-square { width: 8px; height: 8px; background: var(--ink); margin-top: 4px; flex-shrink: 0; }
.hero-label { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, auto));
    gap: 36px;
}
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
}
.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink-muted);
}

/* ============ TOOLBAR ============ */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.filter-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    padding: 8px 14px;
    background: var(--surface);
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .2s;
}
.chip:hover { background: var(--ink); color: var(--surface); }
.chip:hover .chip-dot { box-shadow: 0 0 0 2px var(--surface); }
.chip-active {
    background: var(--ink) !important;
    color: var(--surface) !important;
}
.chip-dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block;
}
.chip-del {
    margin-left: 4px;
    width: 16px;
    height: 16px;
    line-height: 14px;
    text-align: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    background: transparent;
    color: inherit;
    opacity: 0;
    transition: opacity .15s, background .15s, color .15s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chip:hover .chip-del { opacity: .85; }
.chip-del:hover {
    background: var(--status-blocked);
    color: var(--surface);
    opacity: 1;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    padding: 7px 12px;
}
.search-icon { color: var(--ink-muted); font-size: 14px; }
.search-box input {
    border: 0;
    outline: 0;
    font-family: var(--font-mono);
    font-size: 12px;
    width: 180px;
    background: transparent;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface);
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    padding: 4px 4px 4px 12px;
}
.zoom-label {
    font-size: 10px;
    color: var(--ink-muted);
    margin-right: 6px;
    letter-spacing: 1px;
}
.zoom-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    border-radius: 2px;
}
.zoom-btn:hover { background: var(--bg); }
.zoom-active { background: var(--ink) !important; color: var(--surface) !important; }

/* ============ GANTT META ============ */
.gantt-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}
.gantt-meta-block { display: flex; align-items: center; gap: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.meta-square { width: 8px; height: 8px; background: var(--ink); }

.gantt-legend { display: flex; gap: 18px; }
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ink-soft);
}
.legend-bar {
    display: inline-block;
    width: 22px;
    height: 8px;
    border-radius: 2px;
}
.legend-todo     { background: var(--status-todo); }
.legend-progress { background: var(--status-progress); }
.legend-done     { background: var(--status-done); }
.legend-blocked  { background: var(--status-blocked); }

/* ============ CTA STRIP ============ */
.cta-strip {
    margin-top: 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
    gap: 16px;
}
.cta-left { display: flex; align-items: center; gap: 14px; }
.cta-square { width: 12px; height: 12px; background: var(--ink); }
.cta-text {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.cta-highlight {
    background: var(--ink);
    color: var(--surface);
    padding: 3px 8px;
    border-radius: 2px;
}
.cta-right { display: flex; gap: 10px; }

/* ============ MODAL ============ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, .55);
    backdrop-filter: blur(4px);
}
.modal-card {
    position: relative;
    width: min(560px, 92vw);
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius-lg);
    padding: 28px;
    z-index: 1;
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { transform: translateY(8px) scale(.98); opacity: 0; }
    to   { transform: translateY(0) scale(1);     opacity: 1; }
}
.modal-corners { position: absolute; inset: 8px; pointer-events: none; }
.m-corner { position: absolute; width: 12px; height: 12px; border: 1.5px solid var(--ink); }
.m-tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.m-tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.m-bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.m-br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}
.modal-header h3 {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
}
.modal-close {
    background: transparent;
    border: 0;
    font-size: 18px;
    cursor: pointer;
    color: var(--ink);
    padding: 4px 8px;
}
.modal-close:hover { color: var(--accent); }

.modal-form { display: flex; flex-direction: column; gap: 16px; }
.form-row, .form-grid label, .form-row label { display: flex; flex-direction: column; gap: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row label > span,
.form-grid label > span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink-muted);
    font-weight: 600;
}
.modal-form input,
.modal-form select,
.modal-form textarea {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 10px 12px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.modal-form textarea { resize: vertical; min-height: 60px; }
.modal-form input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}
.modal-actions .btn-danger { margin-right: auto; }

.modal-card-wide { width: min(680px, 94vw); }

.modal-hint {
    font-size: 11px;
    color: var(--ink-muted);
    line-height: 1.5;
    background: var(--surface-alt);
    padding: 10px 12px;
    border-left: 3px solid var(--accent);
    border-radius: 2px;
}

/* ============ LISTE DES PROJETS ============ */
.workspace-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 440px;
    overflow-y: auto;
    padding: 4px;
}
.workspace-empty {
    text-align: center;
    color: var(--ink-muted);
    padding: 40px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.workspace-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--surface);
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s, transform .15s, box-shadow .15s;
    gap: 12px;
}
.workspace-item:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.workspace-item.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.ws-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.ws-icon { font-size: 22px; flex-shrink: 0; }
.ws-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ws-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ws-sub {
    font-size: 10px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ws-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.ws-icon-btn {
    width: 28px;
    height: 28px;
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1;
    transition: background .15s, color .15s, border-color .15s;
}
.ws-icon-btn:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.ws-icon-btn.ws-del:hover { background: var(--status-blocked); border-color: var(--status-blocked); }
.ws-active-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: var(--accent);
    color: var(--ink);
    padding: 4px 10px;
    border-radius: 10px;
    border: 1.5px solid var(--ink);
}

.form-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 6px;
}

/* Heures par jour de semaine */
.workhours-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.workhour-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--surface-alt);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
}
.workhour-cell > span:first-child {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink-muted);
    font-weight: 700;
}
.workhour-cell input[type="number"] {
    width: 100%;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    padding: 6px 4px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    background: var(--surface);
}
.workhour-cell .unit {
    font-size: 10px;
    color: var(--ink-muted);
    font-weight: 600;
}

/* Liste des jours de congé */
.holidays-add {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.holidays-add input[type="date"] {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 12px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
}
.holidays-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--surface-alt);
}
.holidays-empty {
    padding: 18px;
    text-align: center;
    font-size: 11px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.holiday-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 12px;
    color: var(--ink);
}
.holiday-item:last-child { border-bottom: 0; }
.holiday-date::first-letter { text-transform: uppercase; }
.holiday-del {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1.5px solid transparent;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    border-radius: 4px;
    transition: background .15s, color .15s, border-color .15s;
}
.holiday-del:hover {
    background: var(--status-blocked);
    color: var(--surface);
    border-color: var(--status-blocked);
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--ink);
    color: var(--surface);
    padding: 14px 20px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 200;
    transform: translateY(120%);
    transition: transform .3s ease;
    box-shadow: 4px 4px 0 var(--accent);
}
.toast.show { transform: translateY(0); }
.toast.error { background: var(--status-blocked); box-shadow: 4px 4px 0 var(--ink); }
.toast.success { box-shadow: 4px 4px 0 var(--accent); }

/* ============ TABLEAU DES TÂCHES ============ */
.task-table-section {
    margin-top: 36px;
}
.task-table-section .gantt-meta { margin-bottom: 12px; }

.task-table-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ts-pill {
    background: var(--surface);
    border: 1.5px solid var(--ink);
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ink);
}
.ts-pill.ts-done { background: var(--status-done); color: var(--surface); border-color: var(--status-done); }
.ts-pill.ts-blocked { background: var(--status-blocked); color: var(--surface); border-color: var(--status-blocked); }
.ts-pill.ts-critical { background: var(--ink); color: var(--accent); border-color: var(--ink); }

.task-table-wrap {
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius-lg);
    overflow: auto;
    max-height: 60vh;
}
.app-shell > .task-table-section .task-table-wrap {
    /* Étend pour matcher la timeline élargie */
    margin-left: -32px;
    margin-right: -32px;
}

.task-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--font-mono);
}
.task-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--ink);
    color: var(--surface);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid var(--ink);
    white-space: nowrap;
    transition: background .15s;
}
.task-table thead th:hover { background: #2a2a2a; }
.task-table thead th.th-actions { cursor: default; }
.task-table thead th.th-actions:hover { background: var(--ink); }

/* Indicateur de tri actif */
.task-table thead th.sort-active { color: var(--accent); }
.task-table thead th.sort-active::after {
    content: ' ▾';
    font-size: 9px;
    color: var(--accent);
}
.task-table thead th.sort-active.sort-asc::after { content: ' ▴'; }

.task-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-grid);
    font-size: 12px;
    color: var(--ink);
    vertical-align: middle;
    white-space: nowrap;
}
.task-table tbody tr {
    cursor: pointer;
    transition: background .15s;
}
.task-table tbody tr:hover { background: var(--bg-soft); }
.task-table tbody tr:hover .td-name { color: var(--accent); }
.task-table tbody tr:last-child td { border-bottom: 0; }

.td-project { display: flex; align-items: center; gap: 8px; }
.project-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--ink);
    flex-shrink: 0;
}
.td-name {
    font-weight: 600;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
}
.td-owner {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
}
.td-date { font-size: 11px; color: var(--ink-soft); }
.td-num {
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.td-unit {
    margin-left: 2px;
    font-size: 10px;
    font-weight: 500;
    color: var(--ink-muted);
}

.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1.5px solid var(--ink);
}
.pill-status.status-todo     { background: var(--surface);        color: var(--ink); }
.pill-status.status-progress { background: var(--accent);         color: var(--ink); border-color: var(--ink); }
.pill-status.status-done     { background: var(--status-done);    color: var(--surface); border-color: var(--status-done); }
.pill-status.status-blocked  { background: var(--status-blocked); color: var(--surface); border-color: var(--status-blocked); }

.pill-priority.priority-low      { background: var(--surface-alt); color: var(--ink-soft); border-color: var(--border-soft); }
.pill-priority.priority-medium   { background: #FEF3C7;            color: #92400E; border-color: #92400E; }
.pill-priority.priority-high     { background: var(--accent);      color: var(--ink); border-color: var(--ink); }
.pill-priority.priority-critical { background: var(--status-blocked); color: var(--surface); border-color: var(--status-blocked); }

.td-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}
.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    min-width: 80px;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width .3s ease;
}
.progress-num {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    min-width: 30px;
    text-align: right;
}

.td-actions { width: 36px; text-align: right; }
.row-del {
    width: 24px;
    height: 24px;
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transition: opacity .15s, background .15s, color .15s, border-color .15s;
}
.task-table tbody tr:hover .row-del { opacity: 1; }
.row-del:hover {
    background: var(--status-blocked);
    color: var(--surface);
    border-color: var(--status-blocked);
}

.task-table-empty {
    text-align: center;
    padding: 40px;
    color: var(--ink-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Date + sélecteur AM/PM côte à côte */
.date-half-input {
    display: flex;
    gap: 6px;
}
.date-half-input input[type="date"] {
    flex: 1;
    min-width: 0;
}
.date-half-input select {
    width: 110px;
    flex-shrink: 0;
}
@media (max-width: 700px) {
    .form-grid-3 { grid-template-columns: 1fr; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .app-shell { padding: 30px 18px; }
    .frame-decoration { inset: 12px; }
    .topbar { flex-direction: column; gap: 14px; align-items: flex-start; }
    .nav { flex-wrap: wrap; gap: 14px; }
    .hero-title { font-size: 64px; letter-spacing: -1px; }
    .hero-meta { grid-template-columns: 1fr; gap: 18px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-left, .toolbar-right { justify-content: space-between; }
    .form-grid { grid-template-columns: 1fr; }
    .cta-strip { flex-direction: column; align-items: flex-start; }
}
