/* ==========================================================================
   CT Concept · Suivi des demandes
   ========================================================================== */

:root {
    --bg: #f5f3ee;
    --surface: #ffffff;
    --surface-2: #faf9f6;
    --ink: #14151a;
    --ink-2: #3d3f48;
    --muted: #7d7f88;
    --line: #e7e4dc;
    --line-strong: #d6d2c7;

    --accent: #ff5a36;
    --accent-dark: #e8441f;
    --accent-soft: #fff0eb;

    --new: #3a6df0;      --new-soft: #eaf0ff;
    --progress: #e69a12; --progress-soft: #fff5e0;
    --waiting: #8b5cf6;  --waiting-soft: #f3eeff;
    --done: #1f9d6b;     --done-soft: #e5f6ee;

    --urgent: #e5383b;   --urgent-soft: #fdeaea;
    --high: #f07a1a;     --high-soft: #fff0e3;
    --normal: #5b6478;   --normal-soft: #eef0f4;
    --low: #9aa0ab;      --low-soft: #f3f4f6;

    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(20, 21, 26, .05);
    --shadow: 0 1px 2px rgba(20, 21, 26, .04), 0 6px 20px -8px rgba(20, 21, 26, .12);
    --shadow-lg: 0 2px 4px rgba(20, 21, 26, .04), 0 24px 48px -16px rgba(20, 21, 26, .22);

    --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font: 15px/1.55 var(--font);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Conteneur posé par les mises en page Blazor (le pied de page reste en bas) */
.app { min-height: 100vh; display: flex; flex-direction: column; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
code { font: 13px ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }

.muted { color: var(--muted); }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 24px; }
.page { flex: 1; padding-top: 32px; padding-bottom: 48px; }
.stack { display: grid; gap: 20px; align-content: start; }

.eyebrow {
    font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 6px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
    position: relative; display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 11px;
    background: var(--ink); color: #fff;
    font: 800 15px/1 var(--font-display); letter-spacing: -.03em;
}
.brand-mark::after {
    content: ""; position: absolute; top: -3px; right: -3px;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--accent); border: 2px solid var(--bg);
}
.brand-text { display: grid; line-height: 1.1; }
.brand-text strong { font: 700 16px var(--font-display); letter-spacing: -.02em; }
.brand-text small { font-size: 12px; color: var(--muted); }

.area-admin .topbar .brand-mark { background: #fff; color: var(--ink); }
.area-admin .topbar .brand-mark::after { border-color: var(--ink); }
.area-admin .topbar .brand-text small { color: rgba(255, 255, 255, .55); }
.brand-light .brand-mark { background: #fff; color: var(--ink); }
.brand-light .brand-mark::after { border-color: var(--ink); }
.brand-light .brand-text small { color: rgba(255, 255, 255, .55); }

/* ---------- Barre du haut ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.area-admin .topbar { background: var(--ink); color: #fff; border-bottom: 0; }
.topbar-inner { display: flex; align-items: center; gap: 32px; height: 66px; }

.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a {
    text-decoration: none; font-weight: 500; font-size: 14px;
    padding: 8px 14px; border-radius: 999px; color: var(--ink-2);
    transition: background .15s, color .15s;
}
.mainnav a:hover { background: var(--surface-2); color: var(--ink); }
.mainnav a.active { background: var(--ink); color: #fff; }
.area-admin .mainnav a { color: rgba(255, 255, 255, .7); }
.area-admin .mainnav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.area-admin .mainnav a.active { background: rgba(255, 255, 255, .14); color: #fff; }

.who { display: flex; align-items: center; gap: 12px; }
.who form { margin: 0; }
.who-name { font-size: 14px; font-weight: 500; }
.project-pill {
    font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent-dark);
    max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.area-admin .who .btn-ghost { color: rgba(255, 255, 255, .75); border-color: rgba(255, 255, 255, .18); }
.area-admin .who .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.avatar {
    display: inline-grid; place-items: center; flex: none;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--normal-soft); color: var(--ink-2);
    font: 700 13px var(--font-display);
}
.avatar-team, .area-admin .who .avatar { background: var(--accent); color: #fff; }

.footer { padding: 24px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- Boutons ---------- */
.btn, .btn-ghost, .btn-danger {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer;
    padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
    transition: background .15s, transform .1s, box-shadow .15s, color .15s;
    white-space: nowrap;
}
.btn { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn:hover { background: #000; box-shadow: 0 4px 14px -4px rgba(20, 21, 26, .4); }
.btn:active, .btn-ghost:active, .btn-danger:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-danger { background: transparent; color: var(--urgent); border-color: #f3c4c5; }
.btn-danger:hover { background: var(--urgent); color: #fff; border-color: var(--urgent); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.landing .btn, .auth-card .btn { background: var(--accent); }
.landing .btn:hover, .auth-card .btn:hover { background: var(--accent-dark); box-shadow: 0 6px 18px -6px rgba(255, 90, 54, .6); }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > span:first-child, .field legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.field legend { margin-bottom: 8px; }

input:not([type=checkbox]):not([type=radio]), select, textarea {
    width: 100%; font: 15px/1.4 var(--font); color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 96px; }
select { appearance: none; padding-right: 36px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237d7f88' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(20, 21, 26, .08); }
::placeholder { color: #b0b2b9; }

.field-error { color: var(--urgent); font-size: 13px; }
.field-error:empty { display: none; }
.field-error ul { margin: 0 0 12px; padding-left: 18px; }
.input-validation-error { border-color: var(--urgent) !important; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--ink); }

.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }

/* Choix de l'urgence */
.prio-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.prio-option { position: relative; cursor: pointer; }
.prio-option input { position: absolute; opacity: 0; pointer-events: none; }
.prio-card {
    display: grid; gap: 2px; height: 100%;
    padding: 13px 14px 13px 30px; border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong); background: var(--surface);
    transition: border-color .15s, background .15s, box-shadow .15s;
    position: relative;
}
.prio-card::before {
    content: ""; position: absolute; left: 12px; top: 17px;
    width: 9px; height: 9px; border-radius: 50%; background: var(--c);
}
.prio-card strong { font-size: 14px; }
.prio-card small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.prio-option:hover .prio-card { border-color: var(--c); }
.prio-option input:checked + .prio-card { border-color: var(--c); background: var(--c-soft); box-shadow: 0 0 0 1px var(--c) inset; }
.prio-option input:focus-visible + .prio-card { box-shadow: 0 0 0 4px rgba(20, 21, 26, .1); }

/* ---------- Badges / statuts ---------- */
.pr-low     { --c: var(--low);     --c-soft: var(--low-soft); }
.pr-normal  { --c: var(--normal);  --c-soft: var(--normal-soft); }
.pr-high    { --c: var(--high);    --c-soft: var(--high-soft); }
.pr-urgent  { --c: var(--urgent);  --c-soft: var(--urgent-soft); }
.st-new      { --s: var(--new);      --s-soft: var(--new-soft); }
.st-progress { --s: var(--progress); --s-soft: var(--progress-soft); }
.st-waiting  { --s: var(--waiting);  --s-soft: var(--waiting-soft); }
.st-done     { --s: var(--done);     --s-soft: var(--done-soft); }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font: 600 12px/1 var(--font); padding: 5px 9px; border-radius: 999px;
    background: var(--c-soft); color: var(--c); text-transform: none; letter-spacing: 0;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pr-urgent.badge { background: var(--urgent); color: #fff; }

.status {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    font: 600 13px/1 var(--font); padding: 7px 12px; border-radius: 999px;
    background: var(--s-soft); color: var(--s);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-lg { font-size: 14px; padding: 10px 16px; }

.tag {
    font: 600 11px/1 var(--font); padding: 4px 8px; border-radius: 6px;
    background: var(--normal-soft); color: var(--ink-2); vertical-align: middle;
}
.tag-internal { background: #fff6d6; color: #8a6400; }

/* ---------- Flash / callout ---------- */
.flash {
    padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; font-weight: 500;
    transition: opacity .4s, transform .4s;
}
.flash-ok { background: var(--done-soft); color: #136b48; border: 1px solid #bfe7d4; }
.flash-err { background: var(--urgent-soft); color: #a3191c; border: 1px solid #f5c2c3; }
.flash.is-hiding { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.callout { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 24px; font-weight: 500; }
.callout-waiting { background: var(--waiting-soft); color: #5b34c4; border: 1px solid #ddd0fd; }

/* ---------- Structure de page ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .muted { margin-top: 6px; }
.back { display: inline-block; margin-bottom: 16px; font-size: 14px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.panel-title { font-size: 15px; margin-bottom: 14px; }
.section-title { font-size: 15px; margin: 32px 0 14px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }

.split { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.detail-grid aside { display: grid; gap: 14px; position: sticky; top: 90px; }

.meta dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 18px 0 0; font-size: 14px; }
.meta form + dl, .meta .btn + dl { padding-top: 18px; border-top: 1px solid var(--line); }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; text-align: right; }
.danger-zone { text-align: center; }

.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); display: grid; gap: 10px; justify-items: center; }
.empty .btn { margin-top: 8px; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--done-soft); color: var(--done); font-size: 22px; font-weight: 700; }

/* ---------- Accueil client ---------- */
.is-bare { background: var(--bg); }
.landing { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.landing-hero {
    position: relative; overflow: hidden; color: #fff;
    background: var(--ink);
    padding: 40px clamp(28px, 5vw, 72px);
    display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.landing-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(160deg, transparent 20%, #000 90%);
}
.landing-hero::after {
    content: ""; position: absolute; width: 620px; height: 620px; right: -220px; bottom: -260px; pointer-events: none;
    background: radial-gradient(circle, rgba(255, 90, 54, .55), rgba(255, 90, 54, 0) 65%);
    filter: blur(10px);
}
.landing-hero > * { position: relative; z-index: 1; }
.hero-copy .eyebrow { color: var(--accent); }
.hero-copy h1 { font-size: clamp(40px, 5.4vw, 76px); line-height: .98; letter-spacing: -.04em; margin: 8px 0 22px; }
.hero-copy h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .85); }
.lead { font-size: 17px; max-width: 470px; color: rgba(255, 255, 255, .7); }
.hero-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-width: 470px; }
.hero-steps li {
    display: flex; align-items: center; gap: 16px; padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); font-size: 15px;
}
.hero-steps span { font: 700 13px var(--font-display); color: var(--accent); min-width: 22px; }

.landing-form { display: grid; place-items: center; padding: 40px 24px; }
.access-card { width: 100%; max-width: 420px; }
.access-card h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.access-card > .muted { margin-bottom: 28px; }
.code-input {
    font: 700 22px/1 ui-monospace, "Cascadia Code", Consolas, monospace !important;
    letter-spacing: .14em; text-align: center; padding: 18px 14px !important;
    text-transform: uppercase; border-width: 1.5px !important;
}
.access-card .btn { margin-top: 6px; }
.admin-link { display: block; text-align: center; margin-top: 26px; font-size: 13px; color: var(--muted); text-decoration: none; }
.admin-link:hover { color: var(--ink); }

/* ---------- Connexion admin ---------- */
.auth-screen {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background:
        radial-gradient(800px 400px at 85% 110%, rgba(255, 90, 54, .18), transparent 60%),
        radial-gradient(700px 400px at 0% -10%, rgba(58, 109, 240, .10), transparent 60%),
        var(--bg);
}
.auth-card { width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: var(--shadow-lg); }
.auth-card .brand { margin-bottom: 28px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 24px; }

/* ---------- Liste des demandes (client) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; display: grid; gap: 4px; position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--s); }
.stat-num { font: 800 32px/1 var(--font-display); letter-spacing: -.03em; }
.stat-label { font-size: 13px; color: var(--muted); }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a {
    text-decoration: none; padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center;
}
.tabs a span { font-size: 12px; background: var(--line); color: var(--ink-2); padding: 2px 7px; border-radius: 999px; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }

.ticket-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticket-row {
    display: grid; grid-template-columns: 54px 1fr auto auto; gap: 16px; align-items: center;
    padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ticket-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.ticket-id { font: 700 13px var(--font-display); color: var(--muted); }
.ticket-main { display: grid; gap: 3px; min-width: 0; }
.ticket-main strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-main small { color: var(--muted); font-size: 13px; }

/* ---------- Progression ---------- */
.progress { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(3, 1fr); }
.progress li { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.progress li::before {
    content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: var(--line);
    z-index: 0;
}
.progress li:first-child::before { display: none; }
.progress .dot { position: relative; z-index: 1; width: 21px; height: 21px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-strong); }
.progress li.done { color: var(--ink); }
.progress li.done::before { background: var(--done); }
.progress li.done .dot { border-color: var(--done); background: var(--done); box-shadow: 0 0 0 4px var(--done-soft); }
.progress li.current .dot { background: var(--surface); }
.progress li.done:last-child .dot { background: var(--done); }
.progress.is-waiting li.current { color: var(--waiting); }
.progress.is-waiting li.current .dot { border-color: var(--waiting); box-shadow: 0 0 0 4px var(--waiting-soft); }
.progress.is-waiting li.current::before { background: var(--waiting); }

/* ---------- Fil de discussion ---------- */
.thread { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; max-width: 88%; }
.msg.from-team { margin-left: auto; background: #fbfaf7; border-color: var(--line-strong); }
.msg.internal { background: #fffbea; border: 1px dashed #e9cf6b; }
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; font-size: 14px; }
.msg-head time { margin-left: auto; color: var(--muted); font-size: 12px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.event { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 2px 6px; }
.event strong { color: var(--ink-2); }
.event time { margin-left: auto; font-size: 12px; }
.event-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.reply { margin-top: 8px; }
.reply-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.reply-bar .check { margin-right: auto; }
.reply-bar select { width: auto; min-width: 220px; }

/* ---------- Pièces jointes ---------- */
.dropzone { position: relative; }
/* Le champ fichier couvre toute la zone : clic et dépôt de fichiers passent directement par lui */
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.dropzone:hover .dropzone-label { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within .dropzone-label { box-shadow: 0 0 0 4px rgba(20, 21, 26, .1); border-color: var(--ink); }
.dropzone-list li.muted { color: var(--muted); font-style: italic; }
.dropzone-label {
    display: grid; justify-items: center; gap: 4px; text-align: center; cursor: pointer;
    padding: 18px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface-2); font-size: 14px; color: var(--ink-2);
    transition: border-color .15s, background .15s;
}
.dropzone-label small { font-size: 12px; }
.dropzone-icon { font-size: 20px; }
.dropzone-label:hover, .dropzone.is-over .dropzone-label { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input:focus-visible + .dropzone-label { box-shadow: 0 0 0 4px rgba(20, 21, 26, .1); border-color: var(--ink); }
.dropzone.has-files .dropzone-label { padding: 12px 16px; }
.dropzone.has-files .dropzone-label small { display: none; }
.dropzone-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.dropzone-list:empty { display: none; }
.dropzone-list li {
    display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; font-size: 13px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.dropzone-remove {
    margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
    background: transparent; color: var(--muted); font-size: 18px; line-height: 1;
}
.dropzone-remove:hover { background: var(--urgent-soft); color: var(--urgent); }
.dropzone .field-error { margin-top: 6px; }

.attachments { display: grid; gap: 8px; margin-top: 14px; }
.att-images { display: flex; flex-wrap: wrap; gap: 8px; }
.att-thumb {
    display: block; width: 132px; height: 96px; border-radius: var(--radius-sm); overflow: hidden;
    border: 1px solid var(--line); background: var(--surface-2); transition: box-shadow .15s, transform .15s;
}
.att-thumb:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-file {
    display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 8px 12px 8px 8px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
    text-decoration: none; font-size: 13px; transition: border-color .15s;
}
.att-file:hover { border-color: var(--ink); }
.att-ext {
    flex: none; min-width: 40px; padding: 6px 4px; border-radius: 6px; text-align: center;
    background: var(--ink); color: #fff; font: 700 10px/1 var(--font); letter-spacing: .04em;
}
.att-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-size { flex: none; color: var(--muted); font-size: 12px; }

/* ---------- Tableau Kanban ---------- */
.head-kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13px; color: var(--muted); }
.kpi strong { color: var(--ink); font: 800 15px var(--font-display); margin-right: 3px; }
.kpi-urgent strong { color: var(--urgent); }
.kpi-reply strong { color: var(--accent); }

.filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filters input[type=search] { flex: 1; min-width: 220px; max-width: 380px; }
.filters select { width: auto; min-width: 180px; }

.board { display: grid; grid-template-columns: repeat(4, minmax(270px, 1fr)); gap: 16px; align-items: start; padding-bottom: 12px; }
.col {
    background: #ecebe5; border-radius: 16px; padding: 12px; min-height: 200px;
    transition: background .15s, box-shadow .15s;
}
.col.is-over { background: var(--s-soft); box-shadow: 0 0 0 2px var(--s) inset; }
.col-head { display: flex; align-items: center; gap: 9px; padding: 4px 6px 12px; }
.col-head h2 { font-size: 14px; flex: 1; }
.col-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--s); }
.col-count { font: 700 12px var(--font); background: var(--surface); color: var(--ink-2); padding: 3px 9px; border-radius: 999px; }
.col-body { display: grid; gap: 9px; min-height: 60px; }
.col-empty { display: none; text-align: center; font-size: 13px; color: var(--muted); padding: 22px 0; border: 1.5px dashed var(--line-strong); border-radius: 12px; }
.col.is-empty .col-empty { display: block; }
.col-more { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }

.card {
    display: grid; gap: 9px; padding: 13px 14px 12px; text-decoration: none;
    background: var(--surface); border-radius: 12px; border: 1px solid var(--line);
    box-shadow: var(--shadow-sm); cursor: grab; position: relative;
    transition: box-shadow .15s, transform .15s, opacity .15s;
}
.card::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.card.pr-low::before, .card.pr-normal::before { display: none; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card.is-dragging { opacity: .35; transform: rotate(1.5deg); }
.card.is-moved { animation: pop .6s ease; }
@keyframes pop { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 54, .5); } 100% { box-shadow: 0 0 0 10px rgba(255, 90, 54, 0); } }
.card-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.card-project { color: var(--accent-dark); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-id { color: var(--muted); font-weight: 600; }
.card-title { font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-meta { font-size: 12px; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-replies { font-size: 12px; color: var(--muted); }
.card-replies.is-waiting { color: #fff; background: var(--accent); padding: 2px 7px; border-radius: 999px; font-weight: 600; }
.st-done .card { opacity: .78; }
.st-done .card:hover { opacity: 1; }

/* ---------- Projets ---------- */
.code-reveal {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 24px 28px; margin-bottom: 28px; border-radius: var(--radius);
    background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
}
.code-reveal .eyebrow { color: var(--accent); }
.code-reveal .muted { color: rgba(255, 255, 255, .65); max-width: 560px; font-size: 14px; }
.code-reveal .btn { background: var(--accent); }
.code-big { font: 700 clamp(26px, 4vw, 38px)/1.1 ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .1em; margin: 4px 0 10px; }

.project-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.project { display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; }
.project.is-off { opacity: .6; }
.project-info { display: grid; gap: 6px; min-width: 0; flex: 1; }
.project-info h3 a { text-decoration: none; }
.project-info h3 a:hover { color: var(--accent-dark); }
.project-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.code-hint { font-family: ui-monospace, Consolas, monospace; color: var(--ink-2); }
.project-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.project-actions form { margin: 0; }

/* ---------- Tableau ---------- */
.table-panel { padding: 6px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 16px; }
.table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table td form { margin: 0; }
.table .avatar { margin-right: 8px; }

/* ---------- Barre d'outils du tableau ---------- */
.head-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .filters { margin-bottom: 0; flex: 1; }
.segmented { display: inline-flex; padding: 4px; gap: 2px; background: #e8e6df; border-radius: 999px; flex: none; }
.segmented a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.segmented a:hover { color: var(--ink); }
.segmented a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.nowrap { white-space: nowrap; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600;
    color: var(--ink-2); text-decoration: none; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-off { opacity: .55; text-decoration: line-through; }
.chip-count { background: var(--accent); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.chip-add { border-style: dashed; color: var(--muted); }

/* ---------- Vue liste ---------- */
.task-table th a { text-decoration: none; color: inherit; }
.task-table th a:hover { color: var(--ink); }
.task-row { cursor: pointer; transition: background .12s; }
.task-row:hover { background: var(--surface-2); }
.task-row.is-done td { opacity: .65; }
.task-row.is-selected { background: var(--accent-soft); }
.task-row.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.task-title { min-width: 240px; }
.task-title a { display: block; font-weight: 600; text-decoration: none; }
.task-title a:hover { color: var(--accent-dark); }
.task-title small { display: flex; gap: 6px; align-items: center; margin-top: 2px; font-size: 12px; }
.card.is-selected { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.card.is-internal { background: #fffdf4; }

/* ---------- Panneau latéral ---------- */
/* Pas de fond grisé : le tableau reste utilisable à gauche (cliquer une autre carte change de tâche) */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); z-index: 50; }
.drawer-panel {
    height: 100%; background: var(--bg); box-shadow: -24px 0 48px -12px rgba(20, 21, 26, .3);
    border-left: 1px solid var(--line); display: flex; flex-direction: column;
    animation: drawer-in .25s cubic-bezier(.2, .8, .2, 1);
}
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px 28px 40px; overscroll-behavior: contain; }
.drawer-loading { color: var(--muted); text-align: center; padding: 48px 0; }
.drawer .page-head { margin-bottom: 20px; }
.drawer .page-head h1 { font-size: 26px; }
.drawer .detail-grid { grid-template-columns: 1fr; }
.drawer .detail-grid aside { position: static; order: -1; }
.drawer .meta dl { grid-template-columns: auto 1fr auto 1fr; }

.icon-btn {
    width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%;
    border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.icon-btn:hover { background: var(--line); color: var(--ink); }

/* ---------- Couleurs des clients (--client défini par /Admin/client-colors.css) ---------- */
.client-dot {
    display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; vertical-align: middle;
    background: var(--client, var(--line-strong)); margin-right: 6px; position: relative; top: -1px;
}
.card.has-client { border-top: 3px solid var(--client, var(--line)); }
/* Une carte de client prend la couleur du client partout (nom du projet, sélection), légèrement
   assombrie pour rester lisible même avec du jaune ou du turquoise clair */
.card.has-client { --client-ink: color-mix(in srgb, var(--client) 78%, #14151a); }
.card.has-client .card-project { color: var(--client-ink); }
.card.has-client.is-selected { box-shadow: 0 0 0 2px var(--client), var(--shadow); }
.card.has-client:focus-visible { box-shadow: 0 0 0 2px var(--client-ink), var(--shadow); }
.task-row[class*="cl-"].is-selected { background: color-mix(in srgb, var(--client) 10%, var(--surface)); }
.task-row[class*="cl-"].is-selected td:first-child { box-shadow: inset 3px 0 0 var(--client); }

/* ---------- Tâches en retard ---------- */
:root { --late: #e8590c; --late-soft: #fff1e6; --very-late: #e5383b; --very-late-soft: #fdeaea; }
.card.is-late { border-color: var(--late); background: linear-gradient(var(--late-soft), var(--surface) 60%); }
.card.is-very-late {
    border-color: var(--very-late); border-width: 2px; background: linear-gradient(var(--very-late-soft), var(--surface) 60%);
    animation: late-pulse 2.2s ease-in-out infinite;
}
@keyframes late-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 56, 59, .45), var(--shadow-sm); }
    50% { box-shadow: 0 0 0 7px rgba(229, 56, 59, 0), var(--shadow-sm); }
}
@media (prefers-reduced-motion: reduce) { .card.is-very-late { animation: none; box-shadow: 0 0 0 3px rgba(229, 56, 59, .35); } }
.late-banner {
    display: flex; align-items: center; gap: 6px; margin: -13px -14px 0; padding: 6px 14px;
    border-radius: 10px 10px 0 0; background: var(--late); color: #fff; font: 700 12px var(--font); letter-spacing: .01em;
}
.late-banner.very { background: var(--very-late); }
.card.has-client .late-banner { border-radius: 0; }
.late-badge {
    display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; vertical-align: middle;
    background: var(--late); color: #fff; font: 700 11px var(--font);
}
.late-badge.very { background: var(--very-late); }
.task-row.is-late td:first-child { box-shadow: inset 4px 0 0 var(--late); }
.task-row.is-very-late { background: var(--very-late-soft); }
.task-row.is-very-late td:first-child { box-shadow: inset 4px 0 0 var(--very-late); }
.kpi-late { text-decoration: none; background: var(--late-soft); border-color: #f6c9a6; color: #a43f08; font-weight: 600; }
.kpi-late strong { color: var(--late); }
.kpi-late.has-very-late { background: var(--very-late-soft); border-color: #f5c2c3; color: #a3191c; }
.kpi-late.has-very-late strong { color: var(--very-late); }
.kpi-late:hover, .kpi-late.active { box-shadow: 0 0 0 2px currentColor; }

/* ---------- Clic droit sur une carte ---------- */
.card-wrap { position: relative; }
.menu-veil { position: fixed; inset: 0; z-index: 60; }
.card-menu {
    position: absolute; top: calc(100% + 6px); left: 8px; right: 8px; z-index: 61;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-lg); padding: 6px; display: grid; outline: none; animation: toast-in .12s ease;
}
.card-menu button, .card-menu .menu-disabled {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; text-align: left;
    padding: 9px 10px; border: 0; border-radius: 8px; background: none; font: 500 14px var(--font); color: var(--ink); cursor: pointer;
}
.card-menu button:hover, .card-menu button:focus-visible { background: var(--surface-2); outline: none; }
.card-menu small { flex-basis: 100%; color: var(--muted); font-size: 12px; padding-left: 22px; }
.card-menu .menu-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s); }
.card-menu .menu-notify { color: var(--done); font-weight: 600; }
.card-menu .menu-notify:hover { background: var(--done-soft); }
.card-menu .menu-disabled { color: var(--muted); cursor: default; }
.card-menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-note { font-size: 12px; color: var(--muted); padding: 2px 10px 6px; }
.card-notified { color: var(--done); font-weight: 700; }

/* ---------- Modifier une tâche / prévenir le client ---------- */
.head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.edit-panel { margin-bottom: 24px; border-color: var(--ink); }
.edit-panel textarea { min-height: 140px; }
.edit-panel .attachments { margin: 0 0 10px; }
.notify-panel .notify-done { color: var(--done); font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.notify-panel .notify-to { font-size: 13px; margin-bottom: 12px; overflow-wrap: anywhere; }
.client-email { font-size: 14px; color: var(--ink-2); }
.client-email-missing { font-size: 13px; font-style: italic; }

/* Supprimer une pièce jointe (équipe) */
.att-item { position: relative; display: inline-flex; max-width: 100%; }
.att-images .att-item { display: block; }
.att-delete {
    position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%;
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted);
    font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center;
    opacity: 0; transition: opacity .15s;
}
.att-item:hover .att-delete, .att-delete:focus-visible { opacity: 1; }
.att-delete:hover { background: var(--urgent); border-color: var(--urgent); color: #fff; }
@media (hover: none) { .att-delete { opacity: 1; } }
.client[class*="cl-"] { border-left: 4px solid var(--client, var(--line)); }
.client h3 .client-dot { width: 11px; height: 11px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { position: relative; cursor: pointer; border: 0; padding: 0; background: none; border-radius: 50%; }
.swatch span, .swatch input[type=color] {
    display: block; width: 28px; height: 28px; border-radius: 50%;
    background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
    transition: transform .12s, box-shadow .12s;
}
.swatch:hover span, .swatch:hover input[type=color] { transform: scale(1.1); }
.swatch.is-selected span,
.swatch-custom.is-selected input[type=color] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.swatch:focus-visible { outline: none; }
.swatch:focus-visible span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.swatch-custom input[type=color] {
    padding: 0; border: 0; cursor: pointer; overflow: hidden;
    background: conic-gradient(#e5383b, #f59f00, #1f9d6b, #0c8599, #3a6df0, #8b5cf6, #d6336c, #e5383b);
}
.swatch-custom input[type=color]::-webkit-color-swatch-wrapper { padding: 5px; }
.swatch-custom input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.swatch-custom input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
.sw-0 { --sw: #3a6df0; } .sw-1 { --sw: #1f9d6b; } .sw-2 { --sw: #8b5cf6; } .sw-3 { --sw: #e8590c; }
.sw-4 { --sw: #d6336c; } .sw-5 { --sw: #0c8599; } .sw-6 { --sw: #f59f00; } .sw-7 { --sw: #5c677d; }
.inline-form .swatches { width: 100%; }

/* ---------- Archives ---------- */
.seg-count { font-size: 11px; background: var(--line-strong); color: var(--ink-2); padding: 1px 7px; border-radius: 999px; margin-left: 2px; }
.segmented a.active .seg-count { background: var(--ink); color: #fff; }
.col-head form { margin: 0; }
.col-action {
    border: 0; background: transparent; cursor: pointer; font: 600 12px var(--font); color: var(--muted);
    padding: 4px 8px; border-radius: 999px; transition: background .15s, color .15s;
}
.col-action:hover { background: var(--surface); color: var(--ink); }
.tag-archived { background: var(--done-soft); color: #136b48; }
.archive-zone { text-align: center; }
.side-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ---------- Suivi ---------- */
.meta-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.meta-check { margin: 0 0 14px; }
.form-hint { margin-top: 12px; font-size: 13px; }

/* ---------- Modifier / supprimer un message ---------- */
.msg-actions { display: flex; align-items: flex-start; gap: 14px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; }
.msg-actions .link-danger { margin-left: auto; }
.msg-edit textarea { min-height: 80px; font-size: 14px; }
.msg-edit-bar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; }
.msg-edit-bar .check { margin-right: auto; }
.link-action { border: 0; background: none; padding: 0; font: 600 13px var(--font); color: var(--muted); cursor: pointer; }
.link-action:hover { color: var(--ink); }
.link-danger { border: 0; background: none; padding: 0; font: 600 13px var(--font); color: var(--muted); cursor: pointer; }
.link-danger:hover { color: var(--urgent); }
.edited { font-style: italic; }
.event .event-delete { margin: 0 0 0 4px; opacity: 0; transition: opacity .15s; }
.event:hover .event-delete { opacity: 1; }
.event .icon-btn { width: 22px; height: 22px; font-size: 15px; }

/* ---------- Clients ---------- */
.client { display: grid; gap: 14px; }
.client.is-off { opacity: .6; }
.client.is-highlight { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.client-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.code-box { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--ink); }
.code-value { background: none; border: 0; padding: 0; color: #fff; font: 700 16px ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .1em; }
.code-box .btn { background: var(--accent); }
.code-box .muted { color: rgba(255, 255, 255, .7); padding-right: 10px; font-size: 13px; }
.access-link {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 8px 8px 8px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line);
}
.access-link-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.access-link-url {
    flex: 1; min-width: 0; font: 13px ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--ink-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none;
}
.access-link-url:hover { color: var(--accent-dark); }
.client-projects { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.client-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; padding-top: 12px; border-top: 1px solid var(--line); }
.client-actions form { margin: 0; }
.inline-edit summary { list-style: none; cursor: pointer; }
.inline-edit summary::-webkit-details-marker { display: none; }
.inline-edit[open] summary { background: var(--surface-2); color: var(--ink); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.inline-form input { width: auto; flex: 1; min-width: 160px; padding: 8px 11px; font-size: 14px; }
.inline-form-stack { display: grid; min-width: 260px; }
.inline-form-stack input, .inline-form-stack select, .inline-form-stack textarea { padding: 8px 11px; font-size: 14px; min-height: 0; }
.project-info .eyebrow a { color: var(--accent-dark); text-decoration: none; }

/* ---------- Temps passé ---------- */
.time-panel .panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.time-total { font: 800 20px var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.time-form { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.time-form input { padding: 9px 11px; font-size: 14px; }
.time-form .time-input { font-weight: 600; }
.time-form .time-note { grid-column: 1 / -1; }
.time-form .btn { grid-column: 1 / -1; }
.time-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.time-quick .chip { cursor: pointer; font: 600 12px var(--font); padding: 5px 10px; }
.time-quick .chip:disabled { opacity: .5; cursor: default; }
.time-hint { font-size: 12px; margin-top: 8px; }
.time-list { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.time-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.time-amount {
    flex: none; min-width: 64px; text-align: center; padding: 3px 8px; border-radius: 999px;
    background: var(--new-soft); color: var(--new); font-weight: 700; font-size: 12px;
}
.time-meta { flex: 1; min-width: 0; color: var(--muted); }
.time-meta strong { color: var(--ink-2); font-weight: 600; }
.time-entry-note { display: block; color: var(--ink-2); overflow-wrap: anywhere; }
.time-list .icon-btn { width: 24px; height: 24px; font-size: 16px; flex: none; }
.card-time { color: var(--new); font-weight: 600; }
.drawer .time-form { grid-template-columns: 110px 160px 1fr auto; }
.drawer .time-form .time-note, .drawer .time-form .btn { grid-column: auto; }

/* ---------- Blazor : notifications, reconnexion, erreurs ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(520px, calc(100vw - 32px)); }
.toast {
    display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; border-radius: 12px;
    font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast-in .25s ease;
}
.toast span { flex: 1; }
.toast .icon-btn { width: 28px; height: 28px; font-size: 18px; color: inherit; opacity: .7; }
.toast-ok { background: var(--ink); color: #fff; }
.toast-ok::before { content: "✓"; color: #6ee7b7; font-weight: 700; }
.toast-err { background: var(--urgent); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Fenêtre de reconnexion : Blazor pose les classes, le CSS l'affiche (aucun script) */
#components-reconnect-modal { display: none; }
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000; background: rgba(20, 21, 26, .45);
}
.components-reconnect-container {
    display: grid; gap: 14px; justify-items: center; text-align: center;
    background: var(--surface); color: var(--ink); border-radius: 16px; padding: 28px 32px; max-width: 360px; box-shadow: var(--shadow-lg);
}
.reconnect-show-text, .reconnect-failed-text, .components-rejoining-animation { display: none; }
.components-reconnect-show .reconnect-show-text, .components-reconnect-retrying .reconnect-show-text,
.components-reconnect-show .components-rejoining-animation, .components-reconnect-retrying .components-rejoining-animation { display: block; }
.components-reconnect-failed .reconnect-failed-text, .components-reconnect-rejected .reconnect-failed-text { display: inline-flex; }
p.reconnect-failed-text { display: none; }
.components-reconnect-failed p.reconnect-failed-text, .components-reconnect-rejected p.reconnect-failed-text { display: block; }
.components-rejoining-animation { position: relative; width: 48px; height: 48px; }
.components-rejoining-animation div {
    position: absolute; inset: 0; border: 3px solid var(--accent); border-radius: 50%;
    animation: rejoin 1.4s cubic-bezier(0, .2, .8, 1) infinite;
}
.components-rejoining-animation div:nth-child(2) { animation-delay: -.7s; }
@keyframes rejoin { from { transform: scale(0); opacity: 1; } to { transform: scale(1); opacity: 0; } }

/* Fenêtre de confirmation (ConfirmHost) */
.confirm-overlay {
    position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px;
    background: rgba(20, 21, 26, .45); animation: fade-in .15s ease;
}
.confirm-dialog {
    width: min(440px, 100%); background: var(--surface); border-radius: 16px; padding: 24px;
    box-shadow: var(--shadow-lg); animation: toast-in .2s ease; outline: none;
}
.confirm-dialog p { font-size: 15px; line-height: 1.5; margin-bottom: 20px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-confirm-danger { background: var(--urgent); }
.btn-confirm-danger:hover { background: #c92a2d; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
#blazor-error-ui {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    padding: 12px 20px; background: var(--urgent); color: #fff; font-weight: 500;
}
#blazor-error-ui a { color: #fff; margin-left: 12px; }
#blazor-error-ui .dismiss { position: absolute; right: 16px; cursor: pointer; text-decoration: none; }

.task-link { display: block; font-weight: 600; }
.task-row:hover .task-link { color: var(--accent-dark); }
.panel.narrow { max-width: 520px; }
.mainnav a.not-active { background: transparent; color: var(--ink-2); }
.card { cursor: grab; }
.card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink), var(--shadow); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .board { grid-template-columns: repeat(4, 280px); overflow-x: auto; }
}
@media (max-width: 900px) {
    .landing { grid-template-columns: 1fr; }
    .landing-hero { min-height: auto; gap: 32px; }
    .hero-steps { display: none; }
    .split, .detail-grid { grid-template-columns: 1fr; }
    .detail-grid aside { position: static; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .prio-picker { grid-template-columns: repeat(2, 1fr); }
    .topbar-inner { gap: 16px; }
    .who-name { display: none; }
}
@media (max-width: 640px) {
    .wrap, .wrap-wide { padding-left: 16px; padding-right: 16px; }
    .page { padding-top: 24px; }
    .topbar-inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 12px; }
    .project-pill { display: none; }
    .mainnav { order: 3; width: 100%; flex: none; overflow-x: auto; }
    .who { margin-left: auto; }
    .brand-text small { display: none; }
    .stat { padding: 14px 16px; }
    .stat-num { font-size: 26px; }
    .ticket-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
    .ticket-id { display: none; }
    .ticket-row .badge { grid-row: 2; justify-self: start; }
    .msg { max-width: 100%; }
    .reply-bar select { width: 100%; }
    .filters select, .filters input[type=search] { max-width: none; width: 100%; }
    .drawer-body { padding: 18px 16px 32px; }
    .drawer .detail-grid aside, .meta-fields { grid-template-columns: 1fr; }
    .drawer .meta dl { grid-template-columns: auto 1fr; }
    .code-box { width: 100%; justify-content: space-between; }
}
