/* Saisie du jour (public/saisie_jour.js, réorganisation 2.12.0, spécification section 3.1.7) : bandeau plan et budget,
   blocs de champs, état par bloc, panneau « Apports de la Géologie ». Jetons et classes de app.css seulement ; aucune
   couleur en dur. La page ne défile jamais : seule la zone des blocs défile ; un écart porte une flèche et un texte en plus
   de sa couleur (jamais la couleur seule). */

.sj-ecran { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sj-ecran.sj-integre { border: 0; }
.sj-barre { gap: var(--e3); }
.sj-date { display: inline-flex; align-items: center; gap: var(--e3); color: var(--ink-2); font-size: var(--fs-s); white-space: nowrap; }
.sj-date .champ { height: 20px; color: var(--ink); font-size: var(--fs-m); }
.sj-etat-jour { color: var(--ink-2); font-size: var(--fs-s); }
/* Journée à venir (2.34.1) : avertissement en texte (« à venir : vérifiez la date ») et en couleur, jamais la couleur seule. */
.sj-etat-jour.sj-a-venir { color: var(--warn); font-weight: 600; }
.sj-cloture { gap: var(--e3); background: var(--warn-bg); color: var(--warn); }
.sj-m { flex: none; display: flex; flex-direction: column; gap: var(--e2); max-height: 72px; overflow: auto; padding: 0 var(--e2); scrollbar-width: thin; }
.sj-m:empty { display: none; }
.sj-corps { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--e3); padding: var(--e3); scrollbar-width: thin; scrollbar-color: var(--line-fort) transparent; }
.sj-corps:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

/* Bandeau plan et budget : tableau dense, défilement horizontal dans le panneau seulement. */
.sj-bandeau { flex: none; }
.sj-bandeau-corps { min-height: 0; }
.sj-bandeau-defile { max-height: 240px; overflow: auto; scrollbar-width: thin; }
.sj-tab-cmp { width: max-content; min-width: 100%; table-layout: auto; }
.sj-tab-cmp th, .sj-tab-cmp td { height: 20px; padding: 0 var(--e3); font-size: var(--fs-s); }
.sj-tab-cmp thead th { text-align: center; }
.sj-tab-cmp thead tr.sj-h2 th { top: var(--h-tete); color: var(--ink-2); font-weight: 400; }
.sj-tab-cmp .sj-mes { position: sticky; left: 0; z-index: 1; min-width: 200px; max-width: 300px; text-align: left; border-right: 1px solid var(--line-fort); }
.sj-tab-cmp thead .sj-mes { z-index: 3; }
.sj-tab-cmp .sj-mes small, .sj-table th small { margin-left: var(--e2); color: var(--ink-2); font-weight: 400; }
.sj-tab-cmp .sj-deb { border-left: 1px solid var(--line-fort); }
.sj-tab-cmp .sj-reel { font-weight: 600; }
.sj-tab-cmp thead th.sj-c-jour { box-shadow: inset 0 2px 0 var(--serie-1); }
.sj-tab-cmp thead th.sj-c-semaine { box-shadow: inset 0 2px 0 var(--serie-2); }
.sj-tab-cmp thead th.sj-c-mois { box-shadow: inset 0 2px 0 var(--accent); }

/* Blocs : grille de panneaux qui s'adapte à la largeur ; les champs gardent la densité des formulaires du logiciel. */
.sj-blocs { flex: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; gap: var(--e3); }
.sj-blocs > .vide, .sj-blocs > .chargement { grid-column: 1 / -1; }
.sj-bloc.sj-modifie { border-color: var(--accent); }
.sj-bloc .panneau-tete .btn { margin-left: auto; }
.sj-etat { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-weight: 400; }
.sj-etat.sj-e-ok { color: var(--ok); }
.sj-etat.sj-e-ok::before { content: "✓ "; }
.sj-etat.sj-e-modifie { color: var(--warn); }
.sj-etat.sj-e-modifie::before { content: "● "; }
.sj-etat.sj-e-refuse { color: var(--bad); }
.sj-etat.sj-e-refuse::before { content: "! "; }
.sj-etat.sj-e-encours { color: var(--info); }
.sj-bloc-corps { display: flex; flex-direction: column; gap: var(--e2); padding: var(--e2) var(--e4) var(--e3); }
.sj-partie + .sj-partie { border-top: 1px solid var(--grid-line); padding-top: var(--e2); }
.sj-sous { display: flex; align-items: center; gap: var(--e3); min-height: 18px; color: var(--ink-2); font-size: var(--fs-s); font-weight: 600; }
.sj-sous .sj-st { margin-left: auto; font-weight: 400; }
.sj-champs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(96px, 42%); align-items: center; gap: var(--e1) var(--e4); }
.sj-champ { display: contents; }
.sj-champ.sj-large > .sj-lib { grid-column: 1 / -1; }
.sj-champ.sj-large > .champ { grid-column: 1 / -1; }
.sj-lib { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-size: var(--fs-s); white-space: nowrap; }
.sj-lib small { margin-left: var(--e2); color: var(--ink-2); font-size: var(--fs-xs); }
.sj-lib b { margin-left: 2px; color: var(--accent-texte); }
.sj-champs .champ { width: 100%; }
.sj-texte { height: auto; min-height: 40px; padding: var(--e1) 5px; resize: vertical; line-height: 1.35; }
.sj-eg b { color: var(--info); }
.sj-calc { min-width: 0; padding: 0 5px; overflow: hidden; text-overflow: ellipsis; background: var(--grid-calc); border-radius: var(--r1); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; line-height: var(--h-cmd); }
/* Note d'un bloc et lignes non modifiables : bulle (i) à côté du titre du bloc (bulles.js, 04/11/2026). */

/* Blocs en tableau (Falcons, engins, ateliers, coulées) : une ligne par équipement, type, atelier ou coulée. */
.sj-table-defile { max-height: 260px; overflow: auto; scrollbar-width: thin; }
.sj-table { width: 100%; table-layout: auto; }
.sj-table th, .sj-table td { height: 24px; padding: 0 var(--e2); font-size: var(--fs-s); }
.sj-table td.sj-in { padding: 1px 2px; }
.sj-table td.sj-in .champ { width: 100%; min-width: 64px; height: 20px; }
.sj-table td.sj-in .sj-texte { min-width: 140px; min-height: 20px; }
.sj-table tbody th { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.sj-ajout { display: flex; align-items: center; gap: var(--e3); flex-wrap: wrap; }
.sj-ajout .champ { height: 20px; }

/* Apports de la Géologie. */
.sj-apports { flex: none; }
.sj-apports-corps { display: flex; flex-direction: column; gap: var(--e2); padding: var(--e2) var(--e4) var(--e3); }
.sj-tab-apports { width: max-content; min-width: 100%; table-layout: auto; }
.sj-tab-apports th, .sj-tab-apports td { height: 20px; padding: 0 var(--e3); font-size: var(--fs-s); }
.sj-reprises { display: flex; flex-direction: column; gap: var(--e1); list-style: none; font-size: var(--fs-s); }
.sj-reprises li { display: flex; align-items: center; gap: var(--e3); flex-wrap: wrap; }
.sj-reprises .sj-lib { min-width: 220px; }

@media (max-width: 900px) {
  .sj-blocs { grid-template-columns: minmax(0, 1fr); }
  .sj-tab-cmp .sj-mes { min-width: 140px; }
  .sj-reprises .sj-lib { min-width: 0; }
}
.sj-ref { color: var(--ink); }
.sj-ref + .sj-ec, .sj-ref + .nd { margin-left: var(--e1); font-size: var(--fs-xs); }

/* Vraisemblance (B2) : valeur inhabituelle face à l'historique validé (avertissement, la ligne reste enregistrée). */
.sj-inhabituel { outline: 2px solid var(--warn); outline-offset: 1px; }

/* Bulle (i) « Définition » (lot 5) : définition rendue par le serveur (catalogue de GET /api/objectifs/comparaison),
   infobulle au survol, panneau Détail au clic. Même allure que les bulles (i) des rapports de réconciliation (rr-bulle).
   Posée au bord droit du nom de la mesure (cellule collante) : un nom long, coupé par des points de suspension, lui
   laisse sa place. */
.sj-tab-cmp tbody th.sj-avec-def { padding-right: 24px; }
.sj-def { position: absolute; top: 50%; right: 4px; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-top: -8px; padding: 0;
  border: 1px solid var(--line-fort); border-radius: 50%; background: var(--bg-1); color: var(--ink-2); font: italic 600 var(--fs-xxs)/1 var(--font); cursor: help; }
.sj-def:hover { color: var(--ink); border-color: var(--accent); }
.sj-def:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
@media print { .sj-def { display: none !important; } }
