/* Ali Gator v166 — tuiles du lot multi-PDF : plus compactes, plus lisibles, plus belles.
   · liseré coloré à gauche selon l'état (à examiner, prêt, validé, en cours…) ;
   · l'état d'abord, puis le nom du PDF sur 2 lignes (nom complet au survol) ;
   · le long message de l'IA replié sur 3 lignes, « Lire la suite » le déroule en douceur (tuiles-pdf-v166.js) ;
   · actions alignées en bas de chaque carte : bouton principal + petites pastilles. */
@property --agt-fade{syntax:'<length>';inherits:false;initial-value:0px}

html:root body:not(#lx) #root article.batch-item:not(#agt-x){display:flex!important;flex-direction:column;gap:10px;padding:16px 16px 14px 20px!important;--agt-tone:rgba(31,58,43,.16)}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>*{margin-top:0!important;margin-bottom:0!important}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)::before{content:'';position:absolute;left:0;top:18px;bottom:18px;width:4px;border-radius:0 4px 4px 0;background:var(--agt-tone);transition:background-color .45s ease}
html:root body:not(#lx) #root article.batch-item:is(.status-exception,.status-ready_with_warnings):not(#agt-x){--agt-tone:#e3a43b}
html:root body:not(#lx) #root article.batch-item:is(.status-error,.status-export_error):not(#agt-x){--agt-tone:#d4574e}
html:root body:not(#lx) #root article.batch-item.status-ready:not(#agt-x){--agt-tone:#5aa83f}
html:root body:not(#lx) #root article.batch-item:is(.status-validated,.status-exported):not(#agt-x){--agt-tone:#1d6141}
html:root body:not(#lx) #root article.batch-item.status-processing:not(#agt-x)::before{background:linear-gradient(180deg,#c5f26f 0%,#2a7a52 50%,#c5f26f 100%);background-size:100% 300%;animation:agt-flow 2.2s linear infinite}
@keyframes agt-flow{to{background-position:0 300%}}
html:root body:not(#lx) #root article.batch-item.status-excluded:not(#agt-x){opacity:.62;transition:opacity .3s ease,box-shadow .4s ease}
html:root body:not(#lx) #root article.batch-item.status-excluded:not(#agt-x):hover{opacity:.92}

/* en-tête : état puis nom du PDF (2 lignes max) */
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.row-between{display:flex!important;flex-direction:column-reverse;align-items:flex-start!important;justify-content:flex-start!important;gap:8px!important;flex-wrap:nowrap!important}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.row-between>strong{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;position:relative;width:100%;padding-left:23px;font-size:14.5px;line-height:1.38;font-weight:650;letter-spacing:-.005em}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.row-between>strong>svg{position:absolute;left:0;top:2px;width:16px;height:16px;color:var(--lx-g6,#1d6141)}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.row-between>.batch-status-badge{height:24px;padding:0 9px!important;font-size:11.5px!important;gap:5px}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.row-between>.batch-status-badge svg{width:13px;height:13px}

/* message de l'IA : 3 lignes, puis « Lire la suite » */
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>p:not([class*=small]):not(.batch-queued){font-size:13px;line-height:1.55;color:var(--lx-ink3,#58685e)}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>p.agt-long{overflow:hidden;max-height:var(--agt-h,none);--agt-fade:0px;-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - var(--agt-fade)),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - var(--agt-fade)),transparent);transition:max-height .5s cubic-bezier(.22,1,.36,1),--agt-fade .45s ease}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>p.agt-long:not(.agt-open){--agt-fade:1.7em}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.agt-more{align-self:flex-start;display:inline-flex;align-items:center;gap:5px;margin-top:-6px!important;padding:3px 9px 3px 7px;border:0;border-radius:999px;background:transparent;color:var(--lx-g6,#1d6141);font:600 12.5px/1.4 var(--lx-sans,inherit);cursor:pointer;transition:background-color .2s ease}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.agt-more:hover{background:rgba(29,97,65,.07)}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.agt-more:focus{outline:0}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.agt-more:focus-visible{box-shadow:0 0 0 3px rgba(162,222,74,.4)}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.agt-more svg{width:12px;height:12px;transition:transform .45s cubic-bezier(.22,1,.36,1)}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.agt-more[aria-expanded=true] svg{transform:rotate(180deg)}

/* aperçus avant / après */
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-previews{display:flex;flex-wrap:wrap;gap:6px}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-previews>a{display:inline-flex;align-items:center;height:28px;padding:0 11px;border-radius:999px;background:rgba(29,97,65,.07);color:var(--lx-g6,#1d6141);font-size:12.5px;font-weight:600;text-decoration:none;transition:background-color .2s ease}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-previews>a:hover{background:rgba(29,97,65,.14)}

/* actions : toujours en bas, bouton principal + pastilles */
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-actions{margin-top:auto!important;padding-top:12px!important;border-top:1px solid var(--lx-line,rgba(31,58,43,.1));display:flex!important;flex-wrap:wrap;align-items:center;gap:6px!important}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-actions>.button.secondary{flex:1 1 100%;display:inline-flex;align-items:center;justify-content:center;min-height:40px!important;height:auto;padding:8px 16px!important;margin:0 0 2px!important;border-radius:14px!important;font-size:13.5px!important;font-weight:650!important;color:var(--lx-g7,#154a31)!important;background:linear-gradient(180deg,#fff,#f3f8f0)!important;box-shadow:0 0 0 1px rgba(29,97,65,.17),0 1px 2px rgba(8,30,18,.06)!important;transition:box-shadow .25s ease,background-color .25s ease}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-actions>.button.secondary:hover:not(:disabled){box-shadow:0 0 0 1px rgba(29,97,65,.34),0 6px 14px -6px rgba(8,30,18,.22)!important}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-actions>.text-button{display:inline-flex!important;align-items:center;gap:6px;min-height:30px;height:auto;padding:5px 11px!important;margin:0!important;border:0!important;border-radius:999px!important;background:rgba(29,97,65,.06)!important;color:var(--lx-ink2,#28392e)!important;font-size:12.5px!important;font-weight:550!important;line-height:1.3!important;text-align:left;text-decoration:none!important;white-space:normal;transition:background-color .2s ease,color .2s ease}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-actions>.text-button:hover:not(:disabled){background:rgba(29,97,65,.13)!important;color:var(--lx-g7,#154a31)!important}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-actions>.text-button:disabled{opacity:.45;cursor:default}
html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.batch-actions>.text-button svg{flex:none;width:14px;height:14px}

@media (prefers-reduced-motion:reduce){
  html:root body:not(#lx) #root article.batch-item:not(#agt-x)>p.agt-long,html:root body:not(#lx) #root article.batch-item:not(#agt-x)>.agt-more svg{transition:none!important}
  html:root body:not(#lx) #root article.batch-item.status-processing:not(#agt-x)::before{animation:none}
}
