/*! Task’in — © 2026 Fandry Ekwalla. Tous droits réservés. */
/* ===== Assistant Task’in (sans IA) ===== */
.as-fab { position: fixed; right: 20px; bottom: 20px; z-index: 901; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #0B233A; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 22px rgba(11, 35, 58, .32); transition: transform .15s ease, box-shadow .15s ease; }
.as-fab.above-bug { bottom: 84px; }
.as-fab svg { width: 24px; height: 24px; }
.as-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(11, 35, 58, .4); }
.as-fab:focus-visible { outline: 3px solid color-mix(in srgb, #2563EB 45%, transparent); outline-offset: 3px; }
.as-fab.is-loading { opacity: .7; cursor: progress; }
.as-fab.hidden { display: none; }
[data-theme="dark"] .as-fab { background: #2563EB; }
.as-panel { position: fixed; right: 20px; bottom: 20px; z-index: 950; width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px -18px rgba(15, 23, 42, .45); overflow: hidden; }
.as-panel.hidden { display: none; }
.as-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, #2563EB 6%, var(--surface)); }
.as-logo { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #0B233A; color: #fff; font-weight: 800; font-size: 17px; flex: none; }
[data-theme="dark"] .as-logo { background: #2563EB; }
.as-head > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.as-head b { font-size: 14px; }
.as-head small { font-size: 11px; color: var(--text3); }
.as-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--text2); cursor: pointer; padding: 2px 6px; }
.as-tab { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; font: inherit; font-size: 12px; font-weight: 700; padding: 4px 9px; cursor: pointer; }
.as-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; }
.as-msg { align-self: flex-start; max-width: 94%; background: var(--surface2); border-radius: 14px 14px 14px 4px; padding: 10px 12px; color: var(--text); }
.as-msg.is-me { align-self: flex-end; background: #2563EB; color: #fff; border-radius: 14px 14px 4px 14px; }
.as-msg h4 { margin: 0 0 4px; font-size: 13.5px; }
.as-msg p { margin: 0 0 6px; }
.as-msg ul, .as-msg ol { margin: 2px 0 6px; padding-left: 18px; }
.as-msg li { margin: 2px 0; }
.as-part + .as-part { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 8px; }
.as-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.as-go { border: 1px solid color-mix(in srgb, #2563EB 40%, var(--border)); background: var(--surface); color: #1D4ED8; border-radius: 9px; padding: 5px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.as-go.is-primary { background: #2563EB; color: #fff; border-color: #2563EB; }
[data-theme="dark"] .as-go:not(.is-primary) { color: #93C5FD; }
.as-near, .as-docs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.as-near > span, .as-docs > span { width: 100%; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text3); }
.as-near button, .as-doc, .as-suggest button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.as-near button:hover, .as-doc:hover, .as-suggest button:hover { border-color: #2563EB; }
.as-resp { background: color-mix(in srgb, var(--amber) 12%, var(--surface)); border-radius: 10px; padding: 7px 9px; }
.as-hint { font-size: 11px; color: var(--text3); }
.as-typing { color: var(--text3); letter-spacing: 3px; }
.as-fb { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11px; color: var(--text3); }
.as-fb button { border: 1px solid transparent; background: none; cursor: pointer; border-radius: 6px; padding: 1px 4px; font-size: 13px; opacity: .65; }
.as-fb button.on, .as-fb button:hover { opacity: 1; border-color: var(--border); }
.as-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; }
.as-suggest:not(:empty) { padding-bottom: 8px; }
.as-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.as-form .form-input { flex: 1; min-width: 0; }
.as-journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.as-journal li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 7px 9px; display: flex; flex-direction: column; }
.as-journal small { color: var(--text3); font-size: 11px; }
@media (max-width: 520px) { .as-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100vh - 16px); } }

/* Journal : rattacher une question à une fiche (suggestions apprises) */
.asl-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.asl-row .asl-sel { flex: 1 1 180px; min-width: 0; height: 32px; padding: 4px 8px; font-size: 12px; }
.asl-row .as-go { margin: 0; }
.as-journal li.asl-done { opacity: .7; }
.as-journal li.asl-done .asl-row small { color: var(--green); font-weight: 600; }
.asl-learned { margin-top: 12px; }
.asl-learned summary { cursor: pointer; font-weight: 600; font-size: 13px; margin-bottom: 6px; }

/* ===== Bouton unique Task’in (Ask’in · Bugs) ===== */
.it-bug-fab, .as-fab { display: none !important; }
.tk-hub { position: fixed; right: 20px; bottom: 20px; z-index: 940; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.tk-hub.hidden { display: none; }
.tk-hub-btn { position: relative; width: 54px; height: 54px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #2563EB; color: #fff; cursor: pointer; box-shadow: 0 10px 26px rgba(37, 99, 235, .38); transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.tk-hub-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 99, 235, .45); }
.tk-hub-btn:focus-visible { outline: 3px solid color-mix(in srgb, #2563EB 40%, transparent); outline-offset: 3px; }
.tk-hub-btn svg { width: 25px; height: 25px; transition: transform .2s ease, opacity .2s ease; }
.tk-hub-btn .tk-hub-x { position: absolute; opacity: 0; transform: rotate(-90deg); }
.tk-hub.is-open .tk-hub-btn { background: #0B233A; }
.tk-hub.is-open .tk-hub-btn .tk-hub-i { opacity: 0; transform: rotate(90deg); }
.tk-hub.is-open .tk-hub-btn .tk-hub-x { opacity: 1; transform: none; }
.tk-hub.is-loading .tk-hub-btn { opacity: .75; cursor: progress; }
.tk-hub-dot { position: absolute; top: -3px; right: -3px; margin: 0; border: 2px solid var(--surface); }
/* Bulles : pastilles alignées sur l’axe du bouton, icône à droite, précision dépliée au survol */
.tk-hub-menu { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; padding-right: 7px; }
.tk-hub-menu[hidden] { display: none; }
.tk-pill { position: relative; display: inline-flex; align-items: center; gap: 0; height: 42px; padding: 0 5px 0 18px; border-radius: 999px; font: inherit; cursor: pointer; white-space: nowrap; opacity: 0; animation: tkPillIn .24s cubic-bezier(.2, .9, .3, 1.2) forwards; transition: transform .16s ease, box-shadow .16s ease; }
.tk-pill[hidden] { display: none; }
.tk-pill.is-ask { animation-delay: .02s; }
.tk-pill.is-bug { animation-delay: .07s; }
@keyframes tkPillIn { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
.tk-pill:hover, .tk-pill:focus-visible { transform: translateX(-2px); outline: none; }
.tk-pill-label { font-size: 13.5px; font-weight: 800; letter-spacing: .01em; margin-right: 10px; }
.tk-pill-hint { max-width: 0; overflow: hidden; font-size: 12px; font-weight: 600; opacity: 0; transition: max-width .22s ease, opacity .18s ease, margin .22s ease; }
.tk-pill:hover .tk-pill-hint, .tk-pill:focus-visible .tk-pill-hint { max-width: 190px; opacity: .78; margin-right: 8px; }
.tk-pill-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; }
.tk-pill-ico svg { width: 17px; height: 17px; }
.tk-pill.is-ask { border: 0; color: #fff; background: linear-gradient(135deg, #3B82F6, #2563EB 60%, #1D4ED8); box-shadow: 0 8px 20px -6px rgba(37, 99, 235, .55); }
.tk-pill.is-ask .tk-pill-ico { background: rgba(255, 255, 255, .2); }
.tk-pill.is-ask:hover, .tk-pill.is-ask:focus-visible { box-shadow: 0 10px 24px -6px rgba(37, 99, 235, .7), 0 0 0 3px color-mix(in srgb, #2563EB 25%, transparent); }
.tk-pill.is-bug { border: 1px solid var(--border2, var(--border)); color: var(--text); background: var(--surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 8px 20px -6px rgba(15, 23, 42, .3); }
.tk-pill.is-bug .tk-pill-ico { color: var(--ocean-ink); background: var(--ocean-dim); }
.tk-pill.is-bug:hover, .tk-pill.is-bug:focus-visible { border-color: var(--ocean); box-shadow: 0 10px 24px -8px rgba(15, 23, 42, .4), 0 0 0 3px color-mix(in srgb, #2563EB 18%, transparent); }
.tk-hub-badge { position: absolute; top: -5px; right: -4px; margin: 0; border: 2px solid var(--surface); }
.tk-hub.is-open .tk-hub-dot { display: none; }
/* L’habillage admin arrondit tous les boutons à 4 px : le bouton et les bulles gardent leur forme */
#tk-hub .tk-hub-btn { border-radius: 50% !important; }
#tk-hub .tk-pill { border-radius: 999px !important; }
.as-panel { z-index: 960; }
@media (max-width: 560px) { .tk-hub { right: 14px; bottom: 14px; } }

/* ===== Ask’in : ton de conversation ===== */
.as-logo svg { width: 18px; height: 18px; }
.as-head small { display: inline-flex; align-items: center; gap: 5px; }
.as-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.as-msg .ak-lead { margin: 0 0 6px; }
.as-msg .ak-lead b { color: var(--text); }
.as-msg .ak-outro { margin: 8px 0 0; color: var(--text2); font-size: 12.5px; }
.as-typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; margin: 0; }
.as-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); animation: akDot 1.1s infinite ease-in-out; }
.as-typing i:nth-child(2) { animation-delay: .15s; }
.as-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes akDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .as-typing i { animation: none; } .tk-pill { animation: none; opacity: 1; } .tk-pill-hint { transition: none; } }
/* Taskiii, la mascotte d’Ask’in : une expression à gauche de chaque message. */
.as-msg.has-face { position: relative; margin-left: 46px; max-width: calc(94% - 46px); }
.as-msg.has-face > .ak-face { position: absolute; left: -46px; top: -2px; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(11, 35, 58, .18)); pointer-events: none; }
.as-logo:has(img) { background: none; overflow: visible; }
.as-logo img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(11, 35, 58, .2)); }
.ak-ai-hint { margin-top: 6px; color: #2563EB; }
[data-theme="dark"] .ak-ai-hint { color: #93C5FD; }
.tk-pill-ico img { width: 26px; height: 26px; object-fit: contain; display: block; }
/* ===== Ask’in · look « messagerie moderne » ===== */
.as-panel { width: min(440px, calc(100vw - 32px)); height: min(680px, calc(100vh - 40px)); border-radius: 22px; box-shadow: 0 28px 70px -20px rgba(11, 35, 58, .5), 0 0 0 1px rgba(11, 35, 58, .04); }
.as-head { padding: 14px 14px 12px; gap: 11px; border-bottom: 0; background: linear-gradient(135deg, #0B233A 0%, #1E3A8A 55%, #2563EB 100%); color: #fff; }
.as-head b { font-size: 15px; letter-spacing: .01em; }
.as-head small { color: rgba(255, 255, 255, .78); display: inline-flex; align-items: center; gap: 5px; }
.as-head small::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); flex: none; }
.as-head .as-logo { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }
.as-head .as-x { color: rgba(255, 255, 255, .85); border-radius: 9px; }
.as-head .as-x:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.as-head .ak-reset { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; }
.as-head .ak-reset svg { width: 17px; height: 17px; }
.as-head .as-tab { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.as-msgs { padding: 16px 14px; gap: 12px; background: color-mix(in srgb, #2563EB 3%, var(--surface)); }
.as-msg { border-radius: 18px 18px 18px 6px; padding: 11px 13px 9px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 2px 8px -4px rgba(11, 35, 58, .12); }
.as-msg.is-me { border-radius: 18px 18px 6px 18px; border-color: transparent; background: linear-gradient(135deg, #2563EB, #1D4ED8); box-shadow: 0 4px 12px -6px rgba(37, 99, 235, .55); }
.ak-time { display: block; margin-top: 4px; font-size: 10.5px; color: var(--text3); text-align: right; }
.as-msg.is-me .ak-time { color: rgba(255, 255, 255, .72); }
.as-msg.has-face > .ak-time { order: 9; }
.ak-quote { margin: 4px 0 8px; padding: 8px 10px; border-left: 3px solid #2563EB; background: color-mix(in srgb, #2563EB 7%, var(--surface)); border-radius: 0 10px 10px 0; font-size: 12.5px; }
.ak-quote b { display: block; margin-bottom: 2px; font-size: 12px; color: #1D4ED8; }
[data-theme="dark"] .ak-quote b { color: #93C5FD; }
.as-near button, .as-doc { border-radius: 999px; padding: 6px 12px; background: var(--surface); transition: border-color .15s ease, background .15s ease; }
.as-near button:hover, .as-doc:hover { background: color-mix(in srgb, #2563EB 8%, var(--surface)); }
.ak-forward { margin-top: 8px; }
.as-form { padding: 10px 12px 12px; border-top: 1px solid var(--border); background: var(--surface); align-items: center; }
.as-form .form-input { border-radius: 999px; padding-left: 16px; }
.as-form .btn { border-radius: 999px; padding-inline: 18px; }
[data-theme="dark"] .as-msgs { background: color-mix(in srgb, #2563EB 5%, var(--surface)); }
[data-theme="dark"] .as-msg:not(.is-me) { background: var(--surface2); }
@media (max-width: 640px) { .as-panel { inset: 0; width: 100vw; height: 100dvh; border-radius: 0; } }
/* Taskiii : pastilles rondes (rendu 3D sur fond clair) */
.as-msg.has-face > .ak-face { border-radius: 50%; object-fit: cover; object-position: 50% 50%; background: #EEF3FC; border: 2px solid var(--surface); box-shadow: 0 3px 8px -3px rgba(11, 35, 58, .35); filter: none; }
.as-head .as-logo:has(img) { background: #EEF3FC; border: 2px solid rgba(255, 255, 255, .7); overflow: hidden; }
.as-logo img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.ak-hero { display: block; width: 132px; height: 132px; margin: 2px auto 8px; border-radius: 50%; object-fit: cover; object-position: 50% 40%; background: #EEF3FC; box-shadow: 0 10px 24px -12px rgba(37, 99, 235, .55); }
.tk-pill.is-ask .tk-pill-ico { background: #EEF3FC; overflow: hidden; }
.tk-pill-ico img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
