/* =====================================================================
   (28/11/2026) Refonte UX, lot 3 : Équipe (docs/audit/ux-refonte.md, parties 4.5 et 4.6)
   Performance › Vue d'équipe (vue chatting, onglet board), Classement, Bulletins, Paie › Règles de paie, Membres et rôles
   (Rôles et accès, Journal). Chargée après les autres feuilles : sélecteurs par id (#view-…) pour passer devant
   sections.css / stylepro.css sans !important. Jetons communs (--fg, --muted, --line, --surface-*, --acc*).
   ===================================================================== */

/* ---------- Vue d'équipe : un tableau, une ligne cliquable par chatter (ouvre son bulletin) ---------- */
html body .app #view-chatting #ct-board .ct-row.bd[data-ct-bl] { cursor: pointer; }
html body .app #view-chatting #ct-board .ct-name { appearance: none; display: block; max-width: 100%; margin: 0; padding: 0; border: 0; background: none; color: var(--fg); font: inherit; font-weight: 600; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px; }
html body .app #view-chatting #ct-board .ct-row.bd[data-ct-bl]:hover .ct-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2, var(--line)); }
html body .app #view-chatting #ct-board .ct-name:focus-visible, html body .app #view-chatting #ct-board .ct-risk-n:focus-visible { outline: 2px solid var(--acc, var(--accent)); outline-offset: 2px; }
html body .app #view-chatting #ct-board .ct-risk-n { appearance: none; margin: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: #ef4444; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
html body .app #view-chatting .ct-rev-bar > .muted.small { flex: 1 1 100%; order: 3; margin: -6px 0 0; text-align: left; }
html body .app #view-chatting .ct-rev-bar > .btn-ghost { margin-left: auto; }
html body .app #view-chatting #ct-review .ct-ok { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
html body .app #view-chatting #ct-review .ct-ok b { font-weight: 600; }

/* les dernières ventes : le menu « chatter crédité » tient sur la ligne de la vente */
html body .app #view-chatting #ct-feed .ct-feed li { grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; }
html body .app #view-chatting #ct-feed .ct-move { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
html body .app #view-chatting #ct-feed .ct-move select { max-width: 150px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: 12.5px; }
html body .app #view-chatting #ct-feed .ct-move small { font-size: 11px; color: var(--muted); }
html body .app #view-chatting .ct-more { margin: 10px 0 0; }
html body .app #view-chatting .ct-cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 1000px) { html body .app #view-chatting .ct-cols { grid-template-columns: minmax(0, 1fr); } }

/* téléphone : une ligne compacte par chatter (nom + ventes, puis 4 chiffres), plus de grande carte à 8 champs */
@media (max-width: 760px) {
  html body .app #view-chatting #ct-board .ct-table { overflow: visible; }
  html body .app #view-chatting #ct-board .ct-row.bd.head { display: none; }
  html body .app #view-chatting #ct-board .ct-row.bd { min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; padding: 12px; }
  html body .app #view-chatting #ct-board .ct-row.bd > .ct-who { grid-column: 1 / 4; }
  html body .app #view-chatting #ct-board .ct-row.bd > .bd-s { display: block; grid-column: 4; text-align: right; }
  html body .app #view-chatting #ct-board .ct-row.bd > .bd-x { display: none; }
  html body .app #view-chatting #ct-board .ct-row.bd > [data-l] { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
  html body .app #view-chatting #ct-board .ct-row.bd > [data-l]::before { content: attr(data-l); display: block; margin-bottom: 1px; font-size: 11px; color: var(--muted); }
  html body .app #view-chatting #ct-board .ct-row.bd > [data-l] > small { display: none; }
  html body :is(#gs, .app) #view-chatting #ct-board .ct-row.bd .ct-who em:is(#gs, *):not(#sx-z) { display: none; }
  html body .app #view-chatting #ct-feed .ct-feed li { grid-template-columns: 64px minmax(0, 1fr); }
  html body .app #view-chatting #ct-feed .ct-move { grid-column: 2; align-items: flex-start; }
}

/* ---------- Classement : le mois face aux objectifs (5 colonnes, médaille sur le rang des 3 premiers) ---------- */
@media (min-width: 761px) { html body .app #view-classement :is(.ls-th, .ls-tr).lb2 { grid-template-columns: minmax(200px, 1.6fr) 150px minmax(170px, 1.2fr) 100px 90px; } } /* (téléphone : la mise en page d’avant, nom + ventes) */
html body :is(#gs, .app) #view-classement #lb2-list .ls-rk:is(.lb2-m1, .lb2-m2, .lb2-m3):is(#gs, *):not(#sx-z) { display: inline-grid; place-items: center; width: 24px; height: 24px; min-width: 24px; border-radius: 50%; background: color-mix(in srgb, var(--t) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 60%, transparent); }
html body .app #view-classement #lb2-list .ls-rk.lb2-m1 { --t: #D8A532; }
html body .app #view-classement #lb2-list .ls-rk.lb2-m2 { --t: #9AA6B2; }
html body .app #view-classement #lb2-list .ls-rk.lb2-m3 { --t: #C0834F; }
html body .app #view-classement #lb2-list .ls-rk:is(.lb2-m1, .lb2-m2, .lb2-m3)::before { color: var(--fg); font-weight: 800; font-size: 11px; }

/* ---------- Bulletins : le bulletin d'un chatter ouvert depuis Vue d'équipe ---------- */
html body .app #view-bulletins .bl-focus { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
html body .app #view-bulletins .bl-focus b { font-weight: 650; }

/* ---------- Paie › Règles de paie : les réglages de l'équipe dans une carte, lien vers les mots interdits ---------- */
html body .app #view-chatting #st-team-card .st-link { cursor: default; padding-top: 12px; border-top: 1px solid var(--line); }
html body .app #view-chatting .st-goal-hint { margin: 12px 0 0; }
html body .app #view-chatting .st-goal-hint .linkish { padding: 0; font-size: inherit; color: var(--fg-2, var(--fg)); }

/* ---------- Membres et rôles › Journal : la recherche prend la place du titre ---------- */
html body .app #view-chatting .jr-bar #jr-q { flex: 1 1 220px; min-width: 0; }
html body .app #view-chatting #ct-board .ct-go { display: flex; justify-content: center; margin: 0 0 18px; }
:root[data-theme="light"] body .app #view-chatting #ct-board .ct-risk-n { color: #c62828; } /* (contraste AA sur fond clair) */
/* Classement : chiffres alignés à droite sous leur intitulé, un peu d’air avant la colonne Objectif */
@media (min-width: 761px) {
  html body .app #view-classement :is(.ls-th, .ls-tr).lb2 > :is(:nth-child(2), :nth-child(4), :nth-child(5)) { text-align: right; }
  html body .app #view-classement :is(.ls-th, .ls-tr).lb2 > :nth-child(3) { padding-left: 28px; }
}
@media (max-width: 760px) { /* cibles tactiles d’au moins 32 px (tests/_mobile-audit.mjs) */
  html body .app #view-chatting #ct-board .ct-name { min-height: 32px; line-height: 32px; }
  html body .app #view-chatting #ct-board .ct-risk-n { display: inline-block; min-height: 32px; line-height: 32px; }
  html body .app #view-chatting .st-goal-hint .linkish { display: inline-block; min-height: 32px; line-height: 32px; }
}

/* ---------- (28/11/2026) lot 3b : Vue d'équipe › Conversion (ex bloc Équipe de Statistiques) ---------- */
html body .app #view-chatting #ct-conv .ct-row.cv { grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr)); }
html body .app #view-chatting #ct-conv .ct-best { margin-bottom: 12px; }
html body .app #view-chatting #ct-conv .note-fold { margin-top: 10px; }
html body .app #view-chatting #ct-conv .ct-lock { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); }
html body .app #view-chatting #ct-conv .ct-lock .i { width: 16px; height: 16px; flex: none; }
@media (max-width: 760px) { /* téléphone : une ligne compacte par membre, comme « Par chatter » */
  html body .app #view-chatting #ct-conv .ct-table { overflow: visible; }
  html body .app #view-chatting #ct-conv .ct-row.cv.head { display: none; }
  html body .app #view-chatting #ct-conv .ct-row.cv { min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; padding: 12px; }
  html body .app #view-chatting #ct-conv .ct-row.cv > .ct-who { grid-column: 1 / 4; }
  html body .app #view-chatting #ct-conv .ct-row.cv > .cv-c { display: block; grid-column: 4; text-align: right; }
  html body .app #view-chatting #ct-conv .ct-row.cv > [data-l] { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
  html body .app #view-chatting #ct-conv .ct-row.cv > [data-l]::before { content: attr(data-l); display: block; margin-bottom: 1px; font-size: 11px; color: var(--muted); }
}
