/* Mode Succès (mode-achievements.js). */

/* Total en tête et vue d'ensemble des catégories racines. */
.a-total { font-size: 13px; color: var(--muted); }
.a-total b { color: var(--text, #e6e6e6); }
.a-total small { color: var(--muted); }
.a-total .a-pbar-total { height: 6px; margin-top: 4px; }
.a-cats { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; max-height: 190px; overflow-y: auto; }
.a-cats li {
  display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 0 6px;
  padding: 3px 6px; border-radius: 5px; cursor: pointer; font-size: 12px; min-width: 0;
}
.a-cats li:hover { background: var(--panel-2); }
.a-cats li.active { background: #263446; outline: 1px solid var(--select); outline-offset: -1px; }
.a-cat-dot { width: 9px; height: 9px; border-radius: 50%; }
.a-cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-cat-n { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.a-cat-pts { grid-column: 2 / -1; color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.a-cats .a-cat-bar { grid-column: 2 / -1; height: 3px; margin-top: 1px; }

/* Liste. */
#sidebar-achievements .list li { grid-template-columns: 40px 1fr auto; }
.a-list .a-st { color: var(--ok); font-weight: 700; text-align: center; }
.a-list li.a-done .name { color: var(--muted); }
.a-list .lvl { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.a-list .lvl small { color: var(--muted); font-size: 11px; }
.a-prog { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.a-prog .q-pbar { flex: 1; margin-top: 0; }
.a-prog small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* Fiche. */
.a-head-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-size: 18px; border: 2px solid; border-radius: 50%; }
.a-desc { font-size: 13px; margin: 2px 0 6px; }
.a-objs, .a-rew { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.a-obj { display: grid; grid-template-columns: 18px 32px 1fr; align-items: start; gap: 6px; padding: 3px 4px; border-radius: 5px; font-size: 12.5px; }
.a-obj:hover { background: rgba(255,255,255,.04); }
.a-obj > input { margin-top: 8px; }
.a-obj > img, .a-rew img { width: 32px; height: 32px; object-fit: contain; }
.a-obj > span:last-child { min-width: 0; padding-top: 6px; }
.a-obj small { color: var(--muted); }
.a-obj > span > small:first-of-type { display: block; }
.a-obj.a-done > span:last-child > a, .a-obj.a-done > span:last-child { color: var(--muted); }
.a-obj.a-done > span:last-child > a { text-decoration: line-through; text-decoration-color: var(--ok); }
.a-objs a { color: inherit; text-decoration: underline dotted; }
.a-objs a:hover { color: var(--ocre); }
.a-ico { width: 32px; text-align: center; font-size: 18px; line-height: 32px; }
.a-auto { color: var(--ok) !important; display: inline !important; margin-left: 4px; }
.a-obj .b-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.a-chal { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 3px 6px; background: rgba(255,255,255,.04); border-radius: 5px; }
.a-chal img { width: 26px; height: 26px; object-fit: contain; flex: none; background: #d9cfb8; border-radius: 4px; padding: 1px; } /* pictos du client sombres : fond clair */
.a-chal small { display: block; }
.a-dj { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.a-dj img { width: 20px; height: 20px; }
.a-dj button { font-size: 11px; padding: 1px 6px; }
.a-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.a-rew li { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 6px; font-size: 12.5px; padding: 2px 4px; border-radius: 5px; }
.a-rew li[data-item] { cursor: pointer; }
.a-rew li[data-item]:hover { background: rgba(255,255,255,.05); }

/* Fiche ouverte dans le panneau : vue d'ensemble réduite (2 lignes, défilante) pour laisser de la place à la liste. */
#sidebar-achievements:has(#a-detail:not([hidden]):not(.float)) .a-cats { max-height: 76px; }
/* « Fait partie de » : pas de case à cocher → 2 colonnes (icône, texte). */
.a-obj.a-par { grid-template-columns: 32px 1fr; }
/* Icônes des succès (client, 58 px). */
.a-img { width: 40px; height: 40px; object-fit: contain; }
.a-noimg { display: grid; place-items: center; font-size: 20px; }
#sidebar-achievements .list li.a-done .a-img { opacity: .55; }
img.a-ico { width: 32px; height: 32px; object-fit: contain; }
.a-head-img { position: relative; flex: none; width: 48px; height: 48px; }
.a-head-img .a-hi { width: 48px; height: 48px; object-fit: contain; }
.a-head-img b { position: absolute; right: -2px; bottom: -2px; background: var(--ok, #5bbf72); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; display: grid; place-items: center; }
/* Liste : ✔ en pastille sur l'icône (plus de colonne vide à gauche). */
.a-iw { position: relative; width: 40px; height: 40px; }
.a-iw .a-ok { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok, #5bbf72); color: #fff; font-size: 10px; display: grid; place-items: center; }
