/*
 * Ecran Tableau de bord (#/suivi/tableau) de la direction : A verifier, Tes actions,
 * Qui fait quoi. Prefixe t- ; les cartes, pastilles et boutons partages viennent de
 * suivi.css (s-) et de commun/style.css.
 *
 * La couleur dit l'urgence, toujours la meme : rouge en retard (--alerte), orange a
 * faire vite (--s-orange), jaune a surveiller (--attente). Telephone d'abord : une
 * colonne, cibles de 44 px, aucun defilement horizontal a 375 px.
 */

.t-tableau h2 { display: flex; align-items: center; gap: 6px; }
.t-bloc + .t-bloc { margin-top: 8px; }
.t-nombre-alerte { background: var(--alerte); color: var(--sur-accent); font-weight: 700; }

/* ---------- couleurs d'urgence ---------- */

.t-rouge { --t-couleur: var(--alerte); }
.t-orange { --t-couleur: var(--s-orange); }
.t-jaune { --t-couleur: var(--attente); }

/* ---------- sommaire des alertes ---------- */

.t-sommaire { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.t-saut {
  border-color: var(--t-couleur, var(--bord-haut)); color: var(--t-couleur, var(--texte));
  background: transparent; font-weight: 600; font-size: 13.5px; padding: 7px 12px;
}
.t-saut:hover:not(:disabled) { border-color: var(--t-couleur, var(--accent)); background: var(--carte-haut); }

.t-tout-va-bien {
  border: 1px solid var(--succes); background: var(--succes-voile); border-radius: 8px;
  padding: 14px 16px;
}
.t-tout-va-bien p:first-child { color: var(--succes-texte); font-weight: 600; font-size: 16px; }

/* ---------- groupes et lignes ---------- */

.t-groupe {
  border-left: 3px solid var(--t-couleur, var(--bord-haut)); padding-left: 12px; margin: 0 0 18px;
  scroll-margin-top: 12px;
}
.t-groupe-titre {
  display: flex; align-items: center; gap: 6px; margin: 0 0 8px !important;
  font-size: 14px !important; color: var(--t-couleur, var(--texte)) !important;
}
.t-lignes { display: grid; gap: 8px; }

.t-ligne {
  background: var(--carte); border: 1px solid var(--bord); border-radius: 8px;
  padding: 10px 12px; display: grid; gap: 6px; min-width: 0;
}
.t-ligne-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.t-titre {
  font-weight: 600; font-size: 15px; color: var(--texte); text-decoration: none;
  min-width: 0; overflow-wrap: anywhere; flex: 1 1 auto;
}
a.t-titre:hover { color: var(--accent); text-decoration: underline; }
.t-meta { margin: 0; font-size: 13px; color: var(--doux); overflow-wrap: anywhere; }
.t-meta a { color: var(--doux); }
.t-meta a:hover { color: var(--accent); }

.t-puce {
  display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; line-height: 1.6;
  border: 1px solid var(--bord-haut); color: var(--doux); white-space: nowrap;
}
/* Une puce ne prend la couleur que de sa propre classe, pas de celle de son groupe. */
.t-puce.t-rouge, .t-puce.t-orange, .t-puce.t-jaune { border-color: var(--t-couleur); color: var(--t-couleur); font-weight: 600; }

/* Choisir le monteur : la liste prend la place, le bouton reste a cote. */
.t-confier select { flex: 0 1 320px; width: auto; min-width: 0; }
.t-confier button { flex: 0 0 auto; }

/* Les retards d'une CM : la date devant, le texte deja redige. */
.t-retards { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 13.5px; }
.t-retards li { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.t-retards li span:last-child { min-width: 0; overflow-wrap: anywhere; }
.t-date { flex: 0 0 42px; color: var(--s-orange); font-variant-numeric: tabular-nums; font-weight: 600; }

.t-replie { margin: 0 0 14px; }

/* ---------- qui fait quoi ---------- */

.t-personnes { display: grid; gap: 8px; }
.t-personne {
  background: var(--carte); border: 1px solid var(--bord); border-radius: 8px; min-width: 0;
}
.t-personne.t-a-voir { border-left: 3px solid var(--alerte); }
.t-personne-aucune { border-style: dashed; }
.t-personne > summary {
  cursor: pointer; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  list-style: none;
}
.t-personne > summary::-webkit-details-marker { display: none; }
/* En flex, le triangle du navigateur disparait : une fleche dit que la ligne se deplie. */
.t-personne > summary::before { content: '\25B8'; color: var(--doux); display: inline-block; transition: transform .15s; }
.t-personne[open] > summary::before { transform: rotate(90deg); }
.t-personne > summary:hover .t-nom { color: var(--accent); }
.t-nom { font-weight: 600; font-size: 15px; }
.t-role { color: var(--doux); font-size: 12.5px; }
.t-puces { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-left: auto; }
.t-detail { padding: 0 12px 12px; display: grid; gap: 8px; }
.t-detail h4 { margin: 6px 0 0; font-size: 13px; color: var(--doux); font-weight: 600; }
.t-forfaits { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; }

/* ---------- telephone ---------- */

@media (max-width: 700px) {
  .t-puces { margin-left: 0; width: 100%; }
  .t-groupe { padding-left: 8px; }
  .t-confier select { flex: 1 1 150px; }
  /* Un bouton seul (Fait) ne prend pas toute la largeur : la ligne reste courte. */
  .t-ligne .s-actions > button { flex: 0 1 auto; min-width: 110px; }
  .t-ligne .s-actions > .s-bouton-lien, .t-detail .s-actions > .s-bouton-lien { flex: 0 1 auto; justify-content: flex-start; }
}

@media (max-width: 700px), (pointer: coarse) {
  .t-saut { min-height: 44px; }
  .t-personne > summary { min-height: 44px; }
  a.t-titre, .t-forfaits a { display: inline-flex; align-items: center; min-height: 44px; }
}
