/* ============================================================================
   VALIDATION DES POINTAGES — /app/validation-pointages (2026-10-01)
   Sa feuille : les .vpt-* ne servent qu'ici. La liste, les onglets, les cartes sous
   1024 px et la fenêtre viennent du gabarit. Aucune couleur en dur.
   ========================================================================= */

.vpt-liste { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--et-ink); }

/* --- Port de la maquette du 2026-10-04 (« design_handoff_validation_pointages ») ---
   Tuiles, bandeau, onglets et pastilles viennent du gabarit ; ici la barre, la table
   regroupée par salarié (un <tbody> par salarié) et ses cartes sous 1024 px. */
.vpt-signal-ligne { flex-wrap: wrap; align-items: center; }
.vpt-signal-ligne .mx-signal-marque { margin-top: 0; }
.vpt-signal-txt { flex: 1 1 320px; min-width: 0; font-size: 14px; color: var(--et-ink); }
.vpt-signal-ligne .mx-signal-acte { min-height: 44px; }

.vpt-carte { padding: 0; display: flex; flex-direction: column; }
.vpt-barre {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
    padding: 0 16px 0 0; border-bottom: 1px solid var(--et-hairline);
}
.vpt-vues { flex: 0 1 auto; border-bottom: 0; max-width: 100%; }
.vpt-recherche-bloc { display: flex; gap: 8px; flex: 1 1 360px; min-width: 0; justify-content: flex-end; padding: var(--et-criteres-py) 0; }
.vpt-recherche {
    flex: 1 1 220px; max-width: 420px; display: flex; align-items: center; gap: 8px;
    height: 44px; margin: 0; padding: 0 12px; border: 1px solid var(--et-bord-champ); background: var(--et-surface);
}
.vpt-recherche .bi { color: var(--et-muted); }
.vpt-recherche input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--et-ink); }
.vpt-recherche input:focus { outline: none; }
.vpt-recherche:focus-within { border-color: var(--et-form-blue); }
.vpt-service { height: 44px; width: auto; max-width: 220px; }

.vpt-selection {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
    padding: 8px 16px; background: var(--et-tint); border-bottom: 1px solid var(--et-hairline);
    font-size: 14px; color: var(--et-ink);
}
.vpt-selection > strong { flex: 1 1 auto; }
.vpt-selection .mx-btn, .vpt-lot, .vpt-gestes .mx-btn { min-height: 44px; }

.vpt-valider { border-color: var(--et-form-blue); color: var(--et-form-blue-d); background: var(--et-surface); }

.vpt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vpt-table thead th {
    padding: var(--et-cellule-tete-y) 12px; background: var(--et-table-head); text-align: left; white-space: nowrap;
    font-size: 12px; font-weight: 600; color: var(--et-sur-ardoise-plein);
}
.vpt-groupe th {
    /* densité voulue : en-tête de groupe, il porte le bouton « Valider les N » de 44 px */
    padding: 6px 16px; background: var(--et-surface-2); border-bottom: 1px solid var(--et-hairline);
    text-align: left; font-weight: 400;
}
.vpt-groupe th { display: table-cell; }
.vpt-groupe-txt { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; color: var(--et-muted); }
.vpt-groupe-txt > strong { font-size: 14px; color: var(--et-ink); }
.vpt-code { font-family: var(--et-font-mono); font-weight: 600; color: var(--et-form-blue-d); }
.vpt-lot { float: right; margin-left: 12px; }
.vpt-ligne > td { padding: var(--et-cellule-y) 12px; border-bottom: 1px solid var(--et-rang); color: var(--et-ink); vertical-align: middle; }
.vpt-ligne:hover > td { background: var(--et-survol); }
.vpt-ligne.est-choisie > td { background: var(--et-tint); }
.vpt-ligne.est-choisie > td:first-child { box-shadow: inset 3px 0 0 var(--et-form-blue); }

.vpt-c-case { width: 52px; padding-left: 4px !important; padding-right: 0 !important; }
.vpt-case-zone {
    width: 44px; height: 44px; display: inline-grid; place-items: center;
    padding: 0; border: 0; background: transparent; cursor: pointer;
}
.vpt-case-zone:focus-visible { outline: 2px solid var(--et-form-blue); outline-offset: -2px; }
.vpt-c-jour { width: 110px; font-family: var(--et-font-mono); font-weight: 600; white-space: nowrap; }
.vpt-c-heure { width: 70px; font-family: var(--et-font-mono); white-space: nowrap; }
.vpt-c-sens { width: 96px; }
.vpt-c-nature { width: 150px; }
.vpt-c-nature .mx-pastille, .vpt-c-decision .mx-pastille { white-space: nowrap; }
.vpt-c-lieu { min-width: 0; overflow-wrap: anywhere; }
.vpt-c-lieu > span { display: block; }
.vpt-c-attente { width: 90px; text-align: right; font-family: var(--et-font-mono); font-weight: 600; white-space: nowrap; }
.vpt-table thead th.vpt-c-attente { text-align: right; }
.vpt-c-attente.est-vieille { color: var(--et-danger-ink); }
.vpt-c-decision { width: 190px; }
.vpt-c-decision .vpt-sous { margin-left: 6px; }
.vpt-c-gestes { width: 210px; }
.vpt-gestes { display: inline-flex; gap: 8px; }

.vpt-sens {
    display: inline-flex; align-items: center; padding: 1px 10px; border-radius: var(--et-r-pill);
    font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--et-tint); color: var(--et-form-blue-d);
}
.vpt-sens.est-sortie { background: var(--et-neutre-bg); color: var(--et-neutre); }
.vpt-motif { color: var(--et-ink); }
.vpt-sous { font-size: 12px; color: var(--et-muted); }
.vpt-hors-zone { font-weight: 600; color: var(--et-avertissement-ink); }
.vpt-lien-carte { font-weight: 600; color: var(--et-form-blue-d); }

.vpt-pied { padding: 10px 16px; border-top: 1px solid var(--et-hairline); font-size: 13px; color: var(--et-muted); }

/* --- Sous 1024 px : une carte par demande, sous l'en-tête de son salarié --- */
@media (max-width: 1024px) {
    .vpt-barre { padding: 0; }
    .vpt-vues { overflow-x: auto; }
    .vpt-recherche-bloc { padding: var(--et-criteres-py) 16px; flex-basis: 100%; }
    .vpt-recherche { max-width: none; }

    .vpt-table, .vpt-table tbody { display: block; width: 100%; }
    .vpt-table thead { display: none; }
    .vpt-groupe, .vpt-groupe th { display: block; }
    .vpt-groupe th { overflow: hidden; }
    .vpt-lot { float: none; display: flex; width: 100%; justify-content: center; margin: 8px 0 2px; }
    .vpt-ligne {
        display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center;
        gap: 6px 10px; padding: 10px 16px; border-bottom: 1px solid var(--et-rang);
    }
    .vpt-ligne > td { display: block; height: auto; padding: 0; border: 0; width: auto; }
    .vpt-ligne:hover > td, .vpt-ligne.est-choisie > td, .vpt-ligne.est-choisie > td:first-child { background: none; box-shadow: none; }
    .vpt-ligne.est-choisie { background: var(--et-tint); box-shadow: inset 3px 0 0 var(--et-form-blue); }
    .vpt-c-case { width: auto; padding: 0 !important; margin-left: -10px; }
    .vpt-c-sens { grid-column: 4; justify-self: end; }
    .vpt-c-nature { grid-column: 1 / 4; grid-row: 2; }
    .vpt-c-attente, .vpt-c-decision { grid-column: 4; grid-row: 2; justify-self: end; text-align: right; }
    .vpt-c-lieu { grid-column: 1 / -1; }
    .vpt-c-gestes { grid-column: 1 / -1; }
    .vpt-gestes { display: flex; }
    .vpt-gestes .mx-btn { flex: 1 1 0; justify-content: center; }
    .vpt-table.est-traitees .vpt-ligne { grid-template-columns: auto minmax(0, 1fr) auto; }
    .vpt-table.est-traitees .vpt-c-sens { grid-column: 3; }
    .vpt-table.est-traitees .vpt-c-nature { grid-column: 1 / 3; grid-row: 2; }
    .vpt-table.est-traitees .vpt-c-decision { grid-column: 3; grid-row: 2; }
}
@media (max-width: 559px) {
    .vpt-recherche-bloc { flex-wrap: wrap; }
    .vpt-service { max-width: none; flex: 1 1 100%; }
}

/* Le sous-titre de la fenêtre (salarié, sens, date) se replie plutôt que d'être coupé par
   « … » au téléphone : la date est ce qu'on refuse. */
.vpt-modale .mx-modale-sous { white-space: normal; overflow: visible; text-overflow: clip; }
