/* ============================================================
   Be Wise — Agents · système visuel
   Palette du site : bleu nuit #181b22 · doré #d78b30 · papier #f7f5f1
   Typo : Montserrat (interface) · Brown Sugar (accents script)
   ============================================================ */
@font-face { font-family: "Brown Sugar"; src: url("/static/brand/fonts/BrownSugar.otf") format("opentype"); font-display: swap; }
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");

:root {
  --navy: #181b22; --navy-900: #0f1116; --navy-800: #1f232c; --navy-700: #2a2f3a; --navy-100: #e9e7e2;
  --gold: #d78b30; --gold-600: #b8741f; --gold-soft: #fbf0df; --gold-line: #efd9b5;
  --paper: #f7f5f1; --card: #ffffff; --ink: #181b22; --ink-2: #3a3f4a; --muted: #6f6c66; --line: #e6e2da; --line-2: #d9d4ca;
  --ok: #1f7a4d; --ok-soft: #e5f3eb; --err: #b23b2b; --err-soft: #fbe9e5; --warn: #9a6a12; --warn-soft: #fff4dd;
  --r-lg: 20px; --r: 14px; --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(24,27,34,.05), 0 2px 8px rgba(24,27,34,.05);
  --shadow: 0 2px 6px rgba(24,27,34,.05), 0 14px 34px rgba(24,27,34,.08);
  --shadow-lg: 0 30px 80px rgba(15,17,22,.35);
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --script: "Brown Sugar", cursive;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; color: var(--ink); background: var(--paper); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--navy-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.script { font-family: var(--script); color: var(--gold); font-size: 1.6rem; line-height: 1; letter-spacing: 0; }
.eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
code { background: #efece5; padding: 1px 6px; border-radius: 6px; font-size: .86em; }
pre { background: var(--navy-900); color: #e8ebf0; padding: 14px 16px; border-radius: var(--r-sm); overflow: auto; font-size: .84rem; line-height: 1.5; }
.ico-svg { display: inline-block; vertical-align: -.22em; flex: none; }
::selection { background: var(--gold-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; } *::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

/* ---------- boutons, champs ---------- */
button, .button { font: inherit; font-weight: 600; font-size: .92rem; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; background: var(--navy-100); color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.2; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s, color .15s, border-color .15s; white-space: nowrap; }
button:hover, .button:hover { transform: translateY(-1px); }
button:active, .button:active { transform: translateY(0); }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: 0; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--gold); }
button.primary, .button.primary { background: var(--navy); color: #fff; box-shadow: 0 8px 18px rgba(24,27,34,.22); }
button.primary:hover, .button.primary:hover { background: var(--navy-700); }
button.gold, .button.gold { background: var(--gold); color: #fff; box-shadow: 0 8px 18px rgba(215,139,48,.3); }
button.gold:hover, .button.gold:hover { background: var(--gold-600); }
button.ghost, .button.ghost { background: transparent; color: var(--navy-700); border: 1px solid var(--line-2); }
button.ghost:hover, .button.ghost:hover { border-color: var(--navy-700); }
button.link { background: none; color: var(--navy-700); padding: 6px 8px; border-radius: 8px; font-weight: 600; }
button.link:hover { background: var(--navy-100); transform: none; }
button.icon-btn { padding: 0; width: 38px; height: 38px; border-radius: 50%; }
button:disabled, .button:disabled { opacity: .45; cursor: default; transform: none !important; box-shadow: none; }
button.sm, .button.sm { padding: 7px 13px; font-size: .84rem; }
form.inline { display: inline; }
label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
input, select, textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font: inherit; background: #fff; color: var(--ink); transition: border .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #a39f97; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { resize: vertical; line-height: 1.5; }
.row { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; }
.row.wrap input, .row.wrap select { width: auto; flex: 1 1 200px; }
.notice, .error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); font-size: .92rem; margin-bottom: 16px; }
.notice { color: var(--navy); background: #fff; border: 1px solid var(--gold-line); border-left: 4px solid var(--gold); }
.error { color: var(--err); background: var(--err-soft); border-left: 4px solid var(--err); }
.tag { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 3px 7px; vertical-align: middle; white-space: nowrap; }
.tag.navy { background: var(--navy-100); color: var(--navy); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.status-pill.on { background: var(--ok-soft); color: var(--ok); }
.status-pill.off { background: var(--navy-100); color: var(--muted); }
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line); }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; margin-bottom: 22px; box-shadow: var(--shadow-sm); min-width: 0; }
.card table { display: block; overflow-x: auto; }
.card > h2 { display: flex; align-items: center; gap: 10px; }
.card > h2 .ico-svg { color: var(--gold); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .82rem; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 30px; height: 30px; font-size: .7rem; }
.tile { width: 44px; height: 44px; border-radius: 13px; background: var(--navy); color: var(--gold); display: inline-grid; place-items: center; flex: none; box-shadow: 0 8px 18px rgba(24,27,34,.22); }
.tile.sm { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; }
.tile.light { background: var(--navy-100); color: var(--navy); box-shadow: none; }

/* ---------- coquille ---------- */
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.nav { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-900) 100%); color: #f3efe7; padding: 28px 18px 20px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; border-right: 1px solid rgba(255,255,255,.06); }
.nav::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .8; pointer-events: none; }
.nav .logo { display: block; width: fit-content; margin-left: 4px; }
.nav .logo img { width: 92px; display: block; }
.nav .script { margin: 6px 0 0 4px; font-size: 1.5rem; color: var(--gold); }
.nav nav { display: flex; flex-direction: column; gap: 3px; }
.nav nav .section { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(243,239,231,.45); margin: 16px 10px 6px; font-weight: 700; }
.nav nav a { color: rgba(243,239,231,.86); text-decoration: none; padding: 9px 10px; border-radius: 12px; display: flex; align-items: center; gap: 11px; font-weight: 500; font-size: .92rem; transition: background .15s, color .15s; }
.nav nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav nav a.active { background: rgba(215,139,48,.16); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav nav a .ico { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: rgba(255,255,255,.07); color: rgba(243,239,231,.9); flex: none; transition: background .15s, color .15s; }
.nav nav a.active .ico, .nav nav a:hover .ico { background: var(--gold); color: #fff; }
.nav-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.nav-foot .who { flex: 1; line-height: 1.25; font-size: .88rem; min-width: 0; }
.nav-foot .who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-foot .who small { color: rgba(243,239,231,.6); }
.nav-foot .icon-btn { width: 34px; height: 34px; background: rgba(255,255,255,.08); color: #f3efe7; }
.nav-foot .icon-btn:hover { background: var(--gold); }
.content { padding: 40px 48px 70px; max-width: 1220px; width: 100%; min-width: 0; }
.content.chat { padding: 0; max-width: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.page-head .script { font-size: 2rem; margin-bottom: 8px; display: block; }
.page-head h1 { margin: 0; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }

/* ---------- connexion ---------- */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login .pane { position: relative; overflow: hidden; background: radial-gradient(900px 500px at 15% 5%, rgba(215,139,48,.22), transparent 55%), linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); color: #f3efe7; padding: 64px; display: flex; flex-direction: column; justify-content: space-between; }
.login .pane::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(215,139,48,.25); pointer-events: none; }
.login .pane img { width: 150px; }
.login .pane .tagline { font-size: 2.3rem; font-weight: 700; line-height: 1.12; letter-spacing: -.02em; max-width: 14ch; margin: 0; }
.login .pane .script { font-size: 2.1rem; margin-top: 12px; color: var(--gold); }
.login .pane .foot { font-size: .82rem; opacity: .65; }
.login .form { display: grid; place-items: center; padding: 40px; }
.login .form > div { width: min(400px, 100%); }
.login .form h1 { font-size: 1.8rem; }
.login .form .row { justify-content: stretch; } .login .form .row button { width: 100%; padding: 13px; }

/* ---------- accueil ---------- */
.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-bottom: 40px; }
.agent-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.agent-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--gold), #e9b974); opacity: 0; transition: opacity .2s; }
.agent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-line); }
.agent-card:hover::before { opacity: 1; }
.agent-head { display: flex; align-items: center; gap: 14px; }
.agent-head h2 { margin: 0; font-size: 1.2rem; }
.agent-head .for { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; margin-top: 2px; }
.agent-card > p { margin: 0; color: var(--muted); font-size: .9rem; }
.agent-card .examples { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 4px; }
.agent-card .examples button { background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; font-size: .8rem; padding: 7px 10px; text-align: left; border-radius: 10px; justify-content: flex-start; gap: 8px; white-space: normal; line-height: 1.35; }
.agent-card .examples button .ico-svg { color: var(--gold); }
.agent-card .examples button:hover { border-color: var(--gold); background: var(--gold-soft); transform: none; }
.agent-card .start { margin-top: auto; align-self: flex-start; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.convs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.convs li a { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.convs li a:hover { border-color: var(--gold-line); transform: translateX(3px); box-shadow: var(--shadow-sm); }
.convs .title { flex: 1; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convs small { color: var(--muted); white-space: nowrap; }
.convs .ico-svg.chev { color: var(--line-2); }
.empty { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 26px; text-align: center; color: var(--muted); font-size: .9rem; }
dialog { border: 0; border-radius: 22px; padding: 0; width: min(700px, 92vw); box-shadow: var(--shadow-lg); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(15,17,22,.55); backdrop-filter: blur(4px); }
dialog .dlg-head { display: flex; align-items: center; gap: 14px; padding: 22px 26px 0; }
dialog .dlg-head h2 { margin: 0; font-size: 1.3rem; }
dialog .dlg-head .eyebrow { display: block; margin-bottom: 2px; }
dialog .dlg-body { padding: 16px 26px 24px; }
dialog .hint { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: var(--muted); margin-top: 10px; }
dialog .hint .ico-svg { color: var(--gold); margin-top: 2px; }

/* ---------- conversation ---------- */
.chat-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; height: 100vh; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: rgba(247,245,241,.85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 2; }
.chat-head .back { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); background: var(--navy-100); flex: none; transition: background .15s, color .15s; }
.chat-head .back:hover { background: var(--navy); color: #fff; }
.chat-head h1 { font-size: 1.05rem; margin: 0; }
.chat-head p { margin: 0; color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log { flex: 1; overflow-y: auto; padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.turn { display: flex; gap: 12px; max-width: 84ch; animation: rise .25s var(--ease); }
.turn.user { align-self: flex-end; flex-direction: row-reverse; }
.turn .who { flex: none; margin-top: 2px; }
.msg { padding: 14px 18px; border-radius: 18px; white-space: pre-wrap; font-size: .95rem; line-height: 1.58; min-width: 0; }
.turn.user .msg { background: var(--navy); color: #fff; border-top-right-radius: 6px; box-shadow: 0 10px 24px rgba(24,27,34,.2); }
.turn.agent .msg { background: var(--card); border: 1px solid var(--line); border-top-left-radius: 6px; box-shadow: var(--shadow-sm); white-space: normal; }
.msg h1, .msg h2, .msg h3 { font-size: 1rem; margin: 12px 0 6px; }
.msg h1:first-child, .msg h2:first-child, .msg h3:first-child { margin-top: 0; }
.msg table { font-size: .86rem; margin: 10px 0; display: block; overflow-x: auto; }
.msg th, .msg td { padding: 7px 10px; }
.msg ul, .msg ol { margin: 6px 0 8px; padding-left: 22px; }
.msg li { margin: 2px 0; }
.msg pre { white-space: pre; margin: 8px 0; }
.msg p { margin: 0 0 .7em; } .msg p:last-child { margin-bottom: 0; }
.msg a { color: var(--gold-600); }
.msg.live { white-space: pre-wrap; }
.msg.live::after { content: "▍"; color: var(--gold); animation: blink 1s infinite; margin-left: 2px; }
.typing { display: inline-flex; gap: 5px; align-items: center; padding: 16px 18px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tool { align-self: flex-start; margin-left: 48px; font-size: .82rem; color: var(--muted); background: #efece5; border-radius: 12px; padding: 7px 12px; max-width: 84ch; display: flex; gap: 8px; align-items: flex-start; animation: rise .2s var(--ease); }
.tool .ico-svg { color: var(--navy-700); margin-top: 1px; }
.tool.error { color: var(--err); background: var(--err-soft); } .tool.error .ico-svg { color: var(--err); }
.tool.plug { color: var(--warn); background: var(--warn-soft); } .tool.plug .ico-svg { color: var(--warn); }
.tool details { min-width: 0; } .tool details summary { cursor: pointer; list-style: none; } .tool details summary::-webkit-details-marker { display: none; }
.tool details summary::after { content: " ›"; color: var(--line-2); }
.tool pre { background: #fff; color: var(--ink); font-size: .76rem; max-height: 220px; margin: 8px 0 0; border: 1px solid var(--line); }
.approval { align-self: flex-start; margin-left: 48px; background: linear-gradient(135deg, #fff9ee, #fcefd9); border: 1px solid var(--gold-line); border-radius: 16px; padding: 14px 18px; max-width: 84ch; box-shadow: 0 10px 26px rgba(215,139,48,.16); display: flex; gap: 12px; animation: rise .25s var(--ease); }
.approval .ico-svg.lead { color: var(--gold); margin-top: 2px; }
.approval strong { display: block; margin-bottom: 2px; }
.approval .row { justify-content: flex-start; margin-top: 10px; }
.approval .done { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.status { padding: 6px 24px 8px; color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 8px; }
.status .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }
.composer { padding: 10px 24px 20px; background: linear-gradient(180deg, rgba(247,245,241,0), var(--paper) 35%); }
.composer .box { background: #fff; border: 1px solid var(--line-2); border-radius: 20px; padding: 10px 10px 8px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, box-shadow .15s; }
.composer .box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow); }
.composer textarea { border: 0; padding: 6px 0; box-shadow: none !important; background: transparent; min-height: 44px; max-height: 240px; }
.composer .bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.composer .bar small { color: var(--muted); font-size: .76rem; }
.composer .bar .right { display: flex; gap: 8px; align-items: center; }
.composer .send { width: 42px; height: 42px; border-radius: 50%; padding: 0; background: var(--gold); color: #fff; box-shadow: 0 8px 18px rgba(215,139,48,.35); }
.composer .send:hover { background: var(--gold-600); }
.chat-side { border-left: 1px solid var(--line); background: #fff; padding: 22px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.chat-side h3 { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; }
.chat-side h3 .icon-btn { width: 28px; height: 28px; background: var(--navy-100); color: var(--navy); }
.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.files li a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-size: .84rem; transition: border-color .15s, background .15s; }
.files li a .ico-svg:first-child { color: var(--gold); }
.files li a .name { flex: 1; min-width: 0; word-break: break-all; }
.files li a .ico-svg.dl { color: var(--muted); }
.files li a:hover { border-color: var(--gold-line); background: var(--gold-soft); }
.side-note { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.side-note .ico-svg { color: var(--gold); margin-top: 2px; }
.side-stat { display: flex; align-items: center; gap: 10px; font-size: .86rem; }
.side-stat .ico-svg { color: var(--gold); }
.side-stat strong { margin-left: auto; }

/* ---------- administration ---------- */
.connectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 16px; }
.connector { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 12px; }
.connector .head { display: flex; align-items: center; gap: 12px; }
.connector .head h3 { margin: 0; font-size: 1rem; }
.connector .head small { display: block; color: var(--muted); font-size: .74rem; word-break: break-all; }
.connector > p { margin: 0; color: var(--muted); font-size: .86rem; }
.connector .level { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--paper); flex-wrap: wrap; }
.connector .level .lbl { font-weight: 600; font-size: .84rem; flex: 1; }
.team-row { display: flex; align-items: center; gap: 10px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.kv div { background: var(--paper); border-radius: 12px; padding: 12px 14px; font-size: .84rem; display: flex; align-items: center; gap: 10px; min-width: 0; }
.kv div .ico-svg { color: var(--ok); } .kv div.off .ico-svg { color: var(--muted); }
.kv div code { font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-row { display: flex; align-items: center; gap: 10px; font-weight: 600; }

/* ---------- réactif ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 16px; gap: 10px; }
  .nav .logo img { width: 56px; } .nav .script { display: none; }
  .nav nav { flex-direction: row; flex-wrap: wrap; gap: 4px; } .nav nav .section { display: none; }
  .nav nav a { padding: 7px 10px; font-size: .84rem; }
  .nav-foot { margin: 0 0 0 auto; border: 0; padding: 0; } .nav-foot .who { display: none; }
  .content { padding: 24px 16px 48px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .login { grid-template-columns: 1fr; } .login .pane { padding: 32px; min-height: 260px; } .login .pane .tagline { font-size: 1.7rem; }
  .chat-wrap { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 70px); }
  .chat-side { border-left: 0; border-top: 1px solid var(--line); }
  .log { padding: 18px 14px; } .tool, .approval { margin-left: 0; }
  .turn { max-width: 100%; }
}

/* ---------- clavardage d'équipe ---------- */
.team-wrap { display: grid; grid-template-columns: 268px minmax(0, 1fr); height: 100vh; }
.channels { border-right: 1px solid var(--line); background: #fff; padding: 18px 12px; overflow-y: auto; }
.channels h3 { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 14px 10px 6px; }
.channels h3:first-child { margin-top: 2px; }
.channel { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background .15s; }
.channel:hover { background: var(--paper); }
.channel.active { background: var(--navy-100); }
.channel .name { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel .name small { display: block; color: var(--muted); font-weight: 400; font-size: .72rem; }
.badge { min-width: 20px; height: 20px; border-radius: 999px; background: var(--gold); color: #fff; font-size: .7rem; font-weight: 700; display: inline-grid; place-items: center; padding: 0 6px; flex: none; }
.nav nav a .badge { margin-left: auto; }
.presence { position: relative; }
.presence::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); border: 2px solid #fff; }
.presence.on::after { background: #2ecc71; }
.team-main { display: flex; flex-direction: column; min-width: 0; }
.tlog { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 2px; }
.tlog .empty { margin: auto; max-width: 420px; }
.day { align-self: center; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 14px 0 10px; background: var(--navy-100); padding: 4px 12px; border-radius: 999px; font-weight: 700; }
.tmsg { display: flex; gap: 12px; padding: 5px 10px; border-radius: 12px; max-width: 92ch; animation: rise .2s var(--ease); }
.tmsg:hover { background: rgba(255,255,255,.7); }
.tmsg .avatar { margin-top: 2px; }
.tmsg.me .avatar { background: var(--navy); }
.tmsg.compact { padding-top: 1px; margin-top: -2px; }
.tmsg.compact .avatar { visibility: hidden; height: 0; margin: 0; }
.tmsg .body { min-width: 0; flex: 1; }
.tmsg .meta { display: flex; gap: 8px; align-items: baseline; margin-bottom: 1px; }
.tmsg .meta strong { font-size: .88rem; }
.tmsg .meta time { font-size: .7rem; color: var(--muted); }
.tmsg .text { white-space: pre-wrap; font-size: .94rem; line-height: 1.5; overflow-wrap: anywhere; }
.tmsg .text a { color: var(--gold-600); }
@media (max-width: 960px) {
  .team-wrap { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 70px); }
  .channels { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; }
  .channels h3 { display: none; }
  .channel { flex: none; padding: 6px 10px; }
  .channel .name small { display: none; }
}

/* ---------- pièces jointes, livrable vérifié ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--ink); border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 600; }
.chip.err { background: var(--err-soft); border-color: #f0c2bb; color: var(--err); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .84rem; color: var(--ink-2); margin: 14px 0 0; cursor: pointer; }
label.check input { width: auto; margin: 3px 0 0; accent-color: var(--gold); }
label.check .ico-svg { color: var(--gold); }
.tool.ok { color: var(--ok); background: var(--ok-soft); } .tool.ok .ico-svg { color: var(--ok); }
