/* team : styles propres à ce module (chargé après style.css) — stagiaires (direction), photos, onglet « Équipe » du salarié.
   Teintes douces uniquement ; les couleurs vives restent réservées au sens (vert = en cours / conforme, bleu = information). */

/* ---- rond d'une personne : photo, ou initiales sur une teinte douce (variable --hue posée par le script, aucun style en ligne) ---- */
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; font-weight: 700; letter-spacing: .02em; background: var(--surface-2); border: 1px solid var(--line); }
.avatar-sm { width: 38px; height: 38px; font-size: .82rem; }
.avatar-md { width: 52px; height: 52px; font-size: 1rem; }
.avatar-lg { width: 76px; height: 76px; font-size: 1.45rem; }
.avatar-initials { background: hsl(var(--hue, 100) 34% 91%); color: hsl(var(--hue, 100) 30% 28%); border-color: hsl(var(--hue, 100) 28% 84%); }

/* ---- liste des stagiaires / salariés (direction) ---- */
.who-cell { display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0; }
.who-cell > div { min-width: 0; overflow-wrap: anywhere; }
.who-name { white-space: nowrap; }
.nowrap { white-space: nowrap; }
.cell-stack { min-width: 0; }
table.stackable td .cell-stack { text-align: right; }
@media (min-width: 721px) { table.stackable td .cell-stack { text-align: left; } }
table.stackable td .who-cell { justify-content: flex-start; }
.team-filters { align-items: center; }
.team-filters .segbtn { min-height: 40px; padding: 6px 12px; }
.check-inline { margin-left: auto; min-height: 40px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
tr.is-archived td { opacity: .62; }
.badge.st-upcoming { background: var(--k-rest-bg); color: var(--k-rest); }
.badge.st-ongoing { background: var(--ok-bg); color: var(--ok); }
.badge.st-done, .badge.st-cancelled { background: var(--surface-2); color: var(--muted); }
.badge.st-cancelled { text-decoration: line-through; }
@media (max-width: 720px) {
  table.stackable td .badges { justify-content: flex-end; }
  .check-inline { margin-left: 0; }
}

/* ---- fiche stagiaire (fenêtre) ---- */
.intern-form h3 { font-size: 1rem; }
.intern-access { background: var(--surface-2); box-shadow: none; }
.photo-field { display: flex; align-items: center; gap: 16px; }
.photo-actions { gap: 6px; min-width: 0; }
.photo-actions .btn-link { min-height: 36px; }
.intern-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.intern-docs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.intern-docs .doc-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.intern-doc-add input[type=text] { flex: 1 1 220px; min-width: 0; }
.intern-form select + input[type=text] { margin-top: 8px; }

/* ---- onglet « Équipe » du salarié : cartes sobres regroupées Salariés / Stagiaires ---- */
.team-title { display: flex; align-items: baseline; gap: 4px; }
.team-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.team-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 16px 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.team-card.me { background: var(--surface-2); }
.team-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; }
.team-name { overflow-wrap: anywhere; line-height: 1.25; }
.team-fn { overflow-wrap: anywhere; }
.team-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: auto; }
@media (max-width: 460px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .team-card { padding: 14px 8px 12px; }
  .team-card .avatar-lg { width: 64px; height: 64px; font-size: 1.25rem; }
}
