/*
 * Compléments d'interface ajoutés avec les retours client du 14/09/2026 :
 * onglets des relevés, cartes de choix, contrôle des heures, avancement.
 */

.onglets {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 0 1.25rem;
    border-bottom: 1px solid var(--bordure-forte);
}

.onglets__lien {
    padding: .55rem .95rem;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: var(--texte-doux);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: -1px;
}

.onglets__lien:hover { color: inherit; background: var(--gris-pale); }

.onglets__lien.est-actif {
    color: inherit;
    background: #fff;
    border-color: var(--bordure-forte);
}

.onglets__compteur { margin-left: .35rem; }

.choix-releves {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.choix-releves .carte { display: flex; flex-direction: column; }
.choix-releves .carte__corps { flex: 1; display: flex; flex-direction: column; gap: .75rem; }
.choix-releves .groupe-boutons { margin-top: auto; }

.bandeau-chantier {
    display: grid;
    gap: .25rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.bandeau-chantier__cle {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--texte-doux);
    margin: 0;
}

.bandeau-chantier__valeur { margin: 0 0 .5rem; font-weight: 600; }

.sous-bloc {
    border-top: 1px dashed var(--bordure-forte);
    margin-top: .75rem;
    padding-top: .75rem;
}

.cases-multiples > div,
.cases-multiples {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
}

.cases-multiples label { font-weight: normal; }

.progression {
    height: 7px;
    margin: .3rem 0 .15rem;
    background: var(--gris-pale);
    border-radius: 999px;
    overflow: hidden;
}

.progression__barre {
    height: 100%;
    background: var(--vert);
    border-radius: 999px;
}

.progression__barre--depasse { background: var(--rouge); }

.liste-simple { margin: 0; padding-left: 1.1rem; }
.liste-simple li + li { margin-top: .15rem; }

/*
 * Relevé d'équipe (retours client du 17/09/2026) : équipe du relevé, tâches,
 * barre de synthèse, listes déroulantes à choix multiple et catalogue des
 * articles du stock.
 */

/* Un élément masqué par l'attribut « hidden » le reste, même si sa classe
   impose un affichage (« .alerte » est en flex, par exemple). */
[hidden] { display: none !important; }

.marge-haut-petite { margin-top: .6rem; }

.sous-bloc__titre {
    margin: 0 0 .5rem;
    font-size: .82rem;
    font-weight: 650;
}

details.sous-bloc > summary { cursor: pointer; }
details.sous-bloc > summary.sous-bloc__titre { margin-bottom: 0; }

.collection-item--compact { padding: .7rem .8rem; background: var(--surface); }

/* Liste déroulante à choix multiple (contrôleur « liste-deroulante-multiple ») :
   le panneau se déplie dans le flux, sans rien masquer ni déborder de la carte. */
.liste-deroulante__libelle {
    display: block;
    margin-bottom: .28rem;
    font-size: .78rem;
    font-weight: 650;
    color: var(--texte-doux);
}

.liste-deroulante__bouton {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    min-height: 38px;
    padding: .45rem .65rem;
    border: 1px solid var(--bordure-forte);
    border-radius: var(--rayon-petit);
    background: var(--surface);
    color: var(--texte);
    font: inherit;
    font-size: .88rem;
    text-align: left;
    cursor: pointer;
}

.liste-deroulante__bouton::after {
    content: "";
    flex: 0 0 auto;
    width: .45rem;
    height: .45rem;
    border-right: 2px solid var(--texte-doux);
    border-bottom: 2px solid var(--texte-doux);
    transform: translateY(-2px) rotate(45deg);
}

.liste-deroulante.est-ouverte .liste-deroulante__bouton::after { transform: translateY(2px) rotate(-135deg); }
.liste-deroulante.a-des-choix .liste-deroulante__bouton { border-color: var(--orange-fonce); }

.liste-deroulante__panneau {
    margin-top: .35rem;
    max-height: 16rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .35rem .5rem;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    background: var(--surface);
}

.liste-deroulante__option {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .2rem 0;
    font-weight: normal;
    cursor: pointer;
}

.liste-deroulante__aide { margin: .15rem 0 .4rem; font-size: .78rem; color: var(--texte-doux); }

/* Comptes du bureau, repliés en fin de liste d'équipe (encadrement seul). */
.liste-deroulante__groupe { margin-top: .35rem; padding-top: .35rem; border-top: 1px solid var(--bordure); }
.liste-deroulante__groupe > summary { cursor: pointer; font-size: .85rem; color: var(--texte-doux); padding: .2rem 0; }

.liste-deroulante--equipe { margin-bottom: .9rem; }
.liste-deroulante--equipe .liste-deroulante__panneau { max-width: 32rem; }

/* Équipe du relevé : une ligne par salarié. */
.equipier__entete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .35rem .75rem;
    margin-bottom: .5rem;
}

.equipier__nom { margin: 0; font-weight: 650; }
.equipier__infos { display: flex; flex-wrap: wrap; gap: .35rem; }

.grille--horaires {
    display: grid;
    gap: 0 .75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Tâches du relevé. */
.tache { background: var(--surface); border-left: 3px solid var(--orange); }
.grille--tache { grid-template-columns: 2fr 2fr minmax(9rem, 1fr); gap: 0 1rem; }
.grille--materiel { grid-template-columns: 2fr minmax(8rem, 1fr) 2fr; gap: 0 1rem; }

/* Barre de synthèse : journée de l'équipe, temps imputé, reste à imputer. */
.synthese {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.1rem;
    margin: 0 0 .9rem;
    padding: .55rem .8rem;
    border: 1px solid var(--bordure);
    border-left-width: 4px;
    border-radius: var(--rayon-petit);
    background: var(--surface);
    font-size: .88rem;
}

.carte__pied .synthese { margin: 0; }
.synthese:empty { display: none; }
.synthese__cle { color: var(--texte-doux); }
.synthese--ok { border-left-color: var(--vert); }
.synthese--ok .synthese__element--reste strong { color: var(--vert); }
.synthese--reste { border-left-color: var(--orange); background: var(--orange-pale); }
.synthese--reste .synthese__element--reste strong { color: var(--orange-badge); }
.synthese--depasse { border-left-color: var(--rouge); background: var(--rouge-pale); }
.synthese--depasse .synthese__element--reste strong { color: var(--rouge); }

/* Catalogue « Articles du stock » (contrôleur « catalogue-articles ») : plein
   écran sur téléphone comme les autres fenêtres, plus étroit au bureau. */
@media (min-width: 901px) {
    .catalogue { width: min(720px, 94vw); }
}

.catalogue__resultats {
    list-style: none;
    margin: .6rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.catalogue__article {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    width: 100%;
    min-height: 44px;
    padding: .5rem .7rem;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    background: var(--surface);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.catalogue__article:hover,
.catalogue__article:focus-visible { border-color: var(--orange-fonce); background: var(--orange-pale); }
.catalogue__libelle { font-weight: 600; }
.catalogue__details { font-size: .78rem; color: var(--texte-doux); }

@media (max-width: 900px) {
    .liste-deroulante__bouton { min-height: 44px; }
    .liste-deroulante__option { min-height: 44px; }
    .grille--tache,
    .grille--materiel { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .grille--horaires { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .liste-deroulante--equipe .bouton { width: 100%; }
    .synthese { flex-direction: column; }
}

/* Relevé camions : temps de travail recalculé en direct sous les horaires. */
.total-direct {
    margin: 0 0 1rem;
    padding: .55rem .8rem;
    border-radius: var(--rayon-petit);
    background: var(--gris-pale);
    font-size: .86rem;
}

/*
 * Barre de filtres : un groupe de boutons plus large que l'écran (navigation
 * par semaine du kilométrage : quatre boutons) rétrécit à la largeur de la
 * barre et passe à la ligne, au lieu de faire défiler la page sur téléphone.
 */
.barre-filtres .groupe-boutons { flex-shrink: 1; max-width: 100%; }

/*
 * Suivi d'entretien du parc (retours client du 17/09/2026) : fiche matériel,
 * échéancier et colonne « Entretien » de la liste.
 */
.kpi--orange { border-top-color: var(--orange); }

.pile--serree { gap: .15rem; }

.lien-discret { color: inherit; text-decoration: none; }
.lien-discret:hover { color: inherit; }

a.kpi { display: block; }
a.kpi:hover { box-shadow: var(--ombre-forte); }

.carte__pied details > summary { cursor: pointer; }

/* Sur téléphone, les actions d'une ligne s'empilent au lieu d'élargir le tableau. */
@media (max-width: 560px) {
    .tableau .actions .groupe-boutons--vertical {
        flex-direction: column;
        align-items: stretch;
    }
}

/*
 * Formations des salariés (retours client du 17/09/2026) : dans la liste des
 * comptes, les badges (permis, FCO, CACES, AIPR, SST…) s'alignent sur
 * quelques lignes au lieu de s'empiler un par un.
 */
.rangee--badges { gap: .25rem; min-width: 12rem; }

/*
 * Stock (retours client du 17/09/2026) : champs affichés à la demande,
 * comptages d'inventaire, péremptions.
 */

/* Champ masqué par un contrôleur Stimulus (mouvement de stock, inventaire). */
.champ[hidden] { display: none !important; }

.progression-cellule { min-width: 130px; }

.comptage__saisie {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.comptage__saisie input { width: 7rem; }
.comptage__commentaire { min-width: 11rem; }
.comptage__ecart--plus { color: var(--vert); font-weight: 600; }
.comptage__ecart--moins { color: var(--rouge); font-weight: 600; }
.tableau-comptage tbody tr.est-modifiee td { background: var(--orange-pale); }

/* Sur téléphone, chaque ligne de comptage devient une fiche empilée : un
   tableau de cinq colonnes avec deux champs de saisie ne tient pas en 390 px. */
@media (max-width: 560px) {
    .tableau-comptage thead { display: none; }
    .tableau-comptage,
    .tableau-comptage tbody,
    .tableau-comptage tr,
    .tableau-comptage td { display: block; width: 100%; }
    .tableau-comptage tr { padding: .65rem .8rem; border-bottom: 1px solid var(--bordure); }
    .tableau-comptage tbody tr:last-child { border-bottom: none; }
    .tableau-comptage td { border: 0; padding: .2rem 0; text-align: left; white-space: normal; }
    .tableau-comptage td[data-libelle]::before {
        content: attr(data-libelle) " : ";
        color: var(--texte-doux);
        font-size: .75rem;
    }
    .comptage__saisie { flex-wrap: wrap; }
    .comptage__saisie input { width: 9rem; }
    .comptage__commentaire { width: 100%; min-width: 0; }
}

/*
 * Préparations pour le lendemain (retours client du 17/09/2026) : listes des
 * équipes pointées par le chef de parc, souvent sur téléphone.
 */
.preparation-jour__entete { margin: 1.5rem 0 .75rem; }
.preparation-jour__titre { margin: 0; font-size: 1.1rem; }

.preparation + .preparation {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--bordure-forte);
}

.preparation__entete {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .4rem 1rem;
    margin-bottom: .6rem;
}

.preparation__commentaire {
    margin: 0 0 .6rem;
    padding: .45rem .7rem;
    background: var(--orange-pale);
    border-left: 3px solid var(--orange);
    border-radius: var(--rayon-petit);
    font-size: .86rem;
}

.preparation__lignes {
    list-style: none;
    margin: 0 0 .75rem;
    padding: 0;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    background: var(--surface);
}

.preparation__ligne {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .5rem .7rem;
}

.preparation__ligne + .preparation__ligne { border-top: 1px solid var(--bordure); }
.preparation__ligne.est-prete { background: var(--vert-pale); }
.preparation__ligne > input[type="checkbox"] { flex: 0 0 auto; margin-top: .1rem; }

/* Toute la ligne est cliquable : le libellé couvre le texte de la ligne. */
.preparation__contenu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
    font-weight: normal;
    cursor: pointer;
}

span.preparation__contenu { cursor: default; }

.preparation__principal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .15rem .75rem;
}

.preparation__designation { font-weight: 600; overflow-wrap: anywhere; }
.preparation__quantite { font-weight: 600; white-space: nowrap; }

.preparation__etat {
    flex: 0 0 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--texte-faible);
}

.preparation__etat--prete { color: var(--vert); }
.preparation__etat--manquante { color: var(--rouge); }

.preparation__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.preparation__actions form { margin: 0; }
.preparation__actions .preparation__compteur { margin-right: auto; }

/*
 * Retour client du 13/10/2026 : recherche à la frappe au-dessus des longues
 * listes d'articles (contrôleur « liste-recherche »).
 */
.liste-recherche__champ { margin-bottom: .3rem; }
.liste-recherche__etat { display: block; margin-top: .2rem; }
.liste-recherche__etat:empty { display: none; }
.liste-recherche__creation { margin-top: .3rem; white-space: normal; text-align: left; }
.liste-recherche__creation[hidden] { display: none !important; }

/* Retour client du 15/10/2026 (« 10.2 ») : l'unité de l'article à côté de la quantité. */
.champ-unite { display: flex; align-items: center; gap: .5rem; }
.champ-unite > input { flex: 1; min-width: 0; }
.champ-unite__symbole { font-weight: 600; white-space: nowrap; }
/* Retour client du 26/10/2026 : « une case unité à côté de la case quantité ». */
.champ-unite__case {
    display: inline-flex; align-items: baseline; gap: .35rem; flex: none;
    min-width: 5.5rem; padding: .45rem .6rem; font-size: .86rem;
    background: var(--gris-pale); border: 1px solid var(--bordure-forte); border-radius: var(--rayon-petit);
}
.champ-unite__etiquette { font-size: .72rem; color: var(--texte-doux); text-transform: uppercase; letter-spacing: .02em; }
.champ-unite__symbole:empty::before { content: '—'; color: var(--texte-doux); font-weight: 400; }

/*
 * Retour client du 13/10/2026 : « Signaler un manque » sous chaque ligne
 * pointée par le parc, et motif d'annulation d'une demande d'équipe.
 */
.preparation__ligne:has(.preparation__manque) { flex-wrap: wrap; }
.preparation__manque { flex: 1 0 100%; padding-left: 1.6rem; min-width: 0; }
.preparation__manque summary { cursor: pointer; color: var(--texte-doux); }
.preparation__manque input[type="text"] { width: 100%; }
.preparation__annulation { display: flex; flex-direction: column; gap: .4rem; }
.preparation__annulation[open] form { display: flex; flex-wrap: wrap; gap: .4rem; }
.preparation__annulation input[name="motif"] { min-width: 14rem; flex: 1; }
.preparation__annulation summary { list-style: none; }
.preparation__annulation summary::-webkit-details-marker { display: none; }

.aide-unite { margin: -.35rem 0 .6rem; font-size: .8rem; color: var(--texte-doux); }

/* Éléments masqués par un contrôleur Stimulus : l'attribut « hidden » doit
   l'emporter sur l'affichage propre du composant (boutons, alertes). */
.bouton[hidden],
.alerte[hidden],
.aide-unite[hidden] { display: none !important; }

/* ------------------------------------------------------------------------
 * Planning des équipes (retours client du 17/09/2026) : grilles par salarié
 * et par chantier, pastilles colorées par type de chantier ou par nature
 * d'absence, semaine personnelle en cartes (téléphone).
 * La couleur double toujours un texte : jamais d'information par la seule
 * couleur.
 * ------------------------------------------------------------------------ */

.planning-barre {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1rem;
}

.planning-aller { display: flex; align-items: center; gap: .5rem; }
.planning-aller label { font-size: .78rem; font-weight: 650; color: var(--texte-doux); white-space: nowrap; }
.planning-aller input[type="date"] { width: auto; }

.tableau--planning th,
.tableau--planning td { vertical-align: top; }
.tableau--planning thead th { min-width: 150px; }
.tableau--planning thead th:first-child,
.tableau--planning tbody th[scope="row"] { min-width: 170px; max-width: 220px; white-space: normal; }
.tableau--planning td { min-width: 150px; padding: .4rem; }
.tableau--planning .est-aujourdhui { background: var(--orange-pale); }
.tableau--planning thead th.est-aujourdhui { color: var(--orange-fonce); }
.tableau--planning .est-ferie {
    background-image: repeating-linear-gradient(135deg, transparent 0 7px, var(--gris-pale) 7px 9px);
}
.tableau--planning tbody tr:hover { background: transparent; }
.tableau tr.est-aujourdhui > td { background: var(--orange-pale); }
.planning-ligne-annexe th[scope="row"],
.planning-ligne-annexe td { border-top: 2px solid var(--bordure-forte); }

.planning-jour__ferie { display: block; font-size: .68rem; font-weight: 600; color: var(--texte-doux); text-transform: none; letter-spacing: 0; }
.planning-salarie { display: block; font-weight: 650; }
.planning-salarie__metier { display: block; font-size: .74rem; font-weight: 400; color: var(--texte-doux); }

.cellule-planning { display: flex; flex-direction: column; gap: .3rem; }

.pastille {
    display: block;
    padding: .3rem .45rem;
    border-left: 4px solid var(--bordure-forte);
    border-radius: var(--rayon-petit);
    background: var(--surface-2);
    color: var(--texte);
    font-size: .76rem;
    line-height: 1.3;
}
a.pastille:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--bordure-forte); }
.pastille__creneau {
    display: block;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--texte-doux);
}
.pastille__titre { display: block; font-weight: 650; }
.pastille__detail,
.pastille__materiel,
.pastille__note { display: block; color: var(--texte-doux); overflow-wrap: anywhere; }
.pastille__materiel::before { content: "▸ "; }
.pastille__note { font-style: italic; }
.pastille--alerte { box-shadow: inset 0 0 0 1px var(--rouge); }
.pastille__alerte { display: block; font-weight: 700; color: var(--rouge); }
/* Retour du 25/09/2026 : un engin qui change de chantier dans la journée est
   une saisie acceptée — rappel du transport en orange, le rouge restant aux
   vrais problèmes (même moment, engin hors service). */
.pastille--transport { box-shadow: inset 0 0 0 1px var(--orange-fonce); }
/* Retour client du 15/10/2026 : une case de travail se glisse vers un autre jour ou un autre salarié. */
.pastille--glissable { cursor: grab; }
.pastille--saisie { opacity: .45; }
/* Retour client du 26/10/2026 : « ⋯ » dans le coin de la vignette, son menu
   (ouvrir, dupliquer au lendemain, pour un autre gars). Fond clair pour rester
   lisible sur les couleurs foncées ; le texte de la vignette lui laisse sa place. */
.pastille-groupe { position: relative; }
.pastille-groupe > .pastille { padding-right: 1.6rem; }
.pastille-groupe__menu {
    position: absolute;
    top: .2rem;
    right: .2rem;
    min-width: 1.35rem;
    padding: 0 .25rem;
    border: 1px solid var(--bordure-forte);
    border-radius: var(--rayon-petit);
    background: var(--surface);
    color: var(--texte);
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}
.pastille-groupe__menu:hover,
.pastille-groupe__menu:focus-visible { text-decoration: none; background: var(--orange-pale); }
.menu-vignette__bloc { margin-top: 1.25rem; }
.planning-glisser--actif td[data-glisser-planning-target="case"] { transition: background-color .1s; }
.planning-glisser--actif td.est-cible { background: var(--orange-pale); outline: 2px dashed var(--orange-fonce); outline-offset: -3px; }
.details-deplacer { margin: 1rem 0; padding: .5rem .75rem; border: 1px solid var(--bordure); border-radius: 6px; }
.details-deplacer summary { cursor: pointer; font-weight: 600; }
/* Retour client du 15/10/2026 : les absents de toute la semaine, sur une ligne. */
.absents-semaine { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.pastille__transport { display: block; font-weight: 700; color: var(--orange-fonce); }
.pastille__indisponible { color: var(--rouge); }

/* Types de chantier. */
.pastille--chantier-tp              { background: var(--bleu-pale);   border-left-color: var(--bleu); }
.pastille--chantier-paysage         { background: var(--vert-pale);   border-left-color: var(--vert); }
.pastille--chantier-mixte           { background: #e0f2f1;            border-left-color: #0f766e; }
.pastille--chantier-piscine         { background: #ecfeff;            border-left-color: #0e7490; }
.pastille--chantier-transport       { background: var(--orange-pale); border-left-color: var(--orange-fonce); }
.pastille--chantier-location        { background: var(--violet-pale); border-left-color: var(--violet); }
.pastille--chantier-sous_traitance  { background: #fbf3dc;            border-left-color: #8a6100; }
/* Dépôt et absences. */
.pastille--depot       { background: var(--gris-pale);  border-left-color: var(--ardoise-3); }
.pastille--conges      { background: #fce7f3;           border-left-color: #9d174d; }
.pastille--maladie     { background: var(--rouge-pale); border-left-color: var(--rouge); }
.pastille--formation   { background: #eef2ff;           border-left-color: #4338ca; }
.pastille--intemperies { background: #e0f2fe;           border-left-color: #0369a1; }
.pastille--ecole      { background: #f5f5f4;           border-left-color: #57534e; border-left-style: double; }
.pastille--absence     { background: var(--surface-2);  border-left-color: var(--texte-faible); border-left-style: dashed; }
/* Retour client du 25/09/2026 : une couleur par chantier (fond et liseré en
   style, cf. CouleurChantier). Sur ces fonds teintés, les textes secondaires
   passent en ardoise pour garder un contraste AA ; le type du chantier, qui
   donnait la couleur jusque-là, reste écrit en étiquette. */
.pastille--par-chantier .pastille__creneau,
.pastille--par-chantier .pastille__detail,
.pastille--par-chantier .pastille__materiel,
.pastille--par-chantier .pastille__note { color: var(--ardoise-3); }
/* Retour client du 07/10/2026 : « Les couleurs sont assez similaires / à voir
   si on peut avoir plus de contrastes ». Les chantiers ont désormais des
   couleurs franches (CouleurChantier::PALETTE), dont la moitié sur fond foncé
   à texte blanc : la couleur du texte vient du style de la case, et les
   textes secondaires en héritent (contraste AA, 4,5:1 au moins). Les mentions
   rouges et orange passent sur une étiquette blanche pour rester lisibles
   sur tous les fonds. Liseré plus épais : la teinte se voit même sur une
   case étroite. */
.pastille--par-chantier { border-left-width: 6px; }
.pastille--par-chantier .pastille__creneau,
.pastille--par-chantier .pastille__detail,
.pastille--par-chantier .pastille__materiel,
.pastille--par-chantier .pastille__note,
.pastille--par-chantier .pastille__type { color: inherit; }
.pastille--par-chantier .pastille__alerte,
.pastille--par-chantier .pastille__transport,
.pastille--par-chantier .pastille__indisponible {
    display: inline-block;
    margin-top: .15rem;
    padding: 0 .3rem;
    border-radius: 3px;
    background: #fff;
}
.pastille--par-chantier.pastille--alerte { box-shadow: inset 0 0 0 2px var(--rouge); }
.pastille--par-chantier.pastille--transport { box-shadow: inset 0 0 0 2px var(--orange-fonce); }
a.pastille--fonce:hover { box-shadow: 0 0 0 2px var(--ardoise); }
/* « Mon planning » : la couleur du chantier sur le bandeau du titre et le
   liseré, la carte sur fond blanc (liens et boutons inchangés). */
.affectation-jour--chantier { background: var(--surface); border-left-width: 6px; }
.affectation-jour--chantier .affectation-jour__titre { margin: -.2rem -.35rem .45rem; padding: .3rem .45rem; border-radius: var(--rayon-petit); }
.affectation-jour--chantier .affectation-jour__titre .pastille__creneau { color: inherit; }
.pastille__type {
    display: inline-block;
    margin-top: .15rem;
    padding: 0 .3rem;
    border: 1px solid currentColor;
    border-radius: 3px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ardoise-3);
}
.pastille__note { font-style: normal; }
.pastille__note-titre { font-weight: 700; font-style: normal; }
.legende__temoin--chantiers {
    border-left-color: #172554;
    /* Quatre couleurs de la palette des chantiers (CouleurChantier::PALETTE). */
    background: linear-gradient(90deg, #fde047 0 25%, #1e40af 25% 50%, #fdba74 50% 75%, #166534 75%);
}
.planning-chantier__temoin {
    display: inline-block;
    width: .8rem;
    height: .8rem;
    margin-right: .3rem;
    border-radius: 2px;
    border-left: 4px solid;
    vertical-align: -1px;
}

/* Salariés restant à affecter (retour client du 25/09/2026). La virgule
   suit le nom (même élément) ; sur téléphone, chaque nom devient une
   pastille à toucher de 44 px, sans virgule. */
.planning-a-affecter__jour { margin: 0 0 .35rem; }
.planning-a-affecter__jour:last-child { margin-bottom: 0; }
.planning-a-affecter__liens { display: inline-flex; flex-wrap: wrap; gap: .25rem .5rem; }
/* Le résumé repliable ne sert que sur téléphone (voir plus bas) ; sur
   ordinateur, le jour est écrit devant les noms, tous visibles. */
.planning-a-affecter__resume { display: none; }
/* Le résumé d'un jour replié tient sur une ligne (points de suspension) :
   sans min-width: 0, sa longueur entière élargissait l'alerte, et la page
   débordait de l'écran du téléphone. */
.planning-a-affecter__contenu { flex: 1 1 auto; min-width: 0; }

.planning-ajout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: .2rem .4rem;
    border: 1px dashed var(--bordure-forte);
    border-radius: var(--rayon-petit);
    color: var(--texte-doux);
    font-size: .74rem;
}
.planning-ajout:hover { border-color: var(--orange-fonce); color: var(--orange-fonce); text-decoration: none; }
/* Après .planning-ajout, qu'elle doit surcharger : case d'un salarié à affecter. */
.planning-ajout--a-affecter { border-color: var(--orange-fonce); color: var(--orange-fonce); font-weight: 650; }
/* « Recopier la veille » (retour client du 08/10/2026) : un bouton de formulaire
   à l'allure des liens « + Planifier », en tête de colonne ou dans la case. */
.planning-veille { margin: .3rem 0 0; }
.planning-veille__bouton { width: 100%; background: transparent; font: inherit; font-size: .72rem; font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer; }
.equipe-presente { margin: 0 0 .5rem; padding: 0; list-style: none; font-size: .85rem; }
.equipe-presente li::before { content: "▸ "; color: var(--texte-doux); }

.planning-materiels { margin: 0; padding: 0; list-style: none; font-size: .74rem; color: var(--texte-doux); }
.planning-materiels li::before { content: "▸ "; }
.planning-materiels .est-en-conflit { color: var(--rouge); }
.planning-materiels .est-en-transport { color: var(--orange-fonce); }

.legende { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0; padding: 0; list-style: none; font-size: .74rem; color: var(--texte-doux); }
.legende__item { display: inline-flex; align-items: center; gap: .35rem; }
.legende__temoin { display: inline-block; width: 1.1rem; height: .9rem; border: 1px solid var(--bordure); border-left: 4px solid var(--bordure-forte); border-radius: 2px; }
.legende__temoin--ferie {
    border: 1px solid var(--bordure);
    background-image: repeating-linear-gradient(135deg, transparent 0 3px, var(--bordure-forte) 3px 4px);
}

/* Formulaires : cases à cocher en colonnes (salariés, engins par catégorie). */
.champ-cases { min-width: 0; margin: 0 0 1rem; padding: 0; border: 0; }
.champ-cases__legende {
    margin-bottom: .35rem;
    padding: 0;
    font-size: .78rem;
    font-weight: 650;
    color: var(--texte-doux);
}
.champ-cases__legende.required::after { content: " *"; color: var(--rouge); }
.groupes-cases {
    column-width: 220px;
    column-gap: 1.25rem;
    max-height: 22rem;
    overflow-y: auto;
    padding: .5rem .75rem;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    background: var(--surface-2);
}
.groupes-cases--en-ligne {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    max-height: none;
    padding: 0;
    border: 0;
    background: none;
}
.groupe-cases { break-inside: avoid; }
.groupe-cases__titre {
    margin: .35rem 0 .1rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--texte-doux);
}
.case-a-cocher { display: flex; align-items: center; gap: .15rem; min-height: 30px; break-inside: avoid; }
/* La case garde sa taille quand le libellé passe sur deux lignes (engin loué). */
.case-a-cocher input { flex-shrink: 0; }
.case-a-cocher label { font-size: .84rem; cursor: pointer; }
/* Engin loué qui ne l'est pas à la date choisie (contrôleur « affectation-planning »). */
.case-a-cocher__alerte { color: var(--rouge); font-weight: 700; }
.case-a-cocher--grisee label { cursor: default; opacity: .6; }
.form-actions__fin { margin-left: auto; }

/* Semaine personnelle : une carte par jour. */
.semaine-salarie { display: flex; flex-direction: column; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.jour-planning {
    padding: .8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}
.jour-planning.est-aujourdhui { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.jour-planning__titre { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-size: .95rem; }
.affectation-jour {
    padding: .55rem .75rem;
    border-left: 4px solid var(--bordure-forte);
    border-radius: var(--rayon-petit);
}
.affectation-jour + .affectation-jour { margin-top: .5rem; }
.affectation-jour__titre { margin: 0 0 .35rem; font-weight: 650; }
.affectation-jour__details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .15rem .75rem;
    margin: 0 0 .35rem;
    font-size: .84rem;
}
.affectation-jour__details dt { color: var(--texte-doux); }
.affectation-jour__details dd { margin: 0; overflow-wrap: anywhere; }
.affectation-jour__ligne { margin: 0 0 .25rem; font-size: .84rem; }
/* Retour client du 25/09/2026 : « il faut bien que les gars voient […]
   l'encadré NOTES : pour indiquer leur heure d'embauche et les consignes
   spécifiques ». L'heure d'embauche en gros, les consignes encadrées. */
.affectation-jour__embauche {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    margin: 0 0 .4rem;
    padding: .2rem .55rem;
    border-radius: var(--rayon-petit);
    background: var(--ardoise);
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
}
.affectation-jour__embauche small { font-size: .72rem; font-weight: 600; opacity: .85; }
.affectation-jour__consignes {
    margin: .35rem 0 .4rem;
    padding: .45rem .6rem;
    border: 1px solid var(--orange);
    border-left-width: 4px;
    border-radius: var(--rayon-petit);
    background: var(--orange-pale);
    font-size: .88rem;
    overflow-wrap: anywhere;
}
.affectation-jour__consignes-texte { margin: 0; white-space: pre-line; }
.affectation-jour__consignes-titre {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--orange-fonce);
}

@media (max-width: 900px) {
    .planning-ajout { min-height: 44px; }
    .planning-a-affecter__jour { margin-bottom: .6rem; }
    .planning-a-affecter__liens { display: flex; gap: .4rem; margin-top: .3rem; }
    .planning-a-affecter__nom a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0 .75rem;
        border: 1px solid var(--orange-fonce);
        border-radius: var(--rayon-petit);
        background: var(--surface);
        font-weight: 600;
        text-decoration: none;
    }
    .planning-a-affecter__virgule { display: none; }
    /* Un jour replié tient dans 44 px : jour, nombre et début des noms
       (relecture du 25/09/2026). */
    .planning-a-affecter__libelle { display: none; }
    .planning-a-affecter__resume {
        display: flex;
        align-items: center;
        gap: .5rem;
        min-height: 44px;
        cursor: pointer;
        list-style: none;
    }
    .planning-a-affecter__resume::-webkit-details-marker { display: none; }
    .planning-a-affecter__resume::before { content: "▸"; color: var(--orange-fonce); }
    .planning-a-affecter__jour[open] > .planning-a-affecter__resume::before { content: "▾"; }
    .planning-a-affecter__resume strong { white-space: nowrap; }
    /* Deux lignes plutôt qu'une : la demi-journée qui reste, « (après-midi) »,
       est écrite après le nom et tombait dans les points de suspension dès le
       troisième salarié (vérification du 25/09/2026). Le jour replié garde
       ses 44 px. */
    .planning-a-affecter__apercu {
        flex: 1;
        min-width: 0;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        color: var(--texte-doux);
        font-size: .85rem;
        line-height: 1.3;
    }
    .planning-a-affecter__jour[open] .planning-a-affecter__apercu { display: none; }
    .planning-a-affecter__jour[open] > .planning-a-affecter__liens { margin-top: 0; }
    .pastille { padding: .45rem .55rem; }
    .case-a-cocher { min-height: 44px; }
    .groupes-cases { max-height: none; }
}

@media (max-width: 560px) {
    .tableau--planning thead th:first-child,
    .tableau--planning tbody th[scope="row"] { min-width: 120px; }
    .tableau--planning thead th,
    .tableau--planning td { min-width: 135px; }
    .planning-aller { flex-wrap: wrap; }
    .form-actions__fin { margin-left: 0; }
}

/* ------------------------------------------------------------------------
 * Documents de chantier (retours client du 17/09/2026) : plans techniques,
 * vues 3D et photos. Vignette = le fichier lui-même, réduit ici ; en liste
 * compacte (vignette à gauche) sur téléphone.
 * ------------------------------------------------------------------------ */

.documents-groupe + .documents-groupe { margin-top: 1.25rem; }
.documents-groupe__titre {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .6rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--texte-doux);
}

.documents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: .9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.document {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    overflow: hidden;
}
.document__apercu {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    border-bottom: 1px solid var(--bordure);
}
.document__vignette { display: block; width: 100%; height: 100%; object-fit: cover; }
.document__format {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    height: 100%;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--rouge);
}
.document__format svg { width: 2.4rem; height: 2.4rem; }
.document__corps { display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 0; padding: .7rem .8rem .8rem; }
.document__titre { margin: 0; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.document__details { margin: 0; font-size: .75rem; color: var(--texte-doux); }
.document__actions { margin-top: auto; padding-top: .35rem; }

.depot-documents__declencheur {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 34px;
    font-weight: 650;
    color: var(--orange-fonce);
    cursor: pointer;
}
.depot-documents__declencheur::before { content: "+"; font-size: 1.1rem; line-height: 1; }
.depot-documents[open] > .depot-documents__declencheur::before { content: "−"; }
.depot-documents__corps { padding-top: .75rem; }
.depot-documents__corps .form-actions { margin-top: .5rem; }

@media (max-width: 900px) {
    .depot-documents__declencheur { min-height: 44px; }
}

@media (max-width: 560px) {
    .documents { grid-template-columns: 1fr; gap: .6rem; }
    .document { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
    .document__apercu { aspect-ratio: auto; min-height: 96px; border-bottom: none; border-right: 1px solid var(--bordure); }
    .document__format svg { width: 1.8rem; height: 1.8rem; }
    .document__corps { padding: .6rem .7rem; }
}

/* ------------------------------------------------------------------------
 * Tableau de bord par profil (lot d'intégration) : sections titrées, listes
 * compactes à une ligne par élément (lien + badge), pensées pour le téléphone.
 * ------------------------------------------------------------------------ */

.tdb-section + .tdb-section { margin-top: 1.75rem; }
.tdb-section__titre {
    margin: 0 0 .75rem;
    padding-bottom: .35rem;
    border-bottom: 2px solid var(--bordure);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--texte-doux);
}
.tdb-section__sous-titre { margin: 0; font-size: .98rem; }
/* Deux cartes côte à côte gardent leur hauteur : une longue liste n'étire pas sa voisine. */
.tdb-section .grille { align-items: start; }

.kpi__unite { font-size: .85rem; font-weight: 600; color: var(--texte-doux); }

.tdb-liste { margin: 0; padding: 0; list-style: none; }
.tdb-liste__element {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem 1.1rem;
}
.tdb-liste__element + .tdb-liste__element { border-top: 1px solid var(--bordure); }
.tdb-liste__lien {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: inherit;
}
.tdb-liste__lien:hover { text-decoration: none; }
.tdb-liste__lien:hover .tdb-liste__titre { text-decoration: underline; }
.tdb-liste__titre { font-weight: 600; color: var(--orange-fonce); overflow-wrap: anywhere; }
.tdb-liste__detail { font-size: .8rem; color: var(--texte-doux); overflow-wrap: anywhere; }
.tdb-liste__element > .badge,
.tdb-liste__element > .bouton { flex-shrink: 0; }

.tdb-semaine { margin-bottom: 1.25rem; }
.tdb-semaine__entete { margin-bottom: .6rem; }

.tdb-documents + .tdb-documents { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--bordure); }
.tdb-documents__chantier { margin: 0 0 .6rem; font-weight: 650; }

.tdb-effectif { margin: 0 0 .6rem; font-size: 1rem; }
.tdb-jour { margin: 0 0 .4rem; font-size: .9rem; }
.tdb-chantier.est-suivi { padding-left: .6rem; border-left: 3px solid var(--bleu); }

/* Cibles tactiles du tableau de bord (vérification du 25/09/2026) : le nom
   d'un chantier du bloc « Avancement » (21 px de haut) et le relevé refusé de
   l'alerte du salarié (15 px) deviennent des lignes entières de 44 px.
   « flex: 1 1 0 » : le nom revient à la ligne DANS le lien et le pourcentage
   (ou le type) reste à sa droite, au lieu de passer seul dessous. */
.tdb-chantier__lien {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}
@media (max-width: 900px) {
    .tdb-chantier__lien { min-height: 44px; }
}
/* Détail d'une tuile par morceaux (« Terre 30 m³ · », « Déchets verts
   3,5 m³ · »…) : la ligne se coupe entre deux morceaux, et dans un morceau
   seulement s'il est plus large que la tuile (fiche du chantier, vérification
   du 25/09/2026). */
.kpi__morceau { display: inline-block; }
.tdb-refuses { margin: .5rem 0 0; padding: 0; list-style: none; }
.tdb-refuses > li + li { border-top: 1px solid var(--rouge); }
.tdb-refuses__lien {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .1rem;
    min-height: 44px;
    padding: .5rem 0;
    color: inherit;
}
.tdb-refuses__lien:hover { text-decoration: none; }
.tdb-refuses__lien:hover .tdb-refuses__titre { text-decoration: underline; }
.tdb-refuses__titre { font-weight: 600; overflow-wrap: anywhere; }
.tdb-refuses__motif { font-size: .85rem; overflow-wrap: anywhere; }
.tdb-refuses__action { font-size: .85rem; font-weight: 700; text-decoration: underline; }

/* Moment de sortie du stock (préparations, relevés). */
.regle-sortie { margin: 0 0 1.25rem; color: var(--texte-doux); }
.carte__pied .regle-sortie { margin: 0; }
.carte__pied.texte-doux .regle-sortie { margin-top: .5rem; }

/* Article d'une demande de préparation : champ et bouton « Articles du stock… ». */
.champ-catalogue { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 .5rem; }
.champ-catalogue > .champ { flex: 1 1 14rem; }
.champ-catalogue > .bouton { margin-bottom: 1rem; }

@media (max-width: 560px) {
    .tdb-liste__element { padding: .6rem .8rem; }
    .champ-catalogue > .bouton { width: 100%; margin-top: -.5rem; }
}

/*
 * Tableaux de consultation empilés sur téléphone (retours de vérification du
 * 22/09/2026) : relevé d'équipe (équipe, tâches, matériaux), liste des relevés
 * camions. Chaque ligne devient une fiche et chaque cellule est précédée de son
 * intitulé (attribut data-libelle), au lieu d'un tableau à faire défiler de
 * côté dont les colonnes utiles — temps, statut, matériel concerné — sortaient
 * de l'écran. Même principe que « .tableau-comptage ».
 */
@media (max-width: 560px) {
    .tableau--empile thead { display: none; }
    .tableau--empile,
    .tableau--empile tbody,
    .tableau--empile tfoot,
    .tableau--empile tr,
    .tableau--empile td { display: block; width: 100%; }
    .tableau--empile tr { padding: .6rem .75rem; border-bottom: 1px solid var(--bordure); }
    .tableau--empile tbody tr:last-child { border-bottom: none; }
    .tableau--empile tfoot tr { border-top: 2px solid var(--bordure-forte); }
    .tableau--empile td,
    .tableau--empile td.enveloppe,
    .tableau--empile tbody .num,
    .tableau--empile tfoot .num,
    .tableau--empile tfoot td {
        min-width: 0;
        padding: .15rem 0;
        border: 0;
        text-align: left;
        white-space: normal;
        background: none;
    }
    .tableau--empile td:empty { display: none; }
    .tableau--empile td[data-libelle]::before {
        content: attr(data-libelle) " : ";
        color: var(--texte-doux);
        font-size: .75rem;
    }
    .tableau--empile .tableau__titre-ligne { font-weight: 600; }
    /* La colonne d'actions n'est plus figée ni réduite au bord droit : ses
       boutons se placent à gauche, sous les autres informations de la fiche. */
    .tableau--empile .actions {
        position: static;
        width: 100%;
        text-align: left;
        box-shadow: none;
    }
    .tableau--empile .actions .groupe-boutons { justify-content: flex-start; flex-wrap: wrap; }
}

/* ------------------------------------------------- Refus motivé d'un relevé */
/* Refuser sans dire pourquoi laisse le salarié deviner, et le relevé « reste
   longtemps en refusé » (retour client du 24/09/2026) : le bouton « Refuser »
   déplie un motif obligatoire au lieu d'envoyer tout de suite.

   Le panneau se déplie DANS LE FLUX, sous les boutons, à toutes les largeurs.
   Flottant (position absolue), il était rogné par la carte (overflow: hidden),
   passait sous la barre latérale et laissait voir la page au travers : sur
   ordinateur, l'encadrement ne pouvait plus refuser (vérification du
   25/09/2026). Ouvert, « Refuser » prend toute la ligne du groupe de boutons
   (pied de la carte du relevé, en-tête du relevé camions). */
.refus > summary { list-style: none; }
.refus > summary::-webkit-details-marker { display: none; }
.refus[open] { flex-basis: 100%; }
.refus__panneau {
    width: 100%;
    max-width: 32rem;
    margin-top: .5rem;
    padding: .9rem;
    border: 1px solid var(--bordure-forte);
    border-radius: var(--rayon);
    background: var(--surface);
    box-shadow: var(--ombre);
}
.refus__panneau textarea { width: 100%; }
.refus__panneau .champ__aide { margin: .35rem 0 .7rem; color: var(--texte-doux); font-size: .78rem; }

/* ----------------------------------- Relevés : embauche prévue, copies locales */
/* Embauche prévue au planning, écrite SOUS le champ avec un bouton pour la
   reprendre : plus de valeur grisée dans les cases, qui les faisait croire
   remplies (vérification du 25/09/2026). */
.horaire-prevu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .5rem;
    color: var(--orange-fonce);
    font-style: italic;
}
.horaire-prevu__bouton { font-style: normal; }

/* Confirmation de « Ignorer » dans le bandeau de reprise d'une saisie gardée
   sur l'appareil (contrôleur « brouillon-local »). */
.brouillon-local__confirmation { flex: 1 1 100%; }
.brouillon-local__confirmation .alerte__texte { margin: 0 0 .5rem; font-weight: 600; }

/* États de fin de mois (retour client du 01/10/2026) : la grille des primes
   panier a une colonne par jour du mois, resserrée pour tenir à l’écran. */
.tableau--compact th,
.tableau--compact td { padding-left: .35rem; padding-right: .35rem; }
.tableau--compact td.num,
.tableau--compact th.num { min-width: 1.6rem; }

/* --------------------------------------------------------------------------
   Outillage, EPI et vêtements (retour client du 01/10/2026)
   -------------------------------------------------------------------------- */
.marge-bas { margin-bottom: 1rem; }
/* Une ligne d'alerte avec son bouton : le texte passe à la ligne, le bouton reste entier. */
.ligne-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; padding: .25rem 0; }
.ligne-action form { margin: 0; }
/* Date, case et bouton d'une remise sur une seule ligne quand la place le permet. */
.formulaire-en-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0; }
.formulaire-en-ligne input[type="date"] { min-height: 44px; }
/* Pack outillage d'un véhicule (retour client du 07/10/2026) : quantité par outil. */
.champ-quantite { width: 5.5rem; min-height: 40px; text-align: right; }
.retour-outil > summary { list-style: none; cursor: pointer; }
.retour-outil > summary::-webkit-details-marker { display: none; }
.retour-outil .formulaire-en-ligne > * { width: auto; }
.case-en-ligne { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-weight: 600; }
/* Demandes et outils détenus, côté salarié : une ligne par élément, 44 px au moins. */
.liste-equipements { margin: 0; padding: 0; list-style: none; }
.liste-equipements > li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .15rem .75rem; min-height: 44px; padding: .6rem .25rem; }
.liste-equipements > li + li { border-top: 1px solid var(--bordure); }
.liste-equipements > li > .badge, .liste-equipements > li > form { grid-column: 2; grid-row: 1 / span 3; }
.liste-equipements__titre { font-weight: 600; overflow-wrap: anywhere; }
.liste-equipements__detail { color: var(--texte-doux); font-size: .9rem; overflow-wrap: anywhere; }
.liste-equipements__motif { color: var(--rouge); font-size: .85rem; overflow-wrap: anywhere; }
/* Sous-total d'un salarié dans le tableau des dotations, d'un groupe dans le
   tableau de productivité. */
.tableau .ligne-total th, .tableau .ligne-total td { background: var(--surface-2); font-weight: 650; }
/* Intitulé d'un groupe (salariés, intérim, stagiaires) du tableau de productivité. */
.tableau .ligne-groupe th { background: var(--surface); text-align: left; font-weight: 700; padding-top: .9rem; border-bottom: 2px solid var(--bordure-forte); }
/* Aide dépliable du compteur d'heures (retour client du 07/10/2026) : la règle de calcul. */
.aide-compteur > summary { cursor: pointer; list-style: none; }
.aide-compteur > summary::-webkit-details-marker { display: none; }
.aide-compteur > summary .carte__titre::after { content: " ▸"; color: var(--texte-doux); }
.aide-compteur[open] > summary .carte__titre::after { content: " ▾"; }
.aide-compteur .liste-simple > li + li { margin-top: .4rem; }
/* Choix de la nature d'une absence à l'acceptation : un choix par ligne, avec son effet. */
.choix-nature-absence .groupes-cases { columns: 1; max-height: none; }
.choix-nature-absence .case-a-cocher { align-items: flex-start; padding: .2rem 0; }
/* « Mes notifications » (retour client du 28/10/2026) : une famille, son explication dessous. */
.choix-notifications .case-a-cocher { align-items: flex-start; gap: .5rem; padding: .35rem 0; }
.choix-notifications .case-a-cocher input { margin-top: .2rem; }
.aide-compteur .liste-simple { margin-bottom: .75rem; }

/* ------------------------------------------------------------------------
 * Annonces aux salariés (retour client du 07/10/2026 : « envoyer une info,
 * un message à tous les salariés »). En tête du tableau de bord et de
 * « Mon planning » : encadré ardoise, liseré orange, lisible d'un coup d'œil.
 * ------------------------------------------------------------------------ */
.annonces { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.annonce {
    padding: .75rem 1rem;
    border-left: 6px solid var(--orange);
    border-radius: var(--rayon);
    background: var(--ardoise);
    color: #fff;
    box-shadow: var(--ombre);
}
.annonce__etiquette {
    margin: 0 0 .2rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fbd5b5;
}
.annonce__etiquette strong { color: #fff; letter-spacing: 0; }
.annonce__titre { margin: 0 0 .3rem; font-size: 1.05rem; line-height: 1.3; }
.annonce__titre a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.annonce__texte { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
/* Rédaction : la liste des salariés ne sert qu'à « Une sélection ». */
.annonce-formulaire:has(input[name$="[tousLesSalaries]"][value="1"]:checked) .annonce-formulaire__selection { display: none; }

/* Ligne « Stagiaires » de la grille (retour client du 07/10/2026 : « Je ne
   vois pas de ligne stagiaire ») : toujours là, avec « + Ajouter un stagiaire ». */
.planning-ligne-stagiaires th[scope="row"],
.planning-ligne-stagiaires td { background: var(--surface-2); vertical-align: middle; }
.planning-ligne-stagiaires .planning-ajout { display: inline-flex; margin-left: .75rem; padding: .2rem .75rem; }
/* Retour client du 28/10/2026 : les jours de stage se voient sur la ligne du stagiaire. */
.tableau--planning .est-en-stage {
    background-image: repeating-linear-gradient(135deg, transparent 0 7px, var(--bleu-pale) 7px 10px);
}
.planning-en-stage { align-self: flex-start; padding: .05rem .4rem; border-radius: 999px; background: var(--bleu-pale); color: var(--bleu); font-size: .7rem; font-weight: 650; }

/* ------------------------------------------------------------------------
 * Journée du salarié et « Mes journées » (retour client du 08/10/2026 :
 * « c'est hyper compliqué de reconstituer leur journée pour moi »). Les
 * relevés du jour l'un sous l'autre, dans l'ordre des horaires ; l'heure en
 * premier, lisible d'un coup d'œil sur téléphone.
 * ------------------------------------------------------------------------ */
.journee-navigation { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.journee-navigation [rel="next"] { margin-left: auto; }
.journee-anomalies { margin-top: .35rem; }
.journee-releves { margin: 0; padding: 0; list-style: none; }
.journee-releve {
    padding: .9rem 1.1rem;
    border-left: 4px solid var(--bleu);
}
.journee-releve + .journee-releve { border-top: 1px solid var(--bordure); }
.journee-releve--depot { border-left-color: var(--bordure-forte); }
.journee-releve--location { border-left-color: var(--violet); }
.journee-releve--camion { border-left-color: var(--orange); }
.journee-releve__entete { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.journee-releve__horaires { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.journee-releve__objet { margin: .3rem 0 .6rem; font-weight: 600; overflow-wrap: anywhere; }
.journee-releve__details { margin-bottom: .7rem; }
.journee-total { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.tableau--journees tr.est-aujourdhui > * { background: var(--orange-pale); }
@media (max-width: 560px) {
    .journee-releve { padding: .75rem .8rem; }
    .journee-releve__details { grid-template-columns: minmax(80px, max-content) 1fr; }
    .journee-navigation [rel="next"] { margin-left: 0; }
}
/* Tuile qui ouvre son détail (« Heures travaillées », « Mes heures ») : retour du 08/10/2026. */
.kpi--lien { transition: box-shadow .15s ease; }
.kpi--lien:hover, .kpi--lien:focus-visible { box-shadow: 0 0 0 2px var(--orange); }
.kpi__suite { color: var(--orange-fonce); font-weight: 600; }
/* Planning : le nom ouvre ses journées, « Sa journée → » sa journée reconstituée (08/10/2026). */
a.planning-salarie { color: inherit; }
a.planning-salarie:hover { color: var(--orange-fonce); text-decoration: underline; }
.planning-journee { align-self: flex-start; font-size: .72rem; font-weight: 600; white-space: nowrap; }
/* « Toute la journée » d'un relevé d'équipe : un choix par salarié (08/10/2026). */
.menu-journee { position: relative; display: inline-block; }
.menu-journee > summary { list-style: none; cursor: pointer; }
.menu-journee > summary::-webkit-details-marker { display: none; }
.menu-journee > summary::after { content: " ▾"; }
.menu-journee__liste {
    position: absolute;
    right: 0;
    z-index: 20;
    min-width: 13rem;
    margin: .25rem 0 0;
    padding: .35rem 0;
    list-style: none;
    text-align: left;
    background: var(--surface, #fff);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}
.menu-journee__liste a { display: block; padding: .4rem .8rem; white-space: nowrap; }
.menu-journee__liste a:hover { background: var(--surface-2); }

/* Anniversaires du tableau de bord, pour tous (retour client du 13/10/2026 : « une vue un peu plus fun »). */
.anniversaires {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: var(--rayon);
    border: 1px solid #f6c48f;
    background: linear-gradient(135deg, #fff4e6 0%, #fde8f1 55%, #ece6fb 100%);
    box-shadow: var(--ombre);
}
.anniversaires__deco { position: absolute; top: -.3rem; right: .6rem; font-size: 2.6rem; opacity: .35; transform: rotate(12deg); }
.anniversaires__titre { margin: 0 0 .6rem; font-size: 1.1rem; color: var(--ardoise); }
.anniversaires__du-jour { list-style: none; margin: 0; padding: 0; }
.anniversaires__carte {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-bottom: .5rem;
    padding: .7rem .85rem;
    border-radius: var(--rayon);
    background: rgba(255, 255, 255, .85);
    border-left: 4px solid var(--orange);
}
.anniversaires__emoji { font-size: 2rem; line-height: 1; }
.anniversaires__quand { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--orange-fonce); }
.anniversaires__nom { display: block; font-size: 1.1rem; }
.anniversaires__voeu { display: block; font-size: .85rem; color: var(--texte-doux); }
.anniversaires--fete .anniversaires__emoji { animation: anniversaires-saut 1.2s ease-in-out 3; }
@keyframes anniversaires-saut { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .anniversaires--fete .anniversaires__emoji { animation: none; } }

/* Plan de charge : taux d'heures vendues sur le disponible (retour client du 13/10/2026). */
.taux-vendu { display: inline-block; min-width: 3.6rem; padding: .1rem .45rem; border-radius: 999px; font-weight: 700; text-align: center; white-space: nowrap; }
.taux-vendu--rouge { background: var(--rouge-pale); color: var(--rouge); }
.taux-vendu--orange { background: var(--orange-pale); color: var(--orange-badge); }
.taux-vendu--vert { background: var(--vert-pale); color: var(--vert); }
.taux-vendu--jaune { background: #fff4bf; color: #7a5b00; border: 1px solid #f0cf3a; }
.legende-taux { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: .4rem 0 .6rem; padding: 0; list-style: none; font-size: .82rem; }

/* Retours client du 13/10/2026 — planning. */
/* Matériel déjà pris ailleurs, signalé dès qu'il est coché, avec « Le retirer de … et l'affecter ici ». */
.conflits-materiel:empty { display: none; }
.conflits-materiel { display: grid; gap: .5rem; margin: .25rem 0 .75rem; }
.conflit-materiel { margin: 0; }
.conflit-materiel__cases { margin: .25rem 0 .4rem; padding-left: 1.15rem; }
.conflit-materiel__choix { display: inline-flex; gap: .4rem; align-items: center; margin: .2rem 0 .35rem; font-weight: 600; }
/* Horaires propres au matériel d'une case : un matériel qui fait plusieurs chantiers dans la journée. */
.horaires-materiel { margin-bottom: .75rem; }
.horaires-materiel__raccourcis { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .1rem 0 0; }
.pastille__creneau-materiel { font-variant-numeric: tabular-nums; opacity: .85; white-space: nowrap; }
/* Recopier la veille au choix. */
.recopie-veille__tout { display: flex; gap: .4rem; margin: 0 0 .75rem; }
.recopie-veille__groupe { margin-bottom: .75rem; }
.recopie-veille__chantier { display: inline-flex; gap: .45rem; align-items: center; }
/* Travaux à planifier, en tête du planning et sur leur page. */
.travaux-a-planifier__liste { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.travaux-a-planifier__demande {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: .6rem .75rem;
    border: 1px dashed var(--bordure-forte);
    border-radius: var(--rayon, 6px);
    background: var(--surface-2);
}
.travaux-a-planifier__texte { flex: 1 1 18rem; min-width: 0; overflow-wrap: anywhere; }
.travaux-a-planifier__texte p + p { margin-top: .2rem; }
.travaux-a-planifier__actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.travaux-a-planifier__actions form { margin: 0; }
/* Demande annulée (retour client du 14/10/2026) : grisée, dans la liste seulement. */
.travaux-a-planifier__demande--annulee { opacity: .75; border-style: dotted; }
.travaux-a-planifier__demande--annulee strong { text-decoration: line-through; text-decoration-thickness: 1px; }
/* Planning de l'équipe : depuis le retour client du 15/10/2026, les styles du
   grand écran (grand_ecran_blocs.css, .ecran-telephone). */
/* « Où est-il ? » : pictogramme du lieu (dépôt, chantier, garage), et rendez-vous
   au garage — retour client du 14/10/2026 (« prévoir icône garage »). */
.icone-lieu { flex: none; vertical-align: -.15em; }
.texte-lieu--gris { color: var(--gris); }
.texte-lieu--bleu { color: var(--bleu); }
.texte-lieu--orange, .texte-garage { color: var(--orange-badge); }
.texte-garage { font-weight: 600; }
/* Retour client du 16/10/2026 : matériel et consignes repris d'un créneau du
   même salarié au même endroit, ou copie d'un créneau (« Dupliquer »). */
.aide-reprise {
    margin: 0 0 .6rem;
    padding: .4rem .6rem;
    border-left: 3px solid var(--bleu);
    background: var(--surface-2);
}
.aide-reprise[hidden] { display: none; }

/* Retour client du 02/11/2026 : « si je clique sur la ligne d'un matériel » :
   le lien de la ligne s'étend à toute la ligne, sans script. */
.raccourcis-mois { margin: -.5rem 0 1.25rem; }
.ligne-lien { position: relative; }
.ligne-lien:hover { background: var(--gris-pale); }
.ligne-lien__lien::after { content: ""; position: absolute; inset: 0; }
.ligne-lien details { position: relative; z-index: 1; }
.sans-coupure { white-space: nowrap; }
