/* TOMBÉLA — Le Prof. All rules are scoped to the companion. */
.tcomp{--tcomp-vh:100dvh;--tcomp-bottom:16px;--tcomp-keyboard:0px;--tcomp-ink:#202320;--tcomp-coral:#ed583f;position:fixed;right:max(18px,env(safe-area-inset-right));bottom:calc(var(--tcomp-bottom) + env(safe-area-inset-bottom));z-index:90;width:70px;height:70px;font-family:Arial,sans-serif;color:var(--tcomp-ink);font-size:13px;line-height:1.45}
.tcomp *{box-sizing:border-box}
.tcomp [hidden]{display:none!important}
.tcomp button,.tcomp input{font:inherit}
.tcomp button{cursor:pointer;-webkit-tap-highlight-color:transparent}
.tcomp button:focus-visible,.tcomp a:focus-visible,.tcomp input:focus-visible{outline:3px solid #098d9b;outline-offset:3px}
.tcomp-launcher{display:block;position:relative;width:70px;height:70px;padding:0;border:0;border-radius:18px;background:transparent;color:var(--tcomp-ink);touch-action:manipulation}
.tcomp-mascot{display:block;width:70px;height:70px;object-fit:contain;object-position:center bottom;transform-origin:50% 100%;animation:tcomp-breathe 5.5s ease-in-out infinite;filter:drop-shadow(0 3px 2px #00000014)}
.tcomp-launcher:hover .tcomp-mascot{animation:tcomp-wave .65s ease-in-out 1}
.tcomp-launcher-label{position:absolute;right:65px;top:23px;background:#fff;border:1px solid #e5e7e2;padding:5px 8px;border-radius:12px;white-space:nowrap;font-size:10px;opacity:0;transform:translateX(4px);transition:opacity .15s,transform .15s;pointer-events:none}
.tcomp-launcher:hover .tcomp-launcher-label,.tcomp-launcher:focus-visible .tcomp-launcher-label{opacity:1;transform:translateX(0)}
.tcomp-panel{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:calc(104px + var(--tcomp-keyboard) + env(safe-area-inset-bottom));width:min(386px,calc(100vw - 32px));height:min(548px,calc(var(--tcomp-vh) - 124px));min-height:240px;display:grid;grid-template-rows:auto auto minmax(60px,1fr) auto auto auto;background:#fff;border:1px solid #dce1da;border-radius:17px;box-shadow:0 12px 48px #17282129;overflow:hidden}
.tcomp-header{display:flex;align-items:center;gap:8px;padding:14px 12px 11px;background:#f6f8f3;border-bottom:1px solid #e5e8e2;min-width:0}
.tcomp-avatar{width:32px;height:45px;object-fit:contain;flex:none}
.tcomp-identity{flex:1;min-width:0}
.tcomp-title{font-family:inherit;font-size:16px;line-height:1.2;font-weight:700;letter-spacing:0;margin:0 0 3px}
.tcomp-subtitle{font-size:10px;line-height:1.4;color:#626b62;margin:0;max-width:228px}
.tcomp-header-actions{display:flex;align-self:flex-start;gap:1px}
.tcomp-icon-button{border:0;background:transparent;color:#364038;border-radius:6px;width:27px;height:32px;min-width:27px;padding:0;font-size:22px!important;line-height:1}
.tcomp-icon-button:hover{background:#e7ece4}
.tcomp-context{margin:0;padding:7px 14px;font-size:10px;color:#657067;border-bottom:1px solid #edf0eb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tcomp-log{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:14px 12px;display:flex;flex-direction:column;gap:12px;min-height:0;touch-action:pan-y}
.tcomp-message{max-width:96%;flex:none;border-radius:12px;padding:10px 12px;font-size:12px;line-height:1.55;overflow-wrap:anywhere;word-break:normal}
.tcomp-message-bot{align-self:flex-start;background:#f1f5ef}
.tcomp-message-user{align-self:flex-end;background:#e6f4f7}
.tcomp-speaker{display:block;font-size:9px;font-weight:700;color:#667566;letter-spacing:.2px;margin:0 0 3px}
.tcomp-message-text{white-space:pre-line;margin:0;font-size:12px;line-height:1.6}
.tcomp-message-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.tcomp-link{color:#235c55;border-bottom:1px solid #9fbab0;text-decoration:none;font-size:11px;line-height:1.6}
.tcomp-quick{display:flex;gap:5px;flex-wrap:wrap;padding:9px 12px 5px;border-top:1px solid #edf0eb}
.tcomp-quick-button{padding:7px 9px;border:1px solid #dce5d9;border-radius:15px;background:white;color:#3b5141;font-size:10px!important;line-height:1.2;min-height:30px}
.tcomp-quick-button:hover{background:#edf3e9}
.tcomp-form{display:flex;gap:7px;padding:7px 12px 5px;margin:0;align-items:center;min-width:0}
.tcomp-input{min-width:0;flex:1;width:0;padding:11px 12px;height:43px;border:1px solid #cfd8cd;border-radius:10px;color:#18231e;background:#fff;box-shadow:none;font-size:16px!important;line-height:1.2}
.tcomp-input::placeholder{color:#788477;font-size:12px}
.tcomp-send{flex:none;display:grid;place-items:center;width:42px;height:43px;border:0;border-radius:10px;background:#193f39;color:#fff;font-size:23px!important;font-weight:400;padding:0;line-height:1}
.tcomp-send:hover{background:#2c6154}
.tcomp-note{margin:0;padding:4px 14px 10px;color:#849081;font-size:9px;line-height:1.35}
.tcomp-sr-only{position:absolute!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;width:1px!important;height:1px!important;padding:0!important;border:0!important;white-space:nowrap!important}
@keyframes tcomp-breathe{0%,70%,100%{transform:translateY(0) rotate(0)}80%{transform:translateY(-2px) rotate(-1deg)}90%{transform:translateY(0) rotate(0)}}
@keyframes tcomp-wave{0%,100%{transform:rotate(0)}25%{transform:rotate(-5deg)}65%{transform:rotate(3deg)}}
@media(max-width:600px){.tcomp,.tcomp-launcher,.tcomp-mascot{width:56px;height:56px}.tcomp{right:max(12px,env(safe-area-inset-right))}.tcomp-launcher-label{display:none}.tcomp-panel{right:10px;bottom:calc(10px + var(--tcomp-keyboard) + env(safe-area-inset-bottom));width:calc(100vw - 20px);height:min(548px,calc(var(--tcomp-vh) - 20px));max-height:calc(var(--tcomp-vh) - 20px);min-height:200px;border-radius:14px}.tcomp-open .tcomp-launcher{visibility:hidden}.tcomp-header{padding:10px 9px 8px;gap:6px}.tcomp-subtitle{font-size:9px}.tcomp-icon-button{width:27px;min-width:27px}.tcomp-quick{gap:4px;padding:7px 10px 4px}.tcomp-quick-button{padding:7px 8px;font-size:9px!important}.tcomp-form{padding:5px 10px}.tcomp-note{font-size:8px;padding:3px 12px 8px}}
@media(prefers-reduced-motion:reduce){.tcomp *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

