/*  ecran-notes-annexes.css — SYS-04.

    Préfixe `.nx-`, celui de la maquette, vérifié libre. */

/* 1 · Le filtre d'avancement, avec son compteur. Même forme que les filtres de
      gravité de TRT-04 : un filtre qui ne dit pas combien il cache oblige à le
      cliquer pour le savoir. */
.nx-filtre {
    padding: 3px 10px;
    background: var(--et-surface);
    border: 1px solid var(--et-hairline);
    color: var(--et-ink);
    font-family: inherit;
    font-size: var(--et-fs-cell);
    cursor: pointer;
}

.nx-filtre:hover { background: var(--et-survol); }

.nx-filtre.est-actif {
    background: var(--et-tint);
    border-color: var(--et-form-blue);
    color: var(--et-lien);
    font-weight: 600;
}

.nx-filtre .c {
    font-family: var(--et-font-mono);
    font-size: 12px;
    color: var(--et-muted);
    margin-left: 4px;
}

.nx-filtre.est-actif .c { color: var(--et-lien); }

/* 2 · Le rappel de l'exercice précédent. Il est en retrait de la saisie : c'est un
      appui, pas le texte de cette année. Sa hauteur est bornée — une note de deux
      pages repousserait la zone de saisie hors de l'écran. */
.nx-rappel {
    padding: 8px 10px;
    background: var(--et-surface-2);
    border-left: 3px solid var(--et-hairline);
    font-size: var(--et-fs-cell);
}

.nx-rappel .t {
    font-family: var(--et-font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--et-muted);
}

.nx-rappel .x {
    margin-top: 4px;
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
    color: var(--et-muted);
}

/* 3 · Le circuit de la note (SYS-04, db/1452). Une bande, pas une carte : le circuit
      accompagne la note ouverte, il n'est pas un objet de plus à lire. */
.nx-circuit {
    padding: 8px 10px;
    background: var(--et-surface-2);
    border: 1px solid var(--et-hairline);
}

/* La pastille d'état. Fond et encre viennent de RefStatutNote.Style — un jeton, jamais
   un littéral : ce sont des couleurs d'ÉTAT, ce que la charte leur réserve. */
.nx-pastille {
    display: inline-flex;
    align-items: center;
    padding: var(--et-badge-py) var(--et-badge-px);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* 4 · Le bloc « sans objet ». Il remplace la zone de saisie, et dit ce qui sortira à
      l'impression : une note absente et une note sans objet ne se lisent pas pareil. */
.nx-neant {
    padding: 13px 15px;
    background: var(--et-neutre-bg);
    border-left: 3px solid var(--et-table-head);
    font-size: var(--et-fs-cell);
    color: var(--et-ink);
    white-space: pre-wrap;
}

.nx-neant .x {
    font-size: 12px;
    color: var(--et-muted);
    white-space: normal;
}

/* 5 · Le dossier de la note : pièces, commentaire de réviseur, historique. Trois cases
      côte à côte au large, empilées sous 900 px — la largeur retenue de
      docs/conventions-responsive.md la plus proche du point où trois colonnes de texte
      cessent d'être lisibles. */
.nx-dossier {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.nx-case {
    padding: 8px 10px;
    background: var(--et-surface);
    border: 1px solid var(--et-hairline);
    font-size: var(--et-fs-cell);
}

.nx-case > .t {
    display: block;
    margin-bottom: 4px;
    font-family: var(--et-font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--et-muted);
}

.nx-case > .t .n {
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--et-faint);
}

.nx-case .x {
    font-size: 12px;
    color: var(--et-faint);
    line-height: 1.45;
}

/* Le commentaire du réviseur : marqué comme une remarque, et jamais comme le texte. */
.nx-avis {
    padding: var(--et-alerte-py) 10px;
    background: var(--et-info-bg);
    border-left: 3px solid var(--et-info);
    color: var(--et-ink);
    white-space: pre-wrap;
}

@media (max-width: 1024px) {
    .nx-dossier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .nx-dossier { grid-template-columns: 1fr; }
}

/* L'entête de la note : code, type, source d'alimentation, détenteur. */
.nx-champ-code { max-width: 90px; }
.nx-champ-type { max-width: 170px; }
.nx-champ-source { max-width: 220px; }
.nx-champ-detenteur { max-width: 280px; }

/* 9 · LES VUES (canevas SYS-03, 2026-09-23) — barre de vues, aperçu continu, contrôles
      du jeu et pied. La grammaire suit celle des trois états (ecran-bilan.css §4,
      ecran-tableau-flux.css) sans en emprunter une classe. Aucune couleur écrite. */
.nx-barre {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--et-surface-2);
    border: 1px solid var(--et-hairline);
}

.nx-seg { display: flex; }

.nx-seg button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 14px;
    background: var(--et-surface);
    border: 1px solid var(--et-form-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--et-ink);
    white-space: nowrap;
    cursor: pointer;
}

.nx-seg button + button { border-left: 0; }

.nx-seg button.est-actif {
    background: var(--et-table-head);
    border-color: var(--et-table-head);
    color: var(--et-sur-aplat);
}

.nx-seg-compte {
    min-width: 18px;
    padding: 0 5px;
    background: var(--et-avertissement-bg);
    color: var(--et-avertissement-ink);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    border-radius: 999px;
}

/* L'aperçu continu : le document tel qu'il partira, une note sous l'autre. */
.nx-apercu {
    border: 1px solid var(--et-hairline);
    background: var(--et-surface);
}

.nx-apercu-note { padding: 14px 18px; }
.nx-apercu-note + .nx-apercu-note { border-top: 1px solid var(--et-hairline); }

.nx-apercu-note header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.nx-apercu-titre {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    text-align: left;
    font: inherit;
    font-size: var(--et-fs-tete);
    font-weight: 700;
    color: var(--et-ink);
    cursor: pointer;
}

.nx-apercu-titre:hover { color: var(--et-lien); text-decoration: underline; }
.nx-apercu-titre:focus-visible { outline: 2px solid var(--et-form-blue); outline-offset: 2px; }

.nx-apercu-texte {
    margin-top: 8px;
    max-width: 880px;
    font-size: var(--et-fs-cell);
    line-height: 1.6;
    color: var(--et-ink);
    white-space: pre-line;
}

.nx-apercu-vide { margin-top: 8px; font-size: var(--et-fs-cell); color: var(--et-muted); }

/* Les contrôles du jeu. La marque d'état est une bordure : amber passe par -mark. */
.nx-controles { display: flex; flex-direction: column; gap: 10px; }

.nx-controle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--et-surface);
    border: 1px solid var(--et-hairline);
    border-left: 3px solid var(--et-succes);
}

.nx-controle.est-ko { border-left-color: var(--et-avertissement-mark); }
.nx-controle > .bi { font-size: 16px; color: var(--et-succes-ink); }
.nx-controle.est-ko > .bi { color: var(--et-avertissement-ink); }
.nx-controle-corps { flex: 1 1 auto; min-width: 0; }
.nx-controle-corps .t { font-size: var(--et-fs-cell); font-weight: 600; color: var(--et-ink); }
.nx-controle-corps .x { margin-top: 2px; font-size: 12px; color: var(--et-muted); }

.nx-controle-verdict {
    padding: 1px 9px;
    border-radius: 999px;
    background: var(--et-succes-bg);
    font-size: 12px;
    font-weight: 600;
    color: var(--et-succes-ink);
    white-space: nowrap;
}

.nx-controle.est-ko .nx-controle-verdict { background: var(--et-avertissement-bg); color: var(--et-avertissement-ink); }

/* Le pied : l'avancement du jeu, et le chemin vers les contrôles. */
.nx-pied {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    margin-top: 12px;
    padding: 8px 14px;
    background: var(--et-surface-2);
    border: 1px solid var(--et-hairline);
}

.nx-pied-total { display: inline-flex; align-items: baseline; gap: 8px; }
.nx-pied-total > span { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--et-muted); }

.nx-pied-total strong {
    font-family: var(--et-font-mono);
    font-size: var(--et-fs-tete);
    font-variant-numeric: tabular-nums;
    color: var(--et-ink);
}

.nx-pied-total.est-ok strong { color: var(--et-succes-ink); }
.nx-pied-total.est-ecart strong { color: var(--et-danger-ink); }

/* Cibles tactiles : 44 px sous 1024 px, jamais moins (docs/cibles-tactiles.md). */
@media (max-width: 1024px) {
    .nx-seg button { height: 44px; }
    .nx-apercu-titre { min-height: 44px; }
    .nx-pied .btn, .nx-controle .btn { min-height: 44px; }
    .nx-filtre { min-height: 44px; }
}

@media (max-width: 720px) {
    .nx-seg { width: 100%; }
    .nx-seg button { flex: 1 1 0; justify-content: center; padding: 0 6px; white-space: normal; text-align: center; }
    .nx-controle { flex-wrap: wrap; }
}
