/* ===== ATLAS BRAIN · Contextual Assistant =====
   Assistant contextuel discret : barre réduite par défaut, déploiement en 1 clic.
   Style minimaliste (Notion AI / Copilot / Linear). Dark + light. */

.axc{position:fixed;left:50%;transform:translateX(-50%);bottom:16px;z-index:300;
  font-family:'Inter',system-ui,sans-serif;width:auto;max-width:calc(100vw - 28px)}
/* icônes SVG du module (sécurité de rendu : trait, pas de remplissage) */
.axc svg{fill:none}
.axc-sec h5 svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0}

/* ---------- barre réduite (discrète au repos) ---------- */
.axc-pill{display:flex;align-items:center;gap:0;background:linear-gradient(135deg,rgba(20,32,72,.72),rgba(12,20,48,.78));
  border:1px solid rgba(168,130,255,.18);border-radius:12px;padding:5px 6px 5px 9px;
  box-shadow:0 8px 24px -16px rgba(2,6,28,.6);backdrop-filter:blur(13px);
  cursor:pointer;opacity:.5;transition:opacity .28s,transform .22s,box-shadow .28s,border-color .28s}
.axc-pill:hover{opacity:1;transform:translateY(-2px);border-color:rgba(168,130,255,.34);box-shadow:0 16px 44px -16px rgba(2,6,28,.85),0 0 34px -26px rgba(168,130,255,.6)}
.axc.open .axc-pill{display:none}
.axc-brainic{width:30px;height:30px;border-radius:9px;flex-shrink:0;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#7c3aed,#a882ff);box-shadow:0 5px 14px -6px rgba(124,58,237,.7)}
.axc-brainic svg{width:17px;height:17px;stroke:#fff;fill:none;stroke-width:1.8}
.axc-id{display:flex;flex-direction:column;line-height:1.1;margin:0 10px 0 9px}
.axc-id b{font:700 .76rem/1 'Space Grotesk',sans-serif;color:#eaf0ff;letter-spacing:.2px}
.axc-id span{display:inline-flex;align-items:center;gap:5px;font-size:.64rem;color:#86efac;font-weight:600;margin-top:2px}
.axc-live{width:6px;height:6px;border-radius:50%;background:#34d399;box-shadow:0 0 0 0 rgba(52,211,153,.7);animation:axcPulse 2.2s infinite}
@keyframes axcPulse{0%{box-shadow:0 0 0 0 rgba(52,211,153,.55)}70%{box-shadow:0 0 0 6px rgba(52,211,153,0)}100%{box-shadow:0 0 0 0 rgba(52,211,153,0)}}
.axc-sep{width:1px;height:22px;background:rgba(255,255,255,.08);margin:0 3px}
.axc-meta{display:flex;flex-direction:column;line-height:1.2;padding:0 10px;min-width:0}
.axc-meta .axc-page{font-size:.7rem;color:#9fb2d6;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.axc-meta .axc-sugg{font-size:.66rem;color:#b9a6f0;font-weight:600;margin-top:2px}
.axc-urg{display:inline-flex;align-items:center;gap:4px;font-size:.64rem;font-weight:700;color:#fca5a5;
  background:rgba(248,113,113,.12);border:1px solid rgba(248,113,113,.28);padding:2px 7px;border-radius:6px;margin-left:2px;white-space:nowrap}
.axc-urg svg{width:11px;height:11px;stroke:currentColor}
.axc-open{display:inline-flex;align-items:center;gap:5px;background:rgba(168,130,255,.14);color:#cbb8ff;
  border:1px solid rgba(168,130,255,.26);border-radius:9px;padding:7px 11px;font:700 .72rem/1 'Inter',sans-serif;cursor:pointer;margin-left:7px;flex-shrink:0;transition:.15s}
.axc-open:hover{background:linear-gradient(135deg,#7c3aed,#6d28d9);border-color:transparent;color:#fff}
.axc-open svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.2}

/* ---------- panneau déployé ---------- */
.axc-card{display:none;width:min(560px,94vw);background:linear-gradient(180deg,rgba(16,28,64,.98),rgba(10,18,44,.99));
  border:1px solid rgba(168,130,255,.3);border-radius:18px;overflow:hidden;margin:0 auto;
  box-shadow:0 30px 80px -24px rgba(2,6,28,.9),0 0 60px -34px rgba(168,130,255,.6);backdrop-filter:blur(20px)}
.axc.open .axc-card{display:block;animation:axcUp .26s cubic-bezier(.3,0,.1,1)}
@keyframes axcUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.axc-head{display:flex;align-items:center;gap:11px;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.07)}
.axc-head .axc-brainic{width:36px;height:36px}
.axc-ht{flex:1;min-width:0}
.axc-ht b{font:700 .92rem/1 'Space Grotesk',sans-serif;color:#eaf0ff}
.axc-ht span{display:inline-flex;align-items:center;gap:5px;font-size:.7rem;color:#86efac;font-weight:600;margin-top:3px}
.axc-pagetag{font-size:.7rem;color:#9fb2d6;font-weight:600;background:rgba(96,165,250,.12);border:1px solid rgba(96,165,250,.24);padding:4px 9px;border-radius:7px;white-space:nowrap}
.axc-icbtn{width:30px;height:30px;border-radius:8px;border:1px solid rgba(255,255,255,.1);background:rgba(8,16,40,.5);color:#b6c5e4;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.axc-icbtn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2}
.axc-icbtn:hover{border-color:#a882ff;color:#fff}
.axc-acts-head{display:flex;gap:7px;align-items:center}

.axc-body{padding:16px;display:flex;flex-direction:column;gap:16px;max-height:min(64vh,580px);overflow:auto}
.axc-sec h5{font-size:.64rem;font-weight:800;text-transform:uppercase;letter-spacing:.6px;color:#8fa3c8;margin:0 0 9px;display:flex;align-items:center;gap:6px}
.axc-analyse{font-size:.82rem;line-height:1.55;color:#dbe4fb}
.axc-analyse .al{display:flex;align-items:flex-start;gap:8px;padding:2px 0}
.axc-analyse .al i{width:7px;height:7px;border-radius:50%;background:#60a5fa;flex-shrink:0;margin-top:6px;font-style:normal}

/* actions prioritaires */
.axc-prio{display:flex;flex-direction:column;gap:8px}
.axc-pcard{display:flex;align-items:center;gap:10px;background:rgba(8,16,40,.45);border:1px solid rgba(255,255,255,.08);border-radius:11px;padding:9px 10px}
.axc-pic{width:30px;height:30px;border-radius:9px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:.95rem}
.axc-pic.r{background:rgba(248,113,113,.16)}.axc-pic.o{background:rgba(245,159,66,.16)}.axc-pic.g{background:rgba(52,211,153,.16)}.axc-pic.b{background:rgba(96,165,250,.16)}
.axc-pb{flex:1;min-width:0}
.axc-pb h6{font-size:.8rem;font-weight:700;color:#eaf0ff;margin:0;line-height:1.25}
.axc-pb p{font-size:.7rem;color:#9fb2d6;margin:2px 0 0;line-height:1.3}
.axc-pbtn{flex-shrink:0;background:rgba(168,130,255,.16);border:1px solid rgba(168,130,255,.34);color:#cbb8ff;
  border-radius:8px;padding:7px 11px;font:700 .72rem/1 'Inter',sans-serif;cursor:pointer;transition:.15s}
.axc-pbtn:hover{background:rgba(168,130,255,.28);color:#fff}
.axc-pbtn.crit{background:rgba(248,113,113,.16);border-color:rgba(248,113,113,.36);color:#fca5a5}
.axc-pbtn.crit:hover{background:rgba(248,113,113,.28);color:#fff}

/* actions rapides */
.axc-quick{display:flex;flex-wrap:wrap;gap:7px}
.axc-q{display:inline-flex;align-items:center;gap:7px;background:rgba(8,16,40,.5);border:1px solid rgba(255,255,255,.1);
  color:#dbe4fb;border-radius:9px;padding:8px 11px;font:600 .74rem/1 'Inter',sans-serif;cursor:pointer;transition:.15s}
.axc-q:hover{border-color:#a882ff;background:rgba(168,130,255,.12);color:#fff}
.axc-q svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
.axc-q.primary{background:linear-gradient(135deg,#7c3aed,#6d28d9);border-color:transparent;color:#fff}

/* suivi */
.axc-suivi{display:flex;flex-direction:column;gap:6px}
.axc-srow{display:flex;align-items:center;gap:9px;font-size:.78rem;color:#dbe4fb;padding:5px 0;border-bottom:1px solid rgba(255,255,255,.05)}
.axc-srow:last-child{border-bottom:0}
.axc-srow .sl{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.axc-stag{font-size:.66rem;font-weight:700;padding:2px 8px;border-radius:6px;flex-shrink:0}
.axc-stag.done{color:#86efac;background:rgba(52,211,153,.14)}
.axc-stag.run{color:#cbb8ff;background:rgba(168,130,255,.14)}
.axc-stag.wait{color:#fcd34d;background:rgba(245,159,66,.14)}
.axc-sdot{width:7px;height:7px;border-radius:50%;flex-shrink:0}
.axc-sdot.done{background:#34d399}.axc-sdot.run{background:#a882ff;animation:axcPulse 1.6s infinite}.axc-sdot.wait{background:#f59f42}

.axc-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-top:1px solid rgba(255,255,255,.07)}
.axc-foot small{font-size:.7rem;color:#8fa3c8}
.axc-ask{display:inline-flex;align-items:center;gap:7px;background:rgba(8,16,40,.5);border:1px solid rgba(255,255,255,.12);
  color:#cbb8ff;border-radius:9px;padding:8px 13px;font:700 .74rem/1 'Inter',sans-serif;cursor:pointer;transition:.15s}
.axc-ask:hover{border-color:#a882ff;color:#fff}
.axc-ask svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}

/* confirmation action critique */
.axc-confirm{margin-top:6px;background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.3);border-radius:10px;padding:9px 11px}
.axc-confirm p{font-size:.74rem;color:#fecaca;margin:0 0 8px}
.axc-confirm .row{display:flex;gap:7px}
.axc-confirm .row button{flex:1;border-radius:8px;padding:7px;font:700 .72rem/1 'Inter',sans-serif;cursor:pointer;border:1px solid transparent}
.axc-cyes{background:#dc2626;color:#fff}
.axc-cno{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.14)!important;color:#dbe4fb}

@media(max-width:600px){
  .axc{left:10px;right:10px;transform:none;bottom:80px;max-width:none}
  .axc-pill,.axc-card{width:auto}
  .axc-pill{opacity:.78}
  .axc-meta .axc-page{max-width:120px}
  .axc-sep,.axc-meta .axc-sugg{display:none}
}

/* ---------- mode clair ---------- */
body.theme-light .axc-pill,body.theme-light .axc-card{background:linear-gradient(180deg,#fff,#f5f9ff);border-color:rgba(124,58,237,.22);box-shadow:0 24px 60px -22px rgba(13,31,92,.3)}
body.theme-light .axc-id b,body.theme-light .axc-ht b{color:#0d1f5c}
body.theme-light .axc-meta .axc-page{color:#5a6b8c}
body.theme-light .axc-pcard,body.theme-light .axc-q,body.theme-light .axc-icbtn,body.theme-light .axc-ask{background:#fff;border-color:rgba(13,31,92,.12)}
body.theme-light .axc-pb h6,body.theme-light .axc-analyse,body.theme-light .axc-srow{color:#26406e}
body.theme-light .axc-q{color:#26406e}
