1:root {2 --bg: #f2f4f8;3 --surface: #ffffff;4 --surface2: #f6f8fb;5 --border: #e4e8ef;6 --border-strong: #d4dae3;7 --text: #17203a;8 --muted: #67708a;9 --accent: #3556f0;10 --accent-soft: #eef1fe;11 --accent-grad: linear-gradient(135deg, #3556f0, #5a71f5);12 --green: #17924a;13 --green-soft: #e7f7ee;14 --red: #d5303e;15 --red-soft: #fdeeef;16 --amber: #b26a00;17 --amber-soft: #fff6e6;18 --shadow-sm: 0 1px 2px rgba(23, 32, 58, 0.06), 0 1px 3px rgba(23, 32, 58, 0.08);19 --shadow-md: 0 4px 16px rgba(23, 32, 58, 0.10);20 --shadow-lg: 0 12px 40px rgba(23, 32, 58, 0.16);21 --r-lg: 18px;22 --r-md: 13px;23 --r-sm: 9px;24 --z-header: 100;25 --z-composer: 100;26 --z-welcome: 50;27 --z-drawer: 200;28 --z-login: 300;29 --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;30}31* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }32html, body {33 margin: 0; padding: 0;34 background: var(--bg); color: var(--text);35 font: 15.5px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;36 height: 100%;37 overscroll-behavior: none;38 text-rendering: optimizeLegibility;39}40.hidden { display: none !important; }41button { font-family: inherit; }4243/* ================= Login ================= */44.login {45 position: fixed; inset: 0; z-index: var(--z-login);46 background:47 radial-gradient(1200px 600px at 50% -200px, #e3e9ff 0%, transparent 60%),48 var(--bg);49 display: flex; flex-direction: column; align-items: center; justify-content: center;50 padding: 24px;51}52.login-box {53 width: 100%; max-width: 360px;54 background: var(--surface);55 border: 1px solid var(--border);56 border-radius: 24px;57 box-shadow: var(--shadow-lg);58 padding: 36px 28px 28px;59 display: flex; flex-direction: column; gap: 12px;60 text-align: center;61}62.login-mark {63 width: 64px; height: 64px; margin: 0 auto 4px;64 background: var(--accent-grad); color: #fff;65 border-radius: 20px;66 display: flex; align-items: center; justify-content: center;67 font-size: 22px; font-weight: 800; letter-spacing: 0.5px;68 box-shadow: 0 8px 24px rgba(53, 86, 240, 0.35);69}70.login-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }71.login-sub { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }72.login input {73 background: var(--surface2); border: 1.5px solid var(--border); color: var(--text);74 border-radius: var(--r-md); padding: 14px 16px; font-size: 16px; outline: none;75 transition: border-color 0.15s, box-shadow 0.15s;76}77.login input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }78.login button {79 background: var(--accent-grad); color: #fff; font-weight: 600; font-size: 16px;80 border: none; border-radius: var(--r-md); padding: 14px; cursor: pointer;81 box-shadow: 0 4px 14px rgba(53, 86, 240, 0.3);82 transition: transform 0.1s;83}84.login button:active { transform: scale(0.98); }85.login-error { color: var(--red); font-size: 13px; min-height: 18px; }86.login-foot { margin-top: 20px; color: var(--muted); font-size: 12px; font-family: var(--mono); }8788/* ================= Layout ================= */89.app { display: flex; flex-direction: column; height: 100dvh; }9091.header {92 position: sticky; top: 0; z-index: var(--z-header);93 display: flex; align-items: center; gap: 8px;94 background: rgba(255, 255, 255, 0.92);95 -webkit-backdrop-filter: saturate(180%) blur(14px);96 backdrop-filter: saturate(180%) blur(14px);97 border-bottom: 1px solid var(--border);98 padding: 8px 10px;99 padding-top: calc(8px + env(safe-area-inset-top));100}101.header-mid { flex: 1; min-width: 0; }102.project-row {103 display: flex; align-items: center; gap: 8px;104 background: var(--surface2);105 border: 1px solid var(--border);106 border-radius: 999px;107 padding: 6px 12px 6px 12px;108}109.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex-shrink: 0; transition: background 0.3s; }110.dot.on { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }111.project-sel {112 flex: 1; min-width: 0;113 background: none; color: var(--text); border: none;114 font-size: 15px; font-weight: 600; outline: none;115 appearance: none; -webkit-appearance: none;116 text-overflow: ellipsis;117 padding-right: 14px;118 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%2367708a' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");119 background-repeat: no-repeat; background-position: right center; background-size: 13px;120}121.icon-btn {122 background: none; border: none; color: var(--text);123 width: 40px; height: 40px; border-radius: 12px; cursor: pointer; flex-shrink: 0;124 display: flex; align-items: center; justify-content: center;125 transition: background 0.15s;126}127.icon-btn svg { width: 21px; height: 21px; }128.icon-btn:active { background: var(--surface2); }129.icon-btn.accent { color: var(--accent); background: var(--accent-soft); }130.mode-btn {131 border: 1px solid var(--border); background: var(--green-soft); color: var(--green);132 font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 7px 13px;133 cursor: pointer; flex-shrink: 0; letter-spacing: 0.2px;134}135.mode-btn.auto { color: var(--amber); background: var(--amber-soft); }136137/* ================= Welcome ================= */138.welcome {139 position: absolute; inset: 0; z-index: var(--z-welcome);140 display: flex; flex-direction: column; align-items: center; justify-content: center;141 gap: 8px; padding: 32px; text-align: center; pointer-events: none;142}143.welcome > * { pointer-events: auto; }144.welcome-mark {145 width: 72px; height: 72px;146 background: var(--accent-grad); color: #fff;147 border-radius: 22px;148 display: flex; align-items: center; justify-content: center;149 font-size: 25px; font-weight: 800;150 box-shadow: 0 10px 30px rgba(53, 86, 240, 0.3);151 margin-bottom: 8px;152}153.welcome h2 { margin: 0; font-size: 21px; letter-spacing: -0.3px; }154.welcome p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 300px; }155.hints { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }156.hint {157 background: var(--surface); border: 1px solid var(--border);158 color: var(--text); font-size: 13.5px;159 border-radius: 999px; padding: 9px 15px; cursor: pointer;160 box-shadow: var(--shadow-sm);161}162.hint:active { background: var(--surface2); }163164/* ================= Messages ================= */165.app { position: relative; }166.messages {167 flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;168 padding: 16px 14px 24px;169 display: flex; flex-direction: column; gap: 12px;170 max-width: 780px; width: 100%; margin: 0 auto;171}172@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }173.messages > * { animation: msg-in 0.22s ease-out; }174175.msg-user {176 align-self: flex-end; max-width: 85%;177 background: var(--accent-grad); color: #fff;178 border-radius: 20px 20px 6px 20px;179 padding: 11px 16px;180 white-space: pre-wrap; word-break: break-word;181 box-shadow: 0 3px 10px rgba(53, 86, 240, 0.25);182 font-size: 15.5px;183}184.msg-claude {185 align-self: stretch;186 background: var(--surface);187 border: 1px solid var(--border);188 border-radius: var(--r-lg);189 padding: 13px 16px;190 box-shadow: var(--shadow-sm);191 word-break: break-word;192}193.msg-claude .md > :first-child { margin-top: 0; }194.msg-claude .md > :last-child { margin-bottom: 0; }195.md p { margin: 0.55em 0; }196.md pre {197 background: #f6f8fa; border: 1px solid var(--border); border-radius: var(--r-sm);198 padding: 11px; overflow-x: auto; font-size: 12.5px; line-height: 1.5;199}200.md code { font-family: var(--mono); font-size: 0.88em; }201.md :not(pre) > code { background: var(--accent-soft); color: #2c46c8; padding: 1px 6px; border-radius: 6px; }202.md h1, .md h2, .md h3, .md h4 { font-size: 1.02em; margin: 0.9em 0 0.35em; }203.md table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 13px; }204.md th, .md td { border: 1px solid var(--border); padding: 5px 9px; }205.md th { background: var(--surface2); }206.md a { color: var(--accent); }207.md ul, .md ol { padding-left: 1.35em; margin: 0.5em 0; }208.md blockquote { margin: 0.6em 0; padding: 2px 12px; border-left: 3px solid var(--border-strong); color: var(--muted); }209.md hr { border: none; border-top: 1px solid var(--border); }210211.thinking {212 color: var(--muted); font-style: italic; font-size: 13px;213 border-left: 2.5px solid var(--border-strong); padding-left: 12px;214 white-space: pre-wrap; word-break: break-word;215}216details.thinking-box { padding: 2px 4px; }217details.thinking-box summary { color: var(--muted); font-size: 12.5px; cursor: pointer; }218219.meta-line {220 align-self: center; text-align: center;221 color: var(--muted); font-size: 11px; font-family: var(--mono);222 background: var(--surface2); border-radius: 999px; padding: 3px 12px;223 max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;224}225.error-box {226 background: var(--red-soft); border: 1px solid #f3c2c6;227 color: var(--red); border-radius: var(--r-md); padding: 11px 14px;228 font-size: 13px; white-space: pre-wrap; word-break: break-word;229}230231/* ================= Cartes outils ================= */232.tool {233 background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);234 overflow: hidden; font-size: 13px;235 box-shadow: var(--shadow-sm);236}237.tool summary {238 display: flex; align-items: center; gap: 10px;239 padding: 9px 13px; cursor: pointer; list-style: none; user-select: none;240 min-height: 44px;241}242.tool summary::-webkit-details-marker { display: none; }243.tool .t-icon {244 flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px;245 display: flex; align-items: center; justify-content: center;246 font-size: 14px; background: var(--surface2);247}248.tool .t-icon.bash { background: #eceff5; }249.tool .t-icon.edit { background: var(--amber-soft); }250.tool .t-icon.read { background: #e8f3fd; }251.tool .t-icon.web { background: #e9f6f2; }252.tool .t-name { font-weight: 700; font-family: var(--mono); font-size: 12.5px; flex-shrink: 0; color: var(--text); }253.tool .t-sub {254 color: var(--muted); font-family: var(--mono); font-size: 12px;255 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;256}257.tool .t-state { flex-shrink: 0; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 8px; }258.tool .t-state.pending { color: var(--amber); background: var(--amber-soft); }259.tool .t-state.ok { color: var(--green); background: var(--green-soft); }260.tool .t-state.err { color: var(--red); background: var(--red-soft); }261.tool-body { border-top: 1px solid var(--border); padding: 9px 13px 11px; background: var(--surface2); }262.tool-body pre {263 margin: 6px 0; background: #ffffff; border: 1px solid var(--border);264 border-radius: var(--r-sm); padding: 9px;265 overflow-x: auto; font-size: 12px; font-family: var(--mono);266 white-space: pre-wrap; word-break: break-word;267}268.tool-body .label {269 color: var(--muted); font-size: 10.5px; font-weight: 700;270 text-transform: uppercase; letter-spacing: 0.7px; margin-top: 6px;271}272.see-more { background: none; border: none; color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 0; }273274/* diffs — style GitHub clair */275.diff {276 font-family: var(--mono); font-size: 12px; margin: 6px 0;277 border: 1px solid var(--border); border-radius: var(--r-sm);278 overflow: hidden; background: #fff;279}280.diff .dl { padding: 2px 10px; white-space: pre-wrap; word-break: break-word; }281.diff .del { background: #ffebe9; color: #82071e; }282.diff .add { background: #e6ffec; color: #055d20; }283284/* todos */285.todos { margin: 4px 0; padding: 0; list-style: none; font-size: 13.5px; }286.todos li { padding: 3px 0; }287.todos .done { color: var(--muted); text-decoration: line-through; }288.todos .doing { color: var(--accent); font-weight: 600; }289290/* ================= Permission ================= */291.perm {292 background: var(--amber-soft); border: 1.5px solid #f0c36b;293 border-radius: var(--r-lg); padding: 14px; font-size: 13.5px;294 box-shadow: var(--shadow-md);295}296.perm-title { font-weight: 700; color: var(--amber); margin-bottom: 8px; font-size: 14px; }297.perm pre {298 background: #fff; border: 1px solid #eddcb8; border-radius: var(--r-sm); padding: 9px;299 overflow-x: auto; font-size: 12px; font-family: var(--mono);300 white-space: pre-wrap; word-break: break-word;301 max-height: 200px; overflow-y: auto; margin: 0;302}303.perm-actions { display: flex; gap: 10px; margin-top: 12px; }304.perm-actions button {305 flex: 1; padding: 12px; border-radius: var(--r-md); border: none;306 font-size: 15px; font-weight: 700; cursor: pointer; min-height: 46px;307}308.perm-allow { background: var(--green); color: #fff; box-shadow: 0 3px 10px rgba(23, 146, 74, 0.3); }309.perm-deny { background: #fff; color: var(--red); border: 1.5px solid #f3c2c6 !important; }310.perm-resolved { color: var(--muted); font-size: 12.5px; margin-top: 10px; font-weight: 600; }311312/* ================= Indicateur travail ================= */313.working {314 align-self: flex-start;315 display: flex; align-items: center; gap: 10px;316 color: var(--muted); font-size: 13.5px;317 background: var(--surface); border: 1px solid var(--border);318 border-radius: 999px; padding: 8px 16px;319 box-shadow: var(--shadow-sm);320}321.dots { display: flex; gap: 4px; }322.dots i {323 width: 6px; height: 6px; border-radius: 50%; background: var(--accent);324 animation: pulse 1.2s ease-in-out infinite;325}326.dots i:nth-child(2) { animation-delay: 0.15s; }327.dots i:nth-child(3) { animation-delay: 0.3s; }328@keyframes pulse { 0%, 100% { opacity: 0.25; transform: scale(0.85); } 40% { opacity: 1; transform: scale(1.1); } }329330/* ================= Composer ================= */331.composer {332 position: sticky; bottom: 0; z-index: var(--z-composer);333 background: linear-gradient(to top, var(--bg) 65%, transparent);334 padding: 10px 12px calc(10px + env(safe-area-inset-bottom));335}336.composer-inner {337 display: flex; align-items: flex-end; gap: 8px;338 max-width: 780px; margin: 0 auto;339 background: var(--surface);340 border: 1px solid var(--border);341 border-radius: 26px;342 padding: 7px 7px 7px 18px;343 box-shadow: var(--shadow-md);344}345#input {346 flex: 1; background: none; color: var(--text);347 border: none;348 padding: 9px 0; font-size: 16px; line-height: 1.45;349 resize: none; outline: none; max-height: 140px;350 font-family: inherit;351}352#input::placeholder { color: var(--muted); }353.send-btn {354 width: 40px; height: 40px; border-radius: 50%; border: none;355 background: var(--accent-grad); color: #fff;356 cursor: pointer; flex-shrink: 0;357 display: flex; align-items: center; justify-content: center;358 box-shadow: 0 3px 10px rgba(53, 86, 240, 0.35);359 transition: transform 0.1s, opacity 0.15s;360}361.send-btn svg { width: 19px; height: 19px; }362.send-btn:active { transform: scale(0.92); }363.send-btn:disabled { opacity: 0.35; }364.send-btn.stop { background: var(--red); box-shadow: 0 3px 10px rgba(213, 48, 62, 0.35); }365366/* ================= Drawer ================= */367.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); }368.drawer-back { position: absolute; inset: 0; background: rgba(23, 32, 58, 0.35); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }369@keyframes slide-in { from { transform: translateX(-100%); } to { transform: none; } }370.drawer-panel {371 position: absolute; top: 0; left: 0; bottom: 0; width: min(330px, 88vw);372 background: var(--surface);373 box-shadow: var(--shadow-lg);374 display: flex; flex-direction: column;375 padding-top: env(safe-area-inset-top);376 animation: slide-in 0.22s ease-out;377 border-radius: 0 20px 20px 0;378}379.drawer-head {380 display: flex; align-items: center; justify-content: space-between;381 padding: 14px 10px 12px 20px; border-bottom: 1px solid var(--border);382 font-weight: 700; font-size: 17px;383}384.chat-list { flex: 1; overflow-y: auto; padding: 8px; }385.chat-item {386 padding: 12px 12px; border-radius: var(--r-md); cursor: pointer;387 display: flex; align-items: center; gap: 8px;388 margin-bottom: 2px;389}390.chat-item:active { background: var(--surface2); }391.chat-item.active { background: var(--accent-soft); }392.chat-item .ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }393.chat-item .ci-title { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }394.chat-item .ci-meta { font-size: 11.5px; color: var(--muted); }395.chat-item .ci-running { color: var(--green); font-weight: 700; }396.ci-del {397 background: none; border: none; color: var(--muted); cursor: pointer;398 width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;399 display: flex; align-items: center; justify-content: center; font-size: 15px;400}401.ci-del:active { background: var(--red-soft); color: var(--red); }402.chat-empty { color: var(--muted); text-align: center; padding: 32px 16px; font-size: 14px; }403.logout-btn {404 margin: 10px 16px calc(14px + env(safe-area-inset-bottom));405 background: var(--surface2); border: 1px solid var(--border); color: var(--red);406 border-radius: var(--r-md); padding: 13px; font-size: 14.5px; font-weight: 600; cursor: pointer;407}408409/* écrans plus larges */410@media (min-width: 700px) {411 .header { padding-left: 16px; padding-right: 16px; }412 .messages { padding: 24px 20px 32px; }413}414