/* Atelia · console · écran « File des tâches » (screens/taches.js).
   Palette inchangée : var(--…) uniquement, composants existants (.card, .tbl, .segment, .field, .btn, .st, .note). */

.taches-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.taches .card-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Onglets de la file : la rangée .segment, avec un compteur par onglet. */
.taches .taches-onglets { margin-bottom: 14px; flex-wrap: wrap; }
.taches .taches-onglets button { display: inline-flex; align-items: center; gap: 6px; }
.taches .taches-n { font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: 10px; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.taches .taches-onglets button.on .taches-n { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }

.taches .taches-filtre select { font: inherit; font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }

/* Cellules de la file. */
.taches .taches-note { font-size: 12px; margin-top: 2px; }
.taches-liens { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.taches-lien { font-size: 12.5px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.taches-lien:hover { text-decoration: underline; }
.taches-erreur { color: var(--rouge); font-size: 12.5px; }
.taches .taches-aide { margin: 10px 0 0; font-size: 12.5px; }

/* Planning : une carte par routine (libellé, état, ce qu'elle fait, jours, heures, interrupteur). */
.taches .taches-aide-haut { margin: 0 0 14px; }
.taches-routines { display: flex; flex-direction: column; gap: 12px; }
.taches-routine { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.taches-routine.pause { background: var(--surface-2); }
.taches-routine-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.taches-routine-tete h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--navy); min-width: 0; overflow-wrap: anywhere; }
.taches-routine-desc { margin: 0; font-size: 13px; color: var(--ink-2); }
.taches-routine .taches-rang > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.taches-familles { margin: 0; padding-left: 18px; }
.taches-familles li { margin-bottom: 2px; }
.taches-routine-act { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line-2); }
.taches-routine-act .toggle { font-size: 13px; font-weight: 600; color: var(--ink-2); min-height: 32px; }
.taches-routine .note { margin: 0; }
.taches-routine-nom { margin: 0 0 14px; font-size: 13.5px; overflow-wrap: anywhere; }
.taches-heure { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.taches-heure input[type="time"] { flex: 1 1 auto; min-width: 0; max-width: 160px; }
.taches-heure .btn { flex: none; }
.taches-jours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.taches-jour { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; color: var(--ink); cursor: pointer; min-height: 32px; }

/* Tiroirs : nouvelle tâche et détail. */
.taches-form textarea { width: 100%; font: inherit; }
.taches-form [data-taches-erreur] { margin-bottom: 14px; }
.taches-form [hidden] { display: none; }
.taches-pied { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.taches-detail { display: flex; flex-direction: column; gap: 8px; }
.taches-rang { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; font-size: 13px; align-items: start; }
.taches-titre { margin: 12px 0 2px; font-size: 14px; }
.taches-json { margin: 0; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }

@media (max-width: 640px) {
  .taches-rang { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .taches .card-act { width: 100%; }
}
