#booktime-coder-root{font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#242424;position:relative;z-index:100000}
#booktime-coder-root [hidden]{display:none!important}
#booktime-coder-root *{box-sizing:border-box}
#booktime-coder-root button{font:inherit;cursor:pointer;border:1px solid #dcdfe3;border-radius:9px;padding:8px 12px;background:#fff;color:#30343a;line-height:1.3}
#booktime-coder-root button:hover{background:#f1f2f4}
#booktime-coder-root button:focus-visible,#booktime-coder-root textarea:focus-visible,#booktime-coder-root a:focus-visible{outline:3px solid #75acd9;outline-offset:2px}
#booktime-coder-root button:disabled{opacity:.4;cursor:default}
#booktime-coder-root .btc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#booktime-coder-root .btc-launch{position:fixed;right:22px;bottom:20px;display:flex;align-items:center;gap:8px;padding:7px 16px 7px 9px;background:#fff;color:#242424;border:1px solid #dcdfe3;border-radius:28px;font-weight:650;box-shadow:0 4px 20px #00000015}
#booktime-coder-root .btc-avatar{display:block;width:40px;height:40px;object-fit:contain;flex-shrink:0;background:#fff;border-radius:9px}
#booktime-coder-root .btc-panel{position:fixed;right:18px;bottom:84px;width:min(520px,calc(100vw - 24px));height:min(880px,calc(100dvh - 108px));display:flex;flex-direction:column;background:#fff;border:1px solid #dedfe2;border-radius:20px;box-shadow:0 16px 70px #00000026;overflow:hidden}
#booktime-coder-root .btc-header{display:flex;align-items:center;justify-content:space-between;background:#fff;color:#242424;padding:11px 16px;flex-shrink:0}
#booktime-coder-root .btc-brand{display:flex;align-items:center;gap:10px;min-width:0}
#booktime-coder-root .btc-header .btc-avatar{width:44px;height:44px}
#booktime-coder-root .btc-header strong{font-size:18px}
#booktime-coder-root small{display:block;font-size:11px;line-height:1.4;color:#73777f}
#booktime-coder-root .btc-header small{margin-top:2px}
#booktime-coder-root .btc-close{background:transparent;border:0;font-size:25px;padding:3px 9px}
#booktime-coder-root .btc-context{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 16px;border-block:1px solid #eee;background:#fafafa;flex-shrink:0}
#booktime-coder-root .btc-page{flex:1;font-size:12px;font-weight:550;min-width:150px}
#booktime-coder-root .btc-pick{font-size:11px;padding:6px 9px;border-radius:18px}
#booktime-coder-root .btc-element{flex-basis:100%;overflow-wrap:anywhere;color:#244b70}
#booktime-coder-root .btc-messages{flex:1;min-height:40px;overflow-y:auto;padding:18px 16px 8px;overscroll-behavior:contain;scrollbar-width:thin}
#booktime-coder-root .btc-empty{color:#73777f;margin:14px 6px;text-align:center}
#booktime-coder-root .btc-message{margin:0 0 18px;padding:4px 4px;white-space:pre-wrap;overflow-wrap:anywhere}
#booktime-coder-root .btc-user{background:#f0f1f3;margin-left:auto;max-width:92%;padding:12px 15px;border-radius:18px}
#booktime-coder-root .btc-message small{margin-bottom:5px;font-weight:600}
#booktime-coder-root .btc-progress{padding:0 18px 8px;color:#68717c;font-size:12px;flex-shrink:0;max-height:70px;overflow:auto}
#booktime-coder-root .btc-progress:empty{display:none}
#booktime-coder-root .btc-proposal{max-height:25%;min-height:60px;flex-shrink:0;overflow:auto;border-top:1px solid #eee;padding:8px 16px;background:#fafafa}
#booktime-coder-root details{margin:6px 0;padding:0;border:0}
#booktime-coder-root summary{cursor:pointer;font-size:12px;font-weight:400;margin:0;overflow-wrap:anywhere}
#booktime-coder-root pre{font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre;overflow:auto;background:#fff;padding:10px;border:1px solid #e2eaf1;border-radius:6px;max-height:300px}
#booktime-coder-root h4{margin:9px 0 3px;font-size:11px}
#booktime-coder-root #btc-summary{width:100%;padding:8px;border:1px solid #ced2d8;border-radius:8px;font:inherit;font-size:12px;background:#fff;color:#30343a}
#booktime-coder-root .btc-actions{display:flex;gap:6px;flex-wrap:wrap;padding:5px 16px 8px;flex-shrink:0}
#booktime-coder-root .btc-actions button{font-size:12px}
#booktime-coder-root .btc-publish-help{width:100%;color:#7b4b10}
#booktime-coder-root .btc-publish{background:#242424;color:#fff;border-color:#242424}
#booktime-coder-root .btc-form{margin:0;padding:4px 12px 0;background:#fff;flex-shrink:0}
#booktime-coder-root label{display:block;font-size:12px;font-weight:600;margin-bottom:6px}
#booktime-coder-root textarea{display:block;width:100%;border:1px solid #bdcedc;border-radius:9px;font:inherit;resize:vertical;min-height:65px;max-height:250px;padding:9px;color:#23364a;background:#fff}
#booktime-coder-root .btc-composer{border:1px solid #d8dbdf;border-radius:22px;padding:10px 12px 9px;background:#fafafa;box-shadow:0 2px 8px #00000006}
#booktime-coder-root .btc-composer:focus-within{border-color:#a9afb8}
#booktime-coder-root .btc-composer.btc-dragging{outline:3px solid #75acd9;background:#f0f7ff}
#booktime-coder-root #btc-prompt{border:0;outline:none;background:transparent;border-radius:0;padding:4px 2px;resize:none;min-height:42px;max-height:160px;font-size:14px;line-height:1.5;color:#242424;box-shadow:none}
#booktime-coder-root #btc-prompt::placeholder{color:#81858d}
#booktime-coder-root .btc-composer-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
#booktime-coder-root .btc-tools{display:flex;align-items:center;gap:7px;min-width:0}
#booktime-coder-root .btc-tools small{font-size:10px}
#booktime-coder-root .btc-attach{border:0;background:transparent;font-size:25px;padding:0;width:34px;height:34px;flex-shrink:0;border-radius:50%}
#booktime-coder-root .btc-file-count{font-size:10px;color:#73777f;white-space:nowrap}
#booktime-coder-root .btc-send{display:grid;place-items:center;border:0;border-radius:50%;width:36px;height:36px;flex-shrink:0;padding:0;background:#242424;color:#fff;font:26px/1 system-ui}
#booktime-coder-root .btc-send:hover{background:#444}
#booktime-coder-root .btc-upload-help{font-size:10px;text-align:center;padding:6px 4px}
#booktime-coder-root .btc-pending-files{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 8px;max-height:80px;scrollbar-width:thin}
#booktime-coder-root .btc-pending-file{position:relative;display:flex;align-items:center;gap:8px;flex:0 0 auto;width:190px;padding:6px;background:#fff;border:1px solid #e1e3e6;border-radius:12px}
#booktime-coder-root .btc-preview-open{width:60px;height:50px;border:0;padding:0;background:#f7f7f8;flex-shrink:0;overflow:hidden;border-radius:7px}
#booktime-coder-root .btc-preview-open img{display:block;width:100%;height:100%;object-fit:contain}
#booktime-coder-root .btc-file-meta{min-width:0;padding-right:12px;font-size:11px}
#booktime-coder-root .btc-file-meta strong{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#booktime-coder-root .btc-file-meta small{font-size:10px;margin-top:3px}
#booktime-coder-root .btc-file-icon{font-size:10px;background:#f0f1f3;border-radius:7px;padding:12px 5px;flex-shrink:0}
#booktime-coder-root .btc-file-remove{position:absolute;right:3px;top:3px;padding:0;border:0;background:#f0f1f3;border-radius:50%;width:20px;height:20px;font-size:15px}
#booktime-coder-root .btc-image-dialog{padding:38px 12px 12px;border:1px solid #ddd;border-radius:16px;max-width:90vw;max-height:85dvh;box-shadow:0 15px 80px #0004}
#booktime-coder-root .btc-image-dialog::backdrop{background:#0009}
#booktime-coder-root .btc-image-dialog img{display:block;max-width:min(800px,80vw);max-height:70dvh;object-fit:contain}
#booktime-coder-root .btc-preview-close{position:absolute;right:8px;top:5px;border:0;padding:2px 8px;font-size:22px}
#booktime-coder-root .btc-attached-file{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:11px;color:#244b70;overflow-wrap:anywhere}
#booktime-coder-root .btc-attached-file img{width:140px;height:100px;border-radius:9px;object-fit:contain}
#booktime-coder-root .btc-footnote{font-size:10px;color:#81858d;margin:0 16px 10px;flex-shrink:0}
#booktime-coder-root .btc-model{white-space:nowrap}
#booktime-coder-root .btc-rescue{display:inline;margin-top:0;color:#586575;text-decoration:underline}
#booktime-coder-root .btc-live-update{padding:8px 16px;background:#fff5dc;border-bottom:1px solid #ead7a0;flex-shrink:0}
#booktime-coder-root .btc-live-update button{font-size:11px;padding:4px 8px;margin-top:5px}
#booktime-coder-root .btc-settings{padding:8px 15px;margin:0;border-bottom:1px solid #dbe6ef;background:#f6f9fc;flex-shrink:0;max-height:250px;overflow:auto}
#booktime-coder-root .btc-settings summary{font-weight:650;margin-bottom:4px}
#booktime-coder-root .btc-settings input{display:block;width:100%;padding:7px;border:1px solid #bdcedc;border-radius:7px;font:inherit;font-size:12px;background:#fff;color:#23364a;margin-bottom:7px}
#booktime-coder-root .btc-settings button{font-size:12px;margin:2px 0 6px}
#booktime-coder-root .btc-provider-status{font-size:12px;margin:5px 0}
#booktime-coder-root .btc-instruction-notice{margin:0;padding:7px 15px;background:#f4f8fb;font-size:11px;flex-shrink:0;border-bottom:1px solid #dbe6ef}
#booktime-coder-root .btc-instructions{padding:8px 15px;margin:0;background:#f6f9fc;flex-shrink:0;max-height:45%;overflow:auto;border-bottom:1px solid #dbe6ef}
#booktime-coder-root .btc-instructions summary{font-weight:650}
#booktime-coder-root .btc-instructions p{font-size:12px;margin:6px 0}
#booktime-coder-root .btc-instructions-fields{border:0;padding:0;margin:10px 0 0;min-width:0}
#booktime-coder-root .btc-instructions textarea{font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;min-height:100px;max-height:250px;margin-bottom:10px}
#booktime-coder-root .btc-instructions input{display:block;width:100%;padding:7px;border:1px solid #bdcedc;border-radius:7px;background:#fff;color:#23364a;margin-bottom:9px;font:inherit;font-size:12px}
#booktime-coder-root .btc-instruction-document{margin:10px 0;padding:9px;border:1px solid #dbe6ef;border-radius:8px;background:#fff}
#booktime-coder-root .btc-instructions-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}
#booktime-coder-root .btc-instructions button{font-size:12px}
#booktime-coder-root .btc-instructions-save{background:#244b70;color:#fff;border-color:#244b70}

#booktime-coder-root .btc-admin-open .btc-instructions{flex:1;min-height:0;max-height:none}
#booktime-coder-root .btc-admin-open .btc-messages,#booktime-coder-root .btc-admin-open .btc-progress,#booktime-coder-root .btc-admin-open .btc-proposal,#booktime-coder-root .btc-admin-open .btc-actions,#booktime-coder-root .btc-admin-open .btc-form{display:none}
#booktime-coder-root .btc-instructions-save:hover{background:#1e4161}
#booktime-coder-root .btc-instructions-save:disabled{background:#e4ecf3;color:#536c82;opacity:1;cursor:default}
#booktime-coder-root .btc-instructions-close{margin-top:9px}
.btc-picking *{cursor:crosshair!important}
.btc-picking #booktime-coder-root *{cursor:auto!important}
@media(max-width:600px){#booktime-coder-root .btc-panel{right:6px;bottom:76px;width:calc(100vw - 12px);height:calc(100dvh - 88px);border-radius:16px}#booktime-coder-root .btc-launch{right:12px;bottom:12px}#booktime-coder-root .btc-tools small{font-size:9px}}
@media print{#booktime-coder-root{display:none!important}}

/* Lion / Castor: explicit provider choice, shared publication controls. */
#booktime-coder-root .btc-engine-bar{display:flex;align-items:center;gap:10px;padding:8px 14px;flex-wrap:wrap;border-bottom:1px solid #dce3ed}#booktime-coder-root .btc-engine-toggle{border:1px solid #aabbd0;border-radius:8px;background:#f5f8fc;color:#183b5e;padding:7px 10px;cursor:pointer}#booktime-coder-root .btc-engine-description{color:#52657b}#booktime-coder-root .btc-lion-settings{display:grid;gap:7px;border:1px solid #dce3ed;border-radius:8px;margin-bottom:12px;padding:10px}#booktime-coder-root .btc-lion-settings select{width:100%;padding:8px;border:1px solid #bac8da;border-radius:6px}

/* Conversation first: secondary controls live in the header menu. */
#booktime-coder-root .btc-panel{width:min(680px,calc(100vw - 24px));height:min(900px,calc(100dvh - 108px))}
#booktime-coder-root .btc-header{border-bottom:1px solid #eee;padding:12px 18px;gap:6px}
#booktime-coder-root .btc-brand{flex:1}
#booktime-coder-root .btc-menu{border:0;background:transparent;letter-spacing:2px}
#booktime-coder-root .btc-options{flex-shrink:0;max-height:55%;overflow:auto;border-bottom:1px solid #eee;background:#fafafa}
#booktime-coder-root .btc-options .btc-instructions,#booktime-coder-root .btc-options .btc-settings{max-height:none;background:transparent}
#booktime-coder-root .btc-messages{padding:24px 26px 10px}
#booktime-coder-root .btc-empty{white-space:pre-line;margin:60px auto;line-height:1.9;font-size:16px;color:#555}
#booktime-coder-root .btc-message{line-height:1.7;margin-bottom:26px}
#booktime-coder-root .btc-message>small:last-child:not(:first-child){display:none}
#booktime-coder-root .btc-user{max-width:88%;background:#f3f3f3}
#booktime-coder-root .btc-model-button{font-size:11px;border:0;background:transparent;color:#666;padding:5px;white-space:normal;text-align:left}
#booktime-coder-root .btc-tools #btc-input-help{display:none}
#booktime-coder-root .btc-progress{padding:8px 26px;max-height:110px;white-space:pre-wrap;line-height:1.6}
#booktime-coder-root .btc-activity{padding:0 26px;flex-shrink:0;color:#777}
#booktime-coder-root .btc-activity-lines{max-height:160px;overflow:auto;font-size:12px;white-space:pre-wrap}
#booktime-coder-root .btc-activity-lines p{padding-left:10px;border-left:2px solid #ddd}
#booktime-coder-root .btc-form{padding:8px 18px 10px}
#booktime-coder-root .btc-upload-help{padding-top:8px}
#booktime-coder-root .btc-actions{padding-inline:24px}
#booktime-coder-root .btc-options .btc-footnote{margin-top:12px}
@media(max-width:600px){#booktime-coder-root .btc-panel{width:calc(100vw - 12px);height:calc(100dvh - 88px)}#booktime-coder-root .btc-messages{padding:18px}#booktime-coder-root .btc-form{padding:8px}}

#booktime-coder-root .btc-message-line:empty{height:.7em}
#booktime-coder-root .btc-message-body code{font:12px ui-monospace,monospace;background:#f1f1f1;padding:2px 4px;border-radius:4px}
#booktime-coder-root .btc-message-body pre{font-size:12px;white-space:pre;max-height:340px;background:#f8f8f8}

/* Commandes principales du chat Lion. */
#booktime-coder-root .btc-send{width:auto;min-width:76px;padding:0 14px;font-size:14px}
#booktime-coder-root .btc-options>.btc-publish,#booktime-coder-root .btc-options>.btc-discard{margin:8px}
