/* Liste de tâches en ligne */
.o-liste-taches { display: flex; flex-direction: column; gap: 14px; }
.o-liste-taches [hidden] { display: none !important; }
.o-liste-taches-alerte { margin: 0; padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--erreur-fond); color: var(--erreur-texte); font-weight: 600; }
.o-liste-taches label { font-size: .88rem; color: var(--texte-2); }
.o-liste-taches label small { font-size: .8rem; }
.o-liste-taches select, .o-liste-taches input[type="text"], .o-liste-taches input[type="date"] { min-height: 42px; padding: 6px 10px; border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface); color: var(--texte); font: inherit; }
.o-liste-taches :is(select, input, textarea, button, summary):focus-visible { outline: 3px solid var(--marque); outline-offset: 1px; }
.o-liste-taches input[type="checkbox"] { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--marque); cursor: pointer; }

.o-liste-taches-listes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px 14px; align-items: end; }
.o-liste-taches-listes label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.o-liste-taches-rangee { display: flex; flex-wrap: wrap; gap: 8px; }
.atelier .o-liste-taches .o-liste-taches-danger { color: var(--erreur-texte); }

.o-liste-taches-ajout { display: flex; gap: 8px; }
.o-liste-taches-ajout input { flex: 1; min-width: 0; min-height: 48px; font-size: 1.05rem; }
.o-liste-taches-ajout .btn { min-height: 48px; }

.o-liste-taches-avancement { display: flex; flex-direction: column; gap: 6px; }
.o-liste-taches-avancement output { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.o-liste-taches-barre { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--bord); overflow: hidden; }
.o-liste-taches-barre i { display: block; height: 100%; width: 0; background: var(--marque); border-radius: 999px; transition: width .25s ease; }
.o-liste-taches-barre.complet i { background: #12a150; }

.o-liste-taches-vue { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.o-liste-taches-filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.o-liste-taches-filtres .btn { border-radius: 999px; }
.atelier .o-liste-taches-filtres .btn[aria-pressed="true"] { background: var(--marque); border-color: var(--marque); color: var(--sur-marque); }
.o-liste-taches-tri { display: flex; align-items: center; gap: 8px; }
.o-liste-taches .o-liste-taches-tri select { width: auto; min-height: 36px; }
.o-liste-taches-message { color: var(--ok-texte); font-size: .95rem; font-weight: 600; }

.o-liste-taches-taches { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.o-liste-taches-tache { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 8px; border: 1px solid var(--bord); border-left: 4px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface); }
.o-liste-taches-tache.retard { border-left-color: #d92d20; }
.o-liste-taches-tache.jour { border-left-color: #f79009; }
.o-liste-taches-tache.porte { background: var(--surface-2); box-shadow: var(--ombre); border-color: var(--marque); }
.o-liste-taches.glisse { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.o-liste-taches-principal { display: flex; align-items: center; gap: 8px; flex: 1 1 300px; min-width: 0; }
.o-liste-taches-texte { flex: 1; min-width: 0; padding: 6px 2px; overflow-wrap: anywhere; line-height: 1.35; cursor: text; }
.o-liste-taches-tache.faite .o-liste-taches-texte { color: var(--texte-2); text-decoration: line-through; }
.o-liste-taches .o-liste-taches-edition { flex: 1; min-width: 0; width: auto; min-height: 38px; }
.o-liste-taches-poignee { flex: none; width: 30px; height: 38px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--texte-2); cursor: grab; touch-action: none; }
.o-liste-taches-poignee i { display: block; width: 10px; height: 18px; margin: 0 auto; background: radial-gradient(circle, currentColor 1.5px, transparent 2px) 0 0 / 5px 6px; }
.o-liste-taches-poignee:hover:not(:disabled) { background: var(--surface-2); color: var(--texte); }
.o-liste-taches-poignee:disabled { opacity: .3; cursor: default; }
.o-liste-taches-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.o-liste-taches-pastille { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bord); }
.o-liste-taches-pastille[data-p="3"] { background: #d92d20; border-color: #d92d20; }
.o-liste-taches-pastille[data-p="2"] { background: #f79009; border-color: #f79009; }
.o-liste-taches-pastille[data-p="1"] { background: #2e90fa; border-color: #2e90fa; }
.o-liste-taches .o-liste-taches-meta select, .o-liste-taches .o-liste-taches-meta input[type="date"] { width: auto; min-height: 36px; padding: 4px 8px; font-size: .9rem; }
.o-liste-taches-badge { padding: 2px 8px; border-radius: 999px; font-size: .8rem; white-space: nowrap; }
.o-liste-taches-tache.retard .o-liste-taches-badge { background: var(--erreur-fond); color: var(--erreur-texte); }
.o-liste-taches-tache.jour .o-liste-taches-badge { background: var(--ok-fond); color: var(--ok-texte); }
.o-liste-taches-boutons { display: flex; gap: 4px; margin-left: auto; }
.o-liste-taches-icone { width: 36px; height: 36px; padding: 0; border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface); color: var(--texte); font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; }
.o-liste-taches-icone:hover:not(:disabled) { background: var(--surface-2); }
.o-liste-taches-icone:disabled { opacity: .35; cursor: default; }
.o-liste-taches-icone.o-liste-taches-danger { color: var(--erreur-texte); }
.o-liste-taches-vide { margin: 0; padding: 22px 14px; border: 1px dashed var(--bord); border-radius: var(--rayon-petit); color: var(--texte-2); text-align: center; }

.o-liste-taches-bandeau { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface-2); box-shadow: var(--ombre); }
.o-liste-taches-bandeau span { min-width: 0; overflow-wrap: anywhere; }
.o-liste-taches-bandeau .btn { flex: none; min-height: 38px; }
.o-liste-taches-confirmer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--erreur-fond); color: var(--erreur-texte); }
.o-liste-taches-confirmer p { flex: 1 1 220px; margin: 0; font-weight: 600; }

.o-liste-taches-bloc { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--bord); }
.o-liste-taches-bloc > strong { font-size: .9rem; color: var(--texte-2); font-weight: 600; }
.o-liste-taches-lien label { display: flex; flex-direction: column; gap: 4px; }
.o-liste-taches-lien input { width: 100%; font-family: var(--mono); font-size: .88rem; }
.o-liste-taches-aide { margin: 0; color: var(--texte-2); font-size: .88rem; }
.o-liste-taches-import { border-top: 1px solid var(--bord); padding-top: 12px; }
.o-liste-taches-import summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.o-liste-taches-import label { display: block; margin: 8px 0 4px; }
.o-liste-taches-import textarea { font-family: var(--police); font-size: 1rem; margin-bottom: 8px; }
.o-liste-taches-note { margin: 0; padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--surface-2); color: var(--texte-2); font-size: .9rem; }
.o-liste-taches-impression { display: none; }

@media (max-width: 760px) {
  .o-liste-taches-listes { grid-template-columns: minmax(0, 1fr); }
  .o-liste-taches-meta { padding-left: 38px; }
}
@media (max-width: 480px) {
  .o-liste-taches-rangee .btn { flex: 1 1 auto; }
  .o-liste-taches-principal { flex-basis: 100%; }
  .o-liste-taches-meta { display: contents; }
  .o-liste-taches .o-liste-taches-meta select { flex: 1 1 100px; min-width: 0; }
  .o-liste-taches .o-liste-taches-meta input[type="date"] { flex: 1 1 130px; min-width: 0; }
  .o-liste-taches-pastille { margin-left: 4px; }
  .o-liste-taches-badge { margin-left: 4px; }
  .o-liste-taches-icone, .o-liste-taches-poignee { height: 40px; }
  .o-liste-taches-icone { width: 40px; }
}
@media (prefers-reduced-motion: reduce) { .o-liste-taches-barre i { transition: none; } }

/* Impression : seule la liste sort sur le papier, avec des cases à cocher */
@media print {
  body > *:not(.o-liste-taches-impression) { display: none !important; }
  body > .o-liste-taches-impression { display: block; margin: 0; padding: 0; background: #fff; color: #000; font: 12pt/1.4 Arial, Helvetica, sans-serif; }
  .o-liste-taches-impression h1 { margin: 0 0 14pt; font-size: 18pt; }
  .o-liste-taches-impression ul { margin: 0; padding: 0; list-style: none; }
  .o-liste-taches-impression li { display: flex; align-items: flex-start; gap: 9pt; padding: 5pt 0; border-bottom: .5pt solid #bbb; break-inside: avoid; }
  .o-liste-taches-impression li i { flex: none; width: 12pt; height: 12pt; margin-top: 1.5pt; border: 1pt solid #000; font: 700 10pt/11pt Arial, sans-serif; text-align: center; }
  .o-liste-taches-impression li span { flex: 1; overflow-wrap: anywhere; }
  .o-liste-taches-impression li.faite span { text-decoration: line-through; }
  .o-liste-taches-impression li small { flex: none; font-size: 9pt; color: #333; }
}
@media print { html, body { background: #fff !important; } }
