/* Klaao AI — charte : fonds blanc/gris orangés cassés (n°6), structure graphite (icône n°5), accent orange Klaao (#FC6000).
   Polices hébergées sur nos serveurs (Inter, Poppins — licence OFL). Aucune ressource externe. */
@font-face { font-family: "Inter"; src: url("/studio/fonts/inter-latin-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/studio/fonts/poppins-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/studio/fonts/poppins-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #FAF6F1;            /* blanc orangé cassé (variante n°6) */
  --panel: #FFFFFF;
  --panel-2: #F6EDE3;       /* gris orangé clair (variante n°6) */
  --hover: #F0E4D8;
  --border: #E8DACB;
  --text: #1C1612;
  --muted: #6B5E54;
  --accent: #FC6000;        /* orange Klaao — accent uniquement */
  --accent-soft: #FDEEE2;
  --btn: #2C2522;           /* graphite chaud (icône n°5) */
  --btn-hover: #4A403B;
  --btn-text: #FFF8F2;
  --ok: #15803D;
  --warn: #B45309;
  --danger: #C2362B;
  --code-bg: #1E1916;
  --code-head: #2C2522;
  --code-text: #F3ECE6;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 3px rgba(44, 37, 34, .06), 0 10px 28px rgba(44, 37, 34, .07);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Poppins", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171311;            /* noir chaud (icône n°5) */
    --panel: #221C19;
    --panel-2: #2C2522;       /* graphite chaud */
    --hover: #3A322E;
    --border: rgba(255, 240, 228, .1);
    --text: #FBF5EF;
    --muted: rgba(251, 245, 239, .64);
    --accent-soft: rgba(252, 96, 0, .16);
    --btn: #F3E6DA;           /* crème : contraste maximal sur fond sombre */
    --btn-hover: #FFFFFF;
    --btn-text: #171311;
    --code-bg: #100D0B;
    --code-head: #1C1714;
    --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.display { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Boutons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font-weight: 600; line-height: 1.2; }
.btn-primary { background: var(--btn); color: var(--btn-text); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.icon-btn { border: 1px solid var(--border); background: var(--panel); border-radius: 9px; width: 34px; height: 34px; display: inline-grid; place-items: center; color: var(--muted); }
.icon-btn:hover { color: var(--text); background: var(--hover); }

/* ── Accès ── */
.auth { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 24px; }
.auth-card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 32px 28px; text-align: center; }
.auth-card h1 { margin: 10px 0 4px; font-size: 26px; }
.auth-card .lead { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }
.auth-card form { text-align: left; display: flex; flex-direction: column; gap: 12px; }
.auth-card label, .form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text); }
.auth-card input, .form input, .form select, .form textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); font-weight: 400; font-size: 14.5px;
}
.auth-card input:focus, .form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; background: var(--panel); }
.auth-card .btn { width: 100%; padding: 11px; margin-top: 4px; }
.hint { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); }
.error { color: var(--danger); min-height: 1.1em; margin: 0; font-size: 13.5px; }
.auth-foot { color: var(--muted); font-size: 12.5px; margin: 0; }

/* ── Structure ── */
.app { display: grid; grid-template-columns: 272px 1fr; height: 100dvh; }
.sidebar { display: flex; flex-direction: column; gap: 10px; padding: 16px 14px; background: var(--panel-2); border-right: 1px solid var(--border); min-height: 0; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; }
.brand strong { display: block; font-family: var(--font-head); font-size: 17px; letter-spacing: -.01em; }
.brand span { display: block; font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; border-radius: 10px; padding: 9px 10px; text-align: left; font-weight: 600; color: var(--muted); position: relative; }
.nav-item .ico { width: 20px; text-align: center; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.nav-item.active::after { content: ""; position: absolute; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.new { justify-content: flex-start; margin-top: 6px; }
.history { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 1px; min-height: 0; margin-top: 2px; }
.history .item { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.history .item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .item:hover { background: var(--hover); }
.history .item.active { background: var(--panel); }
.history .item .del { opacity: 0; border: 0; background: none; color: var(--muted); padding: 0 4px; }
.history .item:hover .del { opacity: 1; }
.history-empty { font-size: 13px; padding: 4px 10px; margin: 0; }
.badge { font-size: 11px; font-style: normal; padding: 1px 7px; border-radius: 99px; background: var(--panel); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.err { color: var(--danger); }
.badge.accent { color: var(--accent); }

.account { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; position: relative; margin-top: auto; }
.avatar-s { width: 34px; height: 34px; border-radius: 10px; background: var(--btn); color: var(--btn-text); display: grid; place-items: center; font-weight: 700; flex: none; }
.who { flex: 1; min-width: 0; }
.who strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { display: block; font-size: 12px; color: var(--muted); }
.menu { position: absolute; bottom: 52px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 5; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.menu button:hover { background: var(--hover); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--border); background: var(--bg); }
.topbar h1 { flex: 1; margin: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); }
.dot.err { background: var(--danger); }
.model select { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 6px 10px; font-size: 13.5px; }
#toggle-sidebar { display: none; }
.view { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* ── Chat ── */
.messages { flex: 1; overflow: auto; padding: 26px 22px 8px; }
.msg { max-width: 820px; margin: 0 auto 20px; display: flex; gap: 12px; }
.msg .avatar { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.msg.user .avatar { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }
.msg.assistant .avatar { background: url("/studio/icon.svg") center / cover; color: transparent; }
.msg .body { flex: 1; min-width: 0; }
.msg.user .body { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; white-space: pre-wrap; }
.msg .meta { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 12px; }
.msg .meta button { border: 0; background: none; color: var(--muted); padding: 0; font-size: 12px; }
.msg .meta button:hover { color: var(--accent); }
.reasoning { margin: 0 0 10px; font-size: 13px; color: var(--muted); border-left: 2px solid var(--border); padding-left: 10px; }
.reasoning summary { cursor: pointer; }
.reasoning div { white-space: pre-wrap; max-height: 240px; overflow: auto; }
.cursor::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

.md p { margin: 0 0 10px; }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--font-head); margin: 16px 0 8px; line-height: 1.3; }
.md h1 { font-size: 1.3em; } .md h2 { font-size: 1.16em; } .md h3 { font-size: 1.05em; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 2px 0; }
.md li::marker { color: var(--accent); }
.md blockquote { margin: 0 0 10px; padding: 4px 12px; border-left: 2px solid var(--accent); color: var(--muted); }
.md code { font-family: var(--mono); font-size: .88em; background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.md a { color: var(--accent); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.md table { border-collapse: collapse; margin: 0 0 10px; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--border); padding: 5px 9px; }
.md th { background: var(--panel-2); }
.codeblock { margin: 0 0 12px; border-radius: 10px; overflow: hidden; background: var(--code-bg); }
.codeblock header { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; font-size: 12px; color: #B8ACA2; background: var(--code-head); }
.codeblock header button { border: 0; background: none; color: #B8ACA2; font-size: 12px; }
.codeblock header button:hover { color: #fff; }
.codeblock pre { margin: 0; padding: 12px 14px; overflow-x: auto; }
.codeblock code { background: none; border: 0; padding: 0; color: var(--code-text); font-size: 13px; line-height: 1.55; }

.empty { max-width: 640px; margin: 9vh auto 0; text-align: center; padding: 0 16px; }
.empty h2 { margin: 18px 0 6px; font-size: 28px; }
.empty p { color: var(--muted); margin: 0 0 22px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.suggestions button { border: 1px solid var(--border); background: var(--panel); border-radius: 99px; padding: 8px 14px; font-size: 14px; }
.suggestions button:hover { border-color: var(--accent); }

.composer { max-width: 860px; width: calc(100% - 44px); margin: 8px auto 4px; display: flex; align-items: flex-end; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow); }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; max-height: 220px; padding: 7px 0; }
.composer .send, .composer .stop { flex: none; border: 0; border-radius: 12px; min-width: 38px; height: 38px; padding: 0 12px; font-weight: 700; color: var(--btn-text); background: var(--btn); }
.composer .send:hover { background: var(--btn-hover); }
.composer .stop { background: var(--danger); color: #fff; }
.composer-hint { text-align: center; font-size: 11.5px; color: var(--muted); margin: 0 0 12px; }

/* ── Agent ── */
.agent-layout { flex: 1; display: grid; grid-template-columns: 1fr 300px; min-height: 0; }
.agent-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.agent-intro { max-width: 760px; margin: 30px auto 0; padding: 0 22px; text-align: center; }
.agent-intro h2 { margin: 0 0 8px; font-size: 24px; }
.agent-intro p { margin: 0; color: var(--muted); }
.timeline { flex: 1; overflow: auto; padding: 18px 22px; }
.agent-composer { margin-bottom: 16px; }
.agent-composer textarea { min-height: 70px; }
.agent-side { border-left: 1px solid var(--border); background: var(--panel-2); padding: 18px 16px; overflow: auto; }
.agent-side h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.agent-side section + section { margin-top: 22px; }
.todos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.todos li { display: flex; gap: 8px; align-items: baseline; }
.todos li.completed { color: var(--muted); text-decoration: line-through; }
.files { list-style: none; margin: 0; padding: 0; font-size: 13px; font-family: var(--mono); }
.files button { border: 0; background: none; padding: 4px 6px; border-radius: 6px; width: 100%; text-align: left; color: var(--text); }
.files button:hover { background: var(--hover); color: var(--accent); }
.step { max-width: 820px; margin: 0 auto 8px; display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; }
.step .ico { text-align: center; }
.step .what { min-width: 0; }
.step .tool { font-weight: 600; }
.step .sum { color: var(--muted); font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.step .res { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: pre-wrap; max-height: 120px; overflow: auto; margin-top: 2px; }
.step.fail .res, .step.fail .what { color: var(--danger); }
.step.note { color: var(--muted); font-size: 13px; }
.thinking { max-width: 820px; margin: 0 auto 10px; padding: 10px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.result-card { max-width: 820px; margin: 14px auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.result-card header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--border); }
.result-card header.ok { color: var(--ok); }
.result-card header.warn { color: var(--warn); }
.result-card header.err { color: var(--danger); }
.result-card .md { padding: 14px 16px 4px; }
.result-card footer { padding: 10px 16px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); }

/* ── Administration ── */
.tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 10px 22px 0; border-bottom: 1px solid var(--border); }
.tabs button { border: 0; background: none; padding: 9px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.admin-body { flex: 1; overflow: auto; padding: 22px; }
.admin-wrap { max-width: 1080px; margin: 0 auto; }
.admin-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.admin-head > div { flex: 1; }
.admin-head h2 { margin: 0 0 4px; font-size: 20px; }
.admin-head p { margin: 0; color: var(--muted); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.card .k { font-size: 12.5px; color: var(--muted); }
.card .v { font-family: var(--font-head); font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.card .s { font-size: 12.5px; color: var(--muted); }
.card.feature { background: var(--btn); border-color: var(--btn); color: var(--btn-text); }
.card.feature .k, .card.feature .s { color: rgba(255, 248, 242, .78); }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.panel h3 { margin: 0; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; text-align: right; }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data td.actions .btn + .btn { margin-left: 6px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.form .help { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.switch { flex-direction: row !important; align-items: center; gap: 10px !important; }
.switch input { width: auto; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.saved { color: var(--ok); font-size: 13px; }
.keybox { display: flex; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.keybox span { flex: 1; }
.callout { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 10px 0; }
.snippet { background: var(--code-bg); color: var(--code-text); border-radius: 10px; padding: 12px; font: 12.5px/1.55 var(--mono); overflow-x: auto; white-space: pre; margin: 10px 0 0; }

/* ── Boîtes de dialogue ── */
dialog { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); color: var(--text); box-shadow: 0 24px 64px rgba(20, 10, 5, .28); padding: 0; }
dialog::backdrop { background: rgba(20, 12, 8, .5); backdrop-filter: blur(3px); }
#modal-form { width: min(520px, 92vw); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
#modal-form h2 { margin: 0; font-family: var(--font-head); font-size: 19px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.viewer { width: min(980px, 94vw); height: min(80vh, 900px); }
.viewer[open] { display: flex; flex-direction: column; }
.viewer header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 13px; }
.viewer header strong { flex: 1; }
.viewer pre { flex: 1; margin: 0; overflow: auto; padding: 14px; background: var(--code-bg); }
.viewer code { color: var(--code-text); font: 13px/1.55 var(--mono); }

/* ── Mobile ── */
@media (max-width: 960px) {
  .agent-layout { grid-template-columns: 1fr; }
  .agent-side { display: none; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 84vw; max-width: 320px; z-index: 20; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  #toggle-sidebar { display: inline-grid; }
  .status #status-text { display: none; }
  .topbar { padding: 10px 12px; }
  .messages, .timeline, .admin-body { padding: 16px 12px 8px; }
  .composer { width: calc(100% - 20px); }
  .form .row { grid-template-columns: 1fr; }
  .tabs { padding: 8px 10px 0; }
}

/* Utilitaires (aucun style en ligne : CSP stricte) */
.panel-body { padding: 14px 16px; }
.panel-pad { padding: 18px; }
.mt-12 { margin: 12px 0 0; }
.fatal { padding: 24px; }

/* Champ mot de passe avec bouton « œil » */
.pw { position: relative; display: block; }
.pw input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; }
.pw-toggle:hover { color: var(--text); background: var(--hover); }
/* Chevron à droite des boutons d'action */
.btn .chev { width: 16px; height: 16px; flex: none; margin-right: -2px; }
.auth-card .btn { gap: 10px; }

/* Listes déroulantes : chevron dessiné, bien décollé du bord (marge interne généreuse) */
select {
  -webkit-appearance: none;
  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='%238A7C70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  padding-right: 42px !important;
  cursor: pointer;
}
.model select { padding: 7px 42px 7px 12px; min-height: 36px; }
.form select { padding-left: 14px; min-height: 42px; }
/* Champs : marges internes homogènes */
.auth-card input, .form input, .form textarea { padding-left: 14px; padding-right: 14px; }
.pw input { padding-right: 48px !important; }
.pw-toggle { right: 8px; }
.model select, .form select, .form select:focus, .auth-card select, #modal-form select, #modal-form select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A7C70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
}

/* Icônes professionnelles (SVG au trait) */
.i { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.i-sm { width: 14px; height: 14px; }
.nav-item .ico { display: inline-grid; place-items: center; }
.new { gap: 8px; }
.composer .send .i, .composer .stop .i { width: 18px; height: 18px; }
.step .ico { display: grid; place-items: start center; padding-top: 2px; color: var(--muted); }
.step .ico .i { width: 16px; height: 16px; }
.step.fail .ico { color: var(--danger); }
.step .res { display: flex; gap: 6px; align-items: flex-start; }
.step .res .i { margin-top: 2px; color: var(--ok); }
.step.fail .res .i { color: var(--danger); }
.todos li { align-items: center; }
.todos li .i { color: var(--muted); }
.todos li.in_progress .i { color: var(--accent); }
.todos li.completed .i { color: var(--ok); }
.result-card header .i { width: 20px; height: 20px; }
.history .item .del .i { width: 14px; height: 14px; }
.saved { display: inline-flex; align-items: center; gap: 6px; }
.btn .i { width: 16px; height: 16px; }
.icon-btn .i { width: 17px; height: 17px; }

/* Tableaux : valeurs techniques sur une seule ligne */
table.data td.mono, table.data td.num, table.data td:nth-child(5), table.data td:nth-child(6) { white-space: nowrap; }
table.data td:first-child { min-width: 130px; }
