/* Présentation des tâches groupées, sur le principe utilisé dans devtest. */
@layer interface {
  .td-entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 28px; }
  .td-entete > div { min-width: 0; }
  .td-entete h1 { margin: 0 0 12px; }
  .td-entete h1:last-child { margin-bottom: 0; }
  .td-entete p { margin: 0; color: #74816b; font-size: var(--texte-courant); }
  .td-entete .button { min-height: 44px; gap: 8px; font-size: 14px; }
  .td-entete > .button { margin-left: auto; }
  .td-page .td-demo { font-size: 11px; color: #89927f; margin: 22px 0 0; }
  .td-section-liste { scroll-margin-top: 12px; }
  .td-filtres-taches .filtre-lecon:not(.active) { background: #e6f1d7; color: #3f6f1f; }
  .td-categories .filter-chip { position: relative; }
  .td-filtres-taches { padding-right: 5px; }
  .td-categories .filtre-retard { background: #f7e4e2; color: var(--rouge); }
  .td-categories .filtre-retard.active { background: var(--rouge); color: #fff; }
  .td-categories .filtre-abandonnees { background: #e2e5e9; color: #59636f; }
  .td-categories .filtre-abandonnees.active { background: #59636f; color: #fff; }
  @media (hover: hover) and (pointer: fine) {
    .td-categories .filtre-retard:hover { background: var(--rouge); color: #fff; }
    .td-filtres-taches .filtre-lecon:hover { background: #3b6524; color: #fff; }
  }

  .td-liste { display: grid; gap: 10px; }
  .td-groupe { min-width: 0; scroll-margin-top: 12px; }
  .td-groupe[data-etat="faire"], .td-rappel-tache[data-etat="faire"] { --td-fond-ligne: #fff5ed; --td-fond-date: #fae5d6; --td-encre-date: #87522c; --td-bordure: #edd5c3; }
  .td-groupe[data-etat="retard"], .td-rappel-tache[data-etat="retard"] { --td-fond-ligne: #fbefee; --td-fond-date: #f7e4e2; --td-encre-date: var(--rouge); --td-bordure: #eac8c5; }
  .td-groupe[data-etat="planifiees"] { --td-fond-ligne: #eef3fa; --td-fond-date: #e0eaf7; --td-encre-date: #496480; --td-bordure: #dce5f1; }
  .td-groupe[data-etat="terminees"] { --td-fond-ligne: #f1f7e9; --td-fond-date: #e6f1d7; --td-encre-date: #3f6f1f; --td-bordure: #d5e4c3; }
  .td-groupe[data-etat="abandonnees"] { --td-fond-ligne: #f1f2f4; --td-fond-date: #e2e5e9; --td-encre-date: #59636f; --td-bordure: #d8dde3; }
  .td-groupe > .td-resume-tache { position: relative; min-height: 76px; padding-right: 44px; grid-template-columns: max-content max-content minmax(0, 1fr); gap: 8px 14px; list-style: none; cursor: pointer; touch-action: manipulation; background: var(--td-fond-ligne); border-color: var(--td-bordure); }
  .td-groupe > div.td-resume-tache { cursor: default; }
  .td-groupe > summary::-webkit-details-marker { display: none; }
  .td-chevron-tache { position: absolute; right: 14px; top: 50%; display: grid; place-items: center; color: var(--td-encre-date); transform: translateY(-50%); }
  .td-groupe[open] > summary .td-chevron-tache { transform: translateY(-50%) rotate(90deg); }
  .td-date-rappel.td-date-tache { grid-column: 1; grid-row: 1 / 3; align-self: center; align-content: end; padding-bottom: 2px; width: 44px; height: 44px; border-radius: 10px; font-size: 24px; gap: 0; background: var(--td-fond-date, #fae5d6); color: var(--td-encre-date, #87522c); }
  .td-date-tache .td-heure-rappel { top: -11px; right: -5px; height: 16px; padding: 0 4px; font-size: 9px; }
  .td-groupe > .td-resume-tache .td-attribution { line-height: 1.2; }
  .td-mois-tache { font-size: 9px; font-weight: 500; line-height: 1.2; }
  .td-progression-tache { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 30px; }
  .td-groupe-principal { grid-column: 3; min-width: 0; display: grid; gap: 2px; }
  .td-groupe-titre { margin: 0; color: #2f3b2b; font: 400 clamp(1.125rem, 1.04rem + .3vw, 1.375rem)/1.2 'Concert One', sans-serif; overflow-wrap: anywhere; }
  /* Roue d’avancement d’un résumé de tâche : elle prend la couleur de l’état de la ligne et la taille des pictos (44 px). */
  .td-groupe > .td-resume-tache .rs-roue-valeur { stroke: var(--td-encre-date, #568238); }
  .td-groupe > .td-resume-tache .rs-roue-fond { stroke: var(--td-bordure, #a4b894); }
  .td-groupe > .td-resume-tache .rs-roue > strong { color: var(--td-encre-date, var(--green)); }
  .td-groupe > .td-resume-tache .rs-roue { width: 44px; height: 44px; }
  .td-groupe > .td-resume-tache .rs-roue > strong { font-size: 13px; }
  /* Variante compacte d’un résumé (carte de détail #taches/{id} côté apprenant) : hauteur 47 px, date/roue/indicateur à -25 %. */
  .td-groupe > .ligne-lecon-compacte.td-resume-tache { min-height: 47px; padding-block: 6px; }
  .td-groupe > .ligne-lecon-compacte.td-resume-tache .td-date-rappel.td-date-tache { width: 33px; height: 33px; border-radius: 8px; font-size: 18px; padding-bottom: 1px; }
  .td-groupe > .ligne-lecon-compacte.td-resume-tache .td-date-tache .td-heure-rappel { top: -8px; right: -4px; height: 12px; padding: 0 3px; font-size: 7px; }
  .td-groupe > .ligne-lecon-compacte.td-resume-tache .rs-roue { width: 33px; height: 33px; }
  .td-groupe > .ligne-lecon-compacte.td-resume-tache .rs-roue > strong { font-size: 10px; }
  .td-groupe > .ligne-lecon-compacte.td-resume-tache .td-progression-tache { flex-basis: 23px; width: 23px; }
  /* Aperçu : sur mobile, donner la largeur au titre et placer les contenus dessous. */
  .td-groupe > .td-resume-apercu { grid-template-columns:44px minmax(0,1fr) 44px; align-items:start; }
  .td-resume-apercu > :first-child { grid-column:1; grid-row:1; }
  .td-resume-apercu > :nth-child(2) { grid-column:1; grid-row:2; justify-self:center; }
  .td-resume-apercu > .td-groupe-principal { grid-column:2 / -1; grid-row:1; }
  .td-resume-apercu > .td-actions-tache { grid-column:2 / -1; grid-row:2; justify-content:flex-start; }
  .td-resume-apercu > .td-actions-tache:empty { display:none; }
  .td-resume-apercu > .td-chevron-tache { grid-column:3; grid-row:3; align-self:center; justify-self:end; }
  @media (min-width:701px) {
    .td-groupe > .td-resume-apercu { align-items:center; }
    .td-resume-apercu > :nth-child(2) { grid-column:2; grid-row:1; }
    .td-resume-apercu > .td-groupe-principal { grid-column:3; grid-row:1; }
    .td-resume-apercu > .td-actions-tache { grid-column:4; grid-row:1; }
    .td-resume-apercu > .td-chevron-tache { grid-column:5; grid-row:1; }
  }
  @media (min-width: 701px) {
    .td-groupe > .ligne-lecon-compacte.td-resume-tache .td-groupe-titre { font-size: 15px; line-height: 1.2; }
    .td-groupe > .ligne-lecon-compacte.td-resume-tache .td-attribution { font-size: 9px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .td-groupe > .ligne-lecon-compacte.td-resume-tache .td-entete-tache > .td-action-tache, .td-groupe > .ligne-lecon-compacte.td-resume-tache .td-entete-tache > .td-abandonner { min-height: 0; padding: 0; font-size: 10px; line-height: 1.2; }
  }
  /* Sur ordinateur, le titre d’un résumé tient sur une ligne (infobulle via title) : hauteur de carte uniforme. */
  @media (min-width: 701px) {
    .td-groupe > .td-resume-tache { padding-block: 0; }
    .td-groupe > .td-resume-tache .td-entete-tache > .td-groupe-titre { min-width: 0; flex: 0 1 auto; }
    .td-groupe > .td-resume-tache .td-attribution { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .td-groupe > .td-resume-tache .td-attribution > span + span::before { content: ' '; }
    .td-groupe > .td-resume-tache .td-entete-tache > :is(.td-action-tache, .td-abandonner) { padding-block: 0; }
  }
  /* Variante de gestion : résumé compact avec commandes de classe et d’archivage. */
  .td-groupe > .td-resume-tache.td-resume-gestion { grid-template-columns: 33px minmax(0,1fr); padding-right: 14px; }
  .td-resume-gestion > .td-groupe-principal { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
  .td-resume-gestion > .td-actions-tache { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .td-resume-gestion .td-actions-tache .selection-native { width: auto; max-width: 100%; }
  @media (min-width: 701px) {
    .td-groupe > .td-resume-tache.td-resume-gestion { grid-template-columns: 33px minmax(0,1fr) auto; }
    .td-resume-gestion > .td-actions-tache { grid-column: 3; grid-row: 1; }
    .td-resume-gestion.ligne-lecon-compacte .selection-native { min-height: 33px; padding: 6px 10px; font-size: var(--texte-discret); }
    .td-resume-gestion.ligne-lecon-compacte .td-action-tache { min-height: 33px; }
  }
  .td-carte-allocation { grid-template-columns: minmax(0,1fr) auto; gap: 16px 18px; align-items: center; }
  .td-allocation-identite { min-width: 0; }
  .td-allocation-identite h2 { margin: 0; }
  .td-allocation-indicateur { display: inline-grid; justify-items: center; gap: 6px; }
  .td-allocation-indicateurs { grid-column: 1 / -1; }
  .td-allocation-reglage { grid-column: 1 / -1; justify-content: flex-end; }
  .td-commande-ronde { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
  .td-allocation-code { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr); align-items: center; gap: 0 8px; font-size: var(--texte-secondaire); }
  .td-allocation-code-valeur { display: inline-flex; align-items: center; gap: 4px; }
  @media (min-width: 1200px) {
    .td-carte-allocation { grid-template-columns: max-content minmax(0,1fr) 454px auto; }
    .td-allocation-indicateurs { grid-column: 1; }
    .td-allocation-reglage { grid-column: 4; }
    .td-allocation-code { grid-column: 3; grid-template-columns: max-content minmax(0,1fr); margin-right: 54px; }
  }
  .td-actions-tache { grid-column: 3; min-width: 0; }
  .td-actions-tache.avec-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
  .td-actions-tache .td-compteur-type { cursor: pointer; }
  .td-actions-tache .td-compteur-type:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
  @media (hover:hover) and (pointer:fine) { .td-actions-tache .td-compteur-type:hover { background: #e4e8ec; } }
  .td-repartition { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; line-height: 1.5; }
  .td-repartition > span { display: inline-flex; align-items: center; gap: 6px; }
  .td-compte-lesson { color: #6f8c56; }
  .td-compte-tutor_quiz { color: #a28443; }
  .td-compte-exercise { color: #8f7aa3; }
  .td-echeance { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #75856a; }
  .td-echeance > span { display: grid; gap: 3px; }
  .td-libelle-echeance { font-size: 11px; line-height: 1.4; }
  .td-echeance time { color: #4b653c; font-size: 13px; font-weight: 600; line-height: 1.5; }
  .td-echeance.td-retard time { color: var(--rouge); }
  .td-attribution { display: flex; flex-wrap: wrap; gap: 3px 8px; font-size: 12px; line-height: 1.6; color: #6c7b62; }
  .td-attribution strong { color: #4d653d; font-weight: 600; }
  .td-detail .td-entete .td-attribution { margin-top: 12px; }
  .td-retard { color: var(--rouge); }
  .td-badge.td-retard { background: #f9eceb; color: var(--rouge); }
  .td-etat-resume { display: flex; align-items: center; gap: 10px; }
  .td-badge { display: inline-flex; align-items: center; width: fit-content; gap: 5px; border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 500; background: #f0f3eb; color: #7b896e; }
  .td-encours { background: #eef4e6; color: #718c58; }
  .td-terminee { background: #eaf3e2; color: #638546; }
  .td-badge.td-abandonnee { background: #e2e5e9; color: #59636f; font-family: 'IBM Plex Sans', sans-serif; vertical-align: middle; }
  .td-progression-tache.td-progression-abandonnee { border-color: #59636f; background: #e2e5e9; color: #59636f; }
  .td-lien-tache { color: inherit; text-decoration: none; }
  .td-lien-tache::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
  .td-resume-tache-lien .td-entete-tache > :is(button, a) { position: relative; z-index: 1; }
  .td-entete-tache { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; min-width: 0; }
  .td-abandonner, .td-action-tache { text-align: left; border: 0; background: transparent; color: var(--rouge); padding: 4px 0; min-height: 44px; font: 600 12px/1.4 'IBM Plex Sans', sans-serif; cursor: pointer; touch-action: manipulation; }
  .td-abandonner:focus-visible, .td-action-tache:focus-visible { outline: 2px solid var(--rouge); outline-offset: 3px; }
  .td-action-tache.td-action-voir { color: var(--green); display: inline-block; text-decoration: none; }
  .td-action-tache.td-action-voir:focus-visible { outline-color: var(--green); }
  .td-confirmer-abandon { background: var(--rouge); color: #fff; }
  .td-annuler-abandon { background: #eef0f2; color: #4d5660; }
  .td-cloturee { background: #edf0f3; color: #87939e; }
  .td-avancement { display: grid; gap: 7px; font-size: 11px; color: #829473; }
  .td-jauge { display: block; height: 5px; width: 100%; border-radius: 10px; background: #edf2e7; overflow: hidden; }
  .td-jauge > span { display: block; height: 100%; background: #8eaf70; border-radius: inherit; }
  .td-groupe[open] > summary { background: var(--td-fond-ligne); border-bottom-color: transparent; border-radius: 13px 13px 0 0; }
  .td-groupe-contenu { border: 1px solid var(--td-bordure); border-top: 0; padding: 4px 16px 8px; background: #fff; border-radius: 0 0 13px 13px; }
  .td-contenus-tache { row-gap: 0; }
  .td-contenus-tache > .ligne-lecon { border: 0; border-radius: 0; background: transparent; padding: 10px 0; }
  .td-contenus-tache > .ligne-lecon.ligne-lecon-compacte { padding-block: 6px; }
  .td-fleche-contenu { display: inline-grid; place-items: center; flex: 0 0 18px; color: var(--green); }
  .td-contenus-tache .entete-ligne-lecon h3 { font-size: clamp(1rem, .915rem + .3vw, 1.25rem); }
  .td-contenus-tache .actions-ligne-lecon { display: flex; flex-wrap: wrap; justify-content: flex-end; min-width: 44px; max-width: 120px; }
  .td-origine { display: inline-flex; align-items: center; gap: 6px; color: #8a9a7d; font-size: 12px; margin-bottom: 12px; }
  .td-detail .td-entete { margin-top: 25px; }
  .td-detail .td-entete h1 { font-size: clamp(2rem, 1.7rem + 1vw, 3rem); }
  .td-tache-ouverte { padding: 22px; box-shadow: none; }
  .td-resume-ouvert { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 25px; padding-bottom: 20px; border-bottom: 1px solid #e6eddd; margin-bottom: 20px; }
  .td-resume-ouvert .td-avancement { flex-basis: 100%; }
  .td-vide { padding: 25px; text-align: center; box-shadow: none; }
  .td-vide p { color: #8a9a7a; font-size: 14px; margin: 0; }
  .td-contexte-travail { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 20px 18px 0; padding: 12px 16px; border: 1px solid #dce6d3; border-radius: 12px; background: #f0f5e9; color: #65824f; }
  .td-contexte-travail a { display: flex; align-items: center; gap: 10px; font-size: 11px; }
  .td-contexte-travail strong { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; }
  .td-contexte-travail > span { font-size: 11px; }
  .td-planificateur { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; margin: 14px 0 40px; }
  .td-calendrier { --td-coche-terminee: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 6 2 2 4-4' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background: #f7f8fa; border-radius: 22px; padding: 22px 12px 18px; box-shadow: 0 10px 30px #192a4614; min-width: 0; }
  .td-mois { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; margin-bottom: 22px; }
  .td-mois h2 { font-family: 'IBM Plex Sans', sans-serif; font-size: 24px; font-weight: 700; text-align: center; text-transform: capitalize; color: #293526; margin: 0; letter-spacing: -.02em; }
  .td-bouton-icone { display: inline-grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #3d5233; padding: 6px; min-width: 36px; min-height: 40px; }
  .td-semaine, .td-grille-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px 0; }
  .td-semaine { margin-bottom: 14px; }
  .td-semaine > span { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #45563c; }
  .td-jour { position: relative; display: grid; place-items: center; width: 34px; height: 40px; margin: 0 auto; border: 0; border-radius: 12px; background: transparent; color: #34452b; font-size: 19px; font-weight: 500; line-height: 1; }
  .td-jour.td-hors-mois { color: #9aa3b2; }
  .td-jour.td-est-aujourdhui { color: #3f6f1f; font-weight: 800; }
  .td-jour.td-est-selectionne { background: #3f6f1f; color: #fff; box-shadow: 0 8px 18px #3f6f1f47; }
  .td-jour.td-avec-travail::after { content: ''; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: #87522c; box-shadow: 0 0 0 3px #f7f8fa; }
  .td-jour.td-travail-termine::after { top: 0; right: 0; }
  .td-jour.td-est-selectionne::after { box-shadow: 0 0 0 2px #fff; }
  .td-jour:disabled { color: #c2c8d2; background: transparent; cursor: not-allowed; opacity: .55; box-shadow: none; }
  .td-jour:disabled::after { opacity: 1; }
  .td-legende { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; margin-top: 24px; font-size: 11px; color: #7a8670; }
  .td-legende > span { display: inline-flex; align-items: center; gap: 7px; }
  .td-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #87522c; }
  .td-jour.td-travail-termine::after, .td-legende i.td-puce-terminee { width: 12px; height: 12px; background: var(--green) var(--td-coche-terminee) center / 12px 12px no-repeat; }
  .td-jour.td-avec-travail:not(.td-travail-termine)::after, .td-legende i:not(.td-puce-terminee) { width: 10px; height: 10px; background: #87522c; }
  .td-jour.td-avec-travail.td-travail-retard::after, .td-legende i.td-puce-retard { background: var(--rouge); }
  .td-jour.td-avec-travail:not(.td-travail-termine)::after { top: 0; right: 0; }
  .td-jour.td-avec-travail:not(.td-travail-termine):disabled { opacity: 1; }

  .td-separation-agenda { display: none; }
  .td-travail-du-jour { min-width: 0; min-height: 0; max-height: 430px; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #a9bd98 #eaf0e4; padding: 8px 14px 4px 0; }
  .td-travail-du-jour::-webkit-scrollbar { width: 6px; }
  .td-travail-du-jour::-webkit-scrollbar-track { background: #eaf0e4; border-radius: 8px; }
  .td-travail-du-jour::-webkit-scrollbar-thumb { background: #a9bd98; border-radius: 8px; }
  .td-travail-du-jour:focus-visible { outline: 2px solid #81a264; outline-offset: 4px; border-radius: 4px; }
  .td-taches-du-jour { display: grid; gap: 26px; }
  .td-rappel-tache { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; align-items: start; }
  .td-date-rappel { position: relative; display: grid; place-items: center; width: 58px; height: 66px; border-radius: 15px; background: #e9eee1; color: #6ea437; font-size: 36px; font-weight: 700; line-height: 1; }
  .td-heure-rappel { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; height: 24px; padding: 0 7px; border-radius: 999px; background: inherit; color: inherit; box-shadow: 0 0 0 2px var(--paper); font-size: 11px; font-weight: 600; line-height: 1; }
  .td-rappel-tache[data-etat="faire"] .td-date-rappel, .td-rappel-tache[data-etat="faire"] .td-voir-tache, .td-rappel-tache[data-etat="retard"] .td-date-rappel, .td-rappel-tache[data-etat="retard"] .td-voir-tache { background: var(--td-fond-date); color: var(--td-encre-date); }
  .td-rappel-texte { min-width: 0; }
  .td-rappel-tache h3 { margin: 0 0 10px; color: #33482a; font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; }
  .td-rappel-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
  .td-compteurs-rappel { margin: 0; gap: 10px; }
  .td-compteurs-moyennes { gap:16px 18px; }
  .td-compteurs-rappel .td-compteur-nombre { white-space:nowrap; }
  .td-compteur-type { border: 1px solid #dfe6d6; font-size: 11px; line-height: 1.4; }
  .td-mode-correction { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 44px; color: var(--td-encre-date, #87522c); }
  .td-compteurs-rappel .td-compteur-type, .td-actions-tache > .td-compteur-type, .td-allocation-reglage > .td-compteur-type { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 10px; }
  .td-compteur-nombre { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: inherit; color: inherit; box-shadow: 0 0 0 2px var(--paper); font-size: 11px; font-weight: 700; line-height: 1; }
  .td-rappel-termine .td-compteurs-rappel .td-compteur-type { text-decoration: line-through; }
  .td-voir-tache { padding: 10px 14px; gap: 8px; font-size: 12px; min-height: 44px; }
  .td-page .td-jour-vide { font-size: 15px; line-height: 1.5; color: #89967c; }
  .td-titre-liste { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin: 0 0 20px; padding-top: 12px; }
  .td-titre-liste h2 { margin: 0; font-size: 30px; color: #354b2b; }
  .td-titre-liste > span { font-size: 13px; color: #859777; }
  .td-dialogue { width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 32px); border: 1px solid #dbe5d3; border-radius: 22px; padding: 24px; color: var(--ink); background: #fff; box-shadow: 0 30px 90px #1c321e33; }
  .td-dialogue::backdrop { background: #1b2c1c80; backdrop-filter: blur(4px); }
  .td-dialogue h2 { margin: 10px 0 15px; font-size: 29px; }
  .td-dialogue > p { color: #829174; font-size: 14px; }
  .td-dialogue form { display: grid; gap: 15px; }
  .td-dialogue-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-top: 5px; }
  .td-dialogue-actions .button { font-size: 13px; gap: 10px; }
  .td-dialogue-actions .text-link { font-size: 13px; }
  .td-dialogue .td-demo { margin: 0; font-size: 11px; }
  .td-page :is(button, input, select):focus-visible, .td-dialogue :is(button, input, select):focus-visible { outline: 2px solid #739c53; outline-offset: 3px; }
  .td-dialogue .text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 13px; }
  .td-dialogue .button:disabled { opacity: .4; }
  .td-page :is(button, summary, a):focus-visible { outline: 2px solid #81a264; outline-offset: 3px; }
  @media (hover:hover) and (pointer:fine) {
    .td-categories .filtre-abandonnees:hover { background: #59636f; color: #fff; }
    .td-abandonner, .td-action-tache { min-height: 24px; }
    .td-abandonner:hover, .td-action-tache:hover { text-decoration: underline; text-underline-offset: 3px; }
    .td-rappel-tache[data-etat="retard"] .td-voir-tache:hover { background: var(--rouge); color: #fff; box-shadow: 0 8px 20px #c6534f24; }
    .td-rappel-tache[data-etat="faire"] .td-voir-tache:hover { background: #f3d4be; color: #744120; box-shadow: 0 8px 20px #87522c24; }
    .td-groupe > .td-resume-tache:hover { background: var(--td-fond-ligne); }
  }
  @media (min-width: 481px) {
    .td-calendrier { padding: 28px 26px 22px; max-width: 500px; }
    .td-mois h2 { font-size: 30px; }
    .td-semaine, .td-grille-jours { gap: 14px 10px; }
    .td-semaine > span { font-size: 13px; }
    .td-jour { width: 40px; height: 40px; font-size: 22px; border-radius: 14px; }

    .td-rappel-tache { grid-template-columns: 78px minmax(0, 1fr); gap: 20px; }
    .td-date-rappel { width: 78px; height: 84px; font-size: 48px; }

  }
  @media (min-width: 701px) {
    .td-groupe > .td-resume-tache { grid-template-columns: max-content max-content minmax(0, 1fr) max-content; }
    .td-date-rappel.td-date-tache, .td-progression-tache { grid-row: 1; }
    .td-actions-tache { grid-column: 4; align-self: center; }
  }
  @media (min-width: 801px) {
    .td-groupe-contenu { padding: 4px 18px 8px; }
    .td-resume-ouvert .td-avancement { flex: 1; min-width: 200px; }
    .td-tache-ouverte { padding: 25px; }
  }
  @media (min-width: 981px) {
    .td-contenus-tache .actions-ligne-lecon { flex-wrap: nowrap; max-width: none; }
  }
  @media (min-width: 1001px) {
    .td-planificateur { grid-template-columns: minmax(340px, 430px) 1px minmax(0, 1fr); gap: 28px; }
    .td-separation-agenda { display: block; width: 1px; height: 100%; align-self: stretch; background: #111; opacity: .95; }
    .td-travail-du-jour { max-height: none; align-self: stretch; contain: size; }
    .td-rappel-tache { grid-template-columns: 92px minmax(0, 1fr); }
    .td-heure-rappel { font-size: 13px; }
    .td-date-rappel { width: 92px; height: 92px; border-radius: 18px; font-size: 58px; }
  }
  @media (hover:hover) and (pointer:fine) {
    .td-jour:hover:not(:disabled):not(.td-est-selectionne), .td-bouton-icone:hover { background: #2f8f5b14; }
  }
  html.td-creation-active, html.td-creation-active body { overflow: hidden; overscroll-behavior: none; }
  /* Deux vues intégrées, avec le glissement numérique/PDF des cas pratiques. */
  .td-vues { position: relative; overflow: hidden; }
  .td-vues-lecture { overflow-anchor: none; }
  .td-vues-lecture:not(.td-creation-ouverte) { overflow-x: clip; overflow-y: visible; }
  .td-vue-tableau, .td-vue-creation { width: 100%; transition: transform 520ms cubic-bezier(.22,1,.36,1), opacity 400ms ease, visibility 520ms; }
  .td-vue-tableau { position: relative; transform: translateX(0); opacity: 1; visibility: visible; }
  .td-vue-creation { position: absolute; top: 0; left: 0; height: var(--td-hauteur-creation, 600px); display: flex; flex-direction: column; transform: translateX(100%); opacity: 0; visibility: hidden; background: #fff; border-radius: 13px; }
  .td-creation-ouverte { height: var(--td-hauteur-creation); }
  .td-creation-ouverte > .td-vue-tableau { position: absolute; top: 0; left: 0; transform: translateX(-100%); opacity: 0; visibility: hidden; }
  .td-creation-ouverte > .td-vue-creation { transform: translateX(0); opacity: 1; visibility: visible; }
  .td-vue-creation[aria-hidden="true"] :is(.td-vue-tableau,.td-vue-creation) { visibility: hidden; }
  .td-creation-entete { flex: 0 0 auto; padding: 8px 14px 14px; border-bottom: 1px solid var(--line); }
  .td-retour-creation { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--green); font-size: 13px; font-weight: 600; touch-action: manipulation; }
  .td-retour-creation .icon { transform: rotate(180deg); }
  .td-creation-entete h1 { margin: 4px 0 0; font-size: clamp(26px, 1.3rem + 1vw, 36px); }
  .td-form-creation { display: flex; flex-direction: column; min-height: 0; flex: 1; }
  .td-creation-corps { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; padding: 18px 14px; scrollbar-width: thin; scrollbar-color: #a9bd98 #f7f7f7; }
  .td-vues:not(.td-creation-page) .td-creation-corps:has(.td-selecteur-niveau[open]:not([hidden] *), .menu-matieres-revisions:not([hidden]):not([hidden] *), details[open]:not([hidden] *) > .liste-etapes-ariane, .td-affiche-apercu:not([hidden] *), dialog[open]) { overflow: hidden; }
  .td-creation-layout { display: grid; gap: 24px; min-width: 0; align-items: start; }
  .td-creation-planning, .td-creation-programme { min-width: 0; }
  .td-creation-agenda { display: grid; gap: 24px; min-width: 0; align-content: start; }
  .td-creation-programme { display: grid; grid-template-columns: minmax(0,1fr); align-content: start; }
  .td-editeur-contenus, .td-apercu-jour { grid-area: 1 / 1; min-width: 0; }
  .td-affiche-apercu .td-editeur-contenus { visibility: hidden; }
  .td-apercu-jour { position: sticky; top: 0; align-self: start; max-height: var(--td-hauteur-apercu); overflow-y: auto; overscroll-behavior: contain; background: #fff; scrollbar-width: thin; scrollbar-color: #a9bd98 #f7f7f7; }
  .td-apercu-superpose { position: relative; }
  .td-apercu-superpose > .td-apercu-jour { position: absolute; inset: 0; max-height: 100%; }
  span.td-jour { cursor: default; }
  .td-apercu-jour[hidden] { display: none; }
  .td-entete-apercu { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .td-entete-apercu h2 { margin: 0; color: #354b2b; font-size: 25px; }
  .td-creation-programme .td-date-apercu { margin: 4px 0 24px; color: #7a8670; font-size: 14px; text-transform: capitalize; }
  .td-apercu-jour .td-taches-du-jour { gap: 24px; padding-top: 6px; }



  .menu-parcours.td-selecteur-programme { position: static; inset: auto; z-index: auto; display: block; width: 100%; max-height: none; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .td-selecteur-programme > .td-selecteur-niveau { position: relative; margin: 0 0 12px; padding: 0; border: 1px solid #e5e9df; border-radius: 17px; background: #fff; box-shadow: none; }
  .td-selecteur-niveau nav button { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 14px; text-align: left; }
  .td-selecteur-programme > .td-selecteur-niveau > .td-commande-choix { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 6px 12px; margin: 0; gap: 12px; font: 600 14px/1.35 'IBM Plex Sans',sans-serif; }
  .td-invitation-niveau { min-width: 0; white-space: nowrap; }
  .td-selecteur-niveau.td-selecteur-vers-haut .contenu-panneau-lecon { top: auto; bottom: calc(100% + 6px); }
  .td-selecteur-programme .td-parcours-choix { padding: 0 0 12px; }
  .td-selecteur-programme.td-selecteur-integre .td-parcours-choix { padding-bottom: 0; }
  .td-selecteur-integre .course-path.fil-ariane { margin-bottom: 0; }
  .td-parcours-choix .td-selecteur-etape { position: relative; flex: 1; min-width: 0; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; }
  .td-parcours-choix .fil-ariane summary { display: flex; align-items: center; justify-content: flex-start; text-align: left; gap: 10px; min-width: 0; min-height: 46px; width: 100%; padding: 8px; border-radius: 11px; list-style: none; color: var(--menu-encre); font: 400 14px/1.35 'IBM Plex Sans',sans-serif; cursor: pointer; overflow-wrap: anywhere; }
  .td-parcours-choix summary::-webkit-details-marker { display: none; }
  .td-parcours-choix .fil-ariane .etape-finale-ariane { background: var(--menu-fond); font-weight: 600; box-shadow: inset 0 0 0 1px var(--menu-trait); }
  .td-parcours-choix .fil-ariane .icone-etape-ariane { display: grid; }
  .td-parcours-choix .td-selecteur-etape[open] { z-index: 6; }
  .td-parcours-choix .contenu-panneau-lecon nav { display: grid; }
  .td-parcours-choix .fil-ariane .etape-parcours-fixe { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; padding: 8px; }
  .td-parcours-choix .liste-etapes-ariane .contenu-panneau-lecon { position: static; margin-block: 6px; box-shadow: none; }
  .td-parcours-choix .liste-etapes-ariane .td-selecteur-etape { width: 100%; }
  .td-selecteur-compact .fil-ariane .td-selecteur-etape > summary { min-height: 46px; }
  .td-selecteur-compact .fil-ariane .etape-finale-ariane .libelle-ariane { white-space: normal; overflow-wrap: anywhere; }


  @media (hover:hover) and (pointer:fine) { .td-parcours-choix .fil-ariane summary:hover { background: var(--menu-survol); } }

  .td-creation-programme .td-selection-creation { margin-top: 18px; }
  .td-selection-groupe { margin: 0 0 12px; padding: 0; width: 100%; border: 0; border-radius: 11px; background: #fff; }
  .td-selection-groupe[hidden] { display: none; }
  .td-selection-groupe > summary { width: 100%; border: 1px solid #e1e7d9; border-radius: 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 6px 12px; color: #405b2e; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
  .td-selection-groupe > summary::-webkit-details-marker { display: none; }
  .td-selection-groupe .chevron-panneau-lecon { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #d1dfbf; border-radius: 9px; background: #edf3e3; color: #4d712f; }
  .td-selection-groupe[open] .chevron-panneau-lecon svg { transform: rotate(180deg); }
  .td-selection-groupe[open] > summary { border-radius: 11px 11px 0 0; }
  .td-interrupteurs-groupe { padding: 2px 12px 8px; border: 1px solid #e1e7d9; border-top: 0; border-radius: 0 0 11px 11px; }
  .td-interrupteur-groupe { position: relative; display: grid; grid-template-columns: minmax(0,1fr) max-content 44px; align-items: center; gap: 10px; min-height: 44px; color: #52644b; cursor: pointer; touch-action: manipulation; user-select: none; }
  .td-interrupteur-groupe:first-child { border-bottom: 1px solid #e5e9df; margin-bottom: 6px; padding-bottom: 6px; }
  .td-libelle-groupe { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13px; line-height: 1.35; }
  .td-icone-groupe { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; }
  .td-icone-groupe.acces-tous { background: #eef0f2; color: #4d5660; }
  .td-compte-groupe { color: #7c8974; font-size: 11px; font-variant-numeric: tabular-nums; }
  .td-interrupteur-groupe input { position: absolute; right: 0; width: 44px; height: 26px; margin: 0; opacity: 0; }
  .td-switch-ui { position: relative; display: block; width: 44px; height: 26px; border-radius: 999px; background: #3a3f45; transition: background .25s ease; pointer-events: none; }
  .td-switch-ui::after { content: ''; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0000002e; transition: transform .25s ease; }
  .td-interrupteur-groupe input:checked + .td-switch-ui { background: var(--green); }
  .td-interrupteur-groupe input:checked + .td-switch-ui::after { transform: translateX(18px); }
  .td-interrupteur-groupe input:indeterminate + .td-switch-ui { background: #fae5d6; }
  .td-interrupteur-groupe input:indeterminate + .td-switch-ui::after { background: #87522c; transform: translateX(9px); }
  .td-interrupteur-groupe:has(input:focus-visible) { outline: 2px solid #739c53; outline-offset: 2px; border-radius: 5px; }
  @media (prefers-reduced-motion: reduce) { .td-switch-ui, .td-switch-ui::after { transition: none; } }
  body.reduce-motion :is(.td-switch-ui,.td-switch-ui::after) { transition: none; }
  .td-liste-choix { gap: 0; grid-template-columns: minmax(0,1fr) max-content; }
  .td-liste-choix > .ligne-lecon { border: 0; border-bottom: 1px solid #edf0e8; border-radius: 0; padding: 8px 0; column-gap: 8px; background: transparent; }
  .td-liste-choix .entete-ligne-lecon h3 { min-width: 0; flex: 1; font-size: clamp(15px, .875rem + .25vw, 18px); line-height: 1.3; }
  .td-liste-choix .entete-ligne-lecon { gap: 8px; }
  .td-liste-choix h3 label { cursor: pointer; }
  .td-liste-choix .actions-ligne-lecon { display: flex; flex-wrap: nowrap; justify-content: flex-end; min-width: 0; gap: 6px; }
  .td-interrupteur-ligne { position: relative; display: flex; align-items: center; flex: 0 0 32px; width: 32px; height: 32px; cursor: pointer; touch-action: manipulation; }
  .td-interrupteur-ligne::before { content: ''; position: absolute; inset: -6px; }
  .td-interrupteur-ligne input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; }
  .td-interrupteur-ligne .td-switch-ui { width: 32px; height: 20px; }
  .td-interrupteur-ligne .td-switch-ui::after { top: 3px; left: 3px; width: 14px; height: 14px; }
  .td-interrupteur-ligne input:checked + .td-switch-ui { background: var(--green); }
  .td-interrupteur-ligne input:checked + .td-switch-ui::after { transform: translateX(12px); }
  .td-interrupteur-ligne input:indeterminate + .td-switch-ui { background: #fae5d6; }
  .td-interrupteur-ligne input:indeterminate + .td-switch-ui::after { background: #87522c; transform: translateX(6px); }
  .td-interrupteur-ligne:has(input:focus-visible) { outline: 2px solid #739c53; outline-offset: 3px; border-radius: 6px; }
  .td-interrupteur-ligne.td-interrupteur-nomme { width: auto; height: auto; min-height: 44px; flex-basis: auto; gap: 10px; }
  .td-interrupteur-nomme .td-switch-ui { flex-shrink: 0; }
  @media (hover: hover) and (pointer: fine) { .td-interrupteur-ligne.td-interrupteur-nomme { min-height: 32px; } }
  .td-liste-choix .actions-ligne-lecon .td-selection-contenu { width: 35px; min-width: 35px; height: 35px; min-height: 35px; padding: 7px; border-radius: 8px; touch-action: manipulation; }
  .td-liste-choix .td-selection-contenu > .icon { width: 18px; height: 18px; }
  .td-selection-contenu::before { content: ''; position: absolute; inset: -3px; }
  .td-selection-contenu:is([aria-pressed="true"],[aria-checked="true"]) { box-shadow: 0 0 0 2px #739c53; }
  .td-selection-contenu .coche-activite { pointer-events: none; width: 15px; height: 15px; top: -5px; right: -5px; }
  .td-selection-contenu .coche-activite .icon { width: 9px; height: 9px; }
  .td-selection-vide { grid-column: 1 / -1; margin: 16px 0; color: #7b8971; font-size: 14px; }
  .td-plus-contenus { margin-top: 18px; width: 100%; font-size: 13px; }
  .td-plus-contenus[hidden] { display: none; }
  .td-barre-creation { position: relative; z-index: 8; display: grid; flex: 0 0 auto; grid-template-columns: auto minmax(0,1fr) auto auto auto; align-items: center; gap: 4px; padding: 10px 6px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 13px 13px; }
  .td-total-selection { display: inline-flex; flex-wrap: nowrap; align-items: baseline; gap: 4px; color: #5e7451; line-height: 1.2; white-space: nowrap; }
  .td-total-selection strong { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--green); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .td-libelle-total { font-size: 11px; }
  .td-libelle-selection { display: none; }
  .td-volume-selection { display: inline-flex; flex-wrap: nowrap; justify-content: center; align-items: baseline; gap: 6px; min-width: 0; color: #52644b; white-space: nowrap; }
  .td-volume-selection strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.2; font-variant-numeric: tabular-nums; }
  .td-libelle-volume, .td-libelle-heure { display: none; }
  .td-date-creation { display: inline-flex; align-items: baseline; gap: 6px; color: #7a8670; white-space: nowrap; font-size: 13px; }
  .td-date-creation > span { display: none; }
  .td-date-creation time { color: #385626; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .td-heure-creation { position: static; margin: 0; padding: 0; min-width: 0; }
  .td-heure-creation > summary { display: inline-flex; align-items: center; min-height: var(--hauteur-controle); list-style: none; cursor: pointer; color: #385626; font-size: 16px; font-weight: 600; white-space: nowrap; touch-action: manipulation; }
  .td-heure-creation > summary::-webkit-details-marker { display: none; }
  .td-heure-creation time { text-decoration: underline; text-decoration-color: #cbd6c2; text-underline-offset: 4px; font-variant-numeric: tabular-nums; }
  .td-heure-panneau { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 10; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 200px; max-width: calc(100vw - 24px); padding: 12px; border: 1px solid #e1e7d9; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px #21301a18; }
  .td-heure-panneau label { display: grid; gap: 8px; min-width: 0; color: #72816a; font-size: 12px; text-align: center; }
  .td-heure-panneau select { appearance: none; width: 100%; min-width: 0; height: 170px; margin: 0; padding: 0; border: 0; border-radius: 7px; background: #fff; color: #52644b; font: 400 19px/1.5 'IBM Plex Sans',sans-serif; text-align: center; scrollbar-width: thin; scrollbar-color: #c9d4c0 #fff; }
  .td-heure-panneau option { padding: 6px 8px; border-radius: 6px; }
  .td-heure-panneau option:checked { background: #eaf1df; color: #385626; font-weight: 600; }
  .td-barre-creation .button { justify-self: end; min-height: 44px; padding: 10px 4px; gap: 0; font-size: 12px; white-space: nowrap; }
  .td-barre-creation .button .icon { display: none; }
  .td-barre-creation .button:disabled { opacity: .4; }
  @media (min-width: 701px) {
    .td-creation-entete, .td-creation-corps { padding-left: 24px; padding-right: 24px; }
    .td-barre-creation { padding-inline: 16px; gap: 18px; }
  }
  @media (min-width: 1001px) {
    .td-barre-creation { grid-template-columns: auto auto auto auto minmax(0,1fr); padding-inline: 24px; gap: 28px; }
    .td-total-selection { gap: 6px; }
    .td-total-selection strong { font-size: 26px; }
    .td-libelle-total { font-size: 14px; }
    .td-libelle-selection { display: inline; }
    .td-date-creation > span { display: inline; }
    .td-date-creation time { font-size: 18px; }
    .td-volume-selection { gap: 6px; }
    .td-volume-selection strong { font-size: 18px; }
    .td-libelle-volume { display: inline; color: #7a8670; font-size: 13px; }
    .td-libelle-heure { display: inline; margin-right: 6px; color: #7a8670; font-size: 13px; }
    .td-heure-creation > summary { font-size: 18px; }
    .td-barre-creation .button { padding-inline: 18px; font-size: 14px; gap: 8px; }
    .td-barre-creation .button .icon { display: block; }
  }
  @media (min-width: 1001px) {
    .td-creation-layout { grid-template-columns: minmax(300px,400px) 1px minmax(0,1fr); gap: 28px; }
    .td-creation-agenda { position: sticky; top: 106px; }
  }
  @media (min-width: 1001px) and (max-width: 1250px) {
    .td-barre-creation { gap: 24px; }
    .td-libelle-selection, .td-libelle-volume, .td-date-creation > span { display: none; }
  }
  @media (max-width: 370px) {
    .td-barre-creation { padding-inline: 4px; }
    .td-total-selection { gap: 2px; }
    .td-libelle-total { font-size: 9px; }
    .td-barre-creation .button { font-size: 10px; padding-inline: 3px; }
    .td-heure-creation > summary { font-size: 13px; }
  }
  @media (prefers-reduced-motion: reduce) { .td-vue-tableau, .td-vue-creation { transition: none; } }
  body.reduce-motion :is(.td-vue-tableau,.td-vue-creation) { transition: none; }

}

/* Variante à étapes du panneau partagé de création de tâche. */
@layer interface {
  .td-navigation-etapes { display: none; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .td-navigation-etapes ol { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: thin; }
  .td-navigation-etapes li { flex: 0 0 auto; }
  .td-navigation-etapes button:disabled { opacity: .45; cursor: default; }
  .td-etape-libelle { white-space: nowrap; }
  .td-parcours-etape { min-width: 0; }
  .td-parcours-etape > h2 { margin: 0 0 22px; font-size: clamp(1.25rem, 1.125rem + .4vw, 1.5rem); }
  .td-parcours-etape[hidden], .td-barre-parcours [hidden], .td-parcours-etape [hidden] { display: none; }
  .td-form-creation > .ens-erreur { margin: 12px 14px; }
  .td-liste-destinataires { column-count: 1; column-gap: 24px; }
  .td-liste-destinataires .td-libelle-groupe { font-size: 14px; }
  .td-liste-destinataires .td-compte-groupe { font-size: 12px; }
  .td-liste-destinataires > label { break-inside: avoid; }
  .td-liste-destinataires > .td-interrupteur-groupe:first-child { column-span: all; width: 100%; max-width: 460px; }
  @media (min-width: 390px) { .td-liste-destinataires { column-count: 2; } }
  @media (min-width: 1001px) { .td-liste-destinataires { column-count: 3; column-gap: 72px; } }
  @media (min-width: 1280px) { .td-liste-destinataires { column-count: 4; } }
  .ens-parcours-destinataires .filtre-revisions { width: 100%; }
  .td-planification-dates, .td-champs-planification { display: grid; align-content: start; gap: 22px; min-width: 0; }
  .td-planification-dates > div { min-width: 0; }
  .td-planification-dates h3 { margin: 0 0 10px; }
  .td-planification-dates .td-creation-planning { display: none; position: static; }
  .td-champs-planification > .filtre-revisions { width: 100%; margin-bottom: 0; }
  .td-champ { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #526747; font-size: var(--texte-secondaire); font-weight: 600; }
  .td-date-heure { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }

  .td-choix-horaire .td-heure-creation { position: relative; }
  .td-message-apprenants { white-space: pre-wrap; overflow-wrap: anywhere; }
  .td-barre-creation.td-barre-parcours { grid-template-columns: 1fr 1fr; padding: 12px 14px; gap: 10px; }
  .td-resume-parcours { grid-column: 1 / -1; display: none; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: center; width: 100%; justify-self: center; color: #52644b; }
  .td-resume-parcours > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; margin: 0; padding: 2px 8px; font-size: 11px; font-weight: 400; line-height: 1.3; }
  .td-resume-parcours > span + span { border-left: 1px solid var(--line); }
  .td-resume-parcours > span strong { color: #385626; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  :is(.td-barre-parcours,.td-barre-personnelle) > .button { padding: 10px 14px; gap: 8px; font-size: 13px; }
  .td-barre-parcours > [data-ens-precedent] { justify-self: start; grid-row: 1; }
  .td-barre-parcours > [data-ens-suivant], .td-barre-parcours > [data-td-creer-tache] { grid-column: 2; grid-row: 1; }
  @media (min-width: 701px) {
    .td-planification-dates .td-creation-planning { display: block; }
    .td-navigation-etapes { display: block; padding-inline: 24px; }
    .td-navigation-etapes ol { flex-wrap: wrap; overflow: visible; }
    .td-barre-creation.td-barre-parcours { grid-template-columns: minmax(0,1fr) auto auto; padding-inline: 24px; gap: 16px; }
    .td-resume-parcours { display: grid; grid-column: 1; justify-self: start; }
    .td-barre-parcours > [data-ens-precedent] { grid-column: 2; }
    .td-barre-parcours > [data-ens-suivant], .td-barre-parcours > [data-td-creer-tache] { grid-column: 3; grid-row: 1; }
  }
  @media (min-width: 1001px) {
    .td-planification-dates { grid-template-columns: minmax(0,1fr) minmax(300px,430px); gap: 36px; }
    .td-resume-parcours .td-libelle-selection { display: none; }
  }
}

@layer interface {
  .td-selection-groupe-colonnes .td-interrupteur-groupe { grid-template-columns: 44px minmax(0,max-content) max-content; justify-content: start; }
  .td-selection-groupe-colonnes .td-switch-ui { grid-column: 1; grid-row: 1; }
  .td-selection-groupe-colonnes .td-libelle-groupe { grid-column: 2; grid-row: 1; }
  .td-selection-groupe-colonnes .td-compte-groupe { grid-column: 3; grid-row: 1; }
  .td-selection-groupe-colonnes .td-interrupteur-groupe input { left: 0; right: auto; }
  .td-selection-groupe-colonnes[data-td-selection-colonnes] > summary { display: none; }
  .td-selection-groupe-colonnes[data-td-selection-colonnes] > .td-interrupteurs-groupe { display: grid; grid-template-columns: repeat(var(--td-colonnes-selection,3),minmax(0,1fr)); gap: 4px 72px; border: 0; border-radius: 0; padding: 0; margin-bottom: 22px; }
  .td-selection-groupe-colonnes[data-td-selection-colonnes] .td-interrupteur-groupe:first-child { border: 0; margin: 0; padding: 0; }
}

@layer interface {
  .td-modes-correction:not(:empty) { margin-top: 28px; }
  .td-mode-choix { display: flex; gap: 6px; }
}

/* Sélecteur de date partagé : dialogue tactile et clavier. */
@layer interface {
  .td-choix-date { min-width: 0; font-size: var(--texte-secondaire); }
  .td-date-commande { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-width: 0; min-height: var(--hauteur-controle); padding: 10px 8px; border: 1px solid #dce5d4; border-radius: 10px; background: #fff; color: #385626; font: inherit; font-weight: 500; cursor: pointer; touch-action: manipulation; }
  .td-date-commande > span { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .td-date-commande > svg { flex: 0 0 16px; color: #72816a; }
  .td-datepicker { width: min(360px,calc(100vw - 16px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 12px; border: 1px solid #e1e7d9; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 16px 48px #21301a24; overflow-y: auto; overscroll-behavior: contain; }
  .td-datepicker::backdrop { background: #21301a55; }
  .td-datepicker .td-entete-apercu { margin-bottom: 12px; }
  .td-datepicker .td-entete-apercu h3 { margin: 0; font-size: 18px; line-height: 1.3; }
  .td-datepicker .td-mois { margin-bottom: 18px; }
  .td-datepicker .td-mois h2 { font-size: 20px; }
  .td-datepicker [data-td-date-mois="-1"] svg { transform: rotate(180deg); }
  .td-datepicker .td-grille-jours { gap: 2px 0; }
  .td-datepicker .td-semaine { gap: 0; margin-bottom: 8px; }
  .td-datepicker .td-jour { width: 100%; height: 44px; font-size: 15px; border-radius: 10px; }
  .td-datepicker :is(.td-jour,.td-bouton-icone):disabled { opacity: .35; cursor: default; }
  .td-datepicker .td-jour:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
  .td-datepicker > .button { width: 100%; min-height: 44px; margin-top: 14px; }
}

/* Le résumé conserve un seul ensemble de colonnes, dans l’ordre du parcours. */
@layer interface {
  .td-resume-parcours { row-gap: 10px; }
  .td-resume-parcours > span:nth-child(4) { border-left: 0; }
  .td-resume-parcours > .td-resume-classe strong { font-size: 13px; white-space: normal; text-align: center; }
  .td-resume-date-valeur { display: grid; place-items: center; min-height: 44px; margin-top: 11px; color: #385626; font-size: 18px; font-weight: 600; }
  @media (min-width: 701px) {
    .td-barre-creation.td-barre-parcours { grid-template-columns: 1fr 1fr; }
    .td-resume-parcours { grid-column: 1 / -1; }
    .td-barre-parcours > [data-ens-precedent] { grid-column: 1; grid-row: 2; }
    .td-barre-parcours > [data-ens-suivant], .td-barre-parcours > [data-td-creer-tache] { grid-column: 2; grid-row: 2; }
  }
  @media (min-width: 1001px) {
    .td-barre-creation.td-barre-parcours { grid-template-columns: minmax(0,1fr) auto auto; }
    .td-resume-parcours { grid-column: 1; grid-template-columns: minmax(100px,1.4fr) repeat(5,minmax(0,1fr)); }
    .td-resume-parcours > span:nth-child(4) { border-left: 1px solid var(--line); }
    .td-barre-parcours > [data-ens-precedent] { grid-column: 2; grid-row: 1; }
    .td-barre-parcours > [data-ens-suivant], .td-barre-parcours > [data-td-creer-tache] { grid-column: 3; grid-row: 1; }
  }
}

/* Variante dans le flux de la page : aucune zone de défilement dans le panneau. */
@layer interface {
  .td-creation-page.td-creation-ouverte { height: auto; overflow-x: clip; overflow-y: visible; }
  .td-creation-page.td-creation-ouverte > .td-vue-tableau { display: none; }
  .td-creation-page.td-creation-ouverte > .td-vue-creation { position: relative; height: auto; min-height: var(--td-hauteur-creation,600px); }
  .td-creation-page .td-form-creation { flex: 1 0 auto; min-height: auto; }
  .td-creation-page .td-creation-corps { flex: 1 0 auto; min-height: auto; overflow: visible; overscroll-behavior: auto; scrollbar-gutter: auto; }
  .td-creation-page .td-barre-creation { position: sticky; bottom: var(--td-navigation-basse,0px); }
}

@layer interface {
  .td-duree-selection { display: none; }
  @media (min-width: 701px) { .td-duree-selection { display: inline; } }
}

@layer interface {
  .td-liste-choix .td-choix-actions-multiples :is(.actions-ligne-lecon,.td-mode-choix) { flex-wrap: wrap; max-width: 76px; }
  @media (min-width: 701px) { .td-liste-choix .td-choix-actions-multiples :is(.actions-ligne-lecon,.td-mode-choix) { flex-wrap: nowrap; max-width: none; } }
}

/* Résumé personnel : contenus, temps prévu et échéance en lecture seule. */
@layer interface {
  .td-barre-creation.td-barre-personnelle { grid-template-columns: minmax(0,1fr) auto; padding: 12px 14px; gap: 16px; }
  .td-barre-personnelle > [data-td-creer-tache] { grid-column: 2; }
  @media (min-width: 701px) {
    .td-barre-creation.td-barre-personnelle { padding-inline: 24px; }
    .td-resume-parcours.td-resume-personnel { grid-column: 1; grid-template-columns: repeat(3,minmax(0,1fr)); }
  }
}

/* Variante résultats : le titre garde sa largeur de lecture sur petit écran. */
@layer interface {
  @media (max-width:700px) {
    .td-contenus-resultats { grid-template-columns:minmax(0,1fr); }
    .td-contenus-resultats > .ligne-lecon { grid-template-columns:minmax(0,1fr); row-gap:12px; }
    .td-contenus-resultats .actions-ligne-lecon { grid-column:1; justify-self:end; max-width:none; }
  }
}

/* Actions communes aux éditeurs de leçon et de quiz. */
@layer interface {
  .td-vues-lecture { --td-navigation-basse: calc(var(--hauteur-menu-mobile) + var(--zone-securisee-basse)); }
  .td-vues-lecture > .td-barre-edition { position: fixed; bottom: var(--td-navigation-basse,0px); }
  .td-vues-lecture > .td-vue-creation { padding-bottom: var(--hauteur-actions-edition,0px); }
  .td-barre-creation.td-barre-edition { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 12px 14px; }
  .td-barre-edition > .button { justify-self: stretch; padding: 10px 14px; gap: 8px; font-size: 13px; white-space: normal; text-align: center; }
  @media (min-width:701px) {
    .td-vues-lecture { --td-navigation-basse: 0px; }
    .td-barre-creation.td-barre-edition { grid-template-columns: auto auto; justify-content: end; padding-inline: 24px; gap: 16px; }
  }
}

  /* Bilan agrégé : les indicateurs disposent de toute la largeur sur mobile. */
  @media (max-width: 700px) {
    .td-resume-bilan > .td-actions-tache { grid-column: 1 / -1; grid-row: 2; }
  }

  /* Attribution par diplôme : interrupteur et dépliage indépendants. */
  .td-reglages-principaux { display: grid; gap: 22px; min-width: 0; }
  .td-groupe > .td-resume-attribution { grid-template-columns: minmax(0,1fr) max-content; padding: 6px 12px; }
  .td-resume-attribution > .td-groupe-principal { grid-column: 1; grid-row: 1; }
  .td-resume-attribution > .td-actions-tache { grid-column: 2; grid-row: 1; flex-wrap: nowrap; }
  .td-resume-attribution [aria-expanded="true"] > .icon { transform: rotate(90deg); }
  .td-choix-matieres { border: 0; margin: 0; padding: 0; min-width: 0; }


  .td-selecteur-attributions { display: grid; gap: 10px; min-width: 0; }

  .td-resume-attribution > .td-groupe-principal { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
  .td-groupe > .td-resume-attribution { column-gap: 6px; padding-inline: 8px; }
  .td-groupe > .td-resume-attribution .td-groupe-titre { font-size: 14px; line-height: 1.2; white-space: nowrap; }
  .td-resume-attribution > .td-actions-tache { gap: 6px; }
  .td-resume-attribution .td-attribution { flex-shrink: 0; font-size: 9px; }
  .setting-option.td-option-compacte { min-height: 44px; padding-block: 6px; }

  @media (max-width: 360px) { .td-unite-attribution { display: none; } }

  .td-groupe > .ligne-lecon-compacte.td-resume-attribution { min-height: 44px; padding-block: 1px; }
  .td-liste-attributions { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .setting-option.td-option-compacte strong { font-size: 14px; line-height: 1.25; }
  @media (hover: hover) and (pointer: fine) {
    .setting-option.td-option-compacte { min-height: 36px; padding-block: 2px; }
  }

  .td-entete-indicateur { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
  .td-entete-indicateur > h3 { flex: 1; min-width: 0; margin: 0; }
  .td-entete-indicateur > .td-compteurs-rappel { flex-shrink: 0; }
