/* Ali Gator · v240 · Chat MAX : barre de suivi fine et calme (remplace la grosse carte). Thème clair.
   Retour arrière : retirer max-bar-v240.css et max-bar-v240.js d’index.html. */
html:root body aside.lxc > .agmb{position:relative;z-index:6;flex:none;display:flex;align-items:center;gap:10px;margin:6px 12px 0;min-height:54px;
  padding:6px 8px 9px 8px;box-sizing:border-box;border:1px solid rgba(29,97,65,.12);border-radius:16px;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(247,251,243,.94));
  box-shadow:0 12px 26px -22px rgba(23,68,47,.55),0 1px 2px rgba(23,68,47,.04);
  font-family:"Hellix",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  animation:agmb-in .45s cubic-bezier(.22,.8,.24,1) both}
@keyframes agmb-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
html:root body aside.lxc > .agmb[data-state="attention"]{border-color:#eadcc0}
html:root body aside.lxc > .agmb[data-state="error"]{border-color:#efcdbd}

/* Le croco : il réfléchit quand MAX travaille, il se repose sinon */
html:root body aside.lxc > .agmb .agmb-pic{flex:none;width:34px;height:40px;display:flex;align-items:flex-end;justify-content:center}
html:root body aside.lxc > .agmb .agmb-pic .agcroco{width:33px}
html:root body aside.lxc > .agmb:not(.is-busy) .agcroco,html:root body aside.lxc > .agmb:not(.is-busy) .agcroco *{animation-play-state:paused!important}
html:root body aside.lxc > .agmb:not(.is-busy) .agcroco :is(.drop,.steam,.puff){display:none!important}
html:root body aside.lxc > .agmb:not(.is-busy) .agcroco .hg{animation:none!important;transform:none}

/* Textes : une ligne chacun, coupés proprement, fondus quand ils changent */
html:root body aside.lxc > .agmb .agmb-txt{flex:1 1 auto;min-width:0;display:grid;gap:2px}
html:root body aside.lxc > .agmb .agmb-title{display:block;font-size:13.5px;line-height:1.25;font-weight:650;color:#1f3a2a;letter-spacing:-.005em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body aside.lxc > .agmb[data-state="attention"] .agmb-title{color:#7a5410}
html:root body aside.lxc > .agmb[data-state="error"] .agmb-title{color:#8f3a24}
html:root body aside.lxc > .agmb .agmb-sub{display:flex;min-width:0;gap:6px;font-size:11.5px;line-height:1.3;color:#6a7f6b;white-space:nowrap;overflow:hidden}
html:root body aside.lxc > .agmb .agmb-count{flex:none;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-weight:600;color:#4c6a55;font-variant-numeric:tabular-nums}
html:root body aside.lxc > .agmb .agmb-file{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;font-style:normal}
html:root body aside.lxc > .agmb .agmb-file:empty{display:none}
html:root body aside.lxc > .agmb .agmb-file::before{content:'·';margin-right:6px;color:#a9b9aa}
html:root body aside.lxc > .agmb .is-swap{animation:agmb-swap .3s ease both}
@keyframes agmb-swap{from{opacity:0;transform:translateY(2px)}to{opacity:1;transform:none}}

/* Boutons compacts */
html:root body aside.lxc > .agmb .agmb-act{flex:none;display:flex;align-items:center;gap:6px}
html:root body aside.lxc > .agmb .agmb-ic{position:relative;display:grid;place-items:center;width:32px;height:32px;padding:0;border-radius:11px;cursor:pointer;
  border:1px solid rgba(29,97,65,.14);background:#fff;color:#26432f;transition:background-color .2s ease,border-color .2s ease,transform .2s ease}
html:root body aside.lxc > .agmb .agmb-ic svg{width:17px;height:17px}
html:root body aside.lxc > .agmb .agmb-ic:hover:enabled{background:#f2f8ec;border-color:rgba(29,97,65,.26)}
html:root body aside.lxc > .agmb .agmb-ic:active:enabled{transform:scale(.95)}
html:root body aside.lxc > .agmb .agmb-ic:disabled{opacity:.45;cursor:default}
html:root body aside.lxc > .agmb .agmb-down.is-busy::after{content:'';position:absolute;inset:-3px;border-radius:13px;border:2px solid rgba(79,154,82,.25);border-top-color:#4f9a52;animation:agmb-spin .9s linear infinite}
html:root body aside.lxc > .agmb .agmb-pill{height:32px;padding:0 13px;border-radius:11px;border:0;cursor:pointer;white-space:nowrap;
  font:600 12.5px/1 "Hellix",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#f4fbe9;background:linear-gradient(180deg,#2f5c43,#244a35);
  box-shadow:0 6px 14px -8px rgba(23,68,47,.6);transition:filter .2s ease,transform .2s ease}
html:root body aside.lxc > .agmb .agmb-pill:hover:enabled{filter:brightness(1.08)}
html:root body aside.lxc > .agmb .agmb-pill:active:enabled{transform:scale(.97)}
html:root body aside.lxc > .agmb .agmb-pill:disabled{opacity:.5;cursor:default}

/* Menu « … » */
html:root body aside.lxc > .agmb .agmb-menu{position:absolute;right:6px;bottom:calc(100% + 6px);z-index:40;min-width:220px;padding:6px;box-sizing:border-box;
  border-radius:14px;border:1px solid rgba(29,97,65,.14);background:rgba(255,255,255,.98);box-shadow:0 22px 44px -20px rgba(23,68,47,.5);
  opacity:0;transform:translateY(6px) scale(.98);transform-origin:100% 100%;pointer-events:none;visibility:hidden;
  transition:opacity .18s ease,transform .24s cubic-bezier(.22,.8,.24,1),visibility 0s linear .24s}
html:root body aside.lxc > .agmb.menu-open .agmb-menu{opacity:1;transform:none;pointer-events:auto;visibility:visible;transition:opacity .18s ease,transform .24s cubic-bezier(.22,.8,.24,1),visibility 0s}
html:root body aside.lxc > .agmb .agmb-menu:empty{display:none}
html:root body aside.lxc > .agmb .agmb-menu button{display:block;width:100%;padding:9px 11px;border:0;border-radius:10px;background:none;cursor:pointer;text-align:left;
  font:600 12.5px/1.25 "Hellix",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#26432f}
html:root body aside.lxc > .agmb .agmb-menu button:hover:enabled{background:rgba(29,97,65,.07)}
html:root body aside.lxc > .agmb .agmb-menu button:disabled{opacity:.45;cursor:default}

/* Fine barre de progression, collée en bas de la barre */
html:root body aside.lxc > .agmb .agmb-rail{position:absolute;left:12px;right:12px;bottom:4px;height:3px;border-radius:999px;overflow:hidden;
  background:rgba(29,97,65,.08);opacity:0;transition:opacity .35s ease}
html:root body aside.lxc > .agmb.is-busy .agmb-rail{opacity:1}
html:root body aside.lxc > .agmb .agmb-rail i{position:absolute;top:0;bottom:0;left:0;width:var(--agmb-p,0%);border-radius:inherit;
  background:linear-gradient(90deg,#a9d977,#4f9a52);box-shadow:0 0 8px rgba(127,191,42,.45);transition:width .7s cubic-bezier(.22,.8,.24,1)}
html:root body aside.lxc > .agmb .agmb-rail.is-indet i{width:32%;animation:agmb-indet 1.5s ease-in-out infinite}
@keyframes agmb-indet{from{transform:translateX(-100%)}to{transform:translateX(320%)}}
@keyframes agmb-spin{to{transform:rotate(360deg)}}

/* L’ancienne carte : seules les parties sans équivalent restent (PDF à examiner, ciblage, file, erreurs) */
html:root body aside.lxc.agmb-on > .lxc-max-foot > :is(.lxc-max-heading,.lxc-activity-detail,.lxc-max-file,.lxc-max-track,.lxc-max-partial,.lxc-max-actions){display:none!important}
html:root body aside.lxc.agmb-on > .lxc-max-foot:not(:has(> :is(details,.lxc-max-target,.lxc-queue-summary,.lxc-max-notice))){display:none!important}
html:root body aside.lxc.agmb-on > .lxc-max-foot{margin-top:6px}
html:root body aside.lxc.agmb-on > .lxc-max-foot > :is(details,.lxc-max-target,.lxc-queue-summary,.lxc-max-notice){margin-top:0!important;border-top:0!important;padding-top:0!important}
html:root body aside.lxc.agmb-on > .lxc-max-foot > :is(details,.lxc-max-target,.lxc-queue-summary,.lxc-max-notice) ~ :is(details,.lxc-max-target,.lxc-queue-summary,.lxc-max-notice){margin-top:8px!important}

@media (prefers-reduced-motion:reduce){
  html:root body aside.lxc > .agmb,html:root body aside.lxc > .agmb *{animation-duration:.01s!important;animation-iteration-count:1!important;transition-duration:.01s!important}
}
