/* ============================================================================
   PÉRIODES DE POINTAGE — /app/periodes
   Passation « design_handoff_periodes_pointage » (2026-10-02), qui succède à
   « design_handoff_periodes » (Design 24) et « export_periodes » (Design 6).

   Tuiles, bandeau à lignes marquées, onglets à chiffre et bande de faits viennent
   du gabarit (modele-erp.css §11.x). Cette feuille porte ce qui ne sert que cet
   écran : la barre onglets + gestes, la liste d'une ligne par période où le trou
   s'intercale, ses cartes sous 1024 px, et la fiche à libellés au-dessus.

   Les vues Suivi et Cockpit, la frise de couverture et la carte « Ce que la période
   commande » sont retirées avec leurs règles : la liste, les tuiles et le bandeau
   disent ce qu'elles disaient.

   PRÉFIXE .pdp-* ET NON .per-* : .per-* est déjà la famille du sélecteur de bornes
   PARTAGÉ. Aucune couleur en dur : tout passe par les jetons --et-*.
   ============================================================================ */

/* --- L'exercice, dans l'en-tête ------------------------------------------- */
.pdp-exercice-choix { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 14px; color: var(--et-muted); }
.pdp-exercice-choix .mx-select { height: 44px; width: auto; min-width: 110px; font-family: var(--et-font-mono); font-weight: 600; }

/* --- Le bandeau ------------------------------------------------------------ */
.pdp-signal-ligne { align-items: center; flex-wrap: wrap; }
.pdp-signal-txt { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pdp-signal-acte { flex: none; }
@media (max-width: 1024px) { .pdp-signal-acte { min-height: 44px; } }
@media (max-width: 640px)  { .pdp-signal-acte { flex: 1 1 100%; justify-content: center; margin-left: 18px; } }

/* --- La barre : onglets à gauche, gestes à droite --------------------------- */
.pdp-barre {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
    padding: 0 12px 0 0; border-bottom: 1px solid var(--et-hairline);
}
.pdp-vues { flex: 1 1 auto; border-bottom: 0; }
.pdp-barre-actes { display: flex; gap: 10px; flex-wrap: wrap; padding: 8px 0; }
.pdp-barre-actes .mx-btn { min-height: 44px; }

/* --- La liste -------------------------------------------------------------- */
.pdp-cadre { background: var(--et-surface); overflow-x: auto; }
.pdp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pdp-table thead th {
    padding: var(--et-cellule-tete-y) 12px; background: var(--et-table-head);
    font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap;
    color: var(--et-sur-ardoise-plein);
}
.pdp-table th.droite, .pdp-table td.droite { text-align: right; }
.pdp-table tbody td { padding: var(--et-cellule-y) 12px; border-bottom: 1px solid var(--et-rang);
    white-space: nowrap; color: var(--et-ink);
}
@media (max-width: 1024px) { .pdp-table tbody td { height: 44px; } }   /* règle tactile, sous 1024 px seulement : posée dès le bureau, la hauteur figeait la ligne (lot AK2) */
.pdp-table .mono { font-family: var(--et-font-mono); font-variant-numeric: tabular-nums; }
.pdp-table td.code { font-weight: 600; }
.pdp-table td.code a { color: var(--et-ink); text-decoration: none; }
.pdp-table td.code a:hover { color: var(--et-lien); text-decoration: underline; }
.pdp-table td.jalon { font-size: 13px; color: var(--et-muted); }
.pdp-table td.ecarts.est-ecart { font-weight: 600; color: var(--et-danger-ink); }
.pdp-table td.acte { width: 1%; }
.pdp-ligne { cursor: pointer; }
.pdp-ligne:hover > td { background: var(--et-survol); }

/* Le trou : à sa place chronologique, ligne ambre, son geste au bout. */
.pdp-trou > td { background: var(--et-avertissement-bg); color: var(--et-avertissement-ink); }
.pdp-trou > td:first-child { box-shadow: inset 3px 0 0 var(--et-avertissement-mark); }
.pdp-trou td.trou-txt { white-space: normal; }

.pdp-statut {
    display: inline-flex; align-items: center; padding: var(--et-badge-py) var(--et-badge-px);
    border-radius: var(--et-r-pill); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pdp-statut.est-ouverte { background: var(--et-tint); color: var(--et-form-blue-d); }
.pdp-statut.est-generee { background: var(--et-avertissement-bg); color: var(--et-avertissement-ink); }
.pdp-statut.est-soldee  { background: var(--et-neutre-bg); color: var(--et-ink); }
.pdp-defaut { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--et-lien); white-space: nowrap; }

/* Les gestes de ligne : au contour bleu — l'orange reste à « Nouvelle période ». */
.pdp-acte {
    min-height: 36px; padding: 0 12px; white-space: nowrap;
    background: var(--et-surface); border: 1px solid var(--et-form-blue); color: var(--et-form-blue-d); font-weight: 600;
}
.pdp-acte:hover:not(:disabled) { background: var(--et-tint); }

.pdp-pied { padding: 10px 14px; font-size: 13px; color: var(--et-muted); }

/* Sous 1024 px : une carte par période. Ligne 1 : code et statut ; ligne 2 : bornes ;
   ligne 3 : pointages, écarts, jalon ; puis le geste. Effectif et absences restent
   dans la fiche. */
@media (max-width: 1024px) {
    .pdp-table, .pdp-table tbody { display: block; width: 100%; }
    .pdp-table thead { display: none; }
    .pdp-table tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 14px; border-bottom: 1px solid var(--et-rang); }
    .pdp-table tbody tr > td { display: block; height: auto; padding: 0; border: 0; background: none; box-shadow: none; white-space: normal; }
    .pdp-table td.droite { text-align: left; }
    .pdp-table td.code { order: 1; }
    .pdp-table td.code a { display: inline-flex; align-items: center; min-height: 44px; }
    .pdp-table td.statut { order: 2; margin-left: auto; }
    .pdp-table td.bornes { order: 3; flex: 1 1 100%; font-size: 13px; color: var(--et-muted); }
    .pdp-table td.pts, .pdp-table td.ecarts, .pdp-table td.jalon { order: 4; font-size: 13px; }
    .pdp-table td.pts::after, .pdp-table td.ecarts::after { content: " " attr(data-unite); }
    .pdp-table td.eff, .pdp-table td.abs { display: none; }
    .pdp-table td.acte { order: 5; flex: 1 1 100%; width: auto; }
    .pdp-table td.acte:empty { display: none; }
    .pdp-acte { width: 100%; min-height: 44px; justify-content: center; }
    .pdp-table tr.pdp-trou { background: var(--et-avertissement-bg); box-shadow: inset 3px 0 0 var(--et-avertissement-mark); color: var(--et-avertissement-ink); }
    .pdp-table tr.pdp-trou td.trou-txt { order: 2; flex: 1 1 auto; }
    .pdp-cadre { overflow-x: visible; }
}

@media (max-width: 640px) {
    .pdp-barre { padding: 0 12px 0 0; }
    .pdp-barre-actes { width: 100%; padding: 8px 0 8px 12px; }
    .pdp-barre-actes .mx-btn { flex: 1 1 auto; justify-content: center; }
    .ecran-tete-bas .pdp-exercice-choix { margin-left: 0; }
}

/* ============================================================================
   LA FICHE DE PÉRIODE — fenêtre du gabarit (.mx-voile > .mx-modale-cadre, 660 px),
   libellés au-dessus, bande de cinq faits, jalons, gestes de référentiel.
   ============================================================================ */

/* La bande de faits est collée à la tête : le filet de l'en-tête sépare déjà. */
.pdp-modale .mx-faits { border-top: 0; }
.pdp-faits .mx-fait { flex-basis: 110px; }
.pdp-faits .mx-fait-val { font-size: 18px; }
.pdp-modale .mx-modale-sous { white-space: normal; overflow: visible; text-overflow: clip; }
.pdp-modale .mx-modale-tete .pdp-statut { background: var(--et-surface); }

.pdp-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin-bottom: 16px; }
.pdp-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0 0 16px; }
.pdp-champs .pdp-champ { margin: 0; }
.pdp-champ-lbl { font-size: 13px; font-weight: 600; color: var(--et-ink); }
.pdp-requis { color: var(--et-danger-ink); }
.pdp-champ .mx-input { height: 44px; }
.pdp-champ .mono { font-family: var(--et-font-mono); }

.pdp-case {
    display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 16px; padding: 0 12px;
    background: var(--et-surface-2); border: 1px solid var(--et-hairline); font-size: 14px; color: var(--et-ink); cursor: pointer;
}
.pdp-case input { width: 18px; height: 18px; flex: none; accent-color: var(--et-form-blue); }

.pdp-jalons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pdp-jalons-titre { font-family: var(--et-font-mono); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--et-muted); }
.pdp-jalons-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pdp-jalon { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--et-hairline); min-width: 0; }
.pdp-jalon-lbl { font-size: 13px; font-weight: 600; color: var(--et-ink); }
.pdp-jalon-val { font-size: 13px; color: var(--et-muted); font-family: var(--et-font-mono); }

.pdp-gestes { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-supprimer:not(:disabled) { color: var(--et-danger-ink); }
.pdp-generer { border-color: var(--et-form-blue); color: var(--et-form-blue-d); }

@media (max-width: 1024px) {
    .pdp-gestes .mx-btn { min-height: 44px; }
}
@media (max-width: 720px) {
    .pdp-champs, .pdp-jalons-grille { grid-template-columns: minmax(0, 1fr); }
    .pdp-gestes .mx-btn { flex: 1 1 100%; justify-content: center; }
}
