/* Onglet Tâches — même langage visuel que Dossiers et la fiche dossier (verre, puces, boutons capsule). */
#taches[hidden]{display:none!important}
#taches{min-width:0}
.taches-liste{display:grid;gap:18px}
.taches-groupe.fiche-panel{margin-bottom:0;padding:20px}
.taches-groupe .panel-help{margin:-6px 0 14px;color:var(--muted);font-size:13px}
.taches-groupe h3 .v2-icon{width:24px;height:24px}
.taches-reprises.fiche-panel{border-color:color-mix(in srgb,#4f46a5 35%,var(--line));background:color-mix(in srgb,#eef2ff 55%,rgb(var(--glass-rgb) / .62))}
:root[data-theme=dark] .taches-reprises.fiche-panel{background:color-mix(in srgb,#2d3150 45%,rgb(var(--glass-rgb) / .62))}
.taches-reprises h3 .v2-icon{color:#4f46a5}:root[data-theme=dark] .taches-reprises h3 .v2-icon{color:#c7caff}
.taches-items li{display:grid;gap:12px;position:relative;padding-left:14px}
.taches-items li::before{content:'';position:absolute;left:0;top:20px;bottom:20px;width:4px;border-radius:4px;background:#a7a7ad}
.taches-items li:first-child::before{top:4px}
.taches-items li.statut-en_cours::before{background:#4f7cff}.taches-items li.statut-en_attente::before{background:#ff9f0a}
.taches-items li.statut-fait::before{background:#34c759}.taches-items li.statut-annulee::before{background:#8e8e93}
.taches-items li.en-retard::before,.taches-items li.prioritaire::before{background:#ff3b30}
.taches-ligne-haut{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
.taches-ligne-texte{min-width:0}.taches-ligne-texte h4{font-size:17px;line-height:1.25;letter-spacing:-.3px;margin:2px 0 0;overflow-wrap:anywhere}
.taches-description{margin:6px 0 0;font-size:14px;line-height:1.45;color:var(--muted);white-space:pre-wrap}
.taches-meta{max-width:50%}
.taches-infos{font-size:13px}.taches-retard{color:#d92d20;font-weight:650}:root[data-theme=dark] .taches-retard{color:#ff9c96}
.taches-motif{margin:0;font-size:13px;color:var(--muted)}
.taches-details{font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.taches-details summary{cursor:pointer;color:var(--ink);padding:8px 0;min-height:36px}
.taches-details summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.taches-details p{margin:8px 0;white-space:pre-wrap}
.taches-ligne-actions{display:flex;flex-wrap:wrap;gap:8px}
.taches-ligne-actions .fiche-action-button{min-height:38px;padding:8px 12px;font-size:12px;display:inline-flex;align-items:center;gap:6px}
.taches-ligne-actions .taches-dossier{color:var(--accent);max-width:100%;overflow-wrap:anywhere;text-align:left}
.taches-ligne-actions .taches-dossier .v2-icon{width:16px;height:16px;flex-shrink:0}
/* Lien de dossier : libellé en premier, numéro DEM en petit et en gris (règle de Kenji du 20/10/2026) */
.taches-ligne-actions .taches-dossier .taches-dossier-numero{font-size:12px;font-weight:500;color:var(--muted);font-variant-numeric:tabular-nums}
.taches-ligne-actions .taches-annuler{color:#b42318}:root[data-theme=dark] .taches-ligne-actions .taches-annuler{color:#ff9c96}
.taches-ligne-actions .taches-reprendre{background:#4f46a5;color:#fff}:root[data-theme=dark] .taches-ligne-actions .taches-reprendre{background:#c7caff;color:#1d1d1f}
.taches-root>.more{width:auto;margin:18px auto 0;display:block;min-height:44px;border-radius:999px;padding:10px 18px}
.taches-root>.fiche-action-feedback{margin:0 0 14px}
.taches-recherche{grid-template-columns:1fr auto;align-items:end}
.taches-recherche label{display:grid;gap:6px;margin:0}.taches-recherche label>span{font-size:12px;font-weight:650;color:var(--muted);padding-left:4px}
.taches-recherche input{width:100%;min-height:44px;border:1px solid var(--line);border-radius:12px;background:rgb(var(--glass-rgb) / .55);color:var(--ink);font:inherit;font-size:14px;padding:8px 11px;backdrop-filter:blur(20px)}
.taches-recherche .secondary{min-height:44px;border-radius:12px}
.taches-dossier-choix>span{font-size:12px;font-weight:650;color:var(--muted);padding-left:4px}
.taches-dossier-recherche{display:grid;grid-template-columns:1fr auto;gap:8px}
.taches-dossier-recherche input{width:100%;min-height:44px;border:1px solid var(--line);border-radius:12px;background:rgb(var(--glass-rgb) / .55);color:var(--ink);font:inherit;font-size:14px;padding:8px 11px}
.taches-dossier-recherche .secondary{min-height:44px;border-radius:12px}
.taches-dossier-resultats{display:flex;flex-wrap:wrap;gap:8px}.taches-dossier-resultats .panel-help{margin:0;font-size:13px;color:var(--muted)}
.taches-dossier-choisi{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0;padding:8px 12px;border-radius:12px;background:var(--soft);color:var(--accent);font-size:14px;font-weight:650}
/* Pastille du menu : nombre de tâches à faire (même couleur que le compteur de notifications). */
.v2-nav-item .nav-pastille{margin-left:auto;border-radius:999px;background:#8b2525;color:#fff;padding:1px 7px;font-size:11px;line-height:16px;min-width:18px;text-align:center;font-weight:700}
@media(max-width:600px){.taches-ligne-haut{display:block}.taches-meta{max-width:none;justify-content:flex-start;margin-top:10px}.taches-ligne-actions{display:grid;grid-template-columns:1fr 1fr}.taches-ligne-actions .fiche-action-button{width:100%;justify-content:center}.taches-ligne-actions .taches-dossier{grid-column:1/-1;justify-content:flex-start}.taches-recherche{grid-template-columns:1fr}.taches-groupe.fiche-panel{padding:18px}
  .v2-nav>.v2-nav-item .nav-pastille{position:absolute;top:4px;right:calc(50% - 24px);margin:0}.v2-nav>.v2-nav-item[data-destination=taches]{position:relative}}
@media(prefers-reduced-transparency:reduce){.taches-recherche input,.taches-dossier-recherche input,.taches-reprises.fiche-panel{background:var(--surface);backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(prefers-contrast:more){.taches-groupe.fiche-panel{outline:1px solid var(--ink)}}
@media(max-width:600px){.taches-new{white-space:nowrap;padding:10px 14px}}
/* Rappels récurrents (direction, administration) : même verre que les groupes de tâches. */
.taches-rappels-lien{display:inline-flex;align-items:center;gap:6px;min-height:44px;border-radius:999px;padding:8px 14px;font-size:14px}
.taches-rappels-lien .v2-icon{width:18px;height:18px}
.taches-rappels.fiche-panel{margin:22px 0 0;padding:20px;scroll-margin-top:24px}
.taches-rappels-entete{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:6px}
.taches-rappels-entete h3{display:flex;align-items:center;gap:8px;margin:0}.taches-rappels-entete h3 .v2-icon{width:24px;height:24px;color:var(--accent)}
.taches-rappels-entete .panel-help{margin:6px 0 0;color:var(--muted);font-size:13px;max-width:62ch}
.taches-rappels-nouveau{white-space:nowrap}
.taches-rappels>.fiche-action-feedback{margin:10px 0}
.taches-rappels-vide{margin:10px 0 0;color:var(--muted);font-size:14px}
.taches-rappels-liste{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:12px}
.taches-rappel{display:grid;gap:10px;position:relative;padding:14px 14px 14px 18px;border:1px solid var(--line);border-radius:16px;background:rgb(var(--glass-rgb) / .45)}
.taches-rappel::before{content:'';position:absolute;left:6px;top:14px;bottom:14px;width:4px;border-radius:4px;background:var(--accent)}
.taches-rappel.inactif{opacity:.78}.taches-rappel.inactif::before{background:#a7a7ad}
.taches-rappel-haut{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
.taches-rappel-texte{min-width:0}.taches-rappel-texte h4{font-size:17px;line-height:1.25;letter-spacing:-.3px;margin:0;overflow-wrap:anywhere}
.taches-rappel-frequence{margin:4px 0 0;font-size:15px;font-weight:600;color:var(--accent)}
.dossier-badge.taches-rappel-actif{background:color-mix(in srgb,#34c759 18%,transparent);color:#1f7a3a}
:root[data-theme=dark] .dossier-badge.taches-rappel-actif{color:#7ee2a0}
.dossier-badge.taches-rappel-desactive{background:color-mix(in srgb,#8e8e93 20%,transparent);color:var(--muted)}
.dossier-badge.taches-recurrent{background:color-mix(in srgb,#4f7cff 16%,transparent);color:#2f55c4}
:root[data-theme=dark] .dossier-badge.taches-recurrent{color:#a9c0ff}
.taches-rappels-dialogue{width:min(680px,calc(100vw - 32px))}
.taches-rappel-grille{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.taches-rappel-grille .large{grid-column:1/-1}
.taches-rappel-grille [hidden]{display:none!important}
.taches-rappel-grille input,.taches-rappel-grille select,.taches-rappel-grille textarea{width:100%;min-width:0}
.taches-rappel-apercu{margin:12px 0 0;padding:10px 12px;border-radius:12px;background:var(--soft);color:var(--accent);font-size:14px;font-weight:650}
@media(max-width:600px){.taches-rappels-entete{display:block}.taches-rappels-nouveau{margin-top:12px;width:100%}.taches-rappel-haut{display:block}.taches-rappel-haut .dossier-meta{justify-content:flex-start;margin-top:8px}
  .taches-rappel-grille{grid-template-columns:1fr}.taches-rappels.fiche-panel{padding:18px}.taches-rappels-lien{padding:8px 12px}}
@media(prefers-reduced-transparency:reduce){.taches-rappel{background:var(--surface)}}
@media(max-width:600px){.taches-root .dossiers-heading-actions{flex-wrap:wrap}}
/* Tâche ouverte en grand (28/10/2026) : étapes, fil d'avancée, gestes. Même verre que les fenêtres de la fiche dossier. */
.taches-ligne-texte h4 .taches-titre{all:unset;cursor:pointer;color:inherit;border-radius:6px;overflow-wrap:anywhere}
.taches-ligne-texte h4 .taches-titre:hover{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.taches-ligne-texte h4 .taches-titre:focus-visible{outline:3px solid #007AFF;outline-offset:3px}
.taches-avancee{display:flex;align-items:center;gap:10px;min-width:0}
.taches-avancee-barre{flex:1;max-width:220px;height:8px;border-radius:999px;background:var(--inset);overflow:hidden;border:1px solid var(--line)}
.taches-avancee-barre>span{display:block;height:100%;border-radius:999px;background:#4f7cff;transition:width var(--duree-normale) var(--courbe)}
.taches-avancee.complete .taches-avancee-barre>span{background:#34c759}
.taches-avancee-texte{font-size:13px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
.taches-avancee-ligne{margin-top:2px}
.taches-ouverte{width:min(1080px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line);border-radius:26px;background:rgb(var(--glass-rgb) / .97);color:var(--ink);box-shadow:0 26px 80px #00000040;backdrop-filter:blur(30px) saturate(180%);-webkit-backdrop-filter:blur(30px) saturate(180%);overflow:auto;overscroll-behavior:contain}
.taches-ouverte::backdrop{background:#00000040;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.taches-ouverte-tete{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:22px 24px 16px;background:rgb(var(--glass-rgb) / .94);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:1px solid var(--line)}
.taches-ouverte-tete>div{min-width:0}
.taches-ouverte-titre{font-size:clamp(22px,3vw,28px);line-height:1.15;letter-spacing:-.6px;margin:4px 0 10px;overflow-wrap:anywhere}
.taches-ouverte-titre:focus{outline:none}
.taches-ouverte-puces{justify-content:flex-start}
.taches-ouverte-fermer{flex-shrink:0;width:44px;height:44px;min-height:44px;padding:0;border-radius:999px;display:grid;place-items:center}
.taches-ouverte-fermer .v2-icon{width:20px;height:20px}
.taches-ouverte>.fiche-action-feedback,.taches-ouverte>.message{margin:14px 24px 0}
.taches-ouverte-corps{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;padding:20px 24px 24px;align-items:start}
.taches-ouverte-principal{grid-column:1;grid-row:1;display:grid;gap:18px;min-width:0}
.taches-ouverte-cote{grid-column:2;grid-row:1;display:grid;gap:18px;position:sticky;top:110px}
.taches-ouverte-bloc{border:1px solid var(--line);border-radius:20px;padding:18px;background:rgb(var(--glass-rgb) / .6);min-width:0}
.taches-ouverte-bloc h3{display:flex;align-items:center;gap:8px;font-size:16px;letter-spacing:-.2px;margin:0 0 12px}
.taches-ouverte-bloc h3 .v2-icon{width:20px;height:20px;color:var(--accent)}
.taches-ouverte-bloc .panel-help{margin:0;color:var(--muted);font-size:13px}
.taches-ouverte-texte{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.5}.taches-ouverte-texte.vide{color:var(--muted);font-size:14px}
.taches-ouverte-avancee{margin-bottom:12px}.taches-ouverte-avancee .taches-avancee-barre{max-width:none;height:10px}.taches-ouverte-avancee .taches-avancee-texte{font-size:14px}
.taches-proposition{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 12px;padding:12px 14px;border-radius:14px;background:color-mix(in srgb,#34c759 14%,var(--surface));border:1px solid color-mix(in srgb,#34c759 40%,var(--line))}
.taches-proposition p{margin:0 auto 0 0;font-weight:650}
.taches-proposition .primary{width:auto;border-radius:999px;padding:10px 18px;min-height:44px}
.taches-proposition .secondary{border-radius:999px;min-height:44px}
.taches-etapes{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:6px}
.taches-etape{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 10px;border-radius:14px;background:var(--surface);border:1px solid var(--line)}
.taches-etape label{flex:1;display:flex;align-items:flex-start;gap:12px;margin:0;font-size:15px;font-weight:500;cursor:pointer;min-height:44px;padding:8px 0;min-width:0}
.taches-etape input[type=checkbox]{flex-shrink:0;width:22px;height:22px;min-height:0;margin:1px 0 0;accent-color:#34c759;cursor:pointer}
.taches-etape-texte{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}
.taches-etape-texte small{font-size:12px;color:var(--muted);font-weight:400}
.taches-etape.faite .taches-etape-texte>span{color:var(--muted);text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--muted) 60%,transparent)}
.taches-etape-outils{display:flex;gap:4px;flex-shrink:0}
.taches-etape-outils button{min-height:36px;min-width:36px;padding:6px 10px;border-radius:10px;font-size:13px}
.taches-ajout{display:grid;grid-template-columns:1fr auto;gap:8px;margin:0;align-items:end}
.taches-ajout input,.taches-ajout textarea{width:100%;min-height:44px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-size:15px;padding:10px 12px;resize:vertical}
.taches-ajout .secondary,.taches-ajout .primary{min-height:44px;border-radius:12px;width:auto;justify-content:center}
.taches-fil{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:0}
.taches-note{position:relative;padding:0 0 14px 20px}
.taches-note::before{content:'';position:absolute;left:4px;top:8px;width:8px;height:8px;border-radius:50%;background:var(--accent)}
.taches-note::after{content:'';position:absolute;left:7px;top:20px;bottom:0;width:2px;background:var(--line)}
.taches-note:last-child::after{display:none}
.taches-note-qui{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;margin:0;font-size:13px}.taches-note-qui span{color:var(--muted)}
.taches-note-texte{margin:2px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.45}
.taches-gestes{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.taches-gestes>.dossier-blocker,.taches-gestes>.panel-help{grid-column:1/-1}
.taches-geste{display:grid;gap:1px;text-align:left;min-height:56px;padding:10px 12px;border-radius:14px;border:1px solid var(--line);background:var(--surface)}
.taches-geste strong{font-size:14px}.taches-geste small{font-size:12px;color:var(--muted)}
.taches-geste-principal{grid-column:1/-1;background:var(--button);border-color:var(--button);color:#fff}.taches-geste-principal small{color:#ffffffc8}
.taches-geste-annuler strong{color:#b42318}:root[data-theme=dark] .taches-geste-annuler strong{color:#ff9c96}
.taches-dossier-nom{margin:0;font-weight:650;font-size:15px;overflow-wrap:anywhere}
.taches-ouverte-dossier .taches-dossier-numero{margin:0 0 10px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.taches-dossier-bref{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:0 0 12px;font-size:14px}
.taches-dossier-bref dt{color:var(--muted);font-size:12px;font-weight:650;padding-top:2px}.taches-dossier-bref dd{margin:0;overflow-wrap:anywhere}
.taches-ouverte-fiche{display:inline-flex;align-items:center;gap:6px;color:var(--accent);width:100%;justify-content:center}
.taches-ouverte-fiche .v2-icon{width:16px;height:16px}
@media(max-width:760px){
  .taches-ouverte{width:100%;max-width:none;max-height:100dvh;height:100dvh;margin:0;border-radius:0;border:0}
  .taches-ouverte-tete{padding:16px}
  .taches-ouverte>.fiche-action-feedback,.taches-ouverte>.message{margin:12px 16px 0}
  .taches-ouverte-corps{display:flex;flex-direction:column;align-items:stretch;gap:14px;padding:14px 16px calc(24px + env(safe-area-inset-bottom))}
  .taches-ouverte-principal,.taches-ouverte-cote{display:contents}
  .taches-ouverte-description{order:1}.taches-ouverte-gestes{order:2}.taches-ouverte-etapes{order:3}.taches-ouverte-fil{order:4}.taches-ouverte-dossier{order:5}
  .taches-ouverte-bloc{padding:16px;border-radius:18px}
  .taches-ajout{grid-template-columns:1fr}.taches-ajout .secondary,.taches-ajout .primary{width:100%}
  .taches-etape-outils button[data-role=monter],.taches-etape-outils button[data-role=descendre]{min-width:40px}
}
@media(prefers-reduced-transparency:reduce){.taches-ouverte,.taches-ouverte-tete,.taches-ouverte-bloc{background:var(--surface);backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(prefers-contrast:more){.taches-ouverte-bloc,.taches-etape{outline:1px solid var(--ink)}}
.taches-ouverte-puces.dossier-meta{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;max-width:none;justify-content:flex-start;align-items:center}
@media(max-width:760px){
  .taches-etape{flex-wrap:wrap;padding:4px 8px 8px 10px}
  .taches-etape label{flex-basis:100%}
  .taches-etape-outils{margin-left:34px}
}
/* Réponse au demandeur en terminant une tâche (23/11/2026) */
.taches-reponse-titre{margin:0;font-weight:650;overflow-wrap:anywhere}
.taches-reponse-choix{display:flex;flex-wrap:wrap;gap:8px}
.taches-reponse-choix .dossiers-chip{min-height:44px;flex:1 1 auto;border:0}
.taches-reponse{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;align-items:baseline;margin:8px 0 0;padding:10px 12px;border-radius:14px;background:var(--soft);font-size:14px;overflow-wrap:anywhere}
.taches-reponse strong{font-size:12px;letter-spacing:.02em;text-transform:uppercase;color:var(--accent)}
.taches-reponse-partiel strong,.taches-reponse-impossible strong{color:#b54708}:root[data-theme=dark] .taches-reponse-partiel strong,:root[data-theme=dark] .taches-reponse-impossible strong{color:#fdb022}
.taches-gestes>.taches-reponse{grid-column:1/-1;margin:0}
