/* mission-temps.css — temps passé : bandeau de mission, lignes de tâche, fiche tâche, fenêtre, pastille. */

/* ── Bandeau de la page mission (piste B : répartition par tâche) ── */
#mt-bandeau { display: none; margin: 0 0 16px; padding: 20px 24px; background: #fff; border: 1px solid #e3e9f2;
  border-radius: 18px; font-family: inherit; color: #232a3b; scroll-margin-top: 90px; }
#mt-bandeau.is-pret { display: block; }
.mt-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mt-ico { width: 46px; height: 46px; border-radius: 13px; background: #eaf2ff; color: #2563eb; display: flex;
  align-items: center; justify-content: center; font-size: 21px; flex: 0 0 auto; }
.mt-tot { display: flex; flex-direction: column; flex: 0 1 auto; min-width: 0; }
.mt-lib { font-size: 13px; font-weight: 600; color: #475569; }
.mt-total { font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mt-total-ligne { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mt-sur { font-size: 14px; font-weight: 600; color: #475569; }
.mt-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.mt-btn.mt-btn-guide { padding: 0; width: 40px; justify-content: center; color: #2563eb; }
.mt-btn.mt-btn-retirer { margin-right: auto; color: #b91c1c; border-color: #f5b5b5; }
.mt-btn.mt-btn-retirer:hover { border-color: #dc2626; color: #991b1b; }

.mt-pilule { display: flex; align-items: center; gap: 12px; margin: 0 auto; padding: 5px 5px 5px 16px; max-width: 100%; box-sizing: border-box;
  border: 2px solid #86d7a8; background: #f3fdf7; border-radius: 999px; color: #14532d; min-width: 0; }
.mt-pilule.is-douteux { border-color: #f5d48a; background: #fff7e6; color: #7a4a00; }
.mt-pilule-nom { font-size: 13px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-pilule .mt-horloge { font-size: 20px; font-weight: 800; color: #166534; }
.mt-pilule.is-douteux .mt-horloge { color: #7a4a00; }
.mt-stop-rond { box-sizing: border-box; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #dc2626; color: #fff;
  font-size: 14px; cursor: pointer; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.mt-stop-rond:hover { background: #b91c1c; }
.mt-stop-rond:focus-visible { outline: 2px solid #4f8cff; outline-offset: 2px; }
.mt-doute { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff7e6; color: #7a4a00; font-size: 13px; }

.mt-corps { display: flex; gap: 32px; align-items: stretch; margin-top: 18px; }
.mt-gauche { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.mt-bloc { display: flex; flex-direction: column; gap: 6px; }
.mt-cap { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #475569; }
.mt-cap-aide { text-transform: none; letter-spacing: 0; font-weight: 600; }
.mt-repart { display: flex; gap: 2px; height: 18px; border-radius: 9px; overflow: hidden; background: #e8edf5; }
.mt-seg { display: block; height: 100%; min-width: 3px; transition: width .4s ease; }
.mt-inviter { margin: 0; font-size: 13px; color: #475569; }
.mt-sous { margin: 0; font-size: 13px; color: #475569; }
.mt-sous b { color: #232a3b; font-variant-numeric: tabular-nums; }
.mt-sous .mt-point { margin: 0 2px; }

/* Objectif d'heures : barre « consommé / prévu », repère d'alerte à 80 % */
.mt-obj { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #475569; }
.mt-obj-ligne { display: flex; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.mt-obj-droite { color: #232a3b; font-weight: 700; }
.mt-barre { position: relative; height: 10px; border-radius: 5px; background: #e8edf5; }
.mt-barre span { display: block; height: 100%; width: 0; border-radius: 5px; background: #16a34a; transition: width .4s ease; }
.mt-seuil { position: absolute; left: 80%; top: -3px; width: 2px; height: 16px; background: #ea8a0a; border-radius: 1px; }
.mt-obj-txt b { color: #232a3b; font-variant-numeric: tabular-nums; }
.mt-obj.is-ok .mt-obj-txt b { color: #166534; }
.mt-obj.is-alerte .mt-barre span { background: #ea8a0a; }
.mt-obj.is-alerte .mt-obj-txt b { color: #9a5b00; }
.mt-obj.is-depasse .mt-barre span { background: #dc2626; }
.mt-obj.is-depasse .mt-obj-txt b, .mt-obj.is-depasse .mt-obj-droite { color: #b91c1c; }

.mt-semaine { flex: 0 0 250px; display: flex; flex-direction: column; gap: 8px; padding-left: 32px; border-left: 1px solid #e3e9f2; }
.mt-semaine-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mt-semaine-tete b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mt-barres { display: flex; align-items: flex-end; gap: 9px; height: 64px; }
.mt-jour { flex: 1 1 0; border-radius: 5px 5px 2px 2px; background: #c7d7f5; min-height: 3px; }
.mt-jour.is-vide { background: #e2e8f0; }
.mt-jour.is-auj { background: #4f8cff; }
.mt-jour.is-auj.is-vide { background: #b9d2ff; }
.mt-lettres { display: flex; gap: 9px; font-size: 11px; font-weight: 700; color: #475569; text-align: center; }
.mt-lettres span { flex: 1 1 0; }
.mt-lettres .is-auj { color: #1d4ed8; }

.mt-btn { box-sizing: border-box; width: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  padding: 0 14px; border: 1px solid #cfd8e6; border-radius: 9px; background: #fff; color: #232a3b;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.mt-btn:hover { border-color: #4f8cff; color: #2563eb; }
.mt-btn-plein { background: #4f8cff; border-color: #4f8cff; color: #fff; }
.mt-btn-plein:hover { background: #3b78ee; border-color: #3b78ee; color: #fff; }
.mt-btn:focus-visible, .mt-rond:focus-visible, .mt-cumul:focus-visible, .mt-mini:focus-visible,
.mt-lien:focus-visible, .mt-puce:focus-visible { outline: 2px solid #4f8cff; outline-offset: 2px; }
.mt-lien { border: 0; background: none; padding: 0; color: #2563eb; font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: underline; width: auto; }

.mt-horloge { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.mt-point { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; flex: 0 0 auto; display: inline-block;
  animation: mt-bat 1.4s ease-in-out infinite; }
.is-douteux .mt-point { background: #ea8a0a; }
@keyframes mt-bat { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.mt-alerte, .mt-erreur { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: #fdecec; color: #991b1b; font-size: 13px; }
.mt-alerte[hidden], .mt-erreur[hidden] { display: none; }

.mt-detail { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e3e9f2; }
.mt-h4 { margin: 14px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.mt-detail .mt-h4:first-child { margin-top: 0; }
.mt-hors, .mt-aide { margin: 0 0 8px; font-size: 13px; color: #475569; }
.mt-case { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #232a3b; cursor: pointer; min-width: 0; }
.mt-case input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; }
.mt-case-maitre { font-weight: 600; margin-bottom: 4px; }
.mt-liste { list-style: none; margin: 0; padding: 0; }
.mt-liste li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eef2f7; font-size: 13px; }
.mt-liste li:last-child { border-bottom: 0; }
.mt-liste li > .mt-case, .mt-l-texte { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.mt-l-jour { color: #64748b; font-variant-numeric: tabular-nums; margin-right: 4px; white-space: nowrap; }
.mt-l-src { color: #94a3b8; font-size: 11px; }
.mt-l-note, .mt-l-tache { color: #64748b; }
.mt-l-tache::before { content: '· '; }
.mt-l-duree { flex: 0 0 auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-l-duree.mt-l-exclue { color: #94a3b8; font-weight: 400; text-decoration: line-through; }
.mt-l-actions { flex: 0 0 auto; display: flex; gap: 4px; }
.mt-mini { box-sizing: border-box; width: auto; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px;
  background: none; color: #64748b; font: inherit; font-size: 12px; cursor: pointer; }
.mt-mini:hover { background: #eef2f7; color: #232a3b; }
.mt-mini-suppr:hover, .mt-mini.is-arme { background: #fdecec; color: #b91c1c; }
.mt-mini.is-arme { font-weight: 700; border-color: #f5b5b5; }

/* ── Ligne de tâche et fiche tâche ── */
.mt-slot { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; margin-left: 4px; }
.mt-rond { box-sizing: border-box; width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 1px solid #cfd8e6;
  background: rgba(255, 255, 255, .95); color: #4f8cff; font-size: 9px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; flex: 0 0 auto; }
.mt-rond:hover { border-color: #4f8cff; background: #eaf2ff; }
.mt-rond.is-on { background: #dc2626; border-color: #dc2626; color: #fff; animation: mt-bat 1.4s ease-in-out infinite; }
.mt-cumul { box-sizing: border-box; width: auto; min-height: 22px; padding: 0 8px; border-radius: 11px; border: 1px solid #dde4ee;
  background: rgba(255, 255, 255, .95); color: #334155; font: inherit; font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.mt-cumul:hover { border-color: #4f8cff; color: #2563eb; }
.mt-cumul.is-vide { color: #94a3b8; border-style: dashed; }
.mt-pt { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.mt-part { font-size: 12px; font-weight: 700; color: #475569; font-variant-numeric: tabular-nums; margin-right: 2px; }
.mt-cumul.is-on { background: #ecfdf3; border-color: #86d7a8; color: #14532d; }

.mt-tache { display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-family: inherit; font-size: 13px; color: #475569; }
.mt-tache.is-pret { display: flex; }
.mt-tache .mt-rond { width: 32px; height: 32px; font-size: 11px; }
.mt-tache .mt-cumul { min-height: 30px; padding: 0 12px; font-size: 13px; border-radius: 15px; }
.mt-fiche-lib { font-weight: 600; color: #232a3b; }
.mt-fiche-lib i { color: #4f8cff; margin-right: 4px; }
.mt-fiche-lien { color: #2563eb; font-weight: 600; }
.mt-fiche-ailleurs { flex: 1 1 100%; font-size: 12px; color: #7a4a00; }
.mt-tache .mt-alerte { flex: 1 1 100%; margin: 0; }

/* ── Fenêtre d'ajout / de correction (posée sur <body>) ── */
.mt-voile { position: fixed; inset: 0; z-index: 10050; background: rgba(15, 23, 42, .55); display: flex;
  align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; font-family: inherit; }
.mt-fen { box-sizing: border-box; width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto; background: #fff;
  border-radius: 14px; padding: 18px; color: #232a3b; box-shadow: 0 20px 50px rgba(15, 23, 42, .35); }
.mt-fen-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.mt-fen-tete h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.mt-champ { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; font-size: 12px; font-weight: 600; color: #475569; flex: 1 1 0; min-width: 0; }
.mt-champ input, .mt-champ select { box-sizing: border-box; width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid #cfd8e6;
  border-radius: 9px; background: #fff; color: #232a3b; font: inherit; font-size: 16px; font-weight: 400; }
.mt-champ input:focus, .mt-champ select:focus { outline: none; border-color: #4f8cff; box-shadow: 0 0 0 3px rgba(79, 140, 255, .2); }
.mt-rang { display: flex; gap: 10px; }
.mt-puces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
.mt-puce { box-sizing: border-box; width: auto; min-height: 44px; padding: 0 4px; border: 1px solid #b9d2ff; border-radius: 10px;
  background: #eaf2ff; color: #1d4ed8; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mt-puce:hover { background: #d9e8ff; }
.mt-puce:active { transform: scale(.97); }
.mt-fen-pied { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.mt-deja { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e3e9f2; }
.mt-deja:empty { display: none; }
.mt-deja .mt-liste { max-height: 190px; overflow-y: auto; }

/* ── Pastille de la barre du haut ── */
#mt-pastille { display: inline-flex; align-items: center; gap: 2px; height: 32px; border-radius: 16px; background: #ecfdf3;
  border: 1px solid #86d7a8; color: #14532d; font-family: inherit; font-size: 13px; font-weight: 700; overflow: hidden; flex: 0 0 auto; }
#mt-pastille[hidden] { display: none; }
#mt-pastille.is-douteux { background: #fff7e6; border-color: #f5d48a; color: #7a4a00; }
.mt-pastille-lien { display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 4px 0 10px; color: inherit;
  text-decoration: none !important; font-variant-numeric: tabular-nums; }
.mt-pastille-stop { box-sizing: border-box; width: 30px; height: 100%; padding: 0; border: 0; background: none; color: #dc2626;
  font-size: 11px; cursor: pointer; }
.mt-pastille-stop:hover { background: rgba(220, 38, 38, .12); }

@media (max-width: 600px) {
  #mt-bandeau { padding: 16px; border-radius: 16px; }
  .mt-total { font-size: 1.7rem; }
  .mt-ico { display: none; }
  .mt-pilule { order: 3; flex: 1 1 100%; margin: 0; }
  .mt-pilule-nom { flex: 1 1 auto; }
  .mt-corps { flex-direction: column; gap: 16px; margin-top: 14px; }
  .mt-semaine { flex: 0 0 auto; padding: 14px 0 0; border-left: 0; border-top: 1px solid #e3e9f2; }
  .mt-barres { height: 48px; }
  .mt-cap-aide { display: none; }
  .mt-actions { flex: 1 1 100%; }
  .mt-actions .mt-btn { flex: 1 1 auto; justify-content: center; padding: 0 10px; }
  .mt-actions .mt-btn-guide { flex: 0 0 40px; padding: 0; }
  .mt-fen-pied { flex-wrap: wrap; }
  .mt-rang { flex-direction: column; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mt-point, .mt-rond.is-on { animation: none; }
  .mt-barre span, .mt-seg { transition: none; }
}
