/* =========================================================
   Page « Encadrants & bureau » (hub Paramètres du club).
   Gestion de l'équipe du club : encadrants (ordonnables) + bureau.
   Réutilise .ls-* (champs de modale, session-staff.css), .ui-confirm-text,
   twig:Button / twig:Modal. Tokens : tokens.css.
   ========================================================= */

.cs-sec-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 0.4rem 0 0.7rem; }
.cs-sec-head-board { margin-top: 2rem; }
.cs-sec-title { font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 0.55rem; }
.cs-sec-title .cs-ico {
    width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
    background: var(--gold-soft); color: var(--gold-strong); border: 1px solid var(--border-strong);
}
.cs-sec-title .cs-ico .ui-ic { width: 16px; height: 16px; }
.cs-sec-title.board .cs-ico { background: rgba(90, 169, 214, 0.14); color: #5aa9d6; border-color: rgba(90, 169, 214, 0.3); }
.cs-count { font-size: 0.82rem; color: var(--text-faint); font-weight: 500; }
.cs-sec-head .ui-btn { margin-left: auto; }
.cs-note { font-size: 0.84rem; color: var(--text-muted); margin: 0 0 1rem; max-width: 78ch; }
.cs-empty { font-size: 0.9rem; color: var(--text-faint); padding: 0.6rem 0 1rem; }

/* Carte personne */
.cs-card {
    display: flex; align-items: center; gap: 0.85rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 0.7rem 1rem; margin-bottom: 0.6rem; max-width: 840px;
}
.cs-card:hover { border-color: var(--border-strong); }

/* Flèches de réordonnancement (encadrants) */
.cs-arrows { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.1rem; }
.cs-arrows form { margin: 0; line-height: 0; }
.cs-arrows button {
    width: 22px; height: 18px; display: grid; place-items: center;
    border: 1px solid var(--border); background: var(--surface-3); color: var(--text-muted);
    border-radius: 6px; cursor: pointer; font-size: 0.6rem; padding: 0;
}
.cs-arrows button:hover:not(:disabled) { color: var(--gold-strong); border-color: var(--border-strong); }
.cs-arrows button:disabled { opacity: 0.35; cursor: default; }

.cs-av {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 700; font-size: 0.82rem; background: var(--gold-soft); color: var(--gold-strong); border: 1px solid var(--border-strong);
}
.cs-av.board { background: rgba(90, 169, 214, 0.14); color: #5aa9d6; border-color: rgba(90, 169, 214, 0.3); }
.cs-main { flex: 1 1 auto; min-width: 0; }
.cs-name { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.cs-mail { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-roles { flex: 0 0 auto; display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }

.role-badge {
    font-size: 0.72rem; font-weight: 600; color: var(--gold-strong);
    background: var(--gold-soft); border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.16rem 0.6rem;
}
.role-badge.asst { color: var(--text-muted); background: var(--surface-3); }
.role-badge.board { color: #5aa9d6; background: rgba(90, 169, 214, 0.14); border-color: rgba(90, 169, 214, 0.3); }

.cs-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 0.1rem; }
.cs-act {
    display: inline-grid; place-items: center; width: 32px; height: 32px;
    border: none; background: none; color: var(--text-faint); cursor: pointer; border-radius: 8px;
}
.cs-act:hover { color: var(--text); background: var(--hover); }
.cs-act.danger:hover { color: var(--danger); background: var(--danger-soft); }

/* Pied d'action des tiroirs d'ajout (encadrant / bureau) */
.cs-drawer-foot {
    display: flex; justify-content: flex-end; gap: 0.6rem;
    margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--border);
}

/* Message d'attente à la soumission (création de compte = hachage, quelques secondes) */
.cs-busy {
    display: flex; align-items: center; gap: 0.6rem;
    margin-top: 1.1rem; padding: 0.7rem 0.85rem;
    background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.84rem; color: var(--text-muted);
}
.cs-busy::before {
    content: ""; flex: 0 0 auto; width: 0.95em; height: 0.95em;
    border: 2px solid var(--gold-strong); border-top-color: transparent; border-radius: 50%;
    animation: ui-btn-spin 0.6s linear infinite;
}

/* Résumé figé (modales d'édition) */
.cs-summary {
    display: flex; align-items: center; gap: 0.7rem; background: var(--surface-3); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0.7rem 0.8rem; margin-bottom: 1.1rem;
}
.cs-summary .av {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 700; font-size: 0.78rem; background: var(--gold-soft); color: var(--gold-strong); border: 1px solid var(--border-strong);
}
.cs-summary .nm { font-weight: 600; }
.cs-summary .ml { font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 620px) {
    .cs-card { flex-wrap: wrap; }
    .cs-roles { max-width: none; justify-content: flex-start; }
}
