/* ================================================================ Pilotage SASITE : système visuel
   Couleurs en jetons (clair / sombre), typo Inter, rythme 4 px. Tout le reste du fichier s'appuie dessus. */
:root {
  --bg: #f6f6f3; --panel: #ffffff; --panel-2: #f1f1ed; --panel-3: #e9e9e4; --line: #e4e3dd; --line-2: #d6d5ce;
  --text: #191a17; --text-2: #3d3e39; --muted: #6d6e67;
  --accent: #1d6b4c; --accent-hover: #175a40; --accent-2: #e5f1eb; --accent-3: #c9e3d6; --accent-text: #ffffff;
  --side-bg: #fbfbf9;
  --warn: #8f5300; --warn-bg: #fcf0d9; --danger: #b0332c; --danger-bg: #fbe6e4; --ok: #1d6b4c; --ok-bg: #e5f1eb;
  --info: #24588c; --info-bg: #e5eef8; --violet: #5d43a5; --violet-bg: #eee8fa;
  --shadow: 0 1px 2px rgba(20,22,18,.04), 0 1px 3px rgba(20,22,18,.06);
  --shadow-lg: 0 12px 32px -8px rgba(20,22,18,.18), 0 2px 6px rgba(20,22,18,.06);
  --radius: 12px; --radius-sm: 8px; --side: 248px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1110; --panel: #161918; --panel-2: #1d211f; --panel-3: #252a27; --line: #262b28; --line-2: #333934;
    --text: #e9ebe7; --text-2: #c5c8c2; --muted: #8f958e;
    --accent: #5cc493; --accent-hover: #74d2a5; --accent-2: #17291f; --accent-3: #1f3a2c; --accent-text: #0b130e;
    --side-bg: #131614;
    --warn: #e9b463; --warn-bg: #2f2616; --danger: #f0897f; --danger-bg: #351c1a; --ok: #5cc493; --ok-bg: #17291f;
    --info: #8db9e8; --info-bg: #182434; --violet: #b8a3f0; --violet-bg: #251f39;
    --shadow: 0 1px 2px rgba(0,0,0,.5); --shadow-lg: 0 16px 40px -8px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1110; --panel: #161918; --panel-2: #1d211f; --panel-3: #252a27; --line: #262b28; --line-2: #333934;
  --text: #e9ebe7; --text-2: #c5c8c2; --muted: #8f958e;
  --accent: #5cc493; --accent-hover: #74d2a5; --accent-2: #17291f; --accent-3: #1f3a2c; --accent-text: #0b130e;
  --side-bg: #131614;
  --warn: #e9b463; --warn-bg: #2f2616; --danger: #f0897f; --danger-bg: #351c1a; --ok: #5cc493; --ok-bg: #17291f;
  --info: #8db9e8; --info-bg: #182434; --violet: #b8a3f0; --violet-bg: #251f39;
  --shadow: 0 1px 2px rgba(0,0,0,.5); --shadow-lg: 0 16px 40px -8px rgba(0,0,0,.6); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.022em; font-weight: 650; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 620; letter-spacing: -.01em; }
h3 { font-size: 13.5px; margin: 0 0 8px; font-weight: 620; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
code, pre, .mono { font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace; font-size: 12.5px; }
:not(pre) > code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
::selection { background: var(--accent-3); }

/* ---------------------------------------------------------------- Structure */
.layout { display: flex; min-height: 100vh; }
.side { width: var(--side); flex: none; background: var(--side-bg); border-right: 1px solid var(--line); padding: 14px 12px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { font-weight: 650; font-size: 14.5px; letter-spacing: -.01em; padding: 4px 8px 16px; display: flex; gap: 10px; align-items: center; line-height: 1.25; }
.brand .logo { width: 32px; height: 32px; flex: none; border-radius: 9px; background: linear-gradient(145deg, var(--accent), var(--accent-hover)); color: var(--accent-text); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), var(--shadow); }
.brand .logo svg { width: 18px; height: 18px; }
.brand small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 16px 10px 6px; }
.nav-group:first-child { padding-top: 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 500; position: relative; transition: background .12s, color .12s; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.active { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow); outline: 1px solid var(--line); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a.active .ico { color: var(--accent); }
.nav .ico { width: 18px; height: 18px; flex: none; display: grid; place-items: center; color: var(--muted); }
.ico svg, .ico-svg { width: 17px; height: 17px; display: block; }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 600; min-width: 20px; text-align: center; background: var(--panel-3); border-radius: 10px; padding: 0 6px; color: var(--text-2); }
.nav .count.hot { background: var(--accent); color: var(--accent-text); }
.side .foot { margin-top: auto; padding: 12px 8px 2px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--accent-2); color: var(--accent); display: grid; place-items: center; font-weight: 650; font-size: 12.5px; border: 1px solid var(--accent-3); }
.foot .who { min-width: 0; line-height: 1.3; }
.foot .who strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot .who a { font-size: 11.5px; text-decoration: none; }
.foot .who a.warn { color: var(--warn); }
.foot .theme-btn { margin-left: auto; font-size: 15px; min-height: 28px; padding: 2px 8px; color: var(--muted); }
.main { flex: 1; min-width: 0; padding: 28px 36px 64px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.head > div:first-child { min-width: 0; max-width: 860px; }
.head .muted { font-size: 13.5px; }
.eyebrow { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 6px; }
.topbar { display: none; }

/* ---------------------------------------------------------------- Panneaux */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .v { font-size: 28px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12.5px; }
.kpi a.small { margin-top: 6px; font-weight: 550; text-decoration: none; }
.bar { height: 6px; background: var(--panel-3); border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }

/* ---------------------------------------------------------------- Contrôles */
button, .btn { font: inherit; font-size: 13px; font-weight: 550; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); border-radius: var(--radius-sm); padding: 6px 12px; min-height: 32px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 1px 1px rgba(20,22,18,.04); transition: background .12s, border-color .12s; white-space: nowrap; }
button:hover, .btn:hover { background: var(--panel-2); }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.15), var(--shadow); }
button.primary:hover, .btn.primary:hover { background: var(--accent-hover); }
button.ghost { border-color: transparent; background: transparent; box-shadow: none; }
button.danger { color: var(--danger); }
button.danger:hover { background: var(--danger-bg); }
button.sm, .btn.sm { padding: 3px 9px; font-size: 12px; min-height: 26px; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 10px; width: 100%; transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
label.f > span { font-weight: 600; color: var(--text-2); }
.inline { width: auto; }
.tabs { display: flex; gap: 2px; margin-bottom: 18px; flex-wrap: wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; width: fit-content; max-width: 100%; }
.tabs a { padding: 5px 14px; text-decoration: none; color: var(--muted); border-radius: 7px; font-weight: 550; font-size: 13px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); background: var(--panel); box-shadow: var(--shadow); font-weight: 600; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; box-shadow: none; min-height: 26px; padding: 3px 11px; font-size: 12.5px; color: var(--muted); border-radius: 7px; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- Guide « comment marche l'app » */
.guide { margin-bottom: 18px; padding: 18px 20px; background: linear-gradient(135deg, var(--accent-2), var(--panel) 70%); }
.guide-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.guide-h h2 { margin: 0 0 2px; }
.guide-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.guide-step { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; transition: border-color .12s, transform .12s; }
.guide-step:hover { border-color: var(--accent); transform: translateY(-1px); }
.guide-step .n { display: flex; align-items: center; gap: 8px; font-weight: 620; font-size: 13.5px; color: var(--text); }
.guide-step .n i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; }
.guide-step .d { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.guide-step .w { font-size: 11.5px; color: var(--accent); font-weight: 600; margin-top: auto; padding-top: 6px; }
.guide-step:not(:last-child)::after { content: ""; position: absolute; right: -10px; top: 50%; width: 7px; height: 7px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: translateY(-50%) rotate(45deg); opacity: .55; z-index: 1; }
@media (max-width: 1100px) { .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .guide-step::after { display: none; } }
@media (max-width: 760px) { .guide-steps { grid-template-columns: 1fr; } }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 550; padding: 1px 8px; border-radius: 6px; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; line-height: 1.6; }
.chip.ok, .chip.warn, .chip.danger, .chip.info, .chip.violet { border-color: transparent; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.danger { background: var(--danger-bg); color: var(--danger); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.violet { background: var(--violet-bg); color: var(--violet); }
.chip.clickable { cursor: pointer; }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 200px; display: flex; flex-direction: column; gap: 8px; }
.col.over { outline: 2px dashed var(--accent); }
.col h3 { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin: 2px 4px 4px; }
.col.wip-over h3 .wip { color: var(--danger); font-weight: 700; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; box-shadow: var(--shadow); }
.tcard:hover { border-color: var(--accent); }
.tcard .t { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.tcard.dragging { opacity: .4; }
.prio-P1 { border-left: 3px solid var(--danger); }
.prio-P2 { border-left: 3px solid var(--warn); }
.prio-P3 { border-left: 3px solid var(--line); }

/* Lists */
.list { display: flex; flex-direction: column; }
.li { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.li:last-child { border-bottom: 0; }
.li.sel { background: var(--accent-2); }
.li.clickable { cursor: pointer; }
.li.clickable:hover { background: var(--panel-2); }
.li.sel { box-shadow: inset 3px 0 0 var(--accent); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--panel-2); position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }

/* Split view */
.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.scroll { max-height: calc(100vh - 170px); overflow-y: auto; }

/* Code viewer */
.tree { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.tree .dir { color: var(--muted); padding: 3px 6px; cursor: pointer; user-select: none; }
.tree .file { padding: 3px 6px 3px 18px; cursor: pointer; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree .file:hover { background: var(--panel-2); }
.tree .file.sel { background: var(--accent-2); color: var(--accent); }
pre.code { margin: 0; padding: 14px; overflow: auto; max-height: calc(100vh - 230px); background: var(--panel-2); border-radius: 8px; }
pre.code code.hljs { background: transparent; padding: 0; }

/* Markdown */
.md { line-height: 1.65; }
.md h1, .md h2, .md h3 { margin: 1.2em 0 .4em; }
.md h2 { font-size: 18px; } .md h3 { font-size: 15px; }
.md p { margin: .5em 0; }

/* Timeline */
.tl { position: relative; padding-left: 24px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl .m { position: relative; margin-bottom: 14px; }
.tl .m::before { content: ""; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--muted); }
.tl .m.fait::before { background: var(--accent); border-color: var(--accent); }
.tl .m.en_cours::before { border-color: var(--accent); }
.tl .m.late::before { border-color: var(--danger); }

/* Modal & toast */
.overlay { position: fixed; inset: 0; background: rgba(12,14,12,.45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; width: min(640px, 100%); max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(980px, 100%); }
.modal .actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 380px; font-weight: 500; animation: toastIn .18s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } }
.toast.err { background: var(--danger); color: #fff; }
.banner { padding: 11px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); margin-bottom: 14px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.banner.info { background: var(--info-bg); color: var(--info); }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--accent); color: var(--accent); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feed .li { font-size: 13px; padding: 7px 4px; }

/* ---------------------------------------------------------------- Connexion */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.login-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 36px 44px; color: #e9f3ee;
  background: radial-gradient(900px 500px at 0% 0%, #2a8a63 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #0f3f2d 0%, transparent 60%), #14513a; }
.login-side::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px); background-size: 44px 44px;
  mask-image: radial-gradient(circle at 70% 30%, #000 0%, transparent 70%); }
.login-side .brand { padding: 0; color: #fff; position: relative; z-index: 1; }
.login-side .brand .logo { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.login-side .brand small { color: rgba(233,243,238,.7); }
.login-pitch { position: relative; z-index: 1; max-width: 460px; }
.login-pitch h2 { font-size: 30px; line-height: 1.18; letter-spacing: -.025em; font-weight: 650; margin: 0 0 26px; color: #fff; text-wrap: balance; }
.login-pitch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.login-pitch li { display: flex; flex-direction: column; padding-left: 18px; border-left: 2px solid rgba(255,255,255,.25); }
.login-pitch li b { font-weight: 620; color: #fff; }
.login-pitch li span { color: rgba(233,243,238,.75); font-size: 13.5px; }
.login-foot { position: relative; z-index: 1; font-size: 12.5px; color: rgba(233,243,238,.6); }
.login-main { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.login-box { width: min(380px, 100%); }
.login-box h1 { font-size: 28px; margin-bottom: 6px; }
.login-box input { padding: 10px 12px; font-size: 14.5px; }
.login-box .totp { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 20px; letter-spacing: .4em; text-align: center; }
.login-go { width: 100%; min-height: 42px; font-size: 14.5px; margin-top: 6px; }
.login-hint { margin: 4px 0 0; text-align: center; }
.login-mobile-brand { display: none; padding: 0 0 28px; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .login-mobile-brand { display: flex; }
  .login-main { place-items: start center; padding-top: 12vh; }
}

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .side { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .main { padding: 18px 16px 60px; }
  .head { margin-bottom: 16px; padding-bottom: 14px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .layout { flex-direction: column; }
}

/* En direct */
.live-card.on { border-color: var(--ok); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

/* Diff git */
.diff { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; overflow-x: auto; border-top: 1px solid var(--line); }
.diff .dl { white-space: pre; padding: 0 12px; min-height: 1.45em; }
.diff .dl.a { background: var(--ok-bg); color: var(--ok); }
.diff .dl.d { background: var(--danger-bg); color: var(--danger); }
.diff .dl.h { color: var(--info); background: var(--info-bg); }
.diff .dl.m { color: var(--muted); font-style: italic; }
.card.clickable:hover { border-color: var(--accent); }

/* Process & docs */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.doc-aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 22px; max-height: calc(100vh - 32px); overflow-y: auto; }
.doc-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 10px 10px 6px; }
.doc-list a { display: flex; gap: 9px; align-items: baseline; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13.5px; line-height: 1.35; }
.doc-list a:hover { background: var(--panel-2); }
.doc-list a.on { background: var(--accent-2); color: var(--accent); font-weight: 600; }
.doc-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); transform: translateY(-1px); }
.doc-dot.ok { background: var(--ok); } .doc-dot.warn { background: var(--warn); }
.doc-toc a { display: flex; gap: 10px; padding: 5px 10px; margin-left: 2px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1.35; }
.doc-toc a:hover { color: var(--text); }
.doc-toc a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.doc-toc-n { flex: none; min-width: 14px; font-variant-numeric: tabular-nums; opacity: .7; }
.doc { max-width: 900px; line-height: 1.7; font-size: 14.5px; }
.doc-hero { background: linear-gradient(135deg, var(--accent-2) 0%, var(--panel) 65%); border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.doc .doc-hero h1 { font-size: 30px; line-height: 1.18; letter-spacing: -.025em; margin: 10px 0 14px; max-width: 700px; text-wrap: balance; }
.doc-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); padding-top: 4px; }
.doc-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; }
.doc-intro { margin-bottom: 18px; }
.doc-callout { margin: 0 0 14px; padding: 14px 18px; border-radius: 12px; background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); color: var(--text); }
.doc-callout p { margin: .3em 0; }
.doc-callout strong { color: var(--info); }
.doc-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 28px 18px; margin-bottom: 16px; box-shadow: var(--shadow); scroll-margin-top: 16px; }
.doc-sec-h { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.doc .doc-sec-h h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.doc-num { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.doc-sec > ol { list-style: none; counter-reset: etape; padding: 0; margin: 14px 0 4px; }
.doc-sec > ol > li { counter-increment: etape; position: relative; padding: 2px 0 16px 46px; }
.doc-sec > ol > li::before { content: counter(etape); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-2); color: var(--accent); border: 1.5px solid var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; line-height: 1; }
.doc-sec > ol > li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 1.5px; background: var(--line); }
.doc ul { padding-left: 20px; } .doc ul > li { margin: 3px 0; } .doc ul > li::marker { color: var(--accent); }
.doc-subs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.doc-sub { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.doc .doc-sub h3 { margin: 0 0 6px; font-size: 15px; }
.doc-sub ul { margin: 6px 0; }
.doc pre { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; line-height: 1.45; font-size: 12px; }
.doc :not(pre) > code { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.doc-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; }
.doc-table table { border-collapse: collapse; width: 100%; font-size: 13.5px; line-height: 1.5; }
.doc-table th { background: var(--panel-2); text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.doc-table th, .doc-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td:first-child { font-weight: 600; }
@media (max-width: 960px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-aside { position: static; max-height: none; }
  .doc-toc { display: none; }
  .doc-sec { padding: 18px 16px 12px; } .doc-hero { padding: 20px 16px; } .doc .doc-hero h1 { font-size: 24px; }
}
.doc-flow { display: flex; align-items: stretch; gap: 8px; margin: 6px 0 14px; }
.doc-flow-step { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; padding: 12px 14px; line-height: 1.5; font-size: 13.5px; }
.doc-flow-t { font-weight: 700; margin-bottom: 4px; }
.doc-flow-arrow { flex: none; align-self: center; color: var(--accent); font-size: 20px; font-weight: 700; }
@media (max-width: 700px) { .doc-flow { flex-direction: column; } .doc-flow-arrow { transform: rotate(90deg); } }

/* ---------------------------------------------------------------- Mon terminal */
.term-window { border-radius: 14px; overflow: hidden; background: #0d0f0e; border: 1px solid #262b28; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 8px 10px 8px 14px; background: #171a19; border-bottom: 1px solid #262b28; color: #9aa19b; font-size: 12.5px; min-height: 42px; }
.term-bar > i { width: 11px; height: 11px; border-radius: 50%; background: #3a403c; flex: none; }
.term-bar > i:nth-child(1) { background: #ec6a5e; } .term-bar > i:nth-child(2) { background: #f4bf4f; } .term-bar > i:nth-child(3) { background: #61c554; }
.term-title { margin-left: 8px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.term-tabs { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.term-tabs a { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 7px; color: #a9b0aa; text-decoration: none; font-size: 12px; font-weight: 550; white-space: nowrap; border: 1px solid transparent; }
.term-tabs a .ico svg { width: 13px; height: 13px; }
.term-tabs a:hover { background: #222724; color: #e9ebe7; }
.term-tabs a.on { background: #0d0f0e; color: #e9ebe7; border-color: #2f3531; }
.term-full { color: #a9b0aa; text-decoration: none; padding: 3px 9px; border-radius: 7px; font-size: 14px; }
.term-full:hover { background: #222724; color: #fff; }
.term-frame { width: 100%; height: calc(100vh - 270px); min-height: 420px; border: 0; display: block; background: #0d0f0e; }
.term-help { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 12.5px; color: var(--muted); }
.term-help > div { display: inline-flex; align-items: center; gap: 7px; }
.keys { display: inline-flex; gap: 3px; }
kbd { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 11.5px; font-weight: 600; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; line-height: 1.6; }
.term-details { margin-top: 10px; color: var(--muted); }
.term-details ul { margin: 6px 0 0; padding-left: 18px; }

/* Mise en route (3 étapes) */
.onboard { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; padding: 26px; }
.onboard-steps { display: flex; flex-direction: column; }
.onboard-step { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.onboard-step:last-child { padding-bottom: 0; }
.onboard-step:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--line); border-radius: 2px; }
.onboard-step.done:not(:last-child)::after { background: var(--accent); }
.onboard-n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--panel-2); color: var(--muted); border: 1.5px solid var(--line-2); }
.onboard-step.done .onboard-n { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.onboard-step.current .onboard-n { border-color: var(--accent); color: var(--accent); background: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-2); }
.onboard-body { padding-top: 4px; min-width: 0; }
.onboard-body h3 { margin: 0 0 3px; font-size: 14.5px; }
.onboard-step:not(.current):not(.done) .onboard-body h3 { color: var(--muted); }
.onboard-step.done .onboard-body h3 { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.onboard-body p { margin: 0 0 10px; max-width: 520px; }
.onboard-aside { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.term-preview { border-radius: 12px; overflow: hidden; background: #0d0f0e; border: 1px solid #262b28; box-shadow: var(--shadow-lg); }
.term-preview pre { margin: 0; padding: 16px 18px 18px; color: #e9ebe7; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; }
.term-preview .p { color: #5cc493; } .term-preview .c { color: #8f958e; }
@media (max-width: 960px) { .onboard { grid-template-columns: 1fr; } .term-title { display: none; } }

/* ---------------------------------------------------------------- Finitions communes à toutes les pages */
.stack > button, .stack > .btn { align-self: flex-start; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); margin: 0; flex: none; }
input[type="file"] { padding: 5px; font-size: 12.5px; color: var(--muted); }
input[type="file"]::file-selector-button { font: inherit; font-size: 12.5px; font-weight: 550; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); border-radius: 6px; padding: 4px 10px; margin-right: 10px; cursor: pointer; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f958e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; padding-right: 30px; }
select.inline { min-width: 0; }
audio { width: 100%; height: 38px; }
details > summary { cursor: pointer; font-weight: 550; color: var(--text-2); }
details > summary::marker { color: var(--muted); }
hr { border: 0; height: 1px; background: var(--line); }
.md h1:first-child, .md h2:first-child, .md h3:first-child { margin-top: 0; }
.md table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; border-collapse: separate; border-spacing: 0; margin: 10px 0; }
.md blockquote { margin: 10px 0; padding: 4px 14px; border-left: 3px solid var(--accent-3); color: var(--text-2); }
/* Encadrés d'aide (« comment ça marche ») : en retrait par rapport au contenu */
.card.help { background: var(--panel-2); box-shadow: none; color: var(--text-2); }
.card.help h2, .card.help h3 { font-size: 13.5px; color: var(--text); }
.card.help h2:first-child::before, .card.help > h2:first-child::before { content: "i"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; background: var(--info-bg); color: var(--info); font-size: 11px; font-weight: 700; font-style: italic; font-family: Georgia, serif; vertical-align: 1px; }
/* États vides : une icône discrète et un cadre en pointillés plutôt qu'un simple texte */
.empty:not(:has(.spin))::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 10px; background: var(--muted); opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / contain no-repeat; }
.card.empty { background: transparent; border-style: dashed; border-color: var(--line-2); box-shadow: none; }
.drop { background: var(--panel); transition: border-color .12s, background .12s; cursor: pointer; }
.drop:hover { border-color: var(--accent); background: var(--accent-2); color: var(--accent); }
/* Tableaux et listes un peu plus aérés */
.tablewrap { box-shadow: var(--shadow); }
tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }

/* ---------------------------------------------------------------- Page Claude Code */
.claude-status { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; border-left: 3px solid var(--warn); }
.claude-status.ok { border-left-color: var(--accent); }
.claude-status-ico { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--warn-bg); color: var(--warn); }
.claude-status.ok .claude-status-ico { background: var(--accent-2); color: var(--accent); }
.claude-status-ico .ico, .claude-status-ico svg { width: 22px; height: 22px; }
.claude-auto { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; background: linear-gradient(135deg, var(--accent-2), var(--panel) 75%); }
.prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.prompt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; white-space: normal; padding: 12px 14px; min-height: 0; border-radius: 10px; background: var(--panel-2); border-color: var(--line); box-shadow: none; font-weight: 400; }
.prompt:hover { border-color: var(--accent); background: var(--accent-2); }
.prompt strong { font-weight: 620; font-size: 13.5px; }
.prompt span { font-size: 12px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prompt em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.setup-step { display: flex; gap: 12px; align-items: flex-start; }
.setup-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; background: var(--accent-2); color: var(--accent); border: 1.5px solid var(--accent); margin-top: 1px; }
@media (max-width: 760px) { .prompt-grid { grid-template-columns: 1fr; } .claude-auto, .claude-status { flex-wrap: wrap; } }

/* ---------------------------------------------------------------- Compte & équipe */
.profile { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.profile-name { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.li.member { padding-left: 0; padding-right: 0; }
.qr { background: #fff; padding: 10px; width: max-content; border-radius: 10px; border: 1px solid var(--line); }
.totp-input { width: 150px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 18px; letter-spacing: .3em; text-align: center; }
label.f .hint { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.next-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
details.card.help > summary { font-size: 13.5px; color: var(--text); }
@media (max-width: 760px) { .profile { flex-wrap: wrap; } }

/* ---------------------------------------------------------------- Tâches & jalons */
.kanban-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.board { gap: 12px; }
.col { gap: 8px; padding: 10px; }
.col-h { padding: 2px 4px 4px; }
.col .col-h h3 { display: flex; align-items: center; gap: 8px; justify-content: flex-start; margin: 0; font-size: 13px; }
.col-h .wip { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; }
.col.wip-over .col-h .wip { color: var(--danger); border-color: var(--danger); }
.col-desc { font-size: 11.5px; color: var(--muted); margin: 2px 0 0 16px; }
.col-alert { font-size: 11.5px; color: var(--danger); background: var(--danger-bg); border-radius: 7px; padding: 5px 8px; }
.dotc { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.tcard { display: flex; flex-direction: column; gap: 6px; }
.tcard .t { margin: 0; line-height: 1.35; }
.tcard-ms { font-size: 11.5px; color: var(--violet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.tcard .chip { font-size: 11px; padding: 0 6px; }
.prio-P3 { border-left-color: var(--line-2); }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; border-width: 1px; }
.col-add, .col-more { justify-content: flex-start; color: var(--muted); width: 100%; }
.col-add:hover, .col-more:hover { color: var(--accent); background: var(--panel); }

.ms-list { display: flex; flex-direction: column; gap: 10px; }
.ms-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 180px; gap: 18px; align-items: start; padding: 16px 18px; }
.ms-row.next { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2), var(--shadow); }
.ms-row.fait { opacity: .78; }
.ms-date { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); line-height: 1.1; }
.ms-date b { font-size: 20px; font-weight: 650; }
.ms-date span { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--text-2); }
.ms-date small { font-size: 10.5px; color: var(--muted); }
.ms-row.late .ms-date { border-color: var(--danger); }
.ms-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ms-title { font-weight: 620; font-size: 14.5px; color: var(--text); text-decoration: none; }
.ms-title:hover { color: var(--accent); }
.ms-tasks { margin-top: 4px; }
.ms-tasks .list { margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; }
.ms-tasks .li { align-items: center; padding: 7px 10px; }
.ms-progress { display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: right; }
.ms-pct { font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stackbar { display: flex; height: 6px; border-radius: 6px; overflow: hidden; background: var(--panel-3); gap: 1px; }
.stackbar i { display: block; height: 100%; }

.adr-group { margin-bottom: 22px; }
.adr-group > h2 { display: flex; align-items: center; gap: 8px; }
details.adr-group > summary { font-size: 14px; margin-bottom: 4px; }
.count-pill { font-size: 11.5px; font-weight: 600; background: var(--panel-3); color: var(--text-2); border-radius: 10px; padding: 0 8px; }
.adr { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.adr.proposee { border-left: 3px solid var(--warn); }
.adr.acceptee { border-left: 3px solid var(--accent); }
.adr-decision { margin: 2px 0 0; font-size: 13.5px; line-height: 1.55; }
.adr details p { margin: 6px 0 0; }

.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rule { display: flex; gap: 14px; align-items: flex-start; }
.rule h3 { margin: 2px 0 4px; font-size: 14px; }
.rule p { margin: 0; color: var(--text-2); line-height: 1.55; }
.rule-n { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-2); color: var(--accent); font-weight: 700; font-size: 13px; }
@media (max-width: 960px) { .ms-row { grid-template-columns: 56px minmax(0, 1fr); } .ms-progress { grid-column: 2; text-align: left; } .rules { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Idées */
.ideas-board { grid-template-columns: repeat(3, minmax(240px, 1fr)) minmax(200px, .7fr); }
.col.folded { opacity: .8; }
.col-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 18px 8px; border: 1.5px dashed var(--line-2); border-radius: 10px; }
.idea-detail { font-size: 12.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ie { font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.idea-src { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.idea-src:hover { color: var(--accent); border-color: var(--accent); }
.idea-src .ico, .idea-src svg { width: 13px; height: 13px; }
.idea button.sm { align-self: flex-start; }
.triage-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; border-left: 3px solid var(--info); }
.triage-banner .claude-status-ico { background: var(--info-bg); color: var(--info); }
.triage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.triage-actions .ghost { margin-left: auto; }
.matrix { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; gap: 8px; }
.matrix-y { display: flex; align-items: center; justify-content: center; }
.matrix-y span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.matrix-x { grid-column: 2; text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.matrix-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quad { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-height: 180px; border-top: 3px solid var(--line-2); }
.quad.ok { border-top-color: var(--ok); } .quad.info { border-top-color: var(--info); } .quad.warn { border-top-color: var(--warn); }
.quad-h { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.quad-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid transparent; cursor: pointer; font-size: 13px; }
.quad-item:hover { border-color: var(--accent); }
@media (max-width: 760px) { .matrix-grid { grid-template-columns: 1fr; } .triage-banner { flex-wrap: wrap; } }

/* ---------------------------------------------------------------- Sites clients */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.client-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.client-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.client-nom { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.client-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.client-meta .ico, .client-meta svg { width: 14px; height: 14px; }
.warn-t { color: var(--warn) !important; } .ok-t { color: var(--ok) !important; } .danger-t { color: var(--danger) !important; }
.back-link { display: inline-block; margin-bottom: 6px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.tcard-client { font-size: 11px; font-weight: 600; color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-client::before { content: "⛺ "; }
.phases { display: flex; flex-direction: column; gap: 10px; }
.phase { padding: 0; }
.phase > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.phase > summary::-webkit-details-marker { display: none; }
.phase.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2), var(--shadow); }
.phase.fait { opacity: .75; }
.phase-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text-2); }
.phase.current .phase-n { background: var(--accent); border-color: var(--accent); color: #fff; }
.phase.fait .phase-n { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.phase-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.phase-date { white-space: nowrap; }
.phase-tasks { border-top: 1px solid var(--line); }
.task-line { align-items: center; padding: 8px 16px 8px 56px; }
.task-line input[type=checkbox] { width: 16px; height: 16px; flex: none; margin: 0; }
.task-t { flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-size: 13.5px; }
.task-t:hover { color: var(--accent); }
.task-line.done .task-t { color: var(--muted); text-decoration: line-through; }
.phase-tasks .li:last-child { padding-left: 50px; }
.attente { align-items: center; padding: 11px 16px; }
.attente.valide, .attente.na { opacity: .65; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: center; }
.kv:last-of-type { border-bottom: 0; }
.kv > span { color: var(--muted); font-size: 12.5px; }
.chantier-row { align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.chantier-nom { min-width: 140px; } .chantier-phase { min-width: 150px; }
@media (max-width: 760px) { .task-line { padding-left: 16px; } .kv { grid-template-columns: 1fr; gap: 2px; } .chantier-row { flex-wrap: wrap; } }

/* ---------------------------------------------------------------- Préversions */
.apercu-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-left: 3px solid var(--accent); }
.apercu-head .claude-status-ico { background: var(--accent-2); color: var(--accent); }
.apercu-wrap { margin-top: 14px; }
.apercu-stage { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; justify-content: center; overflow: auto; }
.apercu-frame { height: 70vh; min-height: 480px; max-width: 100%; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; transition: width .2s; }
.apercu-hist { display: block; padding: 8px 12px; }
.apercu-hist > summary { cursor: pointer; list-style: none; gap: 8px; flex-wrap: nowrap; }
.apercu-hist > summary::-webkit-details-marker { display: none; }
.apercu-log { white-space: pre-wrap; font-size: 11.5px; max-height: 260px; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0 0; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

/* ---------------------------------------------------------------- Recette & migration */
.triage-banner.pret { border-left-color: var(--ok); }
.triage-banner.pret .claude-status-ico { background: var(--ok-bg); color: var(--ok); }
.rc-score { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.rc-score strong { font-size: 22px; line-height: 1.1; }
.rc-groupe { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 4px; }
.rc-groupe:first-of-type { margin-top: 4px; }
.rc-check { align-items: center; flex-wrap: wrap; padding: 8px 4px; }
.rc-check.ok > div:first-child { color: var(--muted); }
.rc-check.ko { background: color-mix(in srgb, var(--danger-bg) 55%, transparent); }
.rc-seg button { padding: 3px 8px; font-size: 12px; }
.rc-seg button.on.ok { color: var(--ok); } .rc-seg button.on.ko { color: var(--danger); }
.rem { flex-direction: column; gap: 4px; align-items: stretch; padding: 10px 2px; }
.rem.done { opacity: .62; }
.rem-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.redir-list { max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.redir { align-items: center; padding: 6px 10px; }
.redir.vide { background: color-mix(in srgb, var(--warn-bg) 50%, transparent); }
.redir-a { flex: 1 1 40%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.redir input.inline { flex: 1 1 35%; min-width: 120px; font-size: 12.5px; }
.redir select.inline { width: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tbl { font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.muted td { color: var(--muted); }
@media (max-width: 760px) { .redir { flex-wrap: wrap; } .redir-a { flex-basis: 100%; } }

/* Page de recette pour le client (sans compte) */
.rc-body { min-height: 100vh; display: flex; flex-direction: column; }
.rc-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.rc-top h1 { margin: 0; font-size: 20px; }
.rc-top .eyebrow { margin-bottom: 2px; }
.rc-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 0; }
.rc-scene { background: var(--panel-2); padding: 14px; display: flex; justify-content: center; overflow: auto; }
.rc-cadre { width: 100%; max-width: 100%; height: calc(100vh - 110px); min-height: 480px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; transition: width .2s; }
.rc-vide { align-self: center; color: var(--muted); max-width: 420px; text-align: center; }
.rc-panneau { border-left: 1px solid var(--line); background: var(--panel); overflow: auto; max-height: calc(100vh - 70px); }
.rc-bloc { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.rc-bloc h2 { font-size: 15px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.rc-liste { display: flex; flex-direction: column; gap: 8px; }
.rc-rem { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.rc-rem-t { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; font-size: 13.5px; }
.rc-rep { margin-top: 6px; padding: 6px 8px; background: var(--accent-2); border-radius: 8px; }
@media (max-width: 900px) {
  .rc-main { grid-template-columns: 1fr; }
  .rc-panneau { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  .rc-cadre { height: 70vh; }
  .rc-top { padding: 12px 16px; }
}

/* ---- Après la mise en ligne : suivi des sites, demandes, abonnement ---- */
.dispo-bar { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 28px; margin: 8px 0 4px; }
.dispo-bar i { background: var(--panel-3); border-radius: 2px; }
.dispo-bar i.ok { background: var(--ok); } .dispo-bar i.warn { background: var(--warn); } .dispo-bar i.ko { background: var(--danger); }
.suivi-etat.ok { border-left-color: var(--ok); } .suivi-etat.ok .claude-status-ico { background: var(--ok-bg); color: var(--ok); }
.suivi-etat.panne { border-left-color: var(--danger); } .suivi-etat.panne .claude-status-ico { background: var(--danger-bg); color: var(--danger); }
.suivi-etat.off, .suivi-etat.inconnu { border-left-color: var(--line-2); }
.suivi-table td { vertical-align: top; }
.dem { flex-direction: column; gap: 4px; align-items: stretch; padding: 10px 2px; }
.dem.done { opacity: .62; }
.dem.urgent { box-shadow: inset 3px 0 0 var(--danger); padding-left: 10px; }
.dem-t { font-weight: 600; text-decoration: none; color: var(--text); }
.dem-t:hover { text-decoration: underline; }
.dem .rem-t { color: var(--text-2); max-height: 7.5em; overflow: auto; }
.dem-client { font-weight: 600; }
button.chrono { font-variant-numeric: tabular-nums; }
button.chrono.on { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
tr.retard td { background: color-mix(in srgb, var(--danger-bg) 45%, transparent); }

/* Espace client (page publique du gérant) */
.ec-main { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; padding: 20px; max-width: 1100px; width: 100%; margin: 0 auto; align-items: start; }
.ec-col h2 { font-size: 16px; margin: 0 0 8px; }
.ec-col > .row { margin-bottom: 10px; }
.ec-etat { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--panel-2); color: var(--text-2); }
.ec-etat .dotc { background: var(--line-2); }
.ec-etat.ok { background: var(--ok-bg); color: var(--ok); } .ec-etat.ok .dotc { background: var(--ok); }
.ec-etat.panne { background: var(--danger-bg); color: var(--danger); } .ec-etat.panne .dotc { background: var(--danger); }
.ec-devis { margin-top: 8px; padding: 10px; border-radius: 8px; background: var(--violet-bg); }
@media (max-width: 820px) {
  .ec-main { grid-template-columns: 1fr; padding: 14px 16px; }
}
