/* Tâches : panneau du compteur du haut et page « Tâches » (resources/views/taches). */
.bo-rappels-haut.taches b{background:#2563eb}
.bo-rappels-haut.taches b.echues{top:auto;bottom:0;background:#dc2626}

.bo-tc-panneau{position:fixed;inset:0;z-index:60}
.bo-tc-panneau .fond{position:absolute;inset:0;background:rgba(17,24,39,.25)}
.bo-tc-panneau aside{position:absolute;top:0;right:0;bottom:0;width:min(620px,100vw);display:flex;flex-direction:column;background:#f9fafb;box-shadow:-8px 0 30px rgba(0,0,0,.15);transition:transform .18s ease}
.bo-tc-panneau aside.depart{transform:translateX(30px)}
.bo-tc-panneau header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e5e7eb;background:#fff}
.bo-tc-panneau header h2{font-size:1.05rem;font-weight:700}
.bo-tc-panneau header button{font-size:1.4rem;line-height:1;color:#6b7280}
.bo-tc-panneau .bo-tc{flex:1;overflow-y:auto;padding:12px 16px}

.bo-tc{display:flex;flex-direction:column;gap:10px;font-size:.84rem}
.bo-tc-alerte{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;gap:8px;padding:8px 12px;border-radius:8px;font-weight:600}
.bo-tc-alerte.err{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
.bo-tc-alerte.ok{background:#f0fdf4;color:#15803d;border:1px solid #bbf7d0}
.bo-tc input[type=text],.bo-tc input[type=search],.bo-tc input[type=date],.bo-tc input[type=time],.bo-tc select,.bo-tc textarea{padding:5px 8px;border:1px solid #d1d5db;border-radius:7px;background:#fff;font-size:.82rem}
.bo-tc textarea{width:100%;resize:vertical}

.bo-tc-saisie{display:flex;flex-direction:column;gap:6px;padding:10px;border:1px solid #e5e7eb;border-radius:10px;background:#fff}
.bo-tc-saisie .ligne{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.bo-tc-saisie .ligne.bas{justify-content:space-between}
.bo-tc-saisie .ligne.bas label{display:inline-flex;align-items:center;gap:5px;font-size:.78rem;font-weight:600;color:#374151}
.bo-tc-saisie .ajouter{margin-left:auto;padding:5px 14px;border-radius:7px;background:#16a34a;color:#fff;font-weight:700}
.bo-tc-saisie .ajouter:disabled{opacity:.5}
.bo-tc-saisie .ctx{font-size:.74rem;color:#6b7280}
.bo-tc-saisie.edition{border-color:#86efac;background:#f0fdf4}

.bo-tc-partage{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:3px 6px;border:1px solid #d1d5db;border-radius:7px;background:#fff}
.bo-tc-partage input[type=text]{flex:1;min-width:120px;border:0!important;padding:3px!important;box-shadow:none!important}
.bo-tc-partage .choisi{display:inline-flex;align-items:center;gap:4px;padding:1px 4px 1px 8px;border-radius:99px;background:#eff6ff;color:#1d4ed8;font-size:.76rem;font-weight:600}
.bo-tc-partage .choisi button{font-size:.9rem;line-height:1;color:#60a5fa}
.bo-tc-partage ul{position:absolute;left:0;right:0;top:100%;z-index:5;margin-top:2px;max-height:280px;overflow-y:auto;border:1px solid #e5e7eb;border-radius:8px;background:#fff;box-shadow:0 6px 18px rgba(0,0,0,.1)}
.bo-tc-partage li{padding:6px 10px;cursor:pointer}
.bo-tc-partage li .groupe{display:block;margin:-6px -10px 6px;padding:4px 10px;background:#f9fafb;border-bottom:1px solid #f3f4f6;font-size:.66rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#9ca3af;cursor:default}.bo-tc-partage li:hover{background:#f3f4f6}

.bo-tc-onglets{display:flex;flex-wrap:wrap;gap:4px}
.bo-tc-onglets button{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border:1px solid #e5e7eb;border-radius:99px;background:#fff;font-size:.74rem;font-weight:600;color:#4b5563}
.bo-tc-onglets button i{font-style:normal;padding:0 6px;border-radius:99px;background:#f3f4f6;font-size:.68rem}
.bo-tc-onglets button.actif{background:#fffbeb;border-color:#fcd34d;color:#b45309}
.bo-tc-onglets button.nouvelles i{background:#dbeafe;color:#1d4ed8}
.bo-tc-onglets button.echues{border-color:#fecaca;color:#b91c1c}.bo-tc-onglets button.echues i{background:#fee2e2}
.bo-tc-filtres{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.bo-tc-filtres input[type=search]{flex:1;min-width:180px}
.bo-tc-filtres label{display:inline-flex;align-items:center;gap:4px;font-size:.76rem;color:#6b7280}
.bo-tc-filtres .vu,.bo-tc-filtres .page{font-size:.76rem;font-weight:600;color:#b45309}
.bo-tc-filtres .page{margin-left:auto}

.bo-tc-liste{display:flex;flex-direction:column;gap:6px}
.bo-tc-liste .vide{padding:20px;text-align:center;color:#9ca3af}
.bo-tc-ligne{padding:8px 10px;border:1px solid #e5e7eb;border-left:4px solid #9ca3af;border-radius:9px;background:#fff}
.bo-tc-ligne.prio-brulante{border-left-color:#dc2626}.bo-tc-ligne.prio-haute{border-left-color:#f97316}.bo-tc-ligne.prio-basse{border-left-color:#d1d5db}
.bo-tc-ligne.terminee{opacity:.65}
.bo-tc-ligne.echue{background:#fef2f2}
.bo-tc-ligne.nouvelle{box-shadow:inset 0 0 0 1px #93c5fd}
.bo-tc-ligne .haut{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}
.bo-tc-ligne .texte{flex:1;min-width:0;overflow-wrap:anywhere;font-weight:600;color:#111827;cursor:pointer;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.bo-tc-ligne.ouverte .texte{display:block}
.bo-tc-ligne .texte .contenu,.bo-tc .detail .texte{white-space:pre-line}
.bo-tc-ligne.terminee .texte{text-decoration:line-through;text-decoration-color:#9ca3af}
.bo-tc-ligne .pastille{display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:99px;background:#2563eb;vertical-align:middle}
.bo-tc-ligne .cote{display:flex;align-items:center;gap:4px;flex-shrink:0}
.bo-tc-ligne .prio{padding:1px 8px;border-radius:99px;background:#f3f4f6;font-size:.7rem;font-weight:700;color:#4b5563}
.bo-tc-ligne.prio-brulante .prio{background:#fee2e2;color:#b91c1c}.bo-tc-ligne.prio-haute .prio{background:#ffedd5;color:#c2410c}
.bo-tc-ligne select.etat{padding:2px 6px;font-size:.74rem;background:#f3f4f6}
.bo-tc-ligne.en_cours select.etat{background:#eff6ff;color:#1d4ed8}.bo-tc-ligne.attente_infos select.etat{background:#f5f3ff;color:#6d28d9}.bo-tc-ligne.terminee select.etat{background:#f0fdf4;color:#15803d}
.bo-tc-ligne .b{width:26px;height:24px;border-radius:6px;font-size:.8rem;line-height:24px;text-align:center}
.bo-tc-ligne .b.modifier{background:#16a34a;color:#fff}.bo-tc-ligne .b.note{background:#5b9bd5;color:#fff}.bo-tc-ligne .b.suppr{color:#6b7280}
.bo-tc-ligne .meta{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px;font-size:.73rem;font-style:italic;color:#6b7280}
.bo-tc-ligne .meta .echeance.echue{color:#b91c1c;font-weight:700}
.bo-tc-ligne .meta .ctx{font-style:normal;font-weight:600;color:#b45309}
.bo-tc-ligne .meta .nb-notes{font-weight:600;color:#2563eb}
.bo-tc .confirmer{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:.78rem;font-weight:600;color:#b91c1c}
.bo-tc .confirmer button{padding:2px 10px;border:1px solid #e5e7eb;border-radius:6px;background:#fff}
.bo-tc .confirmer .oui{background:#dc2626;border-color:#dc2626;color:#fff}
.bo-tc .note-saisie{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.bo-tc .note-saisie button{align-self:flex-end;padding:3px 12px;border-radius:6px;background:#5b9bd5;color:#fff;font-weight:700}
.bo-tc .detail{display:flex;flex-direction:column;gap:4px;margin-top:8px}
.bo-tc .detail .histo{align-self:flex-start;font-size:.72rem;font-weight:600;color:#6b7280}
.bo-tc .historique{display:flex;flex-direction:column;gap:2px;padding-left:8px;border-left:2px solid #e5e7eb;font-size:.74rem}
.bo-tc .historique small{color:#9ca3af}.bo-tc .historique .avant{color:#9ca3af;text-decoration:line-through}

.bo-tc-pages{display:flex;flex-wrap:wrap;align-items:center;gap:4px;font-size:.78rem;color:#6b7280}
.bo-tc-pages span{margin-right:auto}
.bo-tc-pages button{min-width:30px;height:30px;border:1px solid #e5e7eb;border-radius:7px;background:#fff;font-weight:600}
.bo-tc-pages button.actif{background:#fffbeb;border-color:#fcd34d;color:#b45309}
.bo-tc-pages button:disabled{opacity:.5}

@media (max-width:640px){
  .bo-tc-ligne .haut{flex-direction:column}
  .bo-tc-ligne .cote{flex-wrap:wrap}
}
.dark .bo-tc-saisie,.dark .bo-tc-ligne,.dark .bo-tc-panneau aside,.dark .bo-tc-panneau header{background:#111827;border-color:rgba(255,255,255,.1)}
.dark .bo-tc-ligne .texte{color:#f3f4f6}

/* ── Page « Tâches » : listing classique (maquette) ── */
.bo-tc.mode-page{gap:14px;font-size:.86rem}
.bo-tcp-boutons{display:flex;flex-wrap:wrap;gap:10px}
.bo-tcp-boutons button svg{width:20px;height:20px}
.bo-tcp-boutons button{display:inline-flex;align-items:center;gap:8px;padding:9px 18px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;font-weight:600;color:#1f2937;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.bo-tcp-boutons button:hover{border-color:#d1d5db;background:#f9fafb}
.bo-tcp-boutons button.nouvelle{border-color:#3f8a1e;background:#3f8a1e;color:#fff}
.bo-tcp-boutons button.nouvelle:hover{background:#357517}
.bo-tcp-boutons button.actif{border-color:#bef264;background:#f7fee7;color:#3f6212}
.mode-page .bo-tc-onglets{gap:8px}
.mode-page .bo-tc-onglets button{padding:7px 16px;border-radius:10px;font-size:.84rem;color:#1f2937}
.mode-page .bo-tc-onglets button i{background:transparent;padding:0;font-size:.84rem;color:inherit}
.mode-page .bo-tc-onglets button i::before{content:'('}.mode-page .bo-tc-onglets button i::after{content:')'}
.mode-page .bo-tc-onglets button.actif{background:#ecfccb;border-color:#bef264;color:#1a2e05;font-weight:700}
.mode-page .bo-tc-onglets button.echues{color:#b91c1c}

.bo-tcp-filtres{display:flex;flex-wrap:wrap;gap:8px;align-items:stretch}
.bo-tcp-filtres > *{min-height:38px}
.bo-tcp-filtres .recherche{flex:1 1 220px;display:flex;align-items:center;gap:6px;padding:0 10px;border:1px solid #d1d5db;border-radius:9px;background:#fff}
.bo-tcp-filtres svg{width:18px;height:18px;color:#6b7280;flex-shrink:0}
.bo-tcp-filtres .recherche input{flex:1;border:0!important;box-shadow:none!important;padding:6px 0!important}
.bo-tcp-filtres .periode{display:flex;align-items:center;gap:6px;padding:0 8px;border:1px solid #d1d5db;border-radius:9px;background:#fff;color:#6b7280}
.bo-tcp-filtres .periode input{width:130px;border:0!important;padding:4px!important}
.bo-tcp-filtres select{min-width:110px;max-width:170px;border-radius:9px!important}
.bo-tcp-filtres .reinit{display:inline-flex;align-items:center;justify-content:center;width:40px;border:1px solid #d1d5db;border-radius:9px;background:#fff;font-size:1.1rem;color:#374151}

.bo-tcp-lot{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;border:1px solid #bef264;border-radius:9px;background:#f7fee7;font-size:.8rem}
.bo-tcp-lot button{padding:3px 10px;border:1px solid #d1d5db;border-radius:7px;background:#fff;font-weight:600}
.bo-tcp-lot button.suppr{border-color:#fecaca;color:#b91c1c}
.bo-tcp-lot .vider{margin-left:auto;border:0;background:none;color:#6b7280}

.bo-tcp-table{overflow-x:auto;border:1px solid #e5e7eb;border-radius:12px;background:#fff}
.bo-tcp-table table{width:100%;border-collapse:collapse}
.bo-tcp-table thead th{padding:12px 10px;background:#f9fafb;border-bottom:1px solid #e5e7eb;text-align:left;font-weight:700;color:#111827;white-space:nowrap}
.bo-tcp-table thead th button{font-weight:700}
.bo-tcp-table thead th span{font-size:.7rem;color:#6b7280}
.bo-tcp-table td{padding:10px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
.bo-tcp-table tbody:hover > tr:first-child td{background:#fcfcfd}
.bo-tcp-table .coche{width:40px;text-align:center}
.bo-tcp-table .coche input{width:17px;height:17px}
.bo-tcp-table td.tache{cursor:pointer;min-width:280px;max-width:560px}
.bo-tcp-table .titre{font-weight:700;color:#111827;overflow-wrap:anywhere}
.bo-tcp-table .desc{margin-top:2px;font-size:.8rem;color:#4b5563;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bo-tcp-table .desc .ctx{margin-left:6px;font-weight:600;color:#b45309}
.bo-tcp-table .desc .nb-notes{margin-left:4px;font-weight:600;color:#2563eb}
.bo-tcp-table .pastille{display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:99px;background:#2563eb;vertical-align:middle}
.bo-tcp-table td.pour,.bo-tcp-table td.echeance{white-space:nowrap;color:#1f2937}
.bo-tcp-table svg.ico{display:inline-block;width:18px;height:18px;margin-right:6px;vertical-align:-4px;color:#374151}
.bo-tcp-table td.echeance .echue{color:#b91c1c;font-weight:700}
.bo-tcp-table td.echeance .sans{color:#9ca3af}
.bo-tcp-table .badge{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:9px;font-size:.8rem;font-weight:600;white-space:nowrap}
.bo-tcp-table .badge svg{width:17px;height:17px;flex-shrink:0}
.bo-tcp-table .badge select{appearance:none;-webkit-appearance:none;padding:0!important;border:0!important;background:transparent!important;background-image:none!important;color:inherit;font:inherit;cursor:pointer;box-shadow:none!important}
.bo-tcp-table .badge select:disabled{cursor:default;opacity:1}
.bo-tcp-table label.prio{background:#fff7ed;color:#c2410c}
.bo-tcp-table .prio-brulante label.prio{background:#fee2e2;color:#b91c1c}
.bo-tcp-table .prio-haute label.prio{background:#fee2e2;color:#dc2626}
.bo-tcp-table .prio-basse label.prio{background:#f3f4f6;color:#6b7280}
.bo-tcp-table label.etat{background:#f3f4f6;color:#1f2937}
.bo-tcp-table .en_cours label.etat{background:#eff6ff;color:#1d4ed8}
.bo-tcp-table .attente_infos label.etat{background:#f5f3ff;color:#6d28d9}
.bo-tcp-table .terminee label.etat{background:#f0fdf4;color:#15803d}
.bo-tcp-table .terminee .titre{text-decoration:line-through;text-decoration-color:#9ca3af;color:#6b7280}
.bo-tcp-table tbody.echue > tr:first-child td{background:#fef2f2}
.bo-tcp-table td.actions,.bo-tcp-table th.actions{white-space:nowrap;width:1%}
.bo-tcp-table .b{display:inline-flex;align-items:center;justify-content:center;width:32px;height:30px;border-radius:7px;color:#111827}
.bo-tcp-table .b svg{width:19px;height:19px}
.bo-tcp-table .b.note{background:#3b82f6;color:#fff}
.bo-tcp-table .b:hover{background:#f3f4f6}.bo-tcp-table .b.note:hover{background:#2563eb}
.bo-tcp-table tr.sous td{padding-top:0;background:#fafafa}
.bo-tcp-table tbody.ouverte > tr:first-child td{border-bottom-color:transparent}
.bo-tcp-table .complet{padding:8px 0}
.bo-tcp-table .texte-complet{white-space:pre-line;overflow-wrap:anywhere}
.bo-tcp-table .complet small{display:block;margin-top:4px;color:#6b7280}
.bo-tcp-table .vide{padding:30px;text-align:center;color:#9ca3af}
.bo-tcp-pied{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;color:#4b5563}
.mode-page .bo-tc-pages button{min-width:38px;height:38px;border-radius:9px}
.mode-page .bo-tc-pages button.actif{background:#ecfccb;border-color:#bef264;color:#1a2e05}
.dark .bo-tcp-table,.dark .bo-tcp-table thead th,.dark .bo-tcp-boutons button{background:#111827;border-color:rgba(255,255,255,.1);color:#f3f4f6}
.dark .bo-tcp-table .titre{color:#f3f4f6}

.mode-page > .bo-tc-alerte{position:fixed;top:76px;right:24px;z-index:40;max-width:420px;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.bo-tc-fin{min-height:24px;padding:6px 0;text-align:center;font-size:.78rem;color:#9ca3af}
.bo-tcp-pied .bo-tc-fin{padding:0}
