/* AMI Care · wireframes basse fidélité. Gris, une seule couleur d'accent (#2563eb)
   pour les actions principales et les états de l'agent. Données fictives. */
:root {
  --bg: #ececec; --surface: #fff; --line: #d4d4d4; --line-2: #e6e6e6; --fill: #f1f1f1; --fill-2: #e2e2e2;
  --text: #1f1f1f; --muted: #6b6b6b; --dark: #2b2b2b;
  --accent: #2563eb; --accent-2: #dbe6fd; --accent-3: #eef3fe;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body { font-family: "Liberation Sans", Arial, sans-serif; color: var(--text); font-size: 15px; line-height: 1.35; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

/* ------------------------------------------------ cadres */
.app { background: var(--surface); display: flex; flex-direction: column; }
.m { width: 390px; min-height: 844px; }
.d { width: 1440px; min-height: 900px; flex-direction: row; }
.m .content { flex: 1; padding: 12px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.statusbar { height: 26px; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-size: 12px; font-weight: 700; color: var(--muted); }
.topbar { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 16px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 20px; margin: 0; flex: 1; font-weight: 700; }
.topbar .sub { font-size: 12px; color: var(--muted); font-weight: 400; display: block; margin-top: 1px; }
.iconbtn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; font-size: 18px; color: var(--dark); position: relative; }
.iconbtn .dot { position: absolute; top: 6px; right: 4px; background: var(--dark); color: #fff; font-size: 10px; font-weight: 700; border-radius: 9px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.tabbar { display: flex; border-top: 1px solid var(--line); background: #fafafa; }
.tabbar a { flex: 1; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); }
.tabbar a .ic { width: 22px; height: 18px; border-radius: 5px; background: var(--fill-2); }
.tabbar a.on { color: var(--accent); font-weight: 700; }
.tabbar a.on .ic { background: var(--accent); }
.tabbar a .n { font-size: 10px; background: var(--dark); color: #fff; border-radius: 8px; padding: 0 5px; margin-left: 2px; }

.sidebar { width: 232px; background: #f7f7f7; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.sidebar .brand { font-weight: 700; font-size: 17px; padding: 6px 10px 14px; }
.sidebar .brand small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--dark); font-size: 14px; }
.sidebar a .ic { width: 18px; height: 16px; border-radius: 4px; background: var(--fill-2); }
.sidebar a.on { background: var(--accent-3); color: var(--accent); font-weight: 700; }
.sidebar a.on .ic { background: var(--accent); }
.sidebar a .n { margin-left: auto; font-size: 11px; background: var(--dark); color: #fff; border-radius: 9px; padding: 1px 7px; }
.sidebar .sep { height: 1px; background: var(--line); margin: 8px 4px; }
.sidebar .me { margin-top: auto; font-size: 12px; color: var(--muted); padding: 8px 10px; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dtop { height: 56px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.dtop .search { flex: 0 0 420px; height: 36px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: 13px; background: #fafafa; }
.dtop .search kbd { margin-left: auto; font-family: inherit; font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.dtop .grow { flex: 1; }
.cols { flex: 1; display: flex; min-height: 0; }
.col { border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.col:last-child { border-right: none; }
.page { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.page h2, .col h2 { font-size: 20px; margin: 0; }

/* ------------------------------------------------ éléments */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 15px; font-weight: 700; color: var(--dark); white-space: nowrap; }
.d .btn { min-height: 36px; font-size: 14px; padding: 0 14px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn.off { background: var(--fill); color: #a3a3a3; border-color: var(--line-2); }
.btn.block { width: 100%; }
.btn.sm { min-height: 32px; font-size: 13px; padding: 0 10px; }
.m .btn.sm { min-height: 44px; min-width: 44px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow.eq > * { flex: 1; }
.kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; font-weight: 400; }
.hint { font-size: 12px; color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.card.fill { background: var(--fill); border-color: var(--fill); }
.card.accent { border: 2px solid var(--accent); }
.card.darkline { border: 2px solid var(--dark); }
.sect { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sect .c { margin-left: auto; color: var(--dark); font-size: 13px; letter-spacing: 0; }
.row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 700; }
.row .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.chev { color: #a0a0a0; font-size: 18px; min-width: 20px; text-align: center; }
.av { width: 36px; height: 36px; border-radius: 18px; background: var(--fill-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--dark); flex-shrink: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; color: var(--dark); white-space: nowrap; background: #fff; }
.chip.fill { background: var(--fill); border-color: var(--fill); }
.chip.dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.chip.acc { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent); font-weight: 700; }
.chip.accl { border-color: var(--accent); color: var(--accent); }
.chip.strike { text-decoration: line-through; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.scrollx { display: flex; gap: 8px; overflow: hidden; }
.scrollx .chip { font-size: 13px; padding: 0 12px; min-height: 36px; }
.m .scrollx .chip { min-height: 44px; border-radius: 22px; }
.state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; background: var(--fill); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.state::before { content: "◔"; color: var(--muted); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 10px; font-size: 14px; }
.kv .k { color: var(--muted); font-size: 13px; }
.prov { font-size: 12px; color: var(--muted); }
.pin { font-size: 12px; color: var(--muted); }
.field { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; background: #fff; min-height: 44px; }
.field.edit { border: 2px solid var(--accent); }
.label { font-size: 12px; color: var(--muted); font-weight: 700; }
.ph { background: repeating-linear-gradient(45deg, #ededed, #ededed 8px, #e2e2e2 8px, #e2e2e2 16px); border-radius: 8px; display: flex; align-items: flex-end; padding: 6px; font-size: 11px; color: var(--muted); }
.toast { background: var(--dark); color: #fff; border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.toast a { color: #9fbcff; font-weight: 700; margin-left: auto; min-height: 44px; display: flex; align-items: center; padding: 0 6px; }
.d .toast a { min-height: 0; }
.banner { border-radius: 10px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.banner.agent { background: var(--accent-3); border: 1px solid var(--accent-2); color: var(--accent); }
.banner.human { background: #fff; border: 2px solid var(--dark); }
.banner.alert { background: var(--dark); color: #fff; }
.banner.env { background: repeating-linear-gradient(135deg, #3a3a3a, #3a3a3a 10px, #2b2b2b 10px, #2b2b2b 20px); color: #fff; border-radius: 0; font-weight: 700; justify-content: center; font-size: 13px; letter-spacing: .04em; }
.banner .grow { flex: 1; }
.syncok { color: var(--accent); font-size: 12px; font-weight: 700; }
.syncok::before { content: "● "; }
.check { font-size: 13px; }
.ok::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.ko::before { content: "✕ "; font-weight: 700; }
.wait::before { content: "◌ "; color: var(--muted); font-weight: 700; }
.warn::before { content: "! "; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.b { font-weight: 700; }
.sep { height: 1px; background: var(--line-2); }

/* fil */
.thread { display: flex; flex-direction: column; gap: 10px; }
.marker { align-self: center; font-size: 12px; color: var(--muted); background: var(--fill); border-radius: 12px; padding: 3px 10px; text-align: center; }
.marker.acc { background: var(--accent-3); color: var(--accent); }
.bub { max-width: 82%; border-radius: 14px; padding: 8px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.bub .meta { font-size: 11px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.bub.in { align-self: flex-start; background: var(--fill); border-top-left-radius: 4px; }
.bub.out { align-self: flex-end; background: #fff; border: 1px solid var(--line); border-top-right-radius: 4px; }
.bub.human { align-self: flex-end; background: #fff; border: 2px solid var(--dark); border-top-right-radius: 4px; }
.orig { font-size: 12px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; }
.composer { border-top: 1px solid var(--line); padding: 8px 12px; display: flex; gap: 8px; align-items: center; background: #fafafa; }
.composer .input { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 22px; display: flex; align-items: center; padding: 0 14px; color: var(--muted); font-size: 14px; background: #fff; }

/* kanban */
.board { display: flex; gap: 12px; overflow: hidden; }
.kcol { width: 232px; flex-shrink: 0; background: var(--fill); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.kcol h3 { font-size: 13px; margin: 0; display: flex; justify-content: space-between; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }

/* tuiles */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-size: 28px; font-weight: 700; }
.kpi .l { font-size: 13px; color: var(--muted); }
.bar { height: 10px; background: var(--fill-2); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--dark); }
.bar.acc i { background: var(--accent); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t td.nw, table.t th.nw { white-space: nowrap; }
table.t td.msg { min-width: 170px; }
table.t tr.sel td { background: var(--accent-3); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg span { padding: 0 12px; min-height: 36px; display: flex; align-items: center; font-size: 13px; border-right: 1px solid var(--line); }
.m .seg span { min-height: 44px; }
.seg span:last-child { border-right: none; }
.seg span.on { background: var(--dark); color: #fff; font-weight: 700; }
.seg span.acc { background: var(--accent); color: #fff; font-weight: 700; }
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; }
.modal { width: 520px; background: #fff; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.rel { position: relative; }
.sheet { border-top-left-radius: 18px; border-top-right-radius: 18px; border: 1px solid var(--line); border-bottom: none; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; background: #fff; box-shadow: 0 -6px 24px rgba(0,0,0,.08); }
.grab { width: 40px; height: 5px; background: var(--fill-2); border-radius: 3px; align-self: center; }
.rec { width: 88px; height: 88px; border-radius: 44px; background: var(--accent); align-self: center; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
table.t .state { white-space: normal; }
table.t.dense td { padding: 8px 6px; }
/* annotations de wireframe (étapes numérotées) */
.step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--accent); font-weight: 700; }
.step span { width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.m .kcard > a.b { min-height: 44px; display: flex; align-items: center; gap: 6px; }
a.kpi { color: inherit; }
