/* Scène « Le bulletin se prépare » — Paie & RH. À plat : traits, aplats, bordures fines. Classes préfixées bu-. */
.bu-cal, .bu-limite, .bu-titre, .bu-ctrl, .bu-ctrl-lib, .bu-noeud, .bu-bulletin, .bu-trace, .bu-var { position: absolute; left: 0; top: 0; }
.bu-cal i, .bu-bulletin i, .bu-var i, .bu-var em { display: block; font-style: normal; }

/* Le calendrier de paie : une rangée de jours ; après la date limite, un aplat plus soutenu */
.bu-cal { box-sizing: content-box; margin: -1px; border: 1px solid var(--line-fort); border-radius: 10px; overflow: hidden; background: var(--surface); }
.bu-apres { position: absolute; top: 0; background: var(--bg-doux); }
.bu-jours { position: relative; display: flex; border-bottom: 1px solid var(--line-fort); }
.bu-jours span { flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1; }
.bu-voie { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.bu-titre, .bu-ctrl-lib { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.2; white-space: nowrap; }
/* La date limite : le trait qui structure le calendrier, à l’encre */
.bu-limite { width: 3px; margin-left: -1.5px; border-radius: 1.5px; background: var(--ink); }
.bu-limite b { position: absolute; left: 0; top: 0; display: grid; place-items: center; height: 18px; padding: 0 8px 0 8px; border-radius: 0 6px 6px 0; background: var(--ink); color: var(--bg); font-size: 10.5px; font-weight: 700; line-height: 1; white-space: nowrap; }

/* La ligne de contrôle et ses repères : en accent, un repère plein par variable contrôlée */
.bu-ctrl { border-radius: 1.5px; background: var(--accent); }
.bu-ctrl-lib { transform: translateX(-50%); color: var(--accent-texte); }
.bu-noeud { width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.bu-noeud.ok { background: var(--accent); }

/* Le bulletin */
.bu-bulletin { box-sizing: content-box; margin: -2px; border: 2px solid var(--ink); border-radius: 12px; background: var(--surface); }
.bu-bulletin.ok { border-color: var(--accent); }
.bu-b-tete { position: absolute; left: 14px; top: 15px; display: flex; flex-direction: column; gap: 6px; line-height: 1; white-space: nowrap; }
.bu-b-tete b { font-size: 17px; font-weight: 700; color: var(--ink); }
.bu-b-tete span { font-size: 12px; font-weight: 600; color: var(--muted); }
.bu-b-adr { position: absolute; right: 14px; top: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.bu-b-adr i { width: 44px; height: 6px; border-radius: 3px; background: var(--line); }
.bu-b-adr i + i { width: 30px; }
.bu-b-sep { position: absolute; left: 12px; right: 12px; height: 1px; background: var(--line); }
.bu-b-sep.fort { height: 2px; margin-top: -1px; background: var(--ink); }
.bu-barre { position: absolute; height: 8px; border-radius: 4px; background: var(--muted); transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }
.bu-barre.net { height: 12px; margin-top: -1px; border-radius: 6px; background: var(--ink); }
.bu-net { position: absolute; margin-top: -1px; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1; white-space: nowrap; }

/* La validation : un rond en attente ; puis, temps fort, une pastille en aplat dont la coche se trace */
.bu-valide { position: absolute; display: flex; align-items: center; gap: 8px; padding-right: 14px; border-radius: var(--r-pilule); will-change: transform; }
.bu-valide.inverse { flex-direction: row-reverse; gap: 5px; padding: 0 0 0 10px; }
.bu-valide.ok { background: var(--accent-fonce); }
.bu-v-rond { box-sizing: border-box; position: relative; flex: none; height: 100%; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--muted); }
.bu-v-plein { position: absolute; inset: -1.5px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-fonce); opacity: 0; will-change: transform, opacity; }
.bu-v-plein svg { width: 64%; height: 64%; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: 1.04; }
.bu-v-lib { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1; white-space: nowrap; }
.bu-valide.ok .bu-v-lib { color: #fff; }
/* Une fois en aplat, la pastille porte seule la couleur : le rond ne garde que sa coche (pas de raccord entre deux aplats) */
.bu-valide.ok .bu-v-rond { border-color: transparent; }
.bu-valide.ok .bu-v-plein { background: none; }

/* Une variable : sa forme d’origine (le canal), puis sa fiche une fois rangée */
.bu-var { width: 0; height: 0; will-change: transform; }
.bu-src, .bu-fiche { position: absolute; left: 0; top: 0; translate: -50% -50%; background: var(--surface); border: 1px solid var(--line-fort); color: var(--ink); opacity: 0; will-change: transform, opacity; }
.bu-src { box-shadow: var(--flottant); }
.bu-src b { display: block; font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap; }

/* Canal 1 : la feuille d’heures */
.bu-feuille { width: 78px; height: 94px; padding: 10px 9px 0; border-radius: 6px; display: flex; flex-direction: column; gap: 6px; }
.bu-feuille b { padding-bottom: 7px; border-bottom: 1px solid var(--line-fort); }
.bu-feuille i { display: flex; align-items: center; gap: 3px; }
.bu-feuille span { flex: none; width: 13px; height: 4px; margin-right: 2px; border-radius: 2px; background: var(--line-fort); }
.bu-feuille em { flex: none; width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--line-fort); }
.bu-feuille em.p { background: var(--line-fort); }

/* Canal 2 : la bulle de message */
.bu-bulle { width: 104px; height: 46px; padding: 0 14px; border-radius: 14px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.bu-bulle i { width: 50px; height: 4px; border-radius: 2px; background: var(--line-fort); }
.bu-bulle::after { content: ""; position: absolute; left: 18px; bottom: -6px; width: 10px; height: 10px; border-radius: 0 0 2px; background: var(--surface); border-right: 1px solid var(--line-fort); border-bottom: 1px solid var(--line-fort); transform: rotate(45deg); }

/* Canal 3 : la cellule de tableur */
.bu-tableur { width: 112px; height: 66px; border-radius: 6px; overflow: hidden; display: grid; grid-template-columns: 17px 1fr 32px; grid-template-rows: 15px 1fr 1fr; }
.bu-tableur > span { display: grid; place-items: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1; }
.bu-tableur > span:nth-child(3n) { border-right: 0; }
.bu-tableur > span:nth-child(n + 7) { border-bottom: 0; }
.bu-tableur > .c { background: var(--bg-doux); }
.bu-tableur > .sel { font-size: 11.5px; font-weight: 700; color: var(--ink); outline: 2px solid var(--accent); outline-offset: -2px; }
.bu-tableur i { width: 58%; height: 4px; border-radius: 2px; background: var(--line-fort); }

/* La fiche : même format pour toutes, au trait d’encre ; le rond attend la coche du contrôle */
.bu-fiche { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 6px; border: 2px solid var(--ink); border-radius: 8px; font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap; }
.bu-coche { position: relative; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--muted); }
.bu-coche i { position: absolute; inset: -1.5px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-fonce); opacity: 0; }
.bu-coche svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bu-fiche.retard { border-color: var(--ambre); color: var(--ambre-texte); }
.bu-fiche.retard .bu-coche { border-color: var(--ambre); }

/* La trace laissée au calendrier : qui a transmis, et quand */
.bu-trace { border-radius: 8px; border: 1px dashed var(--line-fort); opacity: 0; }
.bu-trace.retard { border-color: var(--ambre); }

/* L’état, en clair, au pied du calendrier (bureau) : le compte se lit d’abord */
.bu-pied { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px; border-top: 1px solid var(--line-fort); font-size: 12px; font-weight: 700; line-height: 30px; color: var(--accent-texte); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bu-pied b { margin-right: 7px; font-size: 17px; font-weight: 700; color: var(--ink); }
.bu-pied.alerte, .bu-pied.alerte b { color: var(--ambre-texte); }

/* Relief : le calendrier et le bulletin sont posés à plat ; le contrôle est un rail, la date limite un repère planté ;
   les fiches glissent juste au-dessus ; les formes d’origine, encore en désordre, flottent plus haut. */
.bu-ctrl, .bu-ctrl-lib { translate: 0 0 calc(6px * var(--relief)); }
.bu-limite, .bu-noeud { translate: 0 0 calc(8px * var(--relief)); }
.bu-var { transform-style: preserve-3d; }
.bu-fiche { translate: -50% -50% calc(10px * var(--relief)); }
.bu-src { translate: -50% -50% calc(40px * var(--relief)); }

/* Petit écran : flux de haut en bas, trois variables, formes plus petites */
.bu-compact .bu-jours span { font-size: 10.5px; }
.bu-compact .bu-limite b { height: 16px; }
.bu-compact .bu-ctrl-lib { transform: translateX(-100%); }
.bu-compact .bu-noeud { width: 10px; height: 10px; margin: -5px; }
.bu-compact .bu-bulletin { margin: -1.5px; border-width: 1.5px; border-radius: 10px; }
.bu-compact .bu-b-sep.fort { height: 1.5px; margin-top: -.75px; }
.bu-compact .bu-b-tete { left: 11px; top: 0; height: 26px; flex-direction: row; align-items: center; gap: 8px; }
.bu-compact .bu-b-tete b { font-size: 13.5px; }
.bu-compact .bu-b-tete span { font-size: 11px; }
.bu-compact .bu-b-adr { display: none; }
.bu-compact .bu-b-sep { left: 10px; right: 10px; }
.bu-compact .bu-barre { height: 7px; }
.bu-compact .bu-v-lib { font-size: 11px; }
.bu-compact .bu-v-plein svg { stroke-width: 2; }
.bu-compact .bu-src b { font-size: 11px; }
.bu-compact .bu-feuille { width: 56px; height: 62px; padding: 7px 7px 0; gap: 5px; border-radius: 5px; }
.bu-compact .bu-feuille b { padding-bottom: 5px; }
.bu-compact .bu-feuille i:nth-of-type(4), .bu-compact .bu-feuille em:nth-of-type(4) { display: none; }
.bu-compact .bu-feuille span { width: 9px; margin-right: 1px; }
.bu-compact .bu-feuille em { width: 7px; height: 7px; }
.bu-compact .bu-bulle { width: 88px; height: 36px; padding: 0 11px; gap: 5px; border-radius: 12px; }
.bu-compact .bu-bulle i { width: 40px; }
.bu-compact .bu-bulle::after { left: 14px; bottom: -5px; width: 8px; height: 8px; }
.bu-compact .bu-tableur { width: 94px; height: 50px; grid-template-columns: 15px 1fr 24px; grid-template-rows: 13px 1fr 1fr; border-radius: 5px; }
.bu-compact .bu-tableur > .sel { font-size: 11px; }
.bu-compact .bu-fiche { gap: 5px; padding: 0 5px 0 3px; border-radius: 7px; font-size: 11px; }
.bu-compact .bu-coche { width: 12px; height: 12px; }
.bu-compact .bu-trace { border-radius: 7px; }
