/* ===== v508 — « Aujourd'hui » (refonte Balisage, lot B) ====================
   Maquette .impeccable/mocks/balisage/index.html, écran Aujourd'hui.
   Jetons de design.css SEULEMENT (aucune couleur en dur), rayons --r / --r-s,
   survol à la souris seulement, transform/opacity seulement. */
.ecran-jour .qui { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 32px 18px; margin-top: -4px; }
.puce { height: 36px; padding: 0 12px 0 5px; border-radius: 999px; border: 1px solid var(--trait-fort);
  background: var(--surface); color: var(--encre); display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; cursor: pointer; }
.puce i { width: 26px; height: 26px; border-radius: 50%; background: var(--actif); display: grid; place-items: center;
  font-style: normal; font-size: 11px; font-weight: 700; color: var(--encre-2); }
.puce small { color: var(--encre-3); font-size: 12.5px; }
.puce[aria-pressed="true"] { background: var(--nav); border-color: var(--bleu); color: var(--sur-bleu); }
.puce[aria-pressed="true"] i { background: var(--bleu); color: var(--sur-bleu); }
.puce[aria-pressed="true"] small { color: var(--nav-txt-2); }

.aj-grille { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; padding: 0 32px 48px; }
.aj-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ph .droite { margin-left: auto; }
.lien { color: var(--bleu); font-weight: 600; font-size: 14px; background: transparent; border: 0; cursor: pointer;
  min-height: 36px; padding: 0 4px; }
.vide-msg { padding: 6px 20px 20px; margin: 0; color: var(--encre-2); font-size: 14.5px; }
.panneau details > summary { list-style: none; cursor: pointer; }
.panneau details > summary::-webkit-details-marker { display: none; }

/* cartes PC de la journée */
.pcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 0 20px 20px; }
.pc { border: 1px solid var(--trait); border-radius: var(--r); padding: 14px; text-align: left; display: flex;
  flex-direction: column; gap: 10px; background: var(--surface); color: var(--encre); cursor: pointer;
  transition: transform 160ms var(--ease-out); font: inherit; }
.pc:active { transform: scale(.98); }
.pc .l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pc .id { font-weight: 700; }
.pc .cl { color: var(--encre-2); font-size: 13.5px; }
.pc .quoi { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.pc .quoi::before { content: "→ "; color: var(--encre-3); font-weight: 400; }
.pc .role { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px;
  font-weight: 600; background: var(--bleu-pale); color: var(--bleu); white-space: nowrap; }
.pc .role.del { background: var(--orange-pale); color: var(--orange); }
.pied-pc { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--encre-2); }
.mini { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.mini span { height: 8px; background: var(--actif);
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 50%, calc(100% - 5px) 100%, 0 100%); }
.mini span.passe { background: var(--trait-fort); }
.mini span.ici { background: var(--bleu); }
.rq-ret { display: inline-flex; align-items: center; gap: 6px; color: var(--rouge); font-weight: 600; }
.alpin { display: inline-block; width: 12px; height: 11px; background: var(--surface); border: 4px solid var(--rouge);
  border-left-width: 1px; border-right-width: 1px; }

/* lignes : tâches, réparations, appels */
.ligne .h { color: var(--encre-2); font-size: 13px; white-space: nowrap; }
.typ { flex: none; width: 24px; display: grid; place-items: center; color: var(--encre-2); }
.typ svg.i { width: 20px; height: 20px; }
.typ.pc { color: var(--bleu); }
.typ.rep { color: var(--orange); }
.ligne.tache { cursor: default; }
.ligne.tache > .txt { background: transparent; border: 0; padding: 8px 0; text-align: left; color: inherit; font: inherit;
  cursor: pointer; min-height: 44px; }
.coche { width: 44px; height: 44px; border-radius: var(--r-s); border: 1.5px solid var(--trait-fort); flex: none; display: grid;
  place-items: center; background: var(--surface); color: var(--sur-bleu); cursor: pointer; position: relative; }
/* v522 : case de 44 × 44 px RÉELS (24 px avant) */
.coche svg.i { width: 20px; height: 20px; stroke-width: 2.6; opacity: 0; transform: scale(.9);
  transition: opacity 140ms ease, transform 160ms var(--ease-out); }
.fait .coche { background: var(--vert); border-color: var(--vert); }
.fait .coche svg.i { opacity: 1; transform: none; }
.fait .txt b { color: var(--encre-3); text-decoration: line-through; }
.groupe { padding: 14px 20px 6px; font-size: 13px; font-weight: 600; color: var(--encre-2); border-top: 1px solid var(--trait); }
.groupe.ret { color: var(--rouge); }
.panneau .groupe:first-child { border-top: 0; }

/* l'équipe, la semaine */
.eq { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 0 20px; min-height: 52px;
  border: 0; border-top: 1px solid var(--trait); width: 100%; text-align: left; font-size: 14.5px; background: transparent;
  color: var(--encre); cursor: pointer; font-family: inherit; }
.eq i { width: 30px; height: 30px; border-radius: 50%; background: var(--actif); display: grid; place-items: center;
  font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--encre-2); }
.eq small { display: block; color: var(--encre-2); font-size: 12.5px; }
.eq .barre { display: flex; gap: 2px; }
.eq .barre span { width: 6px; height: 18px; border-radius: 2px; background: var(--bleu); }
.eq .barre span.t { background: var(--trait-fort); }
.aj-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--trait); border-top: 1px solid var(--trait); }
.aj-kpis > div { background: var(--surface); padding: 12px 20px; display: flex; flex-direction: column; gap: 2px; }
.aj-kpis b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.aj-kpis span { color: var(--encre-2); font-size: 12.5px; }

.ecran-jour .cherche span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* feuille « Attribuer » */
.aj-types { margin-bottom: 14px; display: flex; flex-wrap: wrap; }
.aj-types button { min-height: 36px; padding: 0 12px; }
#ajCmd, #ajRep { width: 100%; min-height: 150px; }

/* v522 (MODULES_CONTRAT, Aujourd'hui) */
.aj-qui-btn { display: none; }
.pc .mini-lb { font-size: 12.5px; color: var(--encre-2); margin-top: -4px; }
/* v578 : « display: block » — stock.css a aussi une classe .pc-suite (une grille à deux colonnes) : sans cette ligne,
   le bouton de la carte en héritait et son libellé passait sur deux ou trois lignes (« Commencer le / montage »). */
.pc .pc-suite { display: block; width: 100%; min-height: 44px; }
.pc .pc-err { color: var(--rouge); font-size: 13px; font-weight: 600; }
.pc:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.ligne.aj-l { display: flex; align-items: center; gap: 10px; padding: 0 0 0 20px; }
.ligne.aj-l .coche { margin-right: -2px; }
.aj-l-ouvre { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px 0 0;
  border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.aj-l-ouvre .txt { flex: 1; min-width: 0; }
.aj-repli > summary { list-style: none; cursor: pointer; flex-wrap: nowrap; }
.aj-repli > summary::-webkit-details-marker { display: none; }
.aj-repli > summary::after { content: "▾"; margin-left: auto; color: var(--encre-3); }
.aj-repli[open] > summary::after { content: "▴"; }
.aj-qui-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.aj-qui-liste .puce { height: 44px; }
.aj-cmds { max-height: 260px; overflow-y: auto; border: 1px solid var(--trait); border-radius: var(--r-s); }
.aj-cmd { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0;
  border-bottom: 1px solid var(--trait); background: var(--surface); color: var(--encre); text-align: left; font: inherit; cursor: pointer; }
.aj-cmd:last-child { border-bottom: 0; }
.aj-cmd small { color: var(--encre-2); font-size: 12.5px; }
.aj-cmd[aria-pressed="true"] { background: var(--bleu-pale); box-shadow: inset 3px 0 0 var(--bleu); }
.aj-manque { color: var(--encre-2); font-size: 13px; margin: 8px 0 0; }

@media (hover: hover) and (pointer: fine) {
  .pc:hover { border-color: var(--bleu); }
  .eq:hover, .ligne.tache:hover { background: var(--surface-2); }
  .puce:not([aria-pressed="true"]):hover { border-color: var(--encre-3); }
}
@media (max-width: 1100px) { .aj-grille { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  .ecran-jour .qui { flex-wrap: nowrap; overflow-x: auto; padding: 0 16px 14px; scrollbar-width: none; }
  .ecran-jour .qui::-webkit-scrollbar { display: none; }
  .aj-grille { padding: 0 max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); gap: 14px; }
  .aj-col { gap: 14px; }
  .pcs { padding: 0 16px 16px; grid-template-columns: minmax(0, 1fr); }
  .groupe { padding: 12px 16px 6px; }
  .eq { padding: 0 16px; min-height: 60px; }
  .vide-msg { padding: 4px 16px 18px; }
  .tete .btn.primary { flex: none; }
  /* téléphone : en-tête compact, loupe en icône 44 px, Attribuer pleine largeur, « Journée de : … ▾ » */
  .ecran-jour .cherche { flex: none; width: 44px; min-width: 44px; padding: 0; justify-content: center; }
  .ecran-jour .tete .outils { justify-content: flex-end; }
  .ecran-jour .cherche span, .ecran-jour .cherche kbd { display: none; }
  .ecran-jour .tete .outils { width: 100%; }
  .ecran-jour .tete #ajAttr { order: 3; flex: 1 1 100%; min-height: 44px; justify-content: center; }
  .aj-qui-btn { display: flex; gap: 6px; margin: -6px 16px 12px; min-height: 44px; justify-content: flex-start; width: calc(100% - 32px); }
  .aj-qui-btn b { margin-right: auto; }
  .ligne.aj-l { padding-left: 16px; }
  .aj-l-ouvre { padding-right: 16px; }
  /* les clients qui attendent : une ligne de compteurs */
  .aj-cli { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .aj-cli .ligne { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; min-height: 64px; border-top: 1px solid var(--trait); }
  .aj-cli .ligne .typ, .aj-cli .ligne small { display: none; }
  .aj-cli .ligne b { font-size: 13px; }
  .aj-cli .ligne .n { order: -1; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .pc:active { transform: none; }
  .coche svg.i { transition: none; }
}
