/* Une seule identité, du bureau au téléphone. Toutes les ressources restent locales. */
.model-pill{min-width:0;max-width:calc(100% - 135px)}#active-model{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar-right{flex-shrink:0}
:root{color-scheme:dark;--background:#060609;--surface:#10141e;--ivory:#eef3fb;--pink:#f5c2dc;--lilac:#e6dcfb;--positive:#99f6e4;--text:#eef3fb;--muted:#b2b6bd;--line:#ffffff22;--accent:#eef3fb;font-family:"Segoe UI",-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;background:var(--background);color:var(--text)}
*{box-sizing:border-box}body{margin:0;min-width:300px}button,input,textarea{font:inherit}button{color:inherit;border:0;background:none;cursor:pointer}button:disabled{cursor:wait;opacity:.45}button:hover:not(:disabled){filter:brightness(1.16)}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--lilac);outline-offset:4px}button,textarea,input{-webkit-tap-highlight-color:transparent}[hidden]{display:none!important}svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}input,textarea{color:var(--text);accent-color:var(--positive)}input::placeholder,textarea::placeholder{color:#b7bbc2}a{color:var(--ivory)}
.ambient{position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(#06060925,#06060935),var(--background)}.app-shell{min-height:100dvh;padding:22px 28px 0;display:flex;flex-direction:column;max-width:1800px;margin:auto}.glass{background:linear-gradient(128deg,#ffffff09,transparent 45%,#e6dcfb05),#10141e62;border:1px solid #ffffff2e;backdrop-filter:blur(23px) saturate(110%);-webkit-backdrop-filter:blur(23px) saturate(110%);box-shadow:inset 0 1px 0 #ffffff30,inset 0 -1px 0 #e6dcfb16,0 12px 40px #0000001f;position:relative}.glass:before{content:"";position:absolute;inset:-1px;padding:1px;border-radius:inherit;pointer-events:none;background:linear-gradient(130deg,#ffffff60,transparent 23%,transparent 73%,#f5c2dc40);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor}
.topbar{min-height:66px;border-radius:30px;display:flex;justify-content:space-between;align-items:center;gap:20px;padding:10px 21px}.brand-group,.brand,.top-actions,.toolbar-right{display:flex;align-items:center;gap:12px}.brand{gap:14px;text-decoration:none}.brand img{width:32px;height:32px}.brand>span{font-size:20px;letter-spacing:6px}.icon-button{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--line);background:linear-gradient(135deg,#ffffff0c,transparent);box-shadow:inset 0 1px 0 #ffffff17;flex-shrink:0;font-size:23px;font-weight:300}.brand-group>.icon-button{border:0;box-shadow:none;background:none;color:#b9bdc4}.connection{display:flex;align-items:center;gap:9px;color:#d3d7de;font-size:12px}.status-dot{height:5px;width:5px;border-radius:50%;background:var(--positive);box-shadow:0 0 8px #99f6e433;flex-shrink:0}.top-actions{gap:9px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:20px 12px 0}.model-pill{display:flex;align-items:center;gap:9px;border-radius:22px;padding:9px 15px;font-size:12px;text-align:left}.model-pill>span:last-child{color:var(--muted);margin-left:6px}.memory-button{display:flex;align-items:center;gap:8px;font-size:12px;color:#c8ccd3}.memory-button>span:last-child{font-size:11px;color:var(--muted);margin-left:4px}.memory-button>span:first-child{font-size:23px}.notice-banner{padding:11px 17px;border:1px solid #f5c2dc44;background:#10141eee;border-radius:15px;margin:15px auto 0;max-width:800px;color:var(--pink);line-height:1.6;white-space:pre-wrap}
.main-stage{width:min(100%,920px);margin:0 auto;flex:1;display:flex;flex-direction:column;align-items:stretch;min-width:0}.presence{display:flex;align-items:center;flex-direction:column;margin:0 auto;width:100%;padding-top:4px}.orb-shell{position:relative;width:360px;height:302px;max-width:100%;transition:width .45s ease,height .45s ease}#orb{width:100%;height:100%;display:block;position:relative;z-index:1}.orb-halo{position:absolute;inset:8%;border-radius:50%;background:radial-gradient(ellipse,#ffffff12,transparent 68%);filter:blur(18px)}.orb-lens{pointer-events:none;position:absolute;top:20.5%;left:25.5%;width:49%;height:59%;border-radius:50%;background:radial-gradient(ellipse at 25% 19%,#ffffff28,transparent 26%),radial-gradient(ellipse at 83% 13%,#f5c2dc30,transparent 22%),radial-gradient(ellipse at 86% 85%,#e6dcfb22,transparent 25%);border:1px solid #ffffff24;box-shadow:inset 3px 0 5px #ffffff18,inset -3px -3px 10px #f5c2dc1a;z-index:2}.presence-label{font-size:12px;display:flex;align-items:center;gap:8px;margin-top:-11px;color:#c9cdd4}.presence-label>span:first-child{height:5px;width:5px;background:var(--positive);border-radius:50%}.welcome{text-align:center;padding:21px 0 42px}.welcome h1{font-size:clamp(25px,3.3vw,38px);font-weight:400;letter-spacing:-.8px;line-height:1.25;margin:0 0 12px}.welcome p{font-size:15px;color:#b9bdc4;margin:0;line-height:1.7}.compose-region{margin-top:auto;width:min(100%,820px);align-self:center;padding-top:5px}.composer{border-radius:37px;padding:22px 22px 17px;background:linear-gradient(135deg,#ffffff0e,transparent 45%,#e6dcfb0a),#10141e80;border-color:#ffffff46;box-shadow:inset 0 1px 1px #ffffff44,inset 0 -1px 2px #f5c2dc20,0 20px 55px #0000001f}.composer textarea{display:block;background:transparent;color:var(--text);border:0;width:100%;min-height:35px;max-height:200px;resize:none;padding:0 5px;font-size:15px;line-height:1.6;overflow-y:auto}.composer-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:9px}.composer .icon-button{height:39px;width:39px}.send-button{display:grid;place-items:center;width:43px;height:43px;border-radius:50%;background:linear-gradient(135deg,#eef3fb,#f5c2dc);color:#10141e;border:1px solid #ffffff88;box-shadow:inset 0 1px 0 #fff6,0 3px 13px #00000020}.send-button svg{width:21px;height:21px;stroke-width:1.7}.stop-button svg{fill:currentColor;stroke:none}.mic-button[aria-pressed=true]{border-color:var(--positive);color:var(--positive);background:#99f6e41a}.compose-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:13px 12px 0;font-size:11px;color:var(--muted)}#keyboard-hint>span{margin-left:13px}.system-line{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:55px;margin-top:24px;border-top:1px solid #ffffff16;font-size:11px;color:#b0b4bb}.mode-label,.local-tag{font:11px/1.5 Consolas,monospace;letter-spacing:2px;white-space:nowrap}.system-summary{display:flex;align-items:center;justify-content:center;gap:15px;flex-wrap:wrap;font-size:11px;color:#b4b8bf;padding:8px}.system-summary b{font-weight:400;color:#dbdfe6;margin-left:4px}.vram-track{height:3px;width:52px;border-radius:6px;background:#ffffff20;overflow:hidden}.vram-track>span{display:block;height:100%;width:0;background:#e6dcfb;border-radius:6px}.local-tag{display:flex;align-items:center;gap:7px}.local-tag>span{width:4px;height:4px;border-radius:50%;background:var(--positive)}
body.has-messages .orb-shell{width:215px;height:150px}body.has-messages .presence{padding-top:0}body.has-messages .presence-label{margin-top:0;font-size:11px}body.has-messages .orb-lens{top:21%;left:30%;width:40%;height:58%}.conversation-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:20px 5% 0;font-size:12px;color:var(--muted)}.conversation-heading>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-button{color:#c7cbd2;padding:7px 9px;border-radius:9px;font-size:12px}.text-button:hover{background:#ffffff0a}.messages{width:min(100%,800px);margin:0 auto;min-width:0;padding:24px 0 30px;display:flex;flex-direction:column;gap:28px}.msg{min-width:0;overflow-wrap:anywhere}.msg-user{max-width:90%;align-self:flex-end;background:#ffffff0c;border:1px solid #ffffff22;border-radius:21px 21px 6px 21px;padding:14px 19px;color:#dee2e9;font-size:14px;white-space:pre-wrap;line-height:1.7}.msg-agent{padding:0 9px;line-height:1.85;font-size:14px}.msg-head{display:flex;align-items:center;gap:10px;color:#dadee5;margin-bottom:10px;font:11px/1.4 Consolas,monospace;letter-spacing:1.5px}.msg-head img{width:20px;height:20px}.msg-body p{margin:0 0 15px}.msg-body p:last-child{margin-bottom:0}.msg-body pre{white-space:pre;overflow-x:auto}.msg-body blockquote{border-left:2px solid #e6dcfb55;padding-left:14px;margin-left:0;color:#ccd0d7}.msg-body a{color:var(--lilac);text-underline-offset:3px}.msg-body h1,.msg-body h2,.msg-body h3{font-weight:500;line-height:1.4;margin-top:25px}.msg-body h1{font-size:23px}.msg-body h2{font-size:20px}.msg-body h3{font-size:17px}.code{border:1px solid #ffffff20;border-radius:15px;background:#060609e6;margin:15px 0;overflow:hidden}.code-head{display:flex;justify-content:space-between;gap:14px;padding:9px 14px;font-size:11px;color:var(--muted);border-bottom:1px solid #ffffff16}.copy{font-size:11px;color:var(--ivory);padding:3px 6px}.code pre{padding:14px;margin:0;font:13px/1.8 Consolas,monospace}.msg-body code{font:13px/1.7 Consolas,monospace;color:#e8dfe9;background:#ffffff08;border-radius:4px;padding:1px 4px}.code pre code{background:none;padding:0}.msg-body table{border-collapse:collapse;width:100%;font-size:13px}.msg-body th,.msg-body td{padding:9px 12px;border-bottom:1px solid #ffffff20;text-align:left}.table-wrap{overflow:auto}.msg-meta{font-size:11px;color:#9a9ea5;margin-top:10px;display:flex;align-items:center;gap:15px}.read-answer{font-size:11px;color:var(--muted);padding:3px 0}.message-waiting{font-size:12px;color:#b1b5bc}.msg-error{color:var(--pink)}.jump-button{position:sticky;bottom:195px;border-radius:20px;padding:9px 16px;align-self:center;z-index:2;margin:8px auto;font-size:12px}.capture-preview{display:flex;align-items:center;gap:12px;margin-bottom:15px;font-size:12px;color:var(--muted)}.capture-preview img{height:55px;max-width:130px;border-radius:7px;object-fit:contain}.capture-preview>button{margin-left:auto}
dialog{color:var(--text);max-height:calc(100dvh - 60px);overflow:auto}dialog::backdrop{background:#07070c9c;backdrop-filter:blur(7px)}dialog.glass{background:linear-gradient(135deg,#ffffff08,transparent 50%),#10141ef7;box-shadow:inset 0 1px 0 #ffffff35,0 30px 100px #0005}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:19px}.dialog-head h2{font-size:19px;font-weight:400;margin:0}.dialog-head .icon-button{font-size:23px}.settings-dialog,.detail-dialog,.edit-dialog,.pair-dialog{width:min(440px,calc(100% - 32px));border-radius:24px;padding:23px}.dialog-note,.history-note{font-size:12px;line-height:1.8;color:var(--muted)}.section-label{font:11px/1.5 Consolas,monospace;letter-spacing:1px;color:var(--muted);margin:5px 0 18px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;padding:15px 0;border-bottom:1px solid #ffffff1a;font-size:13px;text-align:left}.setting-row>span:last-child{font-size:12px;color:var(--muted);text-align:right}.setting-row input{width:17px;height:17px;flex-shrink:0}.primary-button,.new-chat-button{border-radius:14px;padding:12px 17px;border:1px solid #ffffff45;background:#ffffff17;color:var(--ivory);font-size:13px}.dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:21px}.edit-dialog input,.pair-dialog input,.history-drawer input{display:block;width:100%;padding:12px 13px;border-radius:13px;border:1px solid #ffffff2b;background:#06060970;font-size:14px;margin:12px 0}.pair-dialog p{font-size:13px;line-height:1.8;overflow-wrap:anywhere}.pair-dialog label{font-size:12px;color:var(--muted)}.pair-dialog .primary-button{width:100%;margin:5px 0}.pair-qr{width:200px;height:200px;object-fit:contain;display:block;margin:20px auto;background:#fff;border-radius:15px;padding:9px}.pair-code{text-align:center;font:24px/1.5 Consolas,monospace;letter-spacing:4px}#pair-url{font-size:12px;text-align:center;color:var(--muted)}#pair-error{font-size:12px;color:var(--pink)}
.history-drawer{position:fixed;inset:16px auto 16px 16px;margin:0;width:345px;max-width:calc(100% - 32px);max-height:none;border-radius:25px;padding:22px;display:none;flex-direction:column;overflow:hidden}.history-drawer[open]{display:flex}.history-drawer nav{overflow:auto;flex:1;margin-top:9px;min-height:100px}.new-chat-button{width:100%;text-align:left}.conversation-item{display:flex;align-items:center;gap:4px;border-radius:13px;padding:4px;margin-bottom:5px;border:1px solid transparent}.conversation-item.current{background:#ffffff0c;border-color:#ffffff23}.conversation-item>button:first-child{flex:1;min-width:0;text-align:left;padding:9px 7px}.conversation-item .conversation-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.conversation-item small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.conversation-item .icon-button{width:29px;height:29px;font-size:14px;background:none;border:0;box-shadow:none;color:var(--muted)}.history-note{margin:15px 0 0;font-size:11px}.history-empty{font-size:12px;color:var(--muted);padding:15px 5px}.agent-choice{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px;border:1px solid #ffffff22;border-radius:13px;margin:8px 0;text-align:left;background:#ffffff06;font-size:13px}.agent-choice small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.agent-choice[aria-pressed=true]{border-color:#ffffff60;background:#ffffff10}.toasts{position:fixed;z-index:100;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;max-width:min(520px,calc(100% - 30px));pointer-events:none}.toast{border-radius:15px;border:1px solid #ffffff38;background:#10141ef5;padding:12px 18px;box-shadow:0 8px 35px #0004;font-size:13px;line-height:1.6}.toast.error{color:var(--pink)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}body[data-phase=offline] .status-dot{background:#a9adb4}body[data-phase=error] .status-dot{background:var(--pink)}body.reduced-motion *{transition:none!important;scroll-behavior:auto!important}
@media(min-height:950px) and (min-width:701px){.orb-shell{width:430px;height:380px}.welcome{padding-bottom:65px}.composer{min-height:145px}.composer-actions{margin-top:17px}}
@media(max-width:900px){.app-shell{padding:18px 20px 0}.topbar{padding:10px 15px}.brand>span{font-size:18px;letter-spacing:4px}.top-actions{gap:6px}.toolbar{margin-top:17px}.main-stage{max-width:760px}.orb-shell{width:340px;height:290px}.welcome{padding-bottom:32px}.system-line{gap:12px}.system-summary{gap:10px}.local-tag{display:none}.system-line{justify-content:center}.mode-label{margin-right:auto}.system-summary{margin-left:auto}.compose-region{width:95%}}
@media(max-width:600px){.app-shell{padding:max(12px,env(safe-area-inset-top)) 12px 0;min-height:100svh}.topbar{border-radius:25px;gap:8px;padding:9px 10px;min-height:59px;flex-wrap:wrap}.brand-group{gap:5px}.brand{gap:8px}.brand img{width:25px;height:25px}.brand>span{font-size:15px;letter-spacing:3px}.brand-group>.icon-button{width:30px}.connection{font-size:11px;order:3;justify-content:center;width:100%;padding-bottom:2px}.top-actions{margin-left:auto;gap:5px}.top-actions .icon-button{width:31px;height:31px}.top-actions #voice-toggle{display:none}.toolbar{margin:13px 3px 0;gap:8px}.model-pill{font-size:11px;padding:8px 11px}.toolbar-right{gap:8px}.memory-button{font-size:11px;gap:5px}.memory-button>span:last-child{display:none}.toolbar-right>.icon-button{width:32px;height:32px}.presence{padding-top:4px}.orb-shell{width:300px;height:248px}.presence-label{font-size:11px}.welcome{padding:22px 0 42px}.welcome h1{font-size:27px}.welcome p{font-size:13px}.compose-region{width:100%;padding-top:10px}.composer{border-radius:29px;padding:17px 15px 13px}.composer textarea{font-size:16px}.composer-actions{margin-top:9px}.compose-foot{font-size:11px;margin:12px 5px 0;gap:10px;flex-wrap:wrap}#keyboard-hint{display:none}.system-line{margin-top:22px;padding:14px 3px max(18px,env(safe-area-inset-bottom));flex-wrap:wrap;row-gap:6px;min-height:50px}.mode-label{font-size:10px;letter-spacing:1px}.system-summary{padding:0;font-size:10px;gap:9px}.system-summary b{margin-left:3px}.system-summary .vram-track{display:none}.messages{gap:23px;padding:22px 3px 26px}.msg-user{max-width:95%;padding:12px 15px;font-size:14px}.msg-agent{padding:0 5px}.conversation-heading{margin-left:6px;margin-right:6px}body.has-messages .orb-shell{width:180px;height:125px}body.has-messages .presence-label{font-size:11px}.history-drawer{inset:max(10px,env(safe-area-inset-top)) auto max(10px,env(safe-area-inset-bottom)) 10px;max-width:calc(100% - 20px);width:355px;padding:20px}.setting-row{gap:10px}.settings-dialog,.detail-dialog,.edit-dialog,.pair-dialog{padding:21px}.pair-dialog input,.edit-dialog input{font-size:16px}.notice-banner{font-size:12px;padding:10px 13px}.jump-button{bottom:180px}}
@media(max-height:700px) and (min-width:601px){.app-shell{padding-top:14px}.topbar{min-height:54px}.toolbar{margin-top:12px}.orb-shell{width:300px;height:215px}.welcome{padding:16px 0 24px}.welcome h1{font-size:29px}.composer{padding:16px 18px 11px}.system-line{margin-top:16px;min-height:45px}.compose-foot{margin-top:8px}}
@media(pointer:coarse){button:not(.conversation-item .icon-button){min-height:44px}.icon-button,.send-button{min-height:44px;min-width:44px}.topbar{row-gap:5px}.model-pill{padding-top:9px;padding-bottom:9px}.conversation-item .icon-button{min-width:34px;min-height:44px}.history-drawer input{font-size:16px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Matière nacrée : bords optiques en plusieurs plans, centre transparent. */
.glass{background:radial-gradient(ellipse at 4% 0%,#f5c2dc15,transparent 26%),radial-gradient(ellipse at 97% 100%,#e6dcfb12,transparent 27%),linear-gradient(120deg,#10141e63,#10141e42 50%,#10141e67);border:1px solid #f5c2dc66;box-shadow:inset 0 2px 2px #ffffff65,inset 0 -2px 2px #f5c2dc35,inset 3px 0 6px #f5c2dc28,inset -3px 0 6px #e6dcfb26,0 9px 28px #00000028}
.glass:before{inset:3px;padding:1px;background:linear-gradient(130deg,#ffffff58,transparent 18%,transparent 67%,#f5c2dc45);opacity:.65}
.topbar{border-radius:40px;min-height:65px;padding-left:25px}
.connection{font-size:14px}
.icon-button{background:radial-gradient(ellipse at 28% 6%,#ffffff20,transparent 55%),#10141e28;box-shadow:inset 0 1px 2px #ffffff45,inset 0 -1px 2px #f5c2dc25;border-color:#f5c2dc4d}
.ambient{background:linear-gradient(#06060950,#06060950),var(--background)}
.main-stage{width:min(100%,1120px)}
.orb-shell{width:370px;height:315px}
#orb,.orb-lens{visibility:hidden}
.orb-art{position:absolute;height:112%;width:100%;object-fit:contain;left:0;top:-6%;pointer-events:none;filter:brightness(.87) saturate(.68);animation:orb-breath 8s ease-in-out infinite;transition:filter .6s}
.orb-halo{inset:14%;background:radial-gradient(ellipse,#ffffff14,transparent 69%)}
body[data-phase=listening] .orb-art,body[data-phase=speaking] .orb-art{filter:brightness(1) saturate(.72) drop-shadow(0 0 15px #99f6e42b)}
body[data-phase=thinking] .orb-art{animation-duration:2.7s;filter:brightness(.96) saturate(.8)}
@keyframes orb-breath{0%,100%{transform:translateY(0) scale(.99)}50%{transform:translateY(-4px) scale(1)}}
body.reduced-motion .orb-art{animation:none}
.welcome{padding:20px 0 42px}
.welcome h1{font-size:clamp(27px,3.25vw,40px);font-weight:350;letter-spacing:-.8px}
.welcome p{color:#d1d5dc;font-size:16px}
.presence-label{font-size:14px;margin-top:0}
.compose-region{width:min(100%,1000px)}
.composer{min-height:130px;border-radius:65px;padding:25px 35px 17px;background:radial-gradient(ellipse at 2% 0%,#f5c2dc19,transparent 38%),radial-gradient(ellipse at 98% 100%,#e6dcfb19,transparent 28%),linear-gradient(125deg,#10141e70,#10141e44 60%,#10141e60);border-color:#f5c2dc80;box-shadow:inset 0 3px 3px #ffffff66,inset 0 -3px 3px #f5c2dc55,inset 5px 0 7px #f5c2dc35,inset -5px 0 8px #e6dcfb35,0 18px 50px #00000033}
.composer:before{inset:5px;opacity:.8}
.composer textarea{outline:none!important;box-shadow:none;border:0;font-size:16px;min-height:30px}
.composer:focus-within{border-color:#ffffffbb}
.composer-actions{margin-top:6px}
.composer .icon-button,.send-button{width:48px;height:48px}
.compose-foot{margin-top:10px}
body.has-messages .orb-art{height:110%;top:-5%}
@media(min-height:950px) and (min-width:701px){.orb-shell{width:450px;height:375px}.composer{min-height:145px}.welcome{padding-bottom:55px}}
@media(max-width:900px){.orb-shell{width:350px;height:290px}.compose-region{width:97%}.composer{border-radius:48px;padding:24px 27px 17px}.connection{font-size:12px}}
@media(max-width:600px){.orb-shell{width:295px;height:250px}.composer{border-radius:34px;padding:20px 19px 14px;min-height:120px}.composer textarea{font-size:16px}.presence-label{font-size:12px}.welcome{padding:22px 0 35px}.welcome h1{font-size:28px}.welcome p{font-size:13px}.connection{font-size:11px}.topbar{padding:9px 10px;border-radius:29px}.compose-region{width:100%}}
@media(max-height:700px) and (min-width:601px){.orb-shell{width:280px;height:215px}.composer{min-height:105px;padding:18px 28px 12px}.welcome{padding:15px 0 23px}}
@media(prefers-reduced-motion:reduce){.orb-art{animation:none}}

.orb-shell{transform:scale(calc(1 + var(--voice-level,0)*.025))}.orb-shell[data-state=offline] .orb-art{opacity:.4}.orb-shell[data-state=listening] .orb-halo,.orb-shell[data-state=speaking] .orb-halo{opacity:calc(.6 + var(--voice-level,0)*.4);background:radial-gradient(ellipse,#99f6e438,transparent 70%)}

@media(min-width:901px){.model-pill{min-width:195px;min-height:43px;font-size:13px;padding:10px 22px;justify-content:space-between}.orb-shell{height:305px}}

@media(min-width:901px) and (max-height:949px){.welcome{padding-bottom:30px}}

/* Le verre garde ses reflets, le réseau tourne en volume à l’intérieur de l’orbe. */
.orb-shell #orb{visibility:visible;position:absolute;inset:auto;left:0;top:-6%;width:100%;height:112%;z-index:3;pointer-events:none}
.orb-art{z-index:2;animation:none;filter:brightness(.7) saturate(.55);opacity:.8}
.orb-shell{transform:none}
.orb-shell[data-state=thinking] .orb-art,.orb-shell[data-state=generating] .orb-art{animation:none;filter:brightness(.78) saturate(.6)}
body[data-phase=listening] .orb-art,body[data-phase=speaking] .orb-art{filter:brightness(.76) saturate(.6)}
body.has-messages .orb-shell #orb{height:110%;top:-5%}

.orb-art{filter:brightness(.82) saturate(.7);opacity:.95}

/* Matériau optique : la réfraction du fond est calculée dans physical-glass.js. */
.optical-material{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
.optical-glass .app-shell{position:relative;z-index:1}
.optical-glass .topbar,.optical-glass .composer,.optical-glass .model-pill,.optical-glass .icon-button:not(dialog .icon-button){background:transparent;border-color:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.optical-glass .topbar:before,.optical-glass .composer:before,.optical-glass .model-pill:before{display:none}
.optical-glass .orb-shell #orb{visibility:hidden}
.optical-glass .orb-art{opacity:.58;filter:brightness(.84) saturate(.65)}
.optical-glass .composer:focus-within{border-color:#ffffff20}
.optical-glass .send-button{background:linear-gradient(145deg,#ffffff,#f5c2dc);box-shadow:inset 0 1px 1px #fffc,0 3px 10px #00000044}
.optical-glass .composer{min-height:136px;border-radius:68px}
.optical-glass .topbar{border-radius:40px}
@media(max-width:600px){.optical-glass .composer{min-height:122px;border-radius:36px}}

@media(min-width:901px) and (min-height:751px){body:not(.has-messages) .presence,body:not(.has-messages) .welcome{position:relative;top:-26px}}

@media(min-width:901px) and (max-height:949px){.optical-glass .welcome{padding-bottom:20px}}

@media(max-height:780px) and (min-width:601px){
 .optical-glass .app-shell{padding-top:16px}
 .optical-glass .topbar{min-height:58px}
 .optical-glass .toolbar{margin-top:14px}
 .optical-glass .orb-shell{width:340px;height:255px}
 .optical-glass .presence-label{font-size:12px}
 .optical-glass .welcome{padding:16px 0 18px}
 .optical-glass .welcome h1{font-size:32px}
 .optical-glass .welcome p{font-size:14px}
 .optical-glass .composer{min-height:110px;padding:18px 28px 12px;border-radius:55px}
 .optical-glass .composer .icon-button,.optical-glass .send-button{width:42px;height:42px}
 .optical-glass .compose-foot{margin-top:8px}
 .optical-glass .system-line{margin-top:18px;min-height:48px}
}
.msg-approval{border:1px solid #f5c2dc55;border-radius:22px;padding:14px 18px;background:#f5c2dc0d;display:flex;flex-direction:column;gap:9px}.msg-approval p{margin:0}.approval-title{font-size:13px;color:var(--pink)}.approval-detail{display:block;white-space:pre-wrap;overflow-wrap:anywhere;max-height:200px;overflow-y:auto;padding:8px 11px;border-radius:12px;background:#07070c7a;font:12.5px/1.5 Consolas,"Cascadia Mono",monospace;color:var(--text)}.approval-actions{display:flex;gap:10px}.approval-actions button{padding:7px 18px;border-radius:999px;border:1px solid #ffffff46;font-size:13px}.approval-actions .approval-allow{background:linear-gradient(135deg,#eef3fb,#f5c2dc);color:#10141e;border-color:#ffffff88}.approval-actions button:hover{filter:brightness(1.08)}.approval-wait,.approval-done{font-size:12px;color:var(--muted)}.msg-approval.allowed{border-color:#99f6e455}.msg-approval.denied{opacity:.7}

/* ORION · habillage « cockpit » de l'interface commune, pour l'iPhone et la tablette.
   Ajouté par scripts/sync_web_clients.py après design.css (dont la palette nacrée est déjà convertie en celle du
   cockpit) : ici, ce qui ne se réduit pas à des couleurs. Les valeurs reprennent celles de cockpit.css. */

:root {
  --bg: #060609; --bg-2: #16121d;
  --accent: #e6dcfb; --glow: rgba(236, 224, 255, .4); --glow-soft: rgba(236, 224, 255, .11);
  --blob-1: rgba(124, 58, 237, .45); --blob-2: rgba(219, 39, 119, .32); --blob-3: rgba(13, 148, 136, .34);
  --ok: #99f6e4; --warn: #fcd34d; --bad: #fda4af;
  --text: #eef3fb; --muted: rgba(238, 243, 251, .58); --dim: rgba(238, 243, 251, .34);
  --line: rgba(255, 255, 255, .085); --line-strong: rgba(255, 255, 255, .16);
  --background: var(--bg); --ivory: var(--text); --positive: var(--ok);
  font-family: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
/* Le fond est sur html (design.css) : un fond sur body se peindrait par-dessus la lumière (.ambient, z-index -1). */
body { background: transparent; color: var(--text); -webkit-font-smoothing: antialiased; }
::selection { background: var(--glow); color: #fff; }

/* Le fond : la lumière qui dérive du cockpit, sans image. */
.ambient { background: radial-gradient(120% 90% at 50% 38%, var(--bg-2), var(--bg) 68%); overflow: hidden; }
.ambient::before, .ambient::after, .ambient > .blob { content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; will-change: transform; animation: skin-drift 44s ease-in-out infinite alternate; }
.ambient::before { left: -22vmax; top: -30vmax; background: radial-gradient(circle, var(--blob-1), transparent 62%); }
.ambient::after { right: -26vmax; top: 4vh; background: radial-gradient(circle, var(--blob-2), transparent 62%); animation-duration: 56s; animation-delay: -18s; }
.ambient > .blob { left: 18vw; bottom: -42vmax; background: radial-gradient(circle, var(--blob-3), transparent 62%); animation-duration: 64s; animation-delay: -30s; }
@keyframes skin-drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(7vw, 5vh, 0) scale(1.14); } 100% { transform: translate3d(-5vw, 9vh, 0) scale(.94); } }

/* Le verre dépoli des panneaux du cockpit. */
.glass, dialog.glass {
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(34px) saturate(150%); backdrop-filter: blur(34px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 60px rgba(0, 0, 0, .32);
}
.glass:before { background: linear-gradient(130deg, rgba(255, 255, 255, .22), transparent 25%, transparent 75%, rgba(245, 194, 220, .18)); }
dialog.glass { background: rgba(16, 20, 30, .86); }
.topbar { border-radius: 28px; }
.composer { border-radius: 28px; }
.composer:focus-within { border-color: var(--line-strong); }
.icon-button { background: rgba(255, 255, 255, .05); border-color: var(--line); box-shadow: none; }

/* La marque du cockpit : cercles concentriques, point qui respire. */
.brand-mark { width: 30px; height: 30px; stroke: var(--accent); stroke-width: 1.4; fill: none; }
.brand-mark .brand-dot { fill: var(--accent); stroke: none; animation: skin-breathe 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.brand > span { font-size: 17px; font-weight: 600; letter-spacing: .28em; }
@keyframes skin-breathe { 50% { transform: scale(.82); opacity: .7; } }

/* Le noyau 3D du cockpit à la place de l'orbe nacrée. */
.orb-art, .orb-lens { display: none !important; }
.orb-halo { background: radial-gradient(ellipse, var(--glow-soft), transparent 68%); }
.orb-shell #orb { touch-action: none; }
#orb.orb-fallback { background: radial-gradient(circle at 50% 50%, #fff, #f0e9ff 6%, #2a2142 16%, transparent 24%); }
.presence-label > span:first-child, .status-dot { background: var(--ok); box-shadow: 0 0 10px rgba(153, 246, 228, .5); }
body[data-phase=error] .status-dot { background: var(--bad); box-shadow: none; }
body[data-phase=offline] .status-dot { background: var(--dim); box-shadow: none; }

/* Messages : la bulle et la pastille du cockpit. */
.msg-user { background: rgba(255, 255, 255, .1); border-color: transparent; color: var(--text); }
.send-button { background: linear-gradient(135deg, #eef3fb, var(--accent)); color: #0b0a12; border-color: transparent; box-shadow: 0 0 22px var(--glow-soft); }
.stop-button { background: var(--bad); }
.msg-approval { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .3); }
.toast.error, .msg-error { color: var(--bad); }
.vram-track > span { background: linear-gradient(90deg, #f5c2dc, #dbeafe 35%, #ccfbf1 65%, #e6dcfb); }

body.reduced-motion .ambient::before, body.reduced-motion .ambient::after, body.reduced-motion .ambient > .blob { animation: none; }
@media (prefers-reduced-motion: reduce) { .ambient::before, .ambient::after, .ambient > .blob { animation: none; } }

/* Tablette : deux dispositions selon l'orientation (écrans tactiles de plus de 600 px). L'iPhone et le PC ne sont pas touchés. */
@media (min-width: 601px) and (pointer: coarse) {
  body[data-remote] button { min-height: 48px; }
  body[data-remote] .icon-button, body[data-remote] .send-button, body[data-remote] .composer .icon-button { min-width: 48px; min-height: 48px; width: 48px; height: 48px; }
  body[data-remote] .conversation-item .icon-button { width: 44px; min-width: 44px; }
  body[data-remote] .app-shell { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); padding-bottom: env(safe-area-inset-bottom); }
  body[data-remote] .composer textarea { font-size: 17px; }
  body[data-remote] .msg-agent, body[data-remote] .msg-user { font-size: 16px; }
  body[data-remote] .toolbar, body[data-remote] .compose-foot, body[data-remote] .system-line { font-size: 13px; }
  body[data-remote] .model-pill, body[data-remote] .memory-button { min-height: 48px; }
  body[data-remote] .setting-row, body[data-remote] .agent-choice { min-height: 52px; }
  body[data-remote] #keyboard-hint { display: none; }
}

/* Vertical : noyau large en haut, conversation en colonne, zone de saisie collée en bas. */
@media (min-width: 601px) and (pointer: coarse) and (orientation: portrait) {
  body[data-remote] .main-stage { width: min(100%, 860px); }
  body[data-remote] .orb-shell { width: min(78vw, 560px); height: min(66vw, 470px); }
  body[data-remote].has-messages .orb-shell { width: min(46vw, 300px); height: min(38vw, 250px); }
  body[data-remote] .welcome h1 { font-size: clamp(30px, 4.6vw, 42px); }
  body[data-remote] .welcome p { font-size: 17px; }
  body[data-remote] .messages { width: 100%; }
  body[data-remote] .compose-region { position: sticky; bottom: 0; width: 100%; padding-bottom: 6px; z-index: 3; }
  body[data-remote] .jump-button { bottom: 210px; }
  body[data-remote] .history-drawer { width: min(420px, calc(100% - 32px)); }
}

/* Horizontal : noyau fixe à gauche, conversation et saisie à droite. */
@media (min-width: 801px) and (pointer: coarse) and (orientation: landscape) {
  body[data-remote] .app-shell { padding-top: max(12px, env(safe-area-inset-top)); }
  body[data-remote] .topbar { min-height: 58px; }
  body[data-remote] .toolbar { margin-top: 10px; }
  body[data-remote] .main-stage { width: 100%; max-width: 1400px; display: grid; grid-template-columns: minmax(300px, 38%) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; column-gap: 28px; align-items: start; }
  body[data-remote] .presence { grid-column: 1; grid-row: 1 / -1; position: sticky; top: 12px; align-self: start; justify-content: center; min-height: calc(100dvh - 190px); }
  body[data-remote] .orb-shell, body[data-remote].has-messages .orb-shell { width: min(100%, 460px); height: min(46vw, 400px, calc(100dvh - 260px)); }
  body[data-remote] .welcome { grid-column: 2; grid-row: 1 / 3; text-align: left; padding: 8vh 0 20px; align-self: center; }
  body[data-remote] .welcome h1 { font-size: clamp(28px, 3.2vw, 40px); }
  body[data-remote] .conversation-heading { grid-column: 2; grid-row: 1; margin: 6px 4px 0; }
  body[data-remote] .messages { grid-column: 2; grid-row: 3; width: 100%; padding: 14px 4px 24px; }
  body[data-remote] .jump-button { grid-column: 2; grid-row: 3; align-self: end; bottom: 150px; }
  body[data-remote] .compose-region { grid-column: 2; grid-row: 4; position: sticky; bottom: 0; width: 100%; z-index: 3; padding-bottom: 4px; }
  body[data-remote] .composer { min-height: 104px; padding: 16px 24px 10px; border-radius: 40px; }
  body[data-remote] .system-line { margin-top: 10px; min-height: 44px; }
}
