/*
 * Feuilles journalières (heures du terrain). Liée par base.html.twig.
 * Saisie au téléphone : grandes cibles, pas de défilement horizontal,
 * bouton d'envoi collé en bas (.gp-barre-actions).
 */

.gp-heures-saisie-ligne {
    padding: var(--gp-e3);
    margin-bottom: var(--gp-e3);
    border: 1px solid var(--gp-trait);
}

.gp-heures-journee,
.gp-heures-saisie-ligne__engin {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gp-e2) var(--gp-e3);
}

.gp-heures-saisie-ligne__engin {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.gp-heures-saisie-ligne__titre {
    float: none;
    width: 100%;
    margin-bottom: var(--gp-e2);
    font-size: 1rem;
}

.gp-heures-saisie-ligne__reference {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    margin-right: var(--gp-e2);
}

.gp-heures-saisie-ligne__client {
    font-size: 0.875rem;
    color: var(--gp-ardoise-600);
}

@media (max-width: 575.98px) {
    .gp-heures-saisie-ligne__engin {
        grid-template-columns: 1fr;
    }
}

.gp-heures-saisie-ligne__haut {
    display: flex;
    align-items: flex-end;
    gap: var(--gp-e2);
    margin-bottom: var(--gp-e2);
}

.gp-heures-saisie-ligne__chantier {
    flex: 1 1 auto;
    min-width: 0;
}

.gp-heures-saisie-ligne__retirer {
    min-width: var(--gp-cible);
    min-height: var(--gp-cible);
}

.gp-heures-saisie-ligne__horaires {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gp-e2);
    margin-bottom: var(--gp-e2);
}

.gp-heures-saisie-ligne__temps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gp-e2) var(--gp-e4);
    margin-bottom: var(--gp-e2);
}

.gp-heures-saisie-ligne__temps .form-check {
    display: flex;
    align-items: center;
    gap: var(--gp-e2);
    min-height: var(--gp-cible);
    margin: 0;
}

.gp-heures-saisie-ligne__temps .form-check-input {
    width: 1.4rem;
    height: 1.4rem;
    margin: 0;
}

.gp-heures-total dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--gp-e1) var(--gp-e3);
}

.gp-heures-total dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.gp-heures-total__principal {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gp-nuit);
}

.gp-heures-ligne {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--gp-e2);
    padding: var(--gp-e2) 0;
    border-bottom: 1px dashed var(--gp-trait);
}

.gp-heures-ligne:last-child {
    border-bottom: 0;
}

.gp-heures-ligne__horaires,
.gp-heures-ligne__temps {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.gp-heures-ligne__temps {
    text-align: right;
}

.gp-heures-ligne__chantier {
    min-width: 0;
    overflow-wrap: anywhere;
}

.gp-heures-total-ligne {
    margin-top: var(--gp-e2);
    text-align: right;
}

.gp-heures-lien {
    display: inline-flex;
    align-items: center;
    min-height: var(--gp-cible);
    font-weight: 600;
}

/* Semaine du bureau : le tableau défile dans sa carte, jamais la page. */
.gp-heures-semaine {
    overflow-x: auto;
}

.gp-heures-case {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 3.5rem;
    min-height: 2rem;
    padding: 0 0.4rem;
    border-radius: var(--gp-radius-sm);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-decoration: none;
    background: var(--gp-bleu-pale);
    color: var(--gp-bleu);
}

.gp-heures-case--validee {
    background: var(--gp-vert-pale);
    color: var(--gp-vert);
}

.gp-heures-case--manquante {
    background: var(--gp-ambre-pale);
    color: var(--gp-ambre);
    font-size: 0.8rem;
}

.gp-heures-case--absence {
    background: var(--gp-fond-creux);
    color: var(--gp-ardoise-600);
}

.gp-heures-case--vide {
    background: transparent;
    color: var(--gp-ardoise-600);
}


/* « Mes heures du jour » sur la carte de Mon planning. */
.gp-jour__heures {
    padding: 0 var(--gp-e4) var(--gp-e4);
}

/* ------------------------------------------------------------------ */
/* Récap des heures (bureau, paie)                                    */
/* ------------------------------------------------------------------ */

.gp-bi-indicateurs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: var(--gp-e3);
}

.gp-bi-indicateur {
    display: flex;
    flex-direction: column;
    gap: var(--gp-e1);
    padding: var(--gp-e3) var(--gp-e4);
}

.gp-bi-indicateur__valeur {
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--gp-nuit);
    line-height: 1.1;
}

.gp-bi-indicateur__libelle {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gp-ardoise-600);
}

.gp-bi-indicateur--alerte .gp-bi-indicateur__valeur {
    color: var(--gp-ambre);
}

.gp-bi-tableau {
    overflow-x: auto;
}

.gp-bi-tableau td,
.gp-bi-tableau th {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.gp-bi-colonne-barre {
    width: 30%;
    min-width: 8rem;
}

.gp-bi-barre {
    display: flex;
    height: 0.75rem;
    border-radius: var(--gp-radius-sm);
    background: var(--gp-fond-creux);
    overflow: hidden;
}

.gp-bi-barre__engin,
.gp-bi-legende--engin {
    background: var(--gp-jaune);
}

.gp-bi-barre__reste,
.gp-bi-legende--reste {
    background: var(--gp-bleu-chantier);
}

.gp-bi-legende {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 2px;
    vertical-align: middle;
}
