File size: 10,593 Bytes
967429f bd94e19 967429f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | /* ==========================================================================
OPSIOM — modes de Kaïro (Chat / Raisonnement / Agent), cartes d'outils,
bloc « Raisonnement » et panneau « Mes documents ».
Utilise les variables de chat.css (thèmes clair / sombre).
========================================================================== */
/* ---- Barre de modes (au-dessus du champ de saisie) ---- */
#mode-bar { width: 100%; max-width: 780px; display: flex; flex-direction: column; gap: 8px; }
#mode-picker {
align-self: flex-start; display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--chip);
max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
#mode-picker::-webkit-scrollbar { display: none; }
.mode-btn {
display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: 11px; flex: none;
background: transparent; color: var(--ink2); font-size: 13.5px; font-weight: 500; white-space: nowrap;
transition: background .2s, color .2s;
}
.mode-btn svg { opacity: .75; }
.mode-btn:hover { color: var(--ink); }
.mode-btn.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(40, 10, 60, .18); }
.mode-btn.active svg { color: var(--pop); opacity: 1; }
.mode-btn.unavailable { opacity: .5; }
.mode-btn.unavailable:hover { opacity: .8; }
#mode-hint { margin: 0; padding-left: 4px; font-size: 12.5px; line-height: 1.45; color: var(--faint); }
#tool-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tool-chip, .docs-open {
display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px;
border: 1px solid var(--line); background: transparent; color: var(--ink2); font-size: 12.5px; font-weight: 500;
transition: background .2s, border-color .2s, color .2s;
}
.tool-chip:hover, .docs-open:hover { background: var(--hover); color: var(--ink); }
.tool-chip.on { border-color: rgba(var(--pop-rgb), .55); background: rgba(var(--pop-rgb), .12); color: var(--ink); }
.tool-chip.on svg { color: var(--pop); }
.tool-chip.unavailable { opacity: .5; }
.tool-chip small { font-family: 'Geist Mono', monospace; font-size: 10.5px; opacity: .7; }
.docs-open { margin-left: auto; border-style: dashed; }
.settings-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--chip); font-size: 12.5px; line-height: 1.45; color: var(--ink2); }
/* ---- Blocs de réponse (raisonnement, outils) ---- */
.msg-content > .blk-reasoning,
.msg-content > .blk-tool { margin: 0 0 14px; }
.msg-content > .blk-text { margin: 0 0 14px; }
.msg-content > :last-child { margin-bottom: 0; }
.blk-reasoning, .blk-tool {
border: 1px solid var(--line); border-radius: 16px; background: transparent; font-size: 14px; line-height: 1.55;
overflow: hidden;
}
.blk-reasoning > summary, .blk-tool > summary {
display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 14px; cursor: pointer; list-style: none;
color: var(--ink2); user-select: none;
}
.blk-reasoning > summary::-webkit-details-marker, .blk-tool > summary::-webkit-details-marker { display: none; }
.blk-reasoning > summary:hover, .blk-tool > summary:hover { background: var(--hover); }
.blk-ico { display: flex; color: var(--pop); flex: none; }
.blk-title { font-weight: 500; color: var(--ink); white-space: nowrap; }
.blk-meta { font-family: 'Geist Mono', monospace; font-size: 11.5px; color: var(--faint); }
.blk-chev { display: flex; margin-left: auto; color: var(--faint); transition: transform .2s; flex: none; }
details[open] > summary .blk-chev { transform: rotate(180deg); }
.reasoning-body {
padding: 4px 16px 14px 38px; color: var(--ink2); font-size: 14px; line-height: 1.65; white-space: pre-wrap;
overflow-wrap: anywhere; max-height: 340px; overflow-y: auto; scrollbar-width: thin;
}
.blk-reasoning.live { border-color: rgba(var(--pop-rgb), .5); }
.blk-reasoning.live .blk-title::after {
content: ""; display: inline-block; width: 1.4em; text-align: left; animation: dots 1.4s steps(4, end) infinite;
}
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.tool-arg {
min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
font-family: 'Geist Mono', monospace; font-size: 12.5px; padding: 2px 8px; border-radius: 7px; background: var(--chip); color: var(--ink2);
}
.tool-status {
display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding-left: 8px; flex: none;
font-size: 12.5px; color: var(--ink2); max-width: 46%;
}
.tool-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-tool[data-state="ok"] .tool-status { color: var(--green); }
.blk-tool[data-state="error"] .tool-status, .blk-tool[data-state="noresult"] .tool-status { color: var(--red); }
.tool-status + .blk-chev { margin-left: 2px; }
.mini-spin {
width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(var(--pop-rgb), .3); border-top-color: var(--pop);
animation: spin 0.8s linear infinite; display: inline-block;
}
.tool-body { padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.tool-error { margin: 0; color: var(--red); }
.tool-empty { margin: 0; color: var(--faint); }
.tool-calc { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.tool-calc code { font-family: 'Geist Mono', monospace; font-size: .92em; }
.tool-calc strong { font-family: 'Geist Mono', monospace; font-weight: 500; }
.tool-eq { color: var(--faint); }
.tool-results { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.tool-results li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-title { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
a.tr-title { color: var(--pop); text-decoration: none; }
a.tr-title:hover { text-decoration: underline; }
.tr-src { font-family: 'Geist Mono', monospace; font-size: 11.5px; color: var(--faint); }
.tr-text { margin: 2px 0 0; color: var(--ink2); font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
/* Notes du serveur (appel d'outil inutile ignoré…) */
.bubble-notes { flex: 0 0 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.bubble-note { font-size: 12.5px; color: var(--faint); display: flex; gap: 6px; align-items: baseline; }
.bubble-note::before { content: "·"; color: var(--pop); font-weight: 700; }
/* ---- Fenêtre « Mes documents » ---- */
#docs-modal-overlay {
position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px;
background: rgba(20, 8, 32, .55); backdrop-filter: blur(6px); animation: fade-in .2s both;
}
#docs-modal {
position: relative; width: min(520px, 100%); max-height: 100%; overflow-y: auto; padding: 28px; border-radius: 24px;
background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 90px -20px rgba(20, 8, 32, .6);
animation: rise .3s cubic-bezier(.2, .8, .2, 1) both;
}
#docs-modal-close {
position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 10px;
background: transparent; color: var(--faint); display: flex; align-items: center; justify-content: center;
}
#docs-modal-close:hover { background: var(--hover); color: var(--ink); }
#docs-modal-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--chip); color: var(--pop); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
#docs-modal-title { margin: 0 0 6px; font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-size: 30px; letter-spacing: -.01em; }
#docs-modal-lead { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; color: var(--ink2); }
#docs-list { margin: 0 0 8px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 14px; background: var(--chip); }
.doc-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.doc-info strong { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-info small { font-family: 'Geist Mono', monospace; font-size: 11.5px; color: var(--faint); }
.doc-del { width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--faint); display: flex; align-items: center; justify-content: center; flex: none; }
.doc-del:hover { background: var(--hover); color: var(--red); }
#docs-empty { margin: 0 0 8px; padding: 14px; border-radius: 14px; border: 1px dashed var(--line); font-size: 13.5px; color: var(--faint); text-align: center; }
.docs-add { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 12px; }
.docs-file-btn {
display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 14px;
background: var(--grad); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; align-self: flex-start; transition: filter .2s;
}
.docs-file-btn:hover { filter: brightness(1.1); }
.docs-file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.docs-file-btn:focus-within { outline: 2px solid var(--pop); outline-offset: 2px; }
.docs-paste summary { cursor: pointer; font-size: 13.5px; color: var(--ink2); padding: 4px 0; }
.docs-paste[open] { display: flex; flex-direction: column; gap: 8px; }
.docs-paste input, .docs-paste textarea {
width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink);
font: inherit; font-size: 14px; padding: 10px 12px; resize: vertical;
}
.docs-paste input:focus, .docs-paste textarea:focus { outline: 0; border-color: var(--pop); }
.docs-paste-btn { align-self: flex-start; height: 36px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: transparent; font-size: 13.5px; color: var(--ink); }
.docs-paste-btn:hover:not(:disabled) { background: var(--hover); }
#docs-limits { margin: 0; font-size: 12px; color: var(--faint); }
@media (max-width: 720px) {
.tool-status { max-width: 38%; }
.tool-arg { max-width: 34%; }
.docs-open { margin-left: 0; }
#docs-modal { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
.blk-reasoning.live .blk-title::after, .mini-spin { animation: none; }
}
|