/* =====================================================================
   JOUR J — l'écran de terrain. Même pupitre que le cockpit, mais lu debout,
   au soleil, d'une main : gros titre, touches larges, une colonne sur
   téléphone, deux sur iPad. Le filet de gauche garde son seul rôle (l'état).
   ===================================================================== */
.jj-choix { flex: 1; min-width: 0; max-width: 28rem; font-family: var(--ui); font-size: .86rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem .5rem; }
.jj { max-width: 1180px; margin: 0 auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.jj-tete { padding: .2rem 0 .4rem; }
.jj-tete h1 { margin: .3rem 0 .25rem; font-family: var(--ui); font-weight: 600; font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
.jj-sous { margin: 0; color: var(--ink2); font-size: 1rem; }
.jj-dates, .jj-chiffre, .jj-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.jj-etat { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; padding: .15rem .45rem; border-left: 3px solid var(--info); color: var(--info); background: var(--bg2); }
.jj-etat.ok { border-left-color: var(--ok); color: var(--ok); }
.jj-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 820px) { .jj-grille { grid-template-columns: minmax(0, 1fr); } }
.jj-corps { padding: .8rem .9rem; }
.jj-muet { color: var(--ink3); font-size: .86rem; }
.jj-vide { color: var(--ink2); }
.jj-rappel .radar-lib { font-size: 1rem; }

.jj-contacts { list-style: none; margin: .8rem 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.jj-contact { display: flex; flex-direction: column; gap: .35rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.jj-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.jj-gros { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1rem; background: var(--bg3); color: var(--ink); border: 1px solid var(--line2, var(--line)); border-radius: var(--radius); font-family: var(--ui); font-size: .95rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.jj-gros:hover { border-color: var(--ok); }
.jj-lien { color: var(--info); font-size: .88rem; overflow-wrap: anywhere; }
.jj-import { display: block; margin-top: .6rem; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.jj-import input { display: block; margin-top: .35rem; font-family: var(--ui); font-size: .86rem; letter-spacing: 0; text-transform: none; color: var(--ink2); }

.jj-incident-form { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .6rem; }
.jj-incident-form textarea, .jj-ligne input, .jj-frais input, .jj-vcf input, .jj-vcf select {
  font-family: var(--ui); font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .55rem .6rem; min-width: 0;
}
.jj-incident-form textarea { resize: vertical; }
.jj-incident-form button, .jj-ligne button, .jj-frais button, .jj-vcf button, .jj-jours button, .jj-modele-liste button {
  min-height: 44px; background: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; padding: 0 .9rem;
}
.jj-incident-form button:hover, .jj-ligne button:hover, .jj-frais button:hover, .jj-vcf button:hover { border-color: var(--ok); color: var(--ok); }
.jj-ligne { display: flex; gap: .5rem; margin-top: .5rem; }
.jj-ligne input { flex: 1; }

.jj-case label { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 44px; cursor: pointer; font-size: .95rem; }
.jj-case input { width: 22px; height: 22px; flex: none; accent-color: var(--ok); }
.jj-case.fait { border-left-color: var(--ok); }
.jj-case.fait span:last-child { color: var(--ink3); text-decoration: line-through; }
.jj-num { min-width: 2rem; color: var(--ink2); font-size: .8rem; }
.jj-prest { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 1px solid var(--line); }
.jj-puce-choix { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .65rem; border: 1px solid var(--line); background: var(--bg); font-size: .84rem; cursor: pointer; }
.jj-puce-choix input { accent-color: var(--info); }
.jj-modeles > summary { cursor: pointer; padding: .7rem .9rem; font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); border-top: 1px solid var(--line); }
.jj-modeles h3 { margin: .8rem 0 .3rem; font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.jj-modele-liste { list-style: none; margin: 0; padding: 0; }
.jj-modele-liste li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .2rem 0; font-size: .86rem; border-top: 1px solid var(--line); }
.jj-modele-liste button { min-height: 32px; padding: 0 .55rem; }

.jj-jours { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.jj-jours button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.jj-frais { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; align-items: end; }
.jj-frais label { display: flex; flex-direction: column; gap: .25rem; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.jj-frais .jj-large { grid-column: 1 / -1; }
.jj-frais button { grid-column: 1 / -1; }
.jj-unite { display: flex; align-items: center; gap: .3rem; font-family: var(--mono); color: var(--ink3); letter-spacing: 0; }
.jj-unite input { flex: 1; font-family: var(--mono); font-variant-numeric: tabular-nums; width: 100%; }

.jj-vcf { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.jj-vcf-ligne { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .7fr); gap: .5rem; align-items: center; padding-top: .5rem; border-top: 1px solid var(--line); font-size: .86rem; }
@media (max-width: 560px) { .jj-vcf-ligne { grid-template-columns: 1fr 1fr; } .jj-vcf-ligne > div { grid-column: 1 / -1; } }
#jj-ecran[aria-pressed="true"] { color: var(--ok); border-color: var(--ok); }
/* Les listes vont d'un bord à l'autre du panneau, comme dans le cockpit. */
.panel > #jj-epreuves-corps, .panel > #jj-check-corps { padding-left: 0; padding-right: 0; padding-bottom: 0; }
.jj-ligne-haut { margin-top: 0; }
#jj-prevoir .jj-case { display: flex; align-items: center; gap: .5rem; }
#jj-prevoir .jj-case label { flex: 1; }
.jj-suppr { background: none; border: 0; color: var(--ink3); font-size: 1rem; cursor: pointer; min-width: 40px; min-height: 40px; }
.jj-suppr:hover { color: var(--retard); }

/* ---- Bilan du concours : il tient toute la largeur ---- */
.jj-bilan { grid-column: 1 / -1; }
.jj-bilan-form { display: flex; flex-direction: column; gap: 1rem; }
.jj-criteres { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0; padding: 1px 0 0 1px; }
/* Filets par case (et non par le fond de la grille) : une case vide en fin de rangée reste invisible. */
.jj-critere { background: var(--bg2); padding: .7rem .8rem; display: flex; flex-direction: column; gap: .45rem; border: 1px solid var(--line); margin: -1px 0 0 -1px; }
.jj-critere-tete { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.jj-critere-tete strong { font-size: .92rem; }
/* La note se donne en touches carrées de 1 à 5, comme une rangée de voyants. */
.jj-etoiles { display: inline-flex; gap: 2px; }
.jj-etoiles button { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--bg); color: var(--ink3); font-family: var(--mono); font-size: .8rem; cursor: pointer; }
.jj-etoiles button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.jj-critere input:not([type=checkbox]), .jj-prest-real input:not([type=checkbox]), .jj-cr textarea {
  font-family: var(--ui); font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .55rem; min-width: 0; width: 100%;
}
.jj-moyens { display: flex; gap: .4rem; }
.jj-prest-real { border: 1px solid var(--line); margin: 0; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .6rem; }
.jj-prest-real legend, .jj-cr { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); padding: 0 .3rem; }
.jj-prest-real .jj-prest { border: 0; padding: 0; }
.jj-cr { display: flex; flex-direction: column; gap: .3rem; padding: 0; }
.jj-cr textarea { resize: vertical; text-transform: none; letter-spacing: 0; }
.jj-bilan-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.jj-bilan-actions button:not(.jj-gros) { min-height: 48px; background: none; color: var(--ink2); border: 1px solid var(--line); font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: 0 1rem; cursor: pointer; }
/* Les bilans des éditions précédentes, en lecture. */
.jj-bilan-lu { list-style: none; margin: .4rem 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.jj-bilan-lu li { display: flex; flex-wrap: wrap; gap: .2rem .7rem; align-items: baseline; font-size: .86rem; }
.jj-crit { color: var(--ink); min-width: 12rem; }
.jj-note-lue { font-family: var(--mono); letter-spacing: .08em; color: var(--ink2); }
.jj-cr-lu { margin: .4rem 0 0; font-size: .9rem; color: var(--ink); white-space: pre-wrap; }

/* Enregistrement automatique : ce qui est dit sur l'état de la saisie */
.jj-sauve { font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; color: var(--ink3); align-self: center; }
.jj-sauve.ok { color: var(--ok); }
.jj-sauve.attente { color: var(--bientot); }

/* Facturé, dépensé, frais de l'équipe */
.jj-sous-titre { font-family: var(--mono); font-size: .66rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink3); margin: 0 0 .5rem; }
.jj-facture { border-left: 3px solid var(--line); padding-left: .7rem; margin-bottom: .8rem; }
.jj-facture-tete { display: flex; gap: .6rem; flex-wrap: wrap; align-items: baseline; margin-bottom: .3rem; }
.jj-engages { margin: .1rem 0 .3rem; color: var(--ink2); }
.jj-facture-lignes { width: 100%; border-collapse: collapse; font-size: .88rem; }
.jj-facture-lignes td { padding: .22rem 0; border-bottom: 1px solid var(--line); color: var(--ink2); }
.jj-facture-lignes .n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: .6rem; }
.jj-facture-lignes tr.offert td { color: var(--ink3); }
.jj-facture-lignes tfoot td { color: var(--ink); font-weight: 600; border-bottom: 0; padding-top: .35rem; }
.jj-depenses { list-style: none; margin: 0 0 .4rem; padding: 0; }
.jj-depenses li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--ink2); }
.jj-depenses .n { margin-left: auto; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.jj-dep-date { font-family: var(--mono); font-size: .74rem; color: var(--ink3); white-space: nowrap; }
.jj-dep-lib { overflow-wrap: anywhere; }
.jj-rattacher { min-height: 36px; background: none; border: 1px solid var(--line); color: var(--ink2); font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; padding: 0 .6rem; cursor: pointer; }
.jj-rattacher:hover { border-color: var(--ok); color: var(--ok); }
.jj-suggestions summary { cursor: pointer; color: var(--ink2); font-size: .86rem; padding: .3rem 0; }
@media (pointer: coarse) { .jj-rattacher { min-height: 44px; } }
