/* Module RH bio fabriq — charte Biocoop 2026 (Kit de déploiement, « Nouveau territoire de communication ») :
   bleu corporate #0C4DA2 (Pantone 7687C), fond Warm Grey 1C #F9F6F0, bleu clair #D9E7F9 (545C).
   Typographie Biocoop réservée aux titres (jamais au texte courant) ; texte en police système.
   Pastilles : violet 2354C = Chambourcy, vert 6171C = Chaville. */
@font-face { font-family: "Biocoop"; src: url(/biocoop.ttf) format("truetype"); font-display: swap; }
:root {
  --fond: #F9F6F0; --surface: #FFFFFF; --texte: #1F2622; --doux: #5E6A63; --ligne: #DDE2DC; --ligne-douce: #ECEFEA;
  --holding: #0C4DA2; --holding-clair: #D9E7F9; --accent: #0C4DA2; --chambourcy: #94558A; --chaville: #438A40; --stgermain: #A35F00;
  --ok: #438A40; --ok-clair: #E3F2E8; --alerte: #B4531A; --alerte-clair: #FBEBDD; --erreur: #B4214D; --erreur-clair: #FBE4E2;
  --absent: #6B6F75; --absent-clair: #EEEFF1;
  --rayon: 10px; --ombre: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #141A16; --surface: #1C2320; --texte: #E4EAE5; --doux: #9AA79F; --ligne: #34403A; --ligne-douce: #26302B;
    --holding: #8FB4EC; --holding-clair: #1A2B45; --accent: #8FB4EC; --chambourcy: #E699CD; --chaville: #7CC27A; --stgermain: #E8A64A;
    --ok: #6FC196; --ok-clair: #1F3A2C; --alerte: #F0A46B; --alerte-clair: #3B2A1C; --erreur: #F28B82; --erreur-clair: #3C1F1C;
    --absent: #A0A5AB; --absent-clair: #2A2E32; --ombre: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--texte); }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, .barre .titre { font-family: "Biocoop", "Segoe UI", system-ui, sans-serif; font-weight: 400; letter-spacing: .01em; }
h1 { font-size: 28px; margin: 0 0 12px; color: var(--holding); }
h2 { font-size: 17px; margin: 20px 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
p { margin: 6px 0; }
.doux { color: var(--doux); }
.petit { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- barre du haut et onglets */
.barre { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 3px solid var(--accent); }
.barre .titre { font-size: 22px; color: var(--holding); white-space: nowrap; }
.onglets { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.onglets button { border: 0; background: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; color: var(--doux); }
.onglets button.actif { background: var(--holding-clair); color: var(--holding); font-weight: 600; }
/* sous-onglets de la rubrique (sous la barre) et réglages à droite */
.annexes { display: flex; align-items: center; gap: 4px; }
.annexes button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; color: var(--doux); font-size: 13px; }
.annexes button.actif { background: var(--holding-clair); color: var(--holding); font-weight: 600; }
.annexes .petit { margin-left: 6px; }
.sous-onglets { display: flex; gap: 2px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--ligne); overflow-x: auto; }
.sous-onglets button { border: 0; background: none; padding: 10px 12px 8px; cursor: pointer; white-space: nowrap; color: var(--doux);
  border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sous-onglets button.actif { color: var(--holding); font-weight: 600; border-bottom-color: var(--holding); }
/* filtre par magasin, à droite du titre de chaque page (02/12/2026) ; sous le titre sur téléphone */
.titre-filtre { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.titre-filtre h1 { margin: 0; }
.titre-filtre:not(:last-child) { margin-bottom: 12px; }
.entete-nav .titre-filtre, .ligne .titre-filtre { margin-bottom: 0; }
.filtre-magasins { display: flex; max-width: 100%; overflow-x: auto; }
.filtre-magasins .bascule button { white-space: nowrap; }
@media (max-width: 760px) { .titre-filtre { flex-direction: column; align-items: flex-start; gap: 8px; } }
.sous-onglets .nb { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--alerte);
  color: #fff; font-size: 12px; text-align: center; }
.onglets .nb { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--alerte);
  color: #fff; font-size: 12px; text-align: center; }
main { padding: 16px; max-width: 1400px; margin: 0 auto; padding-bottom: 90px; }
@media (max-width: 760px) {
  .barre .onglets, .barre .annexes button { display: none; }
  .barre .annexes .petit { display: none; }
  .onglets-bas { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--surface);
    border-top: 1px solid var(--ligne); padding-bottom: env(safe-area-inset-bottom); }
  .onglets-bas button { flex: 1; border: 0; background: none; padding: 10px 2px 8px; font-size: 12px; color: var(--doux); cursor: pointer; }
  .onglets-bas button.actif { color: var(--holding); font-weight: 700; }
  .onglets-bas .nb { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--alerte); color: #fff; font-size: 11px; }
  main { padding: 12px 16px 96px; }
}
@media (min-width: 761px) { .onglets-bas { display: none; } }

/* ---------- éléments */
.carte { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px; box-shadow: var(--ombre); margin-bottom: 12px; }
.ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ligne.entre { justify-content: space-between; }
.espace { flex: 1; }
.btn { border: 1px solid var(--ligne); background: var(--surface); padding: 8px 14px; border-radius: 8px; cursor: pointer; min-height: 38px; }
.btn:hover { border-color: var(--doux); }
.btn.principal { background: var(--holding); border-color: var(--holding); color: #fff; font-weight: 600; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600; }
.btn.danger { color: var(--erreur); }
.btn.petit { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { border: 1px solid var(--ligne); background: var(--surface); border-radius: 8px; padding: 8px 10px; min-height: 38px; max-width: 100%; }
textarea { width: 100%; min-height: 70px; resize: vertical; }
label.champ { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--doux); }
label.champ > input, label.champ > select, label.champ > textarea { font-size: 15px; color: var(--texte); }
.grille-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pastille { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.p-chaville { background: color-mix(in srgb, var(--chaville) 16%, transparent); color: var(--chaville); }
.p-chambourcy { background: color-mix(in srgb, var(--chambourcy) 16%, transparent); color: var(--chambourcy); }
.p-stgermain { background: color-mix(in srgb, var(--stgermain) 16%, transparent); color: var(--stgermain); }
.p-ok { background: var(--ok-clair); color: var(--ok); }
.p-alerte { background: var(--alerte-clair); color: var(--alerte); }
.p-erreur { background: var(--erreur-clair); color: var(--erreur); }
.p-info { background: var(--holding-clair); color: var(--holding); }
.etat-semaine { margin: 0 0 10px; }
.p-neutre { background: var(--ligne-douce); color: var(--doux); }
.message { padding: 10px 12px; border-radius: 8px; margin: 8px 0; }
.message.erreur { background: var(--erreur-clair); color: var(--erreur); }
.message.ok { background: var(--ok-clair); color: var(--ok); }
.message.alerte { background: var(--alerte-clair); color: var(--alerte); }
.secret { font: 600 20px/1.3 ui-monospace, Consolas, monospace; letter-spacing: 1px; padding: 10px; background: var(--holding-clair); border-radius: 8px; user-select: all; }

/* ---------- tableaux */
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--ligne-douce); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: var(--surface); font-size: 13px; color: var(--doux); font-weight: 600; z-index: 1; }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; }
tr.cliquable { cursor: pointer; }
tr.cliquable:hover td { background: var(--ligne-douce); }

/* ---------- planning semaine */
.semaine { min-width: 860px; table-layout: fixed; }
.semaine th:first-child, .semaine td:first-child { width: 170px; position: sticky; left: 0; background: var(--surface); z-index: 2; }
.semaine th.fin-ligne, .semaine td.fin-ligne { width: 118px; text-align: center; vertical-align: middle; font-weight: 600; }
.choix-fin-ligne { min-height: 30px; padding: 2px 4px; font-size: 13px; }
.semaine td.compteur.negatif { color: var(--alerte); }
.semaine td.compteur.positif { color: var(--ok); }
.semaine td.compteur.modifiable { cursor: pointer; }
.semaine td.compteur.modifiable:hover { background: var(--ligne-douce); }
.semaine th.aujourdhui { color: var(--holding); }
.semaine td.aujourdhui { background: color-mix(in srgb, var(--holding) 5%, transparent); }
/* lignes resserrées (Jean-Michel, 03/12/2026 : « tu peux resserrer un peu les lignes ») */
.semaine td { height: 46px; vertical-align: top; padding: 3px 4px; }
.semaine td.case > .creneau:last-child { margin-bottom: 0; }
.semaine .creneau { padding: 3px 7px; line-height: 1.25; margin-bottom: 3px; }
.creneau.repos { background: repeating-linear-gradient(135deg, #EEEFF1 0 6px, #F7F7F8 6px 12px); color: var(--doux); border-left-color: #C9CDD2;
  text-align: center; pointer-events: none; cursor: inherit; display: flex; align-items: center; justify-content: center; }
/* repos de la même taille qu'un créneau (deux lignes) et noms sur une ligne (Jean-Michel, 03/12/2026) */
.semaine .creneau.repos { min-height: calc(13px * 1.25 + 12px * 1.25 + 6px); }
.semaine th:first-child, .semaine td:first-child { width: 200px; }
.semaine td:first-child > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.semaine td.case { cursor: default; }
.semaine td.case.modifiable { cursor: pointer; }
.semaine td.case.modifiable:hover { background: var(--ligne-douce); }
.creneau { position: relative; display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid rgba(0,0,0,.18); border-radius: 6px;
  padding: 5px 8px; margin-bottom: 4px; background: #D9E7F9; color: #1F2622; font-size: 13px; line-height: 1.35; cursor: pointer; }
.creneau .cr-haut { display: flex; justify-content: space-between; gap: 4px; white-space: nowrap; }
.creneau .cr-haut b { font-weight: 600; }
.creneau .cr-duree { font-size: 12px; opacity: .8; }
.creneau .cr-bas { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; white-space: nowrap; }
.creneau .cr-poste { overflow: hidden; text-overflow: ellipsis; }
.creneau .cr-pause { opacity: .8; }
.creneau:has(.cr-alerte) .cr-bas { padding-right: 18px; }
.creneau.hors-regle { outline: 2px solid var(--erreur); outline-offset: -1px; }
.creneau .cr-legal { position: absolute; top: -6px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--erreur); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.horaires-jour { font-size: 11px; font-weight: 400; color: var(--doux); }
.horaires-jour.exception { color: var(--erreur); font-weight: 600; }
.horaires-jour.ferme { font-style: italic; }
.ligne-reglage.horaire { flex-wrap: wrap; }
.ligne-reglage.horaire .jour-nom { width: 82px; }
.ligne-reglage.horaire input[type=time] { width: 110px; }
.ecarts ul { margin: 4px 0 0; padding-left: 18px; }
.creneau.absence.ferie { background: repeating-linear-gradient(135deg, #D6D6D6 0 6px, #E4E4E4 6px 12px); color: #2B2B2B; pointer-events: none; cursor: default; }
.creneau.absence { background: #B4B4B4; color: #2B2B2B; }
.creneau.moi { box-shadow: inset 0 0 0 2px var(--holding); }
.creneau .cr-alerte { position: absolute; right: 6px; bottom: 5px; width: 15px; height: 15px; border-radius: 50%; background: var(--erreur);
  color: #fff; font-size: 11px; font-weight: 700; line-height: 15px; text-align: center; }
.total-semaine { font-size: 12px; color: var(--doux); }

/* ---------- planning jour */
.jour-liste .rangee { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--ligne-douce); }
.frise { position: relative; height: 30px; background: var(--ligne-douce); border-radius: 6px; }
.frise .bloc { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; background: #D9E7F9; color: #1F2622; font-size: 11px;
  padding: 0 4px; overflow: hidden; white-space: nowrap; line-height: 24px; }
.frise .trait-horaire { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px dashed var(--holding); opacity: .55; z-index: 2; pointer-events: none; }
.frise .bloc.glissable { cursor: grab; touch-action: none; user-select: none; z-index: 1; }
.frise .bloc.glissable:active { cursor: grabbing; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.frise .bloc .poignee { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; }
.frise .bloc .poignee.g { left: 0; }
.frise .bloc .poignee.d { right: 0; }
.semaine td.case.cible { background: var(--holding-clair); outline: 2px dashed var(--holding); outline-offset: -3px; }
.creneau[draggable=true] { cursor: grab; }
.creneau.glisse { opacity: .45; }
.frise .bloc.moi { box-shadow: inset 0 0 0 2px var(--holding); }
.frise .bloc.absence { background: #B4B4B4; color: #2B2B2B; }
.graduations { position: relative; height: 16px; margin-left: 160px; font-size: 11px; color: var(--doux); }
.graduations span { position: absolute; transform: translateX(-50%); }
@media (max-width: 760px) {
  .jour-liste .rangee { grid-template-columns: 1fr; gap: 4px; }
  .graduations { margin-left: 0; }
}

/* ---------- mon planning (téléphone) */
.mes-jours .jour { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ligne-douce); }
.mes-jours .date { width: 64px; flex: none; }
.mes-jours .date b { display: block; font-size: 20px; line-height: 1; }
.mes-jours .jour.aujourdhui .date { color: var(--holding); }
.mes-jours .detail { flex: 1; }
.mes-jours .moi-ligne b { color: var(--ok); }
.creneau .pastille { margin-top: 2px; }
.mes-jours .horaire { font-size: 17px; font-weight: 600; }
.entete-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.entete-nav .periode { font-weight: 600; min-width: 170px; text-align: center; }
.bascule { display: inline-flex; border: 1px solid var(--ligne); border-radius: 8px; overflow: hidden; }
.bascule button { border: 0; background: var(--surface); padding: 7px 12px; cursor: pointer; color: var(--doux); }
.bascule button.actif { background: var(--holding-clair); color: var(--holding); font-weight: 600; }

/* ---------- fenêtre */
#voile { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; }
.fenetre { background: var(--surface); border-radius: 12px; padding: 18px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.fenetre .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* ---------- connexion */
.connexion { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.connexion .marque { font-size: 22px; font-weight: 700; color: var(--holding); margin-bottom: 4px; }
.connexion form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }

/* ---------- entretien */
.question { padding: 12px 0; border-bottom: 1px solid var(--ligne-douce); }
.question .texte-q { font-weight: 600; margin-bottom: 8px; }
.question .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.question .cols.une { grid-template-columns: 1fr; }
.question .qui { font-size: 12px; color: var(--doux); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .03em; }
.question .lu { white-space: pre-wrap; }
.notes { display: inline-flex; gap: 4px; margin-bottom: 6px; }
.notes button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--ligne); background: var(--surface); cursor: pointer; }
.notes button.actif { background: var(--holding); color: #fff; border-color: var(--holding); }
@media (max-width: 760px) { .question .cols { grid-template-columns: 1fr; } }

/* ---------- impression d'un entretien */
/* planning imprimé en A4 paysage (main.paysage) */
.imprime-seul { display: none; }
@page paysage { size: A4 landscape; margin: 8mm; }
@media print {
  .imprime-seul { display: block; margin: 0 0 6px; font-size: 15px; }
  html, body { background: #fff !important; }
  main.paysage { page: paysage; max-width: none; }
  main.paysage .defile { overflow: visible; }
  main.paysage .semaine { min-width: 0; width: 100%; font-size: 10px; }
  main.paysage .semaine th, main.paysage .semaine td:first-child { position: static; }
  main.paysage .semaine th:first-child, main.paysage .semaine td:first-child { width: 110px; }
  main.paysage .semaine td { height: auto; padding: 2px; }
  main.paysage .semaine td.aujourdhui { background: none; }
  main.paysage tr { break-inside: avoid; }
  main.paysage .creneau { padding: 2px 4px; }
  main.paysage .creneau .cr-duree, main.paysage .creneau .cr-bas { font-size: 9px; }
  main.paysage .cr-legal, main.paysage .total-semaine { font-size: 9px; }
  main, main * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media print {
  .barre, .sous-onglets, .onglets-bas, .ne-pas-imprimer, #voile { display: none !important; }
  body, main { background: #fff; color: #000; padding: 0; }
  .carte { border: 0; box-shadow: none; padding: 0; }
  textarea, input { border: 0; }
  .question { break-inside: avoid; }
}

.case-a-cocher { display: flex; align-items: center; gap: 6px; margin: 8px 0; cursor: pointer; }
.case-a-cocher input { min-height: 0; width: 18px; height: 18px; }
.quals { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; }
.pastille.p-qual { background: var(--holding-clair); color: var(--holding); }
.grille-quals { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
.reglages-listes { display: grid; grid-template-columns: 1fr; gap: 8px; }
.ligne-reglage { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ligne-reglage input:not([type=color]) { flex: 1; }
.ligne-reglage input[type=color] { width: 44px; min-width: 44px; height: 38px; padding: 2px; cursor: pointer; }

/* ---------- enquêtes eNPS */
.echelle-enps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; margin: 8px 0 2px; }
.echelle-enps .btn { padding: 8px 0; min-width: 0; text-align: center; }
.echelle-legende { display: flex; justify-content: space-between; margin-bottom: 12px; }
.scores-enps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.score-enps .enps { font-family: 'Biocoop', var(--police, sans-serif); font-size: 44px; line-height: 1.1; color: var(--holding); }
.score-enps .enps.positif { color: var(--ok); }
.score-enps .enps.negatif { color: var(--erreur); }
.repartition { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin: 8px 0 4px; }
.barre-rep { color: #fff; font-size: 12px; text-align: center; line-height: 22px; }
.barre-rep.promoteurs { background: var(--ok); }
.barre-rep.passifs { background: #9AA3A0; }
.barre-rep.detracteurs { background: var(--erreur); }
/* tableau de bord eNPS et engagement (Jean-Michel, 02/12/2026), comme PayFit : deux blocs côte à côte */
.tableau-enquetes { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.bloc-tdb h2 { font-family: "Biocoop", "Segoe UI", system-ui, sans-serif; font-weight: 400; font-size: 22px; color: var(--holding); margin-top: 4px; }
.vide-donnees { padding: 28px 12px; text-align: center; color: var(--doux); background: var(--ligne-douce); border-radius: 8px; }
.tdb-chiffres { display: flex; gap: 32px; flex-wrap: wrap; margin: 8px 0 4px; }
.grand-chiffre { font-family: "Biocoop", "Segoe UI", system-ui, sans-serif; font-size: 40px; line-height: 1.1; color: var(--holding); }
.grand-chiffre.positif { color: var(--ok); }
.grand-chiffre.negatif { color: var(--erreur); }
.ecart { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--ligne-douce); color: var(--doux); }
.ecart.hausse { background: var(--ok-clair); color: var(--ok); }
.ecart.baisse { background: var(--erreur-clair); color: var(--erreur); }
.distribution { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; height: 140px; }
.col-note { display: flex; flex-direction: column; align-items: stretch; text-align: center; font-size: 12px; }
.piste-note { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.barre-note { width: 100%; border-radius: 4px 4px 0 0; }
.barre-note.promoteurs, .puce.promoteurs { background: var(--ok); }
.barre-note.passifs, .puce.passifs { background: #9AA3A0; }
.barre-note.detracteurs, .puce.detracteurs { background: var(--erreur); }
.nb-note { height: 16px; color: var(--doux); }
.lib-note { border-top: 1px solid var(--ligne); padding-top: 2px; }
.puce { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 2px; vertical-align: -1px; }
.courbe-enps { width: 100%; height: auto; max-height: 190px; }
.courbe-enps .axe { stroke: var(--ligne); stroke-width: 1; }
.courbe-enps .axe-zero { stroke: var(--doux); stroke-width: 1; stroke-dasharray: 4 4; }
.courbe-enps .trace { fill: none; stroke: var(--holding); stroke-width: 2.5; }
.courbe-enps .point { fill: var(--surface); stroke: var(--holding); stroke-width: 2.5; }
.courbe-enps .valeur { fill: var(--holding); font-size: 13px; font-weight: 600; }
.courbe-enps .graduation { fill: var(--doux); font-size: 11px; }
.cartes-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.carte-theme { border: 1px solid var(--ligne); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.carte-theme h3 { margin: 0 0 6px; color: var(--holding); }
.score-theme { font-family: "Biocoop", "Segoe UI", system-ui, sans-serif; font-size: 28px; color: var(--holding); line-height: 1.1; }
.jauge { height: 6px; border-radius: 3px; background: var(--holding-clair); margin: 6px 0; overflow: hidden; }
.jauge > div { height: 100%; background: var(--holding); }
.affirmation { margin: 10px 0 4px; padding-top: 6px; border-top: 1px solid var(--ligne-douce); }
.affirmation p { margin: 0 0 4px; }
.case-theme { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; cursor: pointer; }
.case-theme input { margin-top: 4px; }
.case-theme ul { margin: 2px 0 0; padding-left: 18px; }
.table-engagement .ligne-theme td { font-weight: 600; color: var(--holding); background: var(--holding-clair); }
.table-engagement .affirmation-res { padding-left: 18px; }
.commentaires { padding-left: 18px; }
.commentaires li { margin-bottom: 6px; }

/* campagnes et modèles d'entretien */
.cartes-modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.carte-modele { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 14px; min-height: 120px;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px; cursor: pointer; font: inherit; color: inherit; }
.carte-modele:hover, .carte-modele:focus-visible { border-color: var(--holding); box-shadow: 0 0 0 2px var(--holding-clair); }
.carte-modele .pastille { margin-top: auto; }
.fil-etapes { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; flex-wrap: wrap; counter-reset: etape; }
.fil-etapes li { counter-increment: etape; padding: 4px 12px; border-radius: 14px; background: var(--ligne-douce); color: var(--doux); font-size: 13px; }
.fil-etapes li::before { content: counter(etape) ". "; }
.fil-etapes li.actif { background: var(--holding); color: #fff; }
.fil-etapes li.fait { background: var(--holding-clair); color: var(--holding); }
.choix-radio { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.editeur-q { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.carte-q { border: 1px solid var(--ligne); border-radius: 10px; padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.carte-q textarea { width: 100%; }
.num-q { font-weight: 600; color: var(--holding); }
.options-q { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.choix-q { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.choix-q button { padding: 6px 12px; min-height: 36px; border-radius: 18px; border: 1px solid var(--ligne); background: var(--surface); cursor: pointer; font: inherit; }
.choix-q button.actif { background: var(--holding); color: #fff; border-color: var(--holding); }
.cartes-campagnes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.carte-campagne { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: left; cursor: pointer; font: inherit; color: inherit; border: 1px solid var(--ligne); }
.carte-campagne:hover { border-color: var(--holding); }
.avancement { flex: 1; min-width: 80px; height: 8px; border-radius: 4px; background: var(--ligne-douce); overflow: hidden; }
.avancement span { display: block; height: 100%; background: var(--ok); }
.fenetre:has(.editeur-modele) { max-width: 760px; }
.editeur-modele { max-height: 62vh; overflow-y: auto; padding-right: 4px; }

/* formations : qui a fait quoi */
.matrice-formations th span { display: inline-block; max-width: 110px; white-space: normal; font-size: 12px; line-height: 1.2; }
.matrice-formations td.fait { color: var(--ok); white-space: nowrap; font-size: 13px; }
.matrice-formations td.manque { color: var(--alerte); background: var(--alerte-clair); text-align: center; }

/* campagnes et entretiens (02/12/2026) : EPP bien distinct, statuts comme dans PayFit, résumé de 2 à 3 lignes */
.p-epp { background: var(--holding); color: #fff; }
.p-type { background: var(--holding-clair); color: var(--holding); }
.p-turquoise { background: #DDF3F1; color: #0F7C72; }
.p-jaune { background: #FDF3C9; color: #8A6A00; }
@media (prefers-color-scheme: dark) { .p-epp { color: #10213A; } .p-turquoise { background: #143532; color: #6FD3C7; } .p-jaune { background: #3A3214; color: #F2D36B; } }
.carte-campagne.cloturee { opacity: .85; }
.collab { display: flex; gap: 8px; align-items: flex-start; }
.initiales { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--holding-clair); color: var(--holding); font-size: 12px; font-weight: 700; }
.resume { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0 0;
  font-size: 13px; color: var(--doux); max-width: 60ch; white-space: normal; text-align: left; }
button.resume { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px; }
button.resume.vide { font-style: italic; }
.document { padding: 6px 0; border-bottom: 1px solid var(--ligne-douce); }
.document:last-child { border-bottom: 0; }
th.triable { cursor: pointer; user-select: none; }
th.triable[aria-sort="ascending"]::after { content: " ▲"; font-size: 10px; }
th.triable[aria-sort="descending"]::after { content: " ▼"; font-size: 10px; }
.bloc-resume { margin: 8px 0 12px; }
@media print { button.resume { text-decoration: none; } .resume { -webkit-line-clamp: unset; } }
/* catalogue des formations (02/12/2026) : ligne dépliable, qui l'a suivie / qui ne l'a pas encore suivie */
.catalogue-formations .detail-catalogue td { background: var(--ligne-douce); }
.cols-catalogue { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols-catalogue ul { margin: 6px 0 0; padding-left: 18px; }
.case-oblig { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.case-oblig input { width: auto; margin: 0; }
.catalogue-formations td strong + .pastille { margin-left: 6px; }
@media (max-width: 760px) { .cols-catalogue { grid-template-columns: 1fr; } }
/* clés d'accès (02/12/2026) */
.bandeau-cle { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--alerte-clair); color: var(--alerte); border-bottom: 1px solid var(--ligne); }
.codes-secours { columns: 2; font-size: 17px; line-height: 1.9; }
.codes-secours code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .05em; }
/* bulle des alertes du planning (02/12/2026) */
.bulle-alerte { position: fixed; z-index: 50; max-width: min(360px, calc(100vw - 16px)); background: var(--surface); color: var(--texte); border: 1px solid var(--erreur); border-left: 4px solid var(--erreur); border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.35; box-shadow: 0 4px 16px rgba(0,0,0,.18); pointer-events: none; }
.bulle-alerte div + div { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--ligne-douce); }
.creneau .cr-legal, .creneau .cr-alerte { cursor: help; }
/* vue Jour du planning (02/12/2026, modèle Skello) : quadrillage à l'heure et au quart d'heure, présents et besoins */
.vue-jour .rangee-j { display: grid; grid-template-columns: 190px 1fr 64px; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--ligne-douce); }
.vue-jour .entete-j { border-bottom: 1px solid var(--ligne); padding-bottom: 2px; }
.vue-jour .graduations { margin-left: 0; height: 18px; }
.vue-jour .qui-j { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vue-jour .nom-j { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vue-jour .total-j { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.frise.quadrille { height: 40px; background-color: var(--surface); border: 1px solid var(--ligne-douce); border-radius: 4px;
  background-image: linear-gradient(to right, var(--ligne) 1px, transparent 1px), linear-gradient(to right, var(--ligne-douce) 1px, transparent 1px);
  background-size: calc(100% / var(--heures)) 100%, calc(100% / var(--heures) / 4) 100%; }
.vue-jour .frise .bloc { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 7px; font-size: 12px; font-weight: 600;
  overflow: hidden; white-space: nowrap; border-left: 3px solid rgba(0,0,0,.18); }
.vue-jour .frise .bloc .bloc-texte { overflow: hidden; text-overflow: ellipsis; }
.vue-jour .frise .bloc .bloc-duree { font-weight: 400; opacity: .8; }
/* pause déjeuner dans la vue Jour (03/12/2026) : plage hachurée dans la barre, texte « pause 1h » */
.vue-jour .frise .bloc .bloc-texte, .vue-jour .frise .bloc .bloc-duree, .vue-jour .frise .bloc .cr-pause { position: relative; z-index: 1; }
.vue-jour .frise .bloc .cr-pause { margin-left: 6px; opacity: .8; font-style: italic; }
.vue-jour .frise .bloc .bloc-pause { position: absolute; top: 0; bottom: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.8) 0 3px, rgba(0,0,0,.08) 3px 6px);
  border-left: 1px solid rgba(0,0,0,.2); border-right: 1px solid rgba(0,0,0,.2); }
.vue-jour .frise .bloc .cr-legal { position: static; flex: none; box-shadow: none; }
.frise.quarts { height: 26px; background-color: transparent; border: 0; }
.frise.quarts .quart { position: absolute; top: 2px; bottom: 2px; display: flex; align-items: center; justify-content: center; font-size: 11px;
  font-variant-numeric: tabular-nums; border-radius: 2px; }
.quart.sous { background: color-mix(in srgb, var(--erreur) 28%, transparent); color: var(--erreur); font-weight: 700; }
.quart.sur { background: #D6ECFA; color: #0B5A8A; }
.quart.juste { background: var(--ok-clair); color: var(--ok); }
.quart.besoin { color: var(--doux); }
.ligne-presents { border-top: 2px solid var(--ligne); }
.resume-effectif { margin: 10px 0 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) { .vue-jour .rangee-j { grid-template-columns: 90px 1fr 44px; gap: 6px; } .vue-jour .initiales { display: none; } }
.table-besoins td { padding: 6px 8px; border-bottom: 1px solid var(--ligne-douce); vertical-align: middle; }
.table-besoins td.droite { white-space: nowrap; }
.case-jour { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.case-jour input { width: auto; }
/* barre unique du planning (03/12/2026) : état de la semaine et publication dans l'en-tête */
.entete-nav .etat-semaine, .entete-nav .etat-pub { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.entete-nav .etat-pub { margin-left: 4px; }
/* planning : toute la largeur de l'écran pour tenir sur une seule barre (03/12/2026) */
main.paysage { max-width: 1840px; }
/* rapport de paie et compteurs d'heures (03/12/2026) */
.fenetre:has(.rapport), .fenetre:has(.fiche-compteur) { width: min(1300px, 96vw); max-width: 96vw; }
.rapport-contenu { max-height: 62vh; overflow: auto; }
.rapport-mag h3 { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; }
.table-rapport th, .table-rapport td, .table-compteurs th, .table-compteurs td { padding: 6px 8px; white-space: nowrap; }
.table-rapport tr.a-revoir td:first-child { box-shadow: inset 3px 0 0 var(--alerte); }
.alerte-rapport { color: var(--alerte); white-space: normal; max-width: 260px; }
.table-compteurs td a { font-weight: 600; margin-right: 6px; }
.ecart-sem { font-weight: 700; }
.ecart-sem.positif { color: #C8203A; } .ecart-sem.negatif { color: #0F8FA8; } .ecart-sem.nul { color: #1B6FD1; }
.table-compteurs td.negatif { color: var(--alerte); } .table-compteurs td.positif { color: var(--ok); }
.cr-alerte-en-ligne { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #E8DDF7; color: #6A3FB5;
  font-size: 10px; font-weight: 700; margin-left: 4px; cursor: help; }
.fiche-compteur { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.liste-compteurs { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; }
.liste-compteurs .btn { text-align: left; }
.liste-compteurs .btn.actif { background: var(--holding); color: #fff; border-color: var(--holding); }
@media (max-width: 760px) { .fiche-compteur { grid-template-columns: 1fr; } .liste-compteurs { flex-direction: row; overflow-x: auto; } }
/* menu ⋯ du planning (03/12/2026) */
.menu-planning { display: flex; flex-direction: column; gap: 6px; }
.item-menu { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--ligne); border-radius: 8px; background: var(--surface); cursor: pointer; }
.item-menu:hover:not(:disabled) { background: var(--holding-clair); }
.item-menu:disabled { opacity: .55; cursor: default; }
.tri-employes { list-style: none; padding: 0; margin: 8px 0 0; max-height: 50vh; overflow: auto; }
.tri-employes li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--ligne); border-radius: 8px; margin-bottom: 4px; background: var(--surface); cursor: grab; }
.tri-employes li.glisse { opacity: .5; }
.tri-employes .nom { flex: 1; }
.poignee-tri { color: var(--doux); }
.sans-repos .creneau.repos { visibility: hidden; }
.sans-pauses .cr-pause { display: none; }
.sans-postes .creneau:not(.absence) .cr-poste { visibility: hidden; }
.choix-tri { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 4px; }
.choix-tri label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.role-tri { font-size: 12px; color: var(--alerte); }
.role-tri.resp { color: var(--ok); }
.tri-employes.fige li { cursor: default; }

/* barre du planning en deux lignes, semaine au format Skello (Jean-Michel, 03/12/2026) */
.entete-planning { margin-bottom: 12px; }
.entete-planning .entete-nav { margin-bottom: 8px; }
.entete-planning .actions-planning { margin-bottom: 0; }
.nav-semaine { display: inline-flex; align-items: center; gap: 6px; }
.nav-semaine .fleche { border: 0; background: none; font-size: 30px; font-weight: 300; line-height: 1; padding: 0 8px 4px; cursor: pointer; color: var(--texte, #222); border-radius: 6px; }
.nav-semaine .fleche:hover { background: rgba(0,0,0,.06); }
.plage-conteneur { position: relative; display: inline-block; }
.plage-semaine { background: var(--surface); color: var(--texte); border: 1px solid var(--ligne); border-radius: 8px; padding: 8px 18px; font: inherit; font-size: 16px; cursor: pointer; min-width: 200px; text-align: center; }
.plage-semaine:hover { border-color: #b9b9b9; }
.choix-date-cache { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.num-semaine { background: var(--ligne-douce); color: var(--doux); font-weight: 600; font-size: 13px; border-radius: 6px; padding: 5px 9px; white-space: nowrap; }
.cadenas { display: inline-flex; align-items: center; border: 0; background: none; padding: 4px; color: var(--texte); cursor: pointer; border-radius: 6px; }
.cadenas:hover:not(:disabled) { background: rgba(0,0,0,.06); }
.cadenas:disabled { cursor: default; }
.cadenas.ferme { color: var(--ok, #2e7d32); }
.droite-planning { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions-planning .etat-semaine { margin-left: 8px; }

/* feuilles de présence signées (03/12/2026) */
.pastille-signature { border: 0; cursor: pointer; margin-top: 3px; font: inherit; font-size: 11px; }
.table-feuille { width: 100%; border-collapse: collapse; margin: 8px 0; }
.table-feuille td { padding: 5px 8px; border-bottom: 1px solid var(--ligne-douce); vertical-align: top; }
.table-feuille tfoot td { border-bottom: 0; }
.historique-signature li { margin-bottom: 4px; }
.commentaire-signature { color: var(--erreur); margin-left: 12px; }

/* types d'absence : une couleur par type sur les cartes (03/12/2026) */
.creneau.absence.abs-repos, .frise .bloc.absence.abs-repos { background: repeating-linear-gradient(135deg, #E4E6EA 0 6px, #F1F2F4 6px 12px); color: #4A5058; }
.creneau.absence.abs-conges, .frise .bloc.absence.abs-conges { background: #A8D5BA; color: #1E4D33; }
.creneau.absence.abs-rtt, .frise .bloc.absence.abs-rtt { background: #C7C2EE; color: #352C73; }
.creneau.absence.abs-maladie, .frise .bloc.absence.abs-maladie { background: #F6C79A; color: #6B3A0C; }
.creneau.absence.abs-accident, .frise .bloc.absence.abs-accident { background: #F2A97E; color: #5E2A0A; }
.creneau.absence.abs-injustifiee, .frise .bloc.absence.abs-injustifiee { background: #E9B4C8; color: #6A1E3B; }
.creneau.absence.abs-sans_solde, .frise .bloc.absence.abs-sans_solde { background: #E6DCC6; color: #5A4A27; }
.creneau.absence.abs-formation, .frise .bloc.absence.abs-formation { background: #FBE7A1; color: #5E4B00; }
.creneau.absence.abs-a_rattraper, .frise .bloc.absence.abs-a_rattraper { background: #A9DDE3; color: #154E55; }
.creneau.absence.abs-maternite, .creneau.absence.abs-paternite, .frise .bloc.absence.abs-maternite, .frise .bloc.absence.abs-paternite { background: #E3C6F0; color: #4F2266; }
/* retard / départ anticipé : pastille orange « +15 » */
.creneau .cr-retard { position: absolute; left: -4px; top: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--alerte); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; cursor: help; }
.legende-absences { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.legende-absences .creneau { position: static; min-height: 0; padding: 2px 8px; font-size: 11px; width: auto; cursor: default; }
.apercu-liste { max-height: 260px; overflow: auto; }
.choix-salaries { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; margin: 6px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1F2622; color: #fff; padding: 10px 18px; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); z-index: 1000; font-size: 14px; }
.message.attention { background: var(--alerte-clair); color: var(--alerte); }
/* besoins en personnel : saisie rapide par plage (03/12/2026) */
.saisie-rapide-besoins { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; margin: 8px 0 12px; border: 1px solid var(--ligne-douce); border-radius: 8px; }
.saisie-rapide-besoins .ligne { align-items: center; flex-wrap: wrap; }
.saisie-rapide-besoins input[type=number] { width: 64px; }
