/* Tatou Claude Chat — styles. Tout est préfixé par #tcc-root et protégé contre les styles du thème. */
#tcc-root{--tcc-color:#1d4ed8;--tcc-size:58px;--tcc-lbg:#1d4ed8;--tcc-lfg:#fff;--tcc-ring:#1d4ed8;--tcc-head:#1d4ed8;--tcc-headfg:#fff;--tcc-user:#1d4ed8;--tcc-userfg:#fff;--tcc-bot:#fff;--tcc-botfg:#1f2937;--tcc-tbg:#fff;--tcc-tfg:#1f2937;--tcc-radius:14px;--tcc-fs:15px;--tcc-pw:360px;--tcc-ph:480px;position:fixed;bottom:20px;z-index:2147483000;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:var(--tcc-fs);line-height:1.45;color:#1f2937}
#tcc-root[data-size="compact"]{--tcc-pw:320px;--tcc-ph:420px}
#tcc-root[data-size="large"]{--tcc-pw:400px;--tcc-ph:560px}
#tcc-root.tcc-right{right:20px}
#tcc-root.tcc-left{left:20px}
#tcc-root *{box-sizing:border-box}
#tcc-root button::before,#tcc-root button::after{content:none!important}
#tcc-root img{max-width:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}

/* ---------- Lanceur (bulle) ---------- */
#tcc-root button.tcc-toggle{all:unset;position:relative!important;box-sizing:border-box!important;display:flex!important;align-items:center;justify-content:center;gap:9px;width:var(--tcc-size)!important;height:var(--tcc-size)!important;min-width:0!important;min-height:0!important;max-width:none!important;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:var(--tcc-lbg)!important;color:var(--tcc-lfg)!important;cursor:pointer;transition:transform .15s}
#tcc-root.tcc-shadow button.tcc-toggle{box-shadow:0 6px 20px rgba(0,0,0,.25)!important}
#tcc-root button.tcc-toggle:not([data-shape="image"]):hover{transform:scale(1.06)}
#tcc-root button.tcc-toggle[data-shape="image"]{transition:none!important}
#tcc-root button.tcc-toggle[data-shape="image"]:hover{transform:none}
#tcc-root.tcc-open button.tcc-toggle[data-shape="image"]{display:none!important}
#tcc-root.tcc-mobile.tcc-open button.tcc-toggle{display:none!important}
.tcc-idle-row{display:flex;flex-wrap:wrap;gap:6px}
#tcc-root button.tcc-toggle:focus-visible{outline:3px solid rgba(29,78,216,.45)!important;outline-offset:3px}
#tcc-root button.tcc-toggle svg{display:block!important;width:calc(var(--tcc-size)*.48)!important;height:calc(var(--tcc-size)*.48)!important;min-width:0;max-width:none!important;fill:var(--tcc-lfg)!important;stroke:none!important;margin:0!important;flex:none}
#tcc-root button.tcc-toggle .tcc-emoji{font-size:calc(var(--tcc-size)*.5);line-height:1;color:inherit}
#tcc-root button.tcc-toggle .tcc-label{font-family:inherit;font-size:15px;font-weight:600;line-height:1;color:var(--tcc-lfg);white-space:nowrap}

/* Formes */
#tcc-root button.tcc-toggle[data-shape="rounded"]{border-radius:28%!important}
#tcc-root.tcc-right button.tcc-toggle[data-shape="bubble"]{border-radius:50% 50% 10% 50%!important}
#tcc-root.tcc-left button.tcc-toggle[data-shape="bubble"]{border-radius:50% 50% 50% 10%!important}
#tcc-root button.tcc-toggle[data-shape="pill"]{width:auto!important;height:calc(var(--tcc-size)*.86)!important;padding:0 22px 0 17px!important;border-radius:999px!important}

/* Image à la place de la bulle */
#tcc-root button.tcc-toggle[data-fit="rounded"]{border-radius:22%!important}
#tcc-root button.tcc-toggle[data-fit="none"]{width:auto!important;border-radius:0!important;background:transparent!important;overflow:visible}
#tcc-root.tcc-shadow button.tcc-toggle[data-fit="none"]{box-shadow:none!important}
#tcc-root button.tcc-toggle img.tcc-limg{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:inherit}
#tcc-root button.tcc-toggle[data-fit="none"] img.tcc-limg{width:auto!important;height:var(--tcc-size)!important;object-fit:contain!important}
#tcc-root.tcc-shadow button.tcc-toggle[data-fit="none"] img.tcc-limg{filter:drop-shadow(0 6px 10px rgba(0,0,0,.3))}

/* Animations d'attention (arrêtées dès que le chat est ouvert) */
#tcc-root button.tcc-toggle.tcc-anim-pulse::after{content:""!important;position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;border:3px solid var(--tcc-ring);box-sizing:border-box;opacity:0;pointer-events:none;animation:tcc-ring 2s ease-out infinite}
#tcc-root button.tcc-toggle.tcc-anim-shrink{animation:tcc-shrink 1.7s ease-in-out infinite}
#tcc-root button.tcc-toggle.tcc-anim-bounce{animation:tcc-bounce 3s ease-in-out infinite}
#tcc-root button.tcc-toggle.tcc-anim-wiggle{animation:tcc-wiggle 3.5s ease-in-out infinite}
@keyframes tcc-ring{0%{transform:scale(1);opacity:.7}100%{transform:scale(1.6);opacity:0}}
@keyframes tcc-shrink{0%,100%{transform:scale(1)}50%{transform:scale(.85)}}
@keyframes tcc-bounce{0%,40%,100%{transform:translateY(0)}10%{transform:translateY(-13px)}20%{transform:translateY(0)}30%{transform:translateY(-6px)}}
@keyframes tcc-wiggle{0%,30%,100%{transform:rotate(0)}5%{transform:rotate(-14deg)}10%{transform:rotate(12deg)}15%{transform:rotate(-10deg)}20%{transform:rotate(8deg)}25%{transform:rotate(-4deg)}}
@media (prefers-reduced-motion:reduce){#tcc-root.tcc-respect-motion button.tcc-toggle{animation:none!important}}

/* Pastille de notification */
#tcc-root .tcc-badge{position:absolute;top:-5px;right:-5px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#e11d48;color:#fff;font-size:12px;font-weight:700;line-height:20px;text-align:center;box-shadow:0 0 0 2px #fff;pointer-events:none;display:none}
#tcc-root.tcc-badge-on .tcc-badge{display:block}
#tcc-root.tcc-open .tcc-badge{display:none}

/* ---------- Message d'accroche ---------- */
#tcc-root .tcc-teaser{position:absolute;bottom:calc(var(--tcc-size) + 14px);width:max-content;min-width:150px;max-width:min(270px,calc(100vw - 40px));background:var(--tcc-tbg);color:var(--tcc-tfg);border-radius:14px;padding:11px 14px;box-shadow:0 8px 28px rgba(0,0,0,.22);font-size:14px;line-height:1.4;white-space:pre-wrap;word-wrap:break-word;cursor:pointer;opacity:0;transform:translateY(8px) scale(.96);pointer-events:none;transition:opacity .25s,transform .25s}
#tcc-root.tcc-right .tcc-teaser{right:0}
#tcc-root.tcc-left .tcc-teaser{left:0}
#tcc-root .tcc-teaser::after{content:"";position:absolute;bottom:-6px;width:12px;height:12px;background:var(--tcc-tbg);transform:rotate(45deg);border-radius:2px}
#tcc-root.tcc-right .tcc-teaser::after{right:calc(var(--tcc-size)/2 - 6px)}
#tcc-root.tcc-left .tcc-teaser::after{left:calc(var(--tcc-size)/2 - 6px)}
#tcc-root.tcc-teaser-on .tcc-teaser{opacity:1;transform:none;pointer-events:auto}
#tcc-root.tcc-open .tcc-teaser{display:none}
#tcc-root .tcc-teaser.tcc-has-x{padding-right:32px}
#tcc-root button.tcc-teaser-x{all:unset;position:absolute;top:5px;right:6px;width:22px;height:22px;display:flex;align-items:center;justify-content:center;font-size:18px;line-height:1;color:var(--tcc-tfg)!important;opacity:.55;cursor:pointer;border-radius:50%}
#tcc-root button.tcc-teaser-x:hover{opacity:1}

/* ---------- Fenêtre de chat ---------- */
.tcc-panel{position:absolute;bottom:calc(var(--tcc-size) + 14px);width:var(--tcc-pw);max-width:calc(100vw - 40px);height:var(--tcc-ph);max-height:calc(100vh - 120px);background:#fff;border-radius:var(--tcc-radius);box-shadow:0 10px 40px rgba(0,0,0,.25);display:none;flex-direction:column;overflow:hidden}
#tcc-root.tcc-right .tcc-panel{right:0}
#tcc-root.tcc-left .tcc-panel{left:0}
#tcc-root.tcc-open .tcc-panel{display:flex}

.tcc-head{background:var(--tcc-head);color:var(--tcc-headfg);padding:12px 12px 12px 16px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-weight:600}
.tcc-head-main{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 0}
.tcc-head{min-width:0;box-sizing:border-box}
.tcc-title,.tcc-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#tcc-root img.tcc-avatar.tcc-avatar-big{width:auto!important;height:var(--tcc-size)!important;min-width:var(--tcc-size);max-width:140px!important;border-radius:50%!important;object-fit:cover!important}
#tcc-root img.tcc-avatar.tcc-avatar-big[data-fit="rounded"]{border-radius:28%!important}
#tcc-root img.tcc-avatar.tcc-avatar-big[data-fit="none"]{border-radius:0!important;object-fit:contain!important;background:transparent}
#tcc-root img.tcc-avatar{width:38px!important;height:38px!important;border-radius:50%!important;object-fit:cover!important;flex:none;background:rgba(255,255,255,.25)}
.tcc-head-text{display:flex;flex-direction:column;min-width:0}
.tcc-title{font-weight:600;line-height:1.2}
.tcc-sub{font-size:12px;font-weight:400;opacity:.85;line-height:1.2;margin-top:3px}
.tcc-actions{display:flex;align-items:center;gap:6px;flex:none}
#tcc-root button.tcc-close{all:unset;box-sizing:border-box;cursor:pointer;color:var(--tcc-headfg)!important;font-size:24px;line-height:1;padding:0 6px!important}
#tcc-root button.tcc-end{all:unset;box-sizing:border-box;cursor:pointer;color:var(--tcc-headfg)!important;font-size:12px;font-weight:500;opacity:.9;text-decoration:underline;padding:2px 6px!important}
#tcc-root button.tcc-end:hover{opacity:1}

.tcc-msgs{flex:1;overflow-y:auto;padding:14px;background:#f5f6f8;display:flex;flex-direction:column;gap:10px}
.tcc-msg{max-width:85%;padding:9px 13px;border-radius:14px;white-space:pre-wrap;word-wrap:break-word}
.tcc-msg.tcc-bot{background:var(--tcc-bot);color:var(--tcc-botfg);align-self:flex-start;border-bottom-left-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.tcc-msg.tcc-user{background:var(--tcc-user);color:var(--tcc-userfg);align-self:flex-end;border-bottom-right-radius:4px}
.tcc-msg.tcc-err{background:#fef2f2;color:#991b1b}
.tcc-msg.tcc-bot a{color:inherit;font-weight:600;text-decoration:underline;word-break:break-word}
.tcc-typing{display:inline-flex;gap:4px;align-items:center;padding:12px 14px}
.tcc-typing i{width:7px;height:7px;border-radius:50%;background:#9ca3af;animation:tcc-b 1s infinite}
.tcc-typing i:nth-child(2){animation-delay:.15s}
.tcc-typing i:nth-child(3){animation-delay:.3s}
@keyframes tcc-b{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

/* Suggestions de questions */
.tcc-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
#tcc-root button.tcc-chip{all:unset;box-sizing:border-box;cursor:pointer;border:1px solid var(--tcc-user)!important;color:var(--tcc-user)!important;background:#fff!important;border-radius:999px!important;padding:6px 12px!important;font-size:13px;line-height:1.2;transition:background .15s,color .15s}
#tcc-root button.tcc-chip:hover{background:var(--tcc-user)!important;color:var(--tcc-userfg)!important}

.tcc-notice{font-size:11px;color:#6b7280;padding:6px 14px;background:#f5f6f8;border-top:1px solid #e5e7eb}
.tcc-form{display:flex;gap:8px;padding:10px;border-top:1px solid #e5e7eb;background:#fff;align-items:stretch}
#tcc-root .tcc-form textarea{flex:1;min-width:0;width:auto!important;height:auto;margin:0!important;resize:none;border:1px solid #d1d5db!important;border-radius:10px!important;padding:9px 11px!important;font:inherit;max-height:90px;outline:none;color:#111!important;background:#fff!important;box-shadow:none!important}
#tcc-root .tcc-form textarea:focus{border-color:var(--tcc-user)!important}
#tcc-root .tcc-form button{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;border-radius:10px;padding:0 14px!important;background:var(--tcc-user)!important;color:var(--tcc-userfg)!important;font:inherit;font-weight:600;cursor:pointer}
#tcc-root .tcc-form button:disabled{opacity:.5;cursor:not-allowed}
.tcc-hp{position:absolute;left:-9999px;opacity:0;height:0;width:0}
#tcc-root button.tcc-restart{all:unset;box-sizing:border-box;align-self:center;margin-top:6px;padding:9px 16px!important;border-radius:10px;background:var(--tcc-user)!important;color:var(--tcc-userfg)!important;cursor:pointer;font-weight:600}

/* Mobile : fenêtre plein écran (classe posée par le script, utilisable aussi dans l'aperçu) */
#tcc-root.tcc-mobile .tcc-panel{position:fixed;inset:0;width:100%;max-width:100%;height:100%;max-height:100%;border-radius:0;bottom:0;box-sizing:border-box}
@supports (height:100dvh){#tcc-root.tcc-mobile:not(.tcc-preview) .tcc-panel{height:100dvh;max-height:100dvh}}
#tcc-root.tcc-mobile .tcc-form textarea,#tcc-root.tcc-touch .tcc-form textarea{font-size:16px!important}
#tcc-root.tcc-mobile .tcc-head{padding-top:max(12px,env(safe-area-inset-top))!important;padding-right:max(12px,env(safe-area-inset-right))!important;padding-left:max(16px,env(safe-area-inset-left))!important}
#tcc-root.tcc-mobile .tcc-form{padding-bottom:max(10px,env(safe-area-inset-bottom))!important}
@media (max-width:768px){#tcc-root.tcc-hide-mobile{display:none!important}}
