/* LYMPIDIA OVERVIEW · Indigo nuit
   Mode jour : les cinq premières couleurs (14142B, 5B5BD6, E7E7FB, F7F7FB, 111827).
   Mode nuit : les cinq dernières (08080F, 8B8BF5, 25254A, 0D0D18, ECECF8). */

@font-face { font-family: 'Geist'; src: url('/fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/geist-mono.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --nav: #14142B; --nav-on: #26264A; --nav-line: #2A2A4A; --nav-ink: #ECECF8; --nav-mu: #B4B4D6;
  --bg: #F7F7FB; --surface: #FFFFFF; --sunk: #F0F0F7;
  --line: #E4E4F0; --line-soft: #EEEEF6; --line-strong: #D3D3E4;
  --ink: #111827; --ink-2: #2B2F45; --muted: #5A5E78;
  --accent: #5B5BD6; --accent-hover: #4A4AC4; --on-accent: #FFFFFF;
  --accent-soft: #E7E7FB; --accent-text: #3C3CA0; --accent-link: #4A4AC4;
  --ok: #1F7A52; --ok-bg: #E3F4EA; --ok-ink: #1F6B45;
  --warn: #9A6A00; --warn-bg: #FBF0D9; --warn-ink: #6E4B00; --warn-line: #EBD39C;
  --bad: #B42323; --bad-bg: #FBE6E6; --bad-ink: #9A1E1E;
  --scrim: rgba(17, 24, 39, .55);
  --shadow: 0 12px 32px -12px rgba(20, 20, 43, .28);
  --r-card: 12px; --r-ctl: 10px;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --nav: #08080F; --nav-on: #1A1A2E; --nav-line: #1C1C30; --nav-ink: #ECECF8; --nav-mu: #A9A9CF;
  --bg: #0D0D18; --surface: #16162A; --sunk: #11111F;
  --line: #2A2A48; --line-soft: #20203A; --line-strong: #36365C;
  --ink: #ECECF8; --ink-2: #C9C9E0; --muted: #A3A3C2;
  --accent: #8B8BF5; --accent-hover: #A2A2FA; --on-accent: #0D0D18;
  --accent-soft: #25254A; --accent-text: #C9C9F0; --accent-link: #A5A5FF;
  --ok: #6FD3A3; --ok-bg: #173527; --ok-ink: #9FE6C2;
  --warn: #F2C14E; --warn-bg: #3A2F12; --warn-ink: #F6D98E; --warn-line: #5C4A1A;
  --bad: #FF8A8A; --bad-bg: #3D1C22; --bad-ink: #FFB3B3;
  --scrim: rgba(4, 4, 10, .72);
  --shadow: 0 16px 40px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--accent); color: var(--on-accent); }
a { color: var(--accent-link); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: var(--r-ctl); text-decoration: none; }
.skip:focus { top: 12px; color: var(--on-accent); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* Boutons et champs */
.btn { height: 44px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 500; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, transform .1s; }
.btn:hover { background: var(--sunk); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--ink-2); color: var(--bg); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 44px; padding: 0; }
.btn-sm.btn-icon { width: 36px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--sunk); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.input { height: 44px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: var(--surface); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted); opacity: 1; }
textarea.input { height: auto; padding: 10px 14px; resize: vertical; line-height: 1.5; }
select.input { padding-right: 10px; }
.input-sm { height: 36px; padding: 0 10px; font-size: 13px; width: auto; max-width: 280px; }
input[type="checkbox"] { accent-color: var(--accent); }

/* Structure : barre latérale sur ordinateur, barre du bas sur téléphone */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; background: var(--nav); color: var(--nav-ink); padding: 20px 12px 14px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; color: var(--nav-ink); text-decoration: none; }
.brand:hover { color: var(--nav-ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: .05em; }
.brand-sub { font-size: 10.5px; font-weight: 500; letter-spacing: .3em; color: var(--nav-mu); margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--r-ctl); color: var(--nav-mu); text-decoration: none; font-size: 14px; font-weight: 500; transition: background-color .15s, color .15s; }
.nav a:hover { color: var(--nav-ink); background: var(--nav-on); }
.nav a[aria-current="page"] { color: var(--nav-ink); background: var(--nav-on); }
.nav a[aria-current="page"] svg { color: #8B8BF5; }
.nav svg, .tabbar svg { flex-shrink: 0; }
.side-foot { margin-top: auto; border-top: 1px solid var(--nav-line); padding: 14px 6px 0; display: flex; flex-direction: column; gap: 12px; }
.side-status { display: flex; flex-direction: column; gap: 4px; padding: 0 6px; font-size: 13px; }
.side-status .line { display: flex; align-items: center; gap: 8px; color: var(--nav-ink); }
.side-status .mono { font-size: 12px; color: var(--nav-mu); }
.side-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who { display: flex; align-items: center; gap: 6px; }
.theme-btn { width: 40px; height: 40px; border-radius: var(--r-ctl); border: 1px solid var(--nav-line); background: transparent; color: var(--nav-mu); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.theme-btn:hover { color: var(--nav-ink); background: var(--nav-on); }
.tabbar { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0; border: 0; text-decoration: none; }
.avatar:hover { color: #fff; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.md { width: 30px; height: 30px; font-size: 12px; }
button.avatar { cursor: pointer; }

.main { min-width: 0; width: 100%; max-width: 1760px; margin: 0 auto; padding: 32px 40px 64px; display: flex; flex-direction: column; gap: 24px; outline: none; }
.main > * { animation: enter .32s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Accueil */
.hello { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.hello-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.hello h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -.025em; }
.hello .date { color: var(--muted); font-size: 15px; }
.hello p { margin: 6px 0 0; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.card.dark { background: var(--nav); color: var(--nav-ink); border-color: var(--nav); }
.card.dark .mono, .card.dark .muted { color: var(--nav-mu); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* Le rail du jour */
.rail-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.rail-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.rail-head span { color: var(--muted); font-size: 14px; }
.rail { position: relative; }
.rail::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 2px; border-radius: 2px; background: var(--line-strong); }
.rail-track { position: relative; display: flex; gap: 14px; overflow-x: auto; padding: 7px 0 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail-track::-webkit-scrollbar { display: none; }
.ticket { position: relative; flex: 0 0 248px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-card) var(--r-card); padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; transform-origin: top center; animation: hang .42s var(--ease) both; transition: transform .2s var(--ease), border-color .2s; }
.ticket:nth-child(2) { animation-delay: .05s; } .ticket:nth-child(3) { animation-delay: .1s; } .ticket:nth-child(4) { animation-delay: .15s; } .ticket:nth-child(5) { animation-delay: .2s; }
.ticket::before { content: ''; position: absolute; top: -5px; left: 50%; margin-left: -14px; width: 28px; height: 8px; border-radius: 4px; background: var(--accent); }
.ticket:hover { transform: translateY(2px); border-color: var(--line-strong); color: var(--ink); }
.ticket-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.ticket-top .mono { font-size: 13px; }
.ticket-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.ticket-meta { font-size: 14px; line-height: 1.45; color: var(--muted); }
.ticket-cta { margin-top: auto; padding-top: 2px; font-size: 14px; font-weight: 500; color: var(--accent-link); }
.ticket.calm { border-style: dashed; border-top: 0; }
@keyframes hang { from { opacity: 0; transform: translateX(24px) rotate(1.2deg); } to { opacity: 1; transform: none; } }

/* Indicateurs serveur (page Serveur) */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.kpi-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); gap: 8px; }
.kpi-val { font-family: var(--mono); font-size: 24px; font-weight: 400; letter-spacing: -.02em; }
.bar { height: 4px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.bar > div { height: 100%; border-radius: 2px; background: var(--accent); width: 0; transition: width .5s var(--ease); }
.bar > div.ok { background: var(--ok); }
.bar > div.warn { background: var(--warn); }
.services { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.side .dot { background: #6FD3A3; } .side .dot.warn { background: #F2C14E; } .side .dot.bad { background: #FF8A8A; }

/* Tâches */
.newtask { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.col { background: var(--sunk); border-radius: var(--r-card); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; outline: 2px dashed transparent; outline-offset: -2px; transition: outline-color .15s; }
.col.over { outline-color: var(--accent); }
.col-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; color: var(--ink); padding: 2px 4px 4px; }
.col-head .mono { font-weight: 400; font-size: 13px; color: var(--muted); }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px; display: flex; flex-direction: column; gap: 10px; cursor: grab; transition: border-color .15s, transform .2s var(--ease), box-shadow .2s; }
.task:hover { border-color: var(--line-strong); }
.task.dragging { opacity: .6; transform: rotate(-1.5deg); box-shadow: var(--shadow); }
.task-title { font-size: 14px; line-height: 1.4; word-break: break-word; }
.task-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.task-due { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.task-due.late { color: var(--bad); }
.task-btns { display: flex; gap: 4px; align-items: center; }
.task-btns button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); padding: 0; transition: background-color .15s, color .15s; }
.task-btns button:hover { background: var(--sunk); color: var(--ink); }
.task.done .task-title { color: var(--muted); text-decoration: line-through; }
.task-sec { align-self: flex-start; max-width: 100%; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; order: 1; }
.task-meta { order: 2; }
.task-doc { font-size: 12px; color: var(--accent-link); text-decoration: none; white-space: nowrap; }
.planbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--sunk); font-size: 14px; }
.planbar > span:nth-child(2) { flex: 1; min-width: 200px; }
.planbar .btn { margin-left: auto; }

/* Notes */
.feed { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.feed.limit { max-height: 440px; }
.msg { display: flex; gap: 12px; }
.msg-head { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.msg-head strong { color: var(--ink); font-weight: 600; }
.msg-body { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; padding: 2px 4px; text-decoration: underline; }
.composer { display: flex; gap: 8px; margin-top: auto; }
.composer .input { flex-grow: 1; }

/* Fichiers */
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--r-card); padding: 18px; text-align: center; color: var(--muted); font-size: 14px; transition: background-color .15s, border-color .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.drop label { color: var(--accent-link); text-decoration: underline; cursor: pointer; }
.progress { font-size: 13px; color: var(--muted); }
.files { display: flex; flex-direction: column; }
.file { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line-soft); }
.file:last-child { border-bottom: 0; }
.ext { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent-text); font-family: var(--mono); font-size: 11px; display: flex; align-items: center; justify-content: center; text-transform: uppercase; overflow: hidden; }
.ext.dir { background: var(--warn-bg); color: var(--warn-ink); }
.ext.g-doc { background: var(--accent-soft); color: var(--accent-text); }
.ext.g-sheet { background: var(--ok-bg); color: var(--ok-ink); }
.ext.g-slide { background: var(--warn-bg); color: var(--warn-ink); }
.ext.g-pdf { background: var(--bad-bg); color: var(--bad-ink); }
.file-info { flex-grow: 1; min-width: 0; }
.file-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name.link { display: block; color: var(--ink); text-decoration: none; }
.file-name.link:hover { color: var(--accent-link); text-decoration: underline; }
.file-meta { font-size: 12px; color: var(--muted); }
.file-btns { display: flex; gap: 6px; flex-shrink: 0; }
.tabs { display: inline-flex; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 3px; gap: 2px; }
.tab { padding: 7px 14px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; min-width: 0; }
.crumbs a { color: var(--accent-link); text-decoration: none; font-weight: 500; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--muted); }
.crumbs [aria-current] { font-weight: 600; word-break: break-word; }
.drive-line { font-size: 13px; color: var(--muted); text-decoration: none; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.drive-line:hover { color: var(--accent-link); }
.drive-info p { margin: 0; font-size: 14px; }
.drive-info:empty { display: none; }
.gthumb { display: block; width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--r-ctl); overflow: hidden; border: 1px solid var(--line); background: var(--sunk); }
.gthumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.gthumb-btn { display: block; flex-shrink: 0; width: 40px; height: 40px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: var(--r-ctl); }
.gsearch { flex: 1 1 260px; max-width: 420px; display: flex; }
.gsearch .input { width: 100%; }
.gtools { flex-wrap: wrap; }
.linkbtn { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; max-width: 100%; color: var(--ink); }

/* Rapport */
.report-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.report-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--nav-line); padding-bottom: 10px; }
.report-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.card.dark p { margin: 0; color: var(--nav-mu); font-size: 14px; }
.card.dark .btn { background: var(--nav-ink); border-color: var(--nav-ink); color: #14142B; margin-top: auto; }
.reports-layout { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.rep-item { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); }
.rep-item:hover { border-color: var(--line-strong); }
.rep-item[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.rep-item .s { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
a.rep-item { text-decoration: none; }
a.rep-item:hover { color: var(--ink); }
.rep-frame { width: 100%; height: 1200px; border: 0; border-radius: var(--r-card); background: #FFFFFF; }

/* Serveur (détail) */
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; font-size: 14px; }
.kv div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-soft); padding: 10px 0; gap: 12px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-family: var(--mono); text-align: right; }

/* Compte */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.page-title { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }

/* Menu « Plus » (téléphone) */
.menu-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; color: var(--ink); text-decoration: none; border: 0; border-bottom: 1px solid var(--line-soft); background: none; font-size: 15px; text-align: left; cursor: pointer; width: 100%; }
.menu-list > :last-child { border-bottom: 0; }
.menu-list svg { color: var(--muted); }
.menu-list .go { margin-left: auto; color: var(--muted); }

/* Messages */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--nav); color: var(--nav-ink); padding: 12px 18px; border-radius: var(--r-ctl); font-size: 14px; z-index: 50; max-width: calc(100% - 32px); box-shadow: var(--shadow); animation: toast .24s var(--ease) both; }
.toast.err { background: var(--bad); color: #fff; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.alert { border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r-ctl); padding: 12px 14px; font-size: 14px; }

/* Simulation */
.sim-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.sim-sub { margin: 4px 0 0; font-size: 14px; }
.sim-note { font-size: 13px; }
.sim-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.sim-badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.sim-badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.sim-badge.fail { background: var(--bad-bg); color: var(--bad-ink); }
.sim-badge.skip { background: var(--sunk); color: var(--muted); }
.sim-badge.running { background: var(--accent-soft); color: var(--accent-text); }
.sim-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sim-strip { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 20px; }
.sim-strip-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.sim-group { margin: 8px 0 0; font-size: 15px; font-weight: 600; }
.sim-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sim-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.sim-step:last-child { border-bottom: 0; }
.sim-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--line-strong); }
.sim-dot.ok { background: var(--ok); }
.sim-dot.warn { background: var(--warn); }
.sim-dot.fail { background: var(--bad); }
.sim-dot.running { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.sim-step-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sim-step-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.sim-step-top .mono { margin-left: auto; font-size: 12px; }
.sim-step-detail { font-size: 13px; color: var(--ink-2); word-break: break-word; }
.sim-errors { font-size: 12px; }
.sim-errors summary { cursor: pointer; color: var(--warn); }
.sim-errors ul { margin: 6px 0 0; padding-left: 18px; }
.sim-errors li { word-break: break-all; }
.sim-shot { flex-shrink: 0; width: 120px; height: 79px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: block; background: var(--sunk); }
.sim-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* Visionneuse / éditeur Google et petites fenêtres */
.no-scroll { overflow: hidden; }
.gviewer { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: flex; flex-direction: column; padding: 16px; animation: fade .18s ease both; }
@keyframes fade { from { opacity: 0; } }
.gviewer-bar { background: var(--surface); border-radius: var(--r-card) var(--r-card) 0 0; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.gviewer-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gviewer-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.gviewer-sub { font-size: 12px; }
.gviewer-body { flex-grow: 1; background: #fff; border-radius: 0 0 var(--r-card) var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.gviewer-frame { flex-grow: 1; width: 100%; border: 0; }
.gviewer-help { margin: 0; padding: 6px 16px; font-size: 12px; border-top: 1px solid var(--line-soft); color: #5A5E78; }
.dialog-wrap { align-items: center; justify-content: center; }
.dialog { width: 100%; max-width: 460px; box-shadow: var(--shadow); }
.dialog h2 { margin: 0; font-size: 18px; }
.dialog-input { width: 100%; }
.dialog-actions { justify-content: flex-end; }

/* Connexion */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.login-side { background: var(--nav); color: var(--nav-ink); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; overflow: hidden; }
.login-side .brand { padding: 0; }
.login-side .login-pitch { font-size: 40px; color: var(--nav-ink); line-height: 1.08; font-weight: 600; letter-spacing: -.03em; margin: 0; max-width: 12em; }
.login-rail { position: relative; padding-top: 10px; display: flex; gap: 12px; }
.login-rail::before { content: ''; position: absolute; left: -56px; right: -56px; top: 10px; height: 2px; background: var(--nav-line); }
.login-rail .ticket { flex: 0 0 200px; background: var(--nav-on); border-color: var(--nav-line); color: var(--nav-ink); }
.login-rail .ticket::before { background: #8B8BF5; }
.login-rail .ticket-meta, .login-rail .ticket-top { color: var(--nav-mu); }
.login-side p { margin: 0; color: var(--nav-mu); font-size: 14px; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.login-form h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.login-form p { margin: 6px 0 0; }
.login-form .err { color: var(--bad); font-size: 14px; min-height: 20px; }
.login-note { margin: 0; font-size: 13px; text-align: center; }
.login-mobile-brand { display: none; }

/* Responsive */
@media (max-width: 1100px) {
  .cols, .reports-layout { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 28px 28px 56px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); gap: 20px; }
  .mobile-top { display: flex; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500; border-radius: var(--r-ctl); }
  .tabbar a[aria-current="page"] { color: var(--accent-link); }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .newtask { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .newtask .input:first-child { grid-column: 1 / -1; }
  .newtask .btn { grid-column: 1 / -1; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .hello h1 { font-size: 26px; }
  .hello > .actions .btn:not(.btn-primary) { display: none; }
  .ticket { flex-basis: 236px; }
  .sim-shot { width: 72px; height: 48px; }
  .gviewer { padding: 0; } .gviewer-bar, .gviewer-body { border-radius: 0; } .gviewer-title strong { max-width: 60vw; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-side { display: none; }
  .login-mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-weight: 600; letter-spacing: .05em; }
}
.mobile-top { display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--nav); color: var(--nav-ink); position: sticky; top: 0; z-index: 20; }
.mobile-top .brand { padding: 0; }
.mobile-top .side-row { gap: 10px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media (max-width: 860px) { .mobile-top { display: flex; } }
