/* VERSION TEST B — mise en page de la maquette « Pastel doux ».
   Chargé après staff.css et staff-themes.css, seulement par staff-b.html. */

body.bx #app-view { max-width: 520px; padding: calc(10px + env(safe-area-inset-top)) 16px calc(112px + env(safe-area-inset-bottom)); overflow-x: clip; }
/* overflow-x: clip : rien ne peut élargir la page (iOS réduirait alors l'échelle et la barre
   flottante #b-nav se retrouverait au milieu de l'écran). touch-action : pas de zoom au double-tap. */
body.bx { touch-action: manipulation; }
body.bx #tab-bar.b-hide { display: none !important; }
body.bx .card { margin-bottom: 12px; }
body.bx svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.bx .t-testflag { position: absolute; top: calc(4px + env(safe-area-inset-top)); right: 50%; transform: translateX(50%); padding: 2px 8px; font-size: 9.5px; opacity: .85; }

/* ---------- En-têtes ---------- */
.b-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 2px 12px; }
.b-who { display: flex; align-items: center; gap: 11px; }
.b-title { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.b-sub { font-size: 12.5px; color: var(--t-muted); font-weight: 600; margin-top: 2px; }
.b-top-actions { display: flex; gap: 6px; }
.b-icbtn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, 0.6); border: 1px solid var(--t-line);
  color: var(--t-text); box-shadow: var(--t-shadow);
}
.b-icbtn svg { width: 19px; height: 19px; }
.b-icbtn:disabled { opacity: .35; }
.b-pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  background: rgba(255, 255, 255, 0.6); border: 1px solid var(--t-line); color: var(--t-text);
}
.b-status-row { margin: -2px 2px 12px; }
.b-dot { width: 8px; height: 8px; border-radius: 50%; background: #b9a9b4; }
.b-status--work .b-dot  { background: #e0457b; box-shadow: 0 0 0 3px rgba(224, 69, 123, .22); }
.b-status--break .b-dot { background: #f2a33a; box-shadow: 0 0 0 3px rgba(242, 163, 58, .22); }
.b-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.b-card-head b { font-size: 16px; font-weight: 800; }
.b-card-head #myday-planned-label { font-size: 12px; color: var(--t-muted); font-weight: 700; }
.b-chev { width: 18px; height: 18px; color: var(--t-muted); flex: none; transition: transform .2s; }
.open > .b-chev { transform: rotate(90deg); }

/* ---------- Carte anneau ---------- */
.b-hero { display: flex; align-items: center; gap: 16px; padding: 18px; }
.b-ring-wrap { position: relative; width: 128px; height: 128px; flex: none; }
.b-ring { width: 128px; height: 128px; display: block; }
.b-ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.b-ring-txt b { font-size: 27px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.b-ring-txt span { font-size: 11.5px; color: var(--t-muted); font-weight: 700; margin-top: 4px; }
.b-hero-side { flex: 1; min-width: 0; }
.b-hero-title { font-size: 16px; font-weight: 800; }
.b-kv { display: grid; gap: 6px; margin-top: 11px; font-size: 12.5px; }
.b-kv div { display: flex; justify-content: space-between; gap: 6px; }
.b-kv span { display: flex; align-items: center; gap: 7px; color: var(--t-muted); font-weight: 600; }
.b-kv b { font-weight: 800; white-space: nowrap; }
.b-kv i { width: 8px; height: 8px; border-radius: 3px; }
.b-k1 { background: #b99af0; } .b-k2 { background: #f3c1d6; } .b-k3 { background: #e0457b; }

/* Ma journée (rendu staff.js) : plus compact */
body.bx .b-myday { padding: 14px 16px 12px; }
body.bx .myday-legend { gap: 10px; font-size: 11px; }

/* Mode aide : case sous Ma journée (bleu pastel, comme dans Heures) */
.b-helper { padding: 12px 14px; }
.b-helper-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.b-helper-row input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: #60a5fa; cursor: pointer; }
.b-helper-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.b-helper-txt b { font-size: 14.5px; font-weight: 800; }
.b-helper.is-locked .b-helper-row { cursor: default; }
/* Menu déroulant de l'Ordre de départ : seulement la case volontaire — les
   explications (rang, texte, ?) sont masquées, la ligne du haut suffit. */
body.bx #b-cut-more .b-cut-more-head, body.bx #cutrank-body { display: none; }
.b-cut-vol { margin: 0; }
.b-cut.no-more .b-chev { display: none; }
.b-cut.no-more .b-cut-row { cursor: default; }
.b-cut-vol.is-on .b-helper-txt b { color: var(--t-accent); }
body.bx .cutrank-vol { display: none; }
.b-helper-ask { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--t-sep); }
.b-helper-q { font-size: 13px; line-height: 1.4; color: var(--t-muted); }
.b-helper-q b { color: inherit; font-weight: 800; }
.b-helper-err { color: #b91c1c; font-weight: 700; }
.b-helper-btns { display: flex; gap: 8px; margin-top: 10px; }
.b-helper-btns button { flex: 1; border: 0; border-radius: 12px; padding: 11px 10px; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; }
.b-helper-yes { background: #60a5fa; color: #fff; }
.b-helper-no { background: rgba(0,0,0,.06); color: inherit; }
.b-helper-btns button:disabled { opacity: .5; }
.b-helper.is-locked input, .b-helper.is-locked .b-helper-txt b { opacity: .45; cursor: default; }
.b-helper-txt span { font-size: 12.5px; color: var(--t-muted); line-height: 1.35; }
body.bx .b-helper.is-on, .b-helper.is-on { background: #dbeafe; box-shadow: inset 0 0 0 1.5px #93c5fd; }
.b-helper.is-on .b-helper-txt b, .b-helper.is-on .b-helper-txt span { color: #1e3a8a; }

/* ---------- Ordre de départ ---------- */
.b-cut { padding: 12px 14px; }
.b-cut-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer;
}
.b-cut-tile {
  width: 48px; height: 48px; border-radius: 16px; flex: none;
  display: grid; place-items: center; font-size: 19px; font-weight: 900;
  background: #fff; color: var(--t-accent); box-shadow: var(--t-shadow);
}
.b-cut-tile sup { font-size: 11px; margin-left: 1px; }
.b-cut-tile--rank { background: var(--t-grad); color: #fff; }
.b-cut-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.b-cut-txt b { font-size: 14.5px; font-weight: 800; }
.b-cut-txt span { font-size: 12.5px; color: var(--t-muted); line-height: 1.35; }
.b-cut-more { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--t-sep); }
.b-cut-more-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.b-cut-more-head .big-count { font-size: 18px; }
body.bx .cutrank-explain { font-size: 13px; }

/* ---------- Enfants présents ---------- */
.b-groupbar { display: flex; gap: 3px; height: 10px; border-radius: 6px; overflow: hidden; margin: 0 0 14px; }
.b-groupbar:empty { display: none; }
.b-groupbar i { display: block; }
body.bx .donut-legend-row { font-size: 13.5px; }

/* ---------- Horaire : puces ---------- */
.b-days { display: flex; gap: 6px; margin: 4px 0 12px; }
.b-day {
  flex: 1; position: relative; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 9px 0 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.55); border: 1px solid var(--t-line);
  font-family: inherit; font-size: 11px; font-weight: 700; color: var(--t-muted);
}
.b-day b { font-size: 17px; font-weight: 800; color: var(--t-text); }
.b-day i { position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--t-accent); }
.b-day.off b { opacity: .45; }
.b-day.on { background: var(--t-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(var(--t-glow), .55); }
.b-day.on b { color: #fff; opacity: 1; }
.b-day.on i { background: #fff; }
.b-day.picked:not(.on) { border-color: var(--t-accent); }

/* ---------- Horaire : cartes de quart ---------- */
.b-shifts { display: grid; gap: 8px; margin-bottom: 12px; }
body.bx .b-shift {
  display: flex; align-items: center; gap: 12px; margin: 0;
  padding: 11px 14px; border-radius: 18px; transition: box-shadow .3s;
}
.b-shift-bar { width: 4px; align-self: stretch; border-radius: 3px; background: rgba(122, 101, 114, .18); }
.b-shift-main { flex: 1; min-width: 0; }
.b-shift-day { font-size: 11.5px; color: var(--t-muted); font-weight: 700; }
.b-shift-time { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.b-shift-time.muted { font-size: 14px; color: var(--t-muted); font-weight: 700; }
.b-shift-right b { font-size: 13px; font-weight: 800; }
.b-shift-now { font-size: 12px; font-weight: 800; color: var(--t-accent); }
body.bx .b-shift.now { background: var(--t-card-strong); }
body.bx .b-shift.now .b-shift-bar { background: var(--t-accent); }
body.bx .b-shift.past { opacity: .62; }
body.bx .b-shift--empty { padding-top: 9px; padding-bottom: 9px; }
body.bx .b-shift.flash { box-shadow: 0 0 0 2px var(--t-accent), var(--t-shadow); }

/* ---------- Période de paie ---------- */
.b-pay-total { display: flex; align-items: baseline; gap: 7px; margin-top: -2px; }
.b-pay-total b { font-size: 30px; font-weight: 900; letter-spacing: -0.03em; }
.b-pay-total span { font-size: 13px; color: var(--t-muted); font-weight: 700; }
.b-bars { display: flex; align-items: flex-end; gap: 4px; height: 70px; margin-top: 12px; }
.b-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.b-bar i { display: block; width: 100%; border-radius: 5px; background: rgba(255, 255, 255, .75); }
.b-bar.done i { background: var(--t-soft); }
.b-bar.today i { background: var(--t-accent); }
.b-bar.future i { background: rgba(255, 255, 255, .45); border: 1.5px dashed var(--t-soft); box-sizing: border-box; }
.b-bar.none i { height: 5px !important; width: 5px; border-radius: 50%; background: rgba(122, 101, 114, .25); }
.b-pay-legend { display: flex; gap: 12px; margin-top: 10px; font-size: 11px; font-weight: 700; color: var(--t-muted); }
.b-pay-legend span { display: flex; align-items: center; gap: 5px; }
.b-pay-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--t-soft); }
.b-pay-legend i.t { background: var(--t-accent); }
.b-pay-legend i.f { background: rgba(255, 255, 255, .5); border: 1.5px dashed var(--t-soft); box-sizing: border-box; }
.b-bar span { font-size: 9.5px; font-weight: 700; color: var(--t-muted); }
.b-pay-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--t-muted); font-weight: 700; }

.b-fold {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font-family: inherit;
}
.b-fold b { font-size: 16px; font-weight: 800; flex: 1; text-align: left; }
#b-hours-body { margin-top: 12px; }

/* ---------- Groupes ---------- */
body.bx #disp-edit-btn { cursor: pointer; font-family: inherit; }
body.bx .disp-view-switch { margin: 0 0 12px; }
.b-suggest-title { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; margin-bottom: 8px; color: var(--t-accent); }
.b-suggest-title svg { width: 18px; height: 18px; }
body.bx #disp-grid-main { gap: 10px; margin-bottom: 14px; }
body.bx .disp-room {
  background: var(--t-card) !important; border: 1px solid var(--t-line);
  border-top: 4px solid; border-radius: 20px; padding: 10px 11px 12px;
  box-shadow: var(--t-shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
body.bx .disp-room--pouponniere { border-top-color: #4cc38a; }
body.bx .disp-room--bleu   { border-top-color: #5b9cf0; }
body.bx .disp-room--rouge  { border-top-color: #ef6b5b; }
body.bx .disp-room--jaune  { border-top-color: #f2c94c; }
body.bx .disp-room--orange { border-top-color: #f5a05a; }
body.bx .disp-room-head { font-size: 13.5px; font-weight: 900; color: var(--t-text) !important; display: flex; justify-content: space-between; }
body.bx .disp-room-count {
  font-size: 11px; font-weight: 800; opacity: 1; padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); color: var(--t-muted);
}
body.bx .disp-kid { border-radius: 8px; }

/* ---------- Réglages ---------- */
.b-profile { display: flex; align-items: center; gap: 14px; padding: 18px; }
.b-avatar-lg { width: 54px; height: 54px; font-size: 18px; }
.b-prof-name { font-size: 17px; font-weight: 900; }
.b-links { padding: 4px 16px; }
.b-link {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 0;
  background: none; border: 0; border-bottom: 1px solid var(--t-sep);
  color: inherit; text-decoration: none; text-align: left; cursor: pointer; font-family: inherit;
}
.b-link:last-child { border-bottom: 0; }
.b-link span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.b-link b { font-size: 14.5px; font-weight: 800; }
.b-link i { font-style: normal; font-size: 12px; color: var(--t-muted); font-weight: 600; }
body.bx #notif-label { font-size: 13px; color: var(--t-muted); }

/* ---------- Barre flottante ---------- */
#b-nav {
  position: fixed; z-index: 50;
  left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom));
  max-width: 440px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 6px; border-radius: 999px;
  background: var(--t-nav-bg); border: 1px solid var(--t-line);
  box-shadow: 0 16px 36px -14px rgba(var(--t-glow), .5);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
#b-nav button {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 15px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  color: var(--t-muted); font-family: inherit; font-size: 14px; font-weight: 800;
}
#b-nav button svg { width: 22px; height: 22px; flex: none; }
#b-nav button span { display: none; }
#b-nav button.on { flex: 1; background: #fff; color: var(--t-text); box-shadow: 0 4px 14px -8px rgba(var(--t-glow), .5); }
#b-nav button.on span { display: inline; }
#b-nav button.on svg { color: var(--t-accent); }

/* Fond de repli (rebond du défilement iOS) */
html:has(body.bx) { background: var(--bx-base, #f6dbe6); } /* posé par staff-b.js selon le thème */
body.bx #hours-emp-name { display: none; }

/* Groupes : chaque local prend la hauteur de son contenu (pas de bulle vide étirée) */
body.bx .disp-room { align-self: start; }

/* ---------- Enfants présents : ligne compacte au lieu du beigne ---------- */
body.bx #donut-container { display: none; }
body.bx .donut-wrap { display: block; }
body.bx #donut-legend { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
body.bx .donut-legend-row {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 9px;
  border-radius: 999px; background: rgba(255, 255, 255, .6); border: 1px solid var(--t-line);
  font-size: 13px;
}
body.bx .donut-legend-name { flex: none; font-weight: 700; }
body.bx .donut-legend-val { font-weight: 900; }
body.bx .donut-legend-dot { width: 9px; height: 9px; }
body.bx .donut-legend-row--on { background: #fff; box-shadow: 0 0 0 1.5px var(--t-accent); }
body.bx .donut-legend-row--empty { opacity: .6; }
body.bx .donut-legend-row--empty .donut-legend-dot { background: rgba(122, 101, 114, .3) !important; }
body.bx .b-groupbar { height: 14px; border-radius: 8px; margin-bottom: 12px; }
body.bx .b-groupbar i:last-child.b-free { background: rgba(255, 255, 255, .7); }
body.bx #donut-detail { margin-top: 12px; }

/* =================== v2 : mise en page demandée =================== */

/* Accueil : « Bonjour » + date, sans avatar ni cloche */
.b-hello { margin: 18px 4px 16px; }
.b-hello .t-hello { font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.b-hello .t-date { font-size: 14px; margin-top: 3px; }

/* Ligne des présences : même piste que « Ma journée » */
.b-att-count { font-size: 14px; color: var(--t-muted); font-weight: 700; }
.b-att-count b { font-size: 24px; font-weight: 900; color: var(--t-text); letter-spacing: -0.02em; }
body.bx .b-att-track { position: relative; overflow: hidden; display: flex; }
.b-att-seg {
  flex: 0 1 auto; min-width: 17px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  box-shadow: inset -1.5px 0 0 rgba(255, 255, 255, .7);
}
.b-att-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12px; color: var(--t-muted); font-weight: 600; }
.b-att-legend span { display: flex; align-items: center; gap: 5px; }
.b-att-legend b { color: var(--t-text); font-weight: 900; }
.b-att-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.b-att-legend .b-att-zero { opacity: .6; }
.b-att-free { background: rgba(255, 255, 255, .9); border: 1px solid rgba(122, 101, 114, .3); box-sizing: border-box; }

/* Moyenne d'heures, repliée dans l'ordre de départ */
#mycuts-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--t-sep); }
.b-sub-head b { font-size: 14.5px; }

/* Horaire : bande de dates défilante (2 semaines, 7 visibles) */
body.bx .b-days {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 4px -16px 14px; padding: 2px 16px 8px; scroll-padding-inline: 16px; scrollbar-width: none;
}
body.bx .b-days::-webkit-scrollbar { display: none; }
body.bx .b-day { flex: 0 0 calc((100% - 36px) / 7); }
body.bx .b-day:nth-child(7n + 1) { scroll-snap-align: start; }
body.bx .b-day:nth-child(8) { margin-left: 10px; }
body.bx .b-shift--empty { opacity: .7; }

/* Carte de paie : bouton « Détail » à droite du pied */
.b-pay-foot { align-items: center; }
.b-pay-more {
  display: inline-flex; align-items: center; gap: 2px; cursor: pointer;
  border: 0; background: rgba(255, 255, 255, .7); border-radius: 999px; padding: 5px 8px 5px 12px;
  font-family: inherit; font-size: 12px; font-weight: 800; color: var(--t-text);
}
.b-pay-more .b-chev { width: 15px; height: 15px; }

/* Groupes : enfants pas encore arrivés, mêmes carrés que les locaux */
.b-absent-hint { margin: -6px 0 10px; }
.b-abs-group + .b-abs-group { margin-top: 12px; }
.b-abs-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; margin-bottom: 6px; }
.b-abs-label i { width: 9px; height: 9px; border-radius: 3px; }
.b-abs-label span { color: var(--t-muted); font-weight: 700; }
.b-abs-kids { display: flex; flex-wrap: wrap; gap: 6px; }
body.bx .b-abs-kid {
  position: relative; width: 38px; height: 38px; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; opacity: .85;
}
.b-abs-kid img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: inherit; border: 2.5px solid; box-sizing: border-box; background: #fff;
}
body.bx .b-abs-kid.sel { opacity: 1; box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--t-accent); }
#b-absent-confirm .kid-confirm { background: rgba(255, 255, 255, .8); border-color: var(--t-line); border-radius: 14px; }
/* Groupes d'absents côte à côte, plus compact */
#b-absent-list { display: flex; flex-wrap: wrap; gap: 12px 18px; }
body.bx .b-abs-group + .b-abs-group { margin-top: 0; }

/* Panneau de confirmation arrivée / départ (au-dessus de la barre) */
#b-sheet, #a-sheet {
  position: fixed; z-index: 60; left: 16px; right: 16px; max-width: 440px; margin: 0 auto;
  bottom: calc(86px + env(safe-area-inset-bottom));
  padding: 14px; border-radius: 22px; background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 40px -16px rgba(var(--t-glow), .55);
  transform: translateY(12px); opacity: 0; pointer-events: none; transition: transform .18s, opacity .18s;
}
#b-sheet.on, #a-sheet.on { transform: none; opacity: 1; pointer-events: auto; }
.b-sheet-yes.aide { background: #60a5fa; }
.b-sheet-txt { font-size: 14.5px; margin-bottom: 11px; }
.b-sheet-msg { font-size: 14px; font-weight: 700; color: #d23b40; }
.b-sheet-btns { display: flex; gap: 8px; }
.b-sheet-btns button { height: 44px; border-radius: 999px; font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.b-sheet-yes { flex: 1; border: 0; background: #2f9e5b; color: #fff; }
.b-sheet-yes.out { background: #d9485f; }
.b-sheet-yes:disabled { opacity: .6; }
.b-sheet-no { padding: 0 18px; border: 1px solid var(--t-line); background: rgba(255, 255, 255, .7); color: var(--t-text); }
body.b-sheet-open #disp-bubble { display: none; }
body.bx .b-kid-sel { opacity: 1 !important; box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--t-accent); position: relative; z-index: 1; }

/* =================== v3 : ligne des présences mince =================== */
body.bx .b-att { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 10px; }
body.bx .b-att .b-att-count { flex: none; display: flex; align-items: baseline; gap: 3px; font-size: 12px; color: var(--t-muted); font-weight: 700; }
body.bx .b-att .b-att-count b { font-size: 20px; font-weight: 900; color: var(--t-text); letter-spacing: -0.02em; }
body.bx .b-att .b-att-track { flex: 1; height: 22px; border-radius: 9px; }
body.bx .b-att-seg { font-size: 10.5px; }

/* Groupes : tout le visualiseur à l'écran sans défiler */
body.bx [data-panel="groupes"] .b-top { margin: 10px 2px 8px; }
body.bx [data-panel="groupes"] .b-title { font-size: 24px; }
body.bx [data-panel="groupes"] .disp-view-switch { margin: 0 0 8px; }
body.bx [data-panel="groupes"] .cut-status { font-size: 12px; padding: 6px 10px; margin: 0 0 8px; border-radius: 12px; }
body.bx #disp-grid-main { gap: 8px; margin-bottom: 12px; }
body.bx .disp-room { padding: 8px 9px 10px; border-radius: 18px; }
body.bx .disp-room-head { font-size: 13px; margin-bottom: 5px; }
body.bx #b-groups-sub { display: none; } /* redondant avec la ligne des présences */

/* =================== v4 : Réel et Proposé superposables =================== */
/* Local partagé : un bloc par groupe (Réel) ou par éducatrice (Proposé),
   séparés visuellement — chacun sa petite carte teintée avec son nom. */
body.bx .disp-room-kids.disp-room-kids--grouped { display: flex; flex-direction: column; gap: 6px; }
body.bx .disp-subgrp {
  margin: 0; padding: 5px 6px 6px; border-radius: 12px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid color-mix(in srgb, var(--rc, #9aa3ad) 30%, rgba(255, 255, 255, .7));
}
body.bx .disp-subgrp-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10.5px; font-weight: 800; letter-spacing: .3px; margin: 0 1px 4px;
  color: color-mix(in srgb, var(--rc, #9aa3ad) 50%, #4a3d47);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.bx .disp-subgrp-label span { font-weight: 900; opacity: .75; }
body.bx .disp-subgrp-kids { gap: 6px; min-height: 30px; }
body.bx .disp-subgrp.disp-drop-hover { background: rgba(255, 255, 255, .85); border-color: var(--rc, var(--t-accent)); }
body.bx .disp-room-kids { align-content: start; }

/* Ligne des éducatrices : toujours réservée (vide en Réel) */
body.bx .disp-room-edus {
  display: block; height: 15px; margin: -2px 0 6px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
  font-size: 11px; font-weight: 700; color: var(--t-muted);
}
body.bx .disp-room-edu { display: inline; background: none; border: 0; padding: 0; font-size: inherit; }
body.bx .disp-room-edu + .disp-room-edu::before { content: ' · '; }

/* Le bouton ✎ disparaît en Proposé sans changer la hauteur de l'en-tête */
body.bx #disp-edit-btn.hidden { display: inline-flex !important; visibility: hidden; }

/* Suggestion sous le tableau */
body.bx #suggest-head { margin-top: 0; }
body.bx #disp-unassigned:not(.hidden) { margin: 0 0 12px; }
/* Local vide : afficher 0 plutôt que rien (et garder la même hauteur de titre) */
body.bx .disp-room-count:empty::before { content: '0'; }

/* Trait vertical avant le premier enfant qui change de local (discret) */
body.bx .disp-kid.b-first-new { position: relative; overflow: visible; }
body.bx .disp-kid.b-first-new::before {
  content: ''; position: absolute; left: -4px; top: 2px; bottom: 2px; width: 2px;
  border-radius: 1px; background: rgba(60, 50, 60, .28);
}
/* Carrés-photo : la photo est posée en absolu dans le contour, pour que sa
   taille réelle ne déforme jamais le carré (elle débordait et cachait le
   contour quand le trait ci-dessus rendait le carré overflow: visible). */
body.bx .disp-kid--photo { position: relative; min-width: 0; min-height: 0; }
body.bx .disp-kid--photo img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 5.5px; }

/* =================== Thèmes de couleur (Réglages → Couleurs) ===================
   Le thème « rose » est celui de staff-themes.css. Les autres remplacent le
   fond et l'accent ; le texte et les couleurs de groupes ne changent pas. */
body.bx { --t-soft: #d8a6e8; --t-glow: 150, 60, 100; }
html[data-bt="lavande"] body.bx {
  --t-base: #ebe6fb;
  --t-bg: radial-gradient(90% 45% at 0% 0%, #cfc2f7 0%, transparent 60%), radial-gradient(90% 55% at 100% 40%, #d9d0fb 0%, transparent 60%), radial-gradient(90% 55% at 0% 100%, #c3b5f2 0%, transparent 60%), #ebe6fb;
  --t-accent: #6a4fd1; --t-grad: linear-gradient(135deg, #a98bf5, #7fa7f2);
  --t-cta: linear-gradient(90deg, #d9ccfa, #cbd9fa); --t-cta-text: #2c2350;
  --t-soft: #bcaaf2; --t-glow: 100, 70, 190; --t-nav-bg: rgba(248, 246, 255, .74); --t-theme-color: #d9d0fb;
  --t-work: linear-gradient(90deg, #a98bf5, #7fa7f2); --t-work-dot: #9d86ee; --t-planned: rgba(106, 79, 209, .10);
  --t-muted: #6d6782;
}
html[data-bt="menthe"] body.bx {
  --t-base: #e0f4ec;
  --t-bg: radial-gradient(90% 45% at 0% 0%, #c4ecdb 0%, transparent 60%), radial-gradient(90% 55% at 100% 40%, #cdeff0 0%, transparent 60%), radial-gradient(90% 55% at 0% 100%, #bfe8cf 0%, transparent 60%), #e0f4ec;
  --t-accent: #1c8660; --t-grad: linear-gradient(135deg, #5fcf9f, #4fb8cf);
  --t-cta: linear-gradient(90deg, #c6eedd, #c5e8f0); --t-cta-text: #173b2e;
  --t-soft: #98d9bf; --t-glow: 30, 120, 90; --t-nav-bg: rgba(246, 253, 250, .76); --t-theme-color: #c4ecdb;
  --t-work: linear-gradient(90deg, #5fcf9f, #4fb8cf); --t-work-dot: #52c297; --t-planned: rgba(28, 134, 96, .10);
  --t-muted: #5f746b;
}
html[data-bt="ciel"] body.bx {
  --t-base: #e1edf8;
  --t-bg: radial-gradient(90% 45% at 0% 0%, #c3dcf4 0%, transparent 60%), radial-gradient(90% 55% at 100% 40%, #d2dffb 0%, transparent 60%), radial-gradient(90% 55% at 0% 100%, #bcd6f0 0%, transparent 60%), #e1edf8;
  --t-accent: #2a67b3; --t-grad: linear-gradient(135deg, #6eaaf0, #8b9cf4);
  --t-cta: linear-gradient(90deg, #cde1f7, #d3d9fa); --t-cta-text: #1b2d48;
  --t-soft: #a7c6ee; --t-glow: 40, 90, 170; --t-nav-bg: rgba(246, 250, 255, .76); --t-theme-color: #c3dcf4;
  --t-work: linear-gradient(90deg, #6eaaf0, #8b9cf4); --t-work-dot: #6ea3ea; --t-planned: rgba(42, 103, 179, .10);
  --t-muted: #5e6d80;
}
html[data-bt="peche"] body.bx {
  --t-base: #fcebdf;
  --t-bg: radial-gradient(90% 45% at 0% 0%, #fdd9c2 0%, transparent 60%), radial-gradient(90% 55% at 100% 40%, #fbd0bd 0%, transparent 60%), radial-gradient(90% 55% at 0% 100%, #fde3c2 0%, transparent 60%), #fcebdf;
  --t-accent: #c9542a; --t-grad: linear-gradient(135deg, #f7a07a, #f3c064);
  --t-cta: linear-gradient(90deg, #fcd7c4, #fbe3bd); --t-cta-text: #4a2615;
  --t-soft: #f4bd9e; --t-glow: 190, 95, 45; --t-nav-bg: rgba(255, 250, 246, .76); --t-theme-color: #fdd9c2;
  --t-work: linear-gradient(90deg, #f7a07a, #f3c064); --t-work-dot: #f1a57c; --t-planned: rgba(201, 84, 42, .10);
  --t-muted: #806a5f;
}
html[data-bt="rouge"] body.bx {
  --t-base: #fbe4e4;
  --t-bg: radial-gradient(90% 45% at 0% 0%, #f8c9cb 0%, transparent 60%), radial-gradient(90% 55% at 100% 40%, #fbd3d0 0%, transparent 60%), radial-gradient(90% 55% at 0% 100%, #f6c0c6 0%, transparent 60%), #fbe4e4;
  --t-accent: #c22b3a; --t-grad: linear-gradient(135deg, #f0606b, #f2937a);
  --t-cta: linear-gradient(90deg, #f9cdd0, #fbd9cc); --t-cta-text: #4a1a1f;
  --t-soft: #f2a6ad; --t-glow: 190, 50, 65; --t-nav-bg: rgba(255, 247, 247, .76); --t-theme-color: #f8cfd2;
  --t-work: linear-gradient(90deg, #f0606b, #f2937a); --t-work-dot: #ee6f7a; --t-planned: rgba(194, 43, 58, .10);
  --t-muted: #80666a;
}

/* Sélecteur de thème */
.b-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.b-theme {
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
  padding: 10px 4px 8px; border-radius: 16px; border: 1.5px solid transparent;
  background: rgba(255, 255, 255, .5); font-family: inherit; font-size: 12px; font-weight: 800; color: var(--t-text);
}
.b-theme i { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.b-theme.on { border-color: var(--t-accent); background: rgba(255, 255, 255, .85); }

/* =================== v6 : heures du jour, noms par groupe, onglet Infos =================== */

/* Ma journée : heures travaillées jusqu'ici */
.b-worked { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin: -4px 0 10px; }
.b-worked b { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.b-worked span { font-size: 12.5px; color: var(--t-muted); font-weight: 700; }
.b-worked em {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .7); color: var(--t-muted);
}
.b-worked em.b-worked--work { color: var(--t-accent); }
.b-worked em.b-worked--break { color: #c47a12; }

/* Barre des présences : couleur touchée + bulle de noms */
body.bx .b-att { position: relative; z-index: 20; overflow: visible; }
body.bx .b-att-track { cursor: pointer; }
.b-att-seg.on { box-shadow: inset 0 0 0 2px #fff, inset -1.5px 0 0 rgba(255, 255, 255, .7); filter: brightness(1.05); }
.b-att-pop {
  position: absolute; z-index: 40; left: 8px; right: 8px; top: calc(100% - 2px);
  padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .97);
  border-top: 4px solid var(--gc); box-shadow: 0 16px 36px -14px rgba(var(--t-glow), .55);
}
.b-att-pop-head { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 900; margin-bottom: 8px; }
.b-att-pop-head i { width: 10px; height: 10px; border-radius: 3px; background: var(--gc); }
.b-att-pop-head span { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--t-muted); }
.b-att-pop-names { display: flex; flex-wrap: wrap; gap: 5px; max-height: 190px; overflow-y: auto; }
.b-att-pop-names span {
  font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--gc) 16%, #fff); border: 1px solid color-mix(in srgb, var(--gc) 35%, #fff);
}
.b-att-pop-names em { font-size: 12.5px; color: var(--t-muted); }

/* Onglet Infos */
.b-stat-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--t-sep); font-size: 14px; }
.b-stat-row:last-of-type { border-bottom: 0; }
.b-stat-row span { color: var(--t-muted); font-weight: 600; }
.b-stat-row b { font-weight: 900; }
.b-stat-row.strong span { color: var(--t-text); font-weight: 800; }
.b-stat-row.strong b { font-size: 17px; }
.b-stat-note { font-size: 12px; color: var(--t-muted); line-height: 1.45; margin: 8px 0 0; }

/* Barre à 5 onglets : un peu plus serrée */
#b-nav button { padding: 12px 12px; }
#b-nav button.on { padding: 12px 14px; }

/* =================== v7 : fonds plus contrastés =================== */
/* Des taches de couleur plus saturées et de teintes différentes (au lieu
   d'un voile presque uni). Le rose redéfinit celui de staff-themes.css. */
body.bx {
  --t-base: #f4d3e2;
  --t-bg:
    radial-gradient(70% 42% at 0% 0%, #cdb0f7 0%, transparent 65%),
    radial-gradient(75% 50% at 100% 32%, #f7a2c3 0%, transparent 65%),
    radial-gradient(80% 50% at 0% 78%, #f59bbd 0%, transparent 62%),
    radial-gradient(70% 40% at 100% 100%, #c9b6fb 0%, transparent 65%),
    #f4d3e2;
  --t-grad: linear-gradient(135deg, #f37aa8, #a57ff0);
  --t-work: linear-gradient(90deg, #f37aa8, #a57ff0);
  --t-soft: #d59be8;
}
html[data-bt="lavande"] body.bx {
  --t-base: #e4ddfa;
  --t-bg:
    radial-gradient(70% 42% at 0% 0%, #b7a0f8 0%, transparent 65%),
    radial-gradient(75% 50% at 100% 32%, #9fc0fb 0%, transparent 65%),
    radial-gradient(80% 50% at 0% 78%, #d4b0f7 0%, transparent 62%),
    radial-gradient(70% 40% at 100% 100%, #a9b4fa 0%, transparent 65%),
    #e4ddfa;
  --t-grad: linear-gradient(135deg, #9a72f5, #5f95f0); --t-work: linear-gradient(90deg, #9a72f5, #5f95f0); --t-soft: #b19cf2;
}
html[data-bt="menthe"] body.bx {
  --t-base: #d6f1e5;
  --t-bg:
    radial-gradient(70% 42% at 0% 0%, #95e2c0 0%, transparent 65%),
    radial-gradient(75% 50% at 100% 32%, #8fd2ea 0%, transparent 65%),
    radial-gradient(80% 50% at 0% 78%, #bfeaa6 0%, transparent 62%),
    radial-gradient(70% 40% at 100% 100%, #86dccc 0%, transparent 65%),
    #d6f1e5;
  --t-grad: linear-gradient(135deg, #3fc98f, #2fa6d0); --t-work: linear-gradient(90deg, #3fc98f, #2fa6d0); --t-soft: #86d6b5;
}
html[data-bt="ciel"] body.bx {
  --t-base: #d9e8f8;
  --t-bg:
    radial-gradient(70% 42% at 0% 0%, #97c4f5 0%, transparent 65%),
    radial-gradient(75% 50% at 100% 32%, #b0b3fa 0%, transparent 65%),
    radial-gradient(80% 50% at 0% 78%, #9ddcf3 0%, transparent 62%),
    radial-gradient(70% 40% at 100% 100%, #a5bdf7 0%, transparent 65%),
    #d9e8f8;
  --t-grad: linear-gradient(135deg, #4f9bf2, #7b7ef2); --t-work: linear-gradient(90deg, #4f9bf2, #7b7ef2); --t-soft: #95bdef;
}
html[data-bt="peche"] body.bx {
  --t-base: #fbe2d3;
  --t-bg:
    radial-gradient(70% 42% at 0% 0%, #fbb28b 0%, transparent 65%),
    radial-gradient(75% 50% at 100% 32%, #f8a0a0 0%, transparent 65%),
    radial-gradient(80% 50% at 0% 78%, #fcd28c 0%, transparent 62%),
    radial-gradient(70% 40% at 100% 100%, #f9b6a0 0%, transparent 65%),
    #fbe2d3;
  --t-grad: linear-gradient(135deg, #f7865c, #f2b441); --t-work: linear-gradient(90deg, #f7865c, #f2b441); --t-soft: #f3b08a;
}
html[data-bt="rouge"] body.bx {
  --t-base: #fbdcdc;
  --t-bg:
    radial-gradient(70% 42% at 0% 0%, #f7a0a6 0%, transparent 65%),
    radial-gradient(75% 50% at 100% 32%, #f9b4a0 0%, transparent 65%),
    radial-gradient(80% 50% at 0% 78%, #f59aae 0%, transparent 62%),
    radial-gradient(70% 40% at 100% 100%, #f8aaa8 0%, transparent 65%),
    #fbdcdc;
  --t-grad: linear-gradient(135deg, #ef4d5a, #f2845f); --t-work: linear-gradient(90deg, #ef4d5a, #f2845f); --t-soft: #f09aa2;
}

/* =================== v7 : boutons avec du relief =================== */
/* Recette : dégradé clair→un peu plus foncé de haut en bas, reflet blanc
   sur le bord du haut, ombre intérieure en bas et ombre portée teintée. */
body.bx {
  --raise-light: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, .82) 55%, rgba(255, 255, 255, .62) 100%);
  --raise-light-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 4px rgba(var(--t-glow), .10),
    0 1px 2px rgba(0, 0, 0, .06),
    0 8px 18px -10px rgba(var(--t-glow), .55);
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, .06) 50%, rgba(0, 0, 0, .10) 100%);
  --raise-color-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -2px 4px rgba(0, 0, 0, .14),
    0 2px 3px rgba(var(--t-glow), .25),
    0 10px 20px -10px rgba(var(--t-glow), .75);
}

/* Boutons clairs */
body.bx .b-icbtn,
body.bx .b-pill,
body.bx .b-day,
body.bx .b-pay-more,
body.bx .b-sheet-no,
body.bx #logout-btn,
body.bx .b-theme,
body.bx .disp-view-switch,
body.bx .hours-nav-reset:not(.is-now),
body.bx #sched-prev, body.bx #sched-next, body.bx #hours-nav-prev, body.bx #hours-nav-next {
  background: var(--raise-light);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: var(--raise-light-shadow);
}
body.bx .disp-view-switch { padding: 4px; }
body.bx .b-day.off { background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .45)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 10px -8px rgba(var(--t-glow), .4); }

/* Boutons de couleur (accent) */
body.bx .b-day.on,
body.bx .disp-view-btn.active,
body.bx .hours-nav-reset.is-now,
body.bx .b-cut-tile--rank,
body.bx .t-avatar,
body.bx #notif-btn,
body.bx .hours-dates button,
body.bx .login-card button {
  background: var(--gloss), var(--t-grad);
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: var(--raise-color-shadow);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .15);
}
body.bx .b-cut-tile:not(.b-cut-tile--rank) { background: var(--raise-light); box-shadow: var(--raise-light-shadow); }

/* Confirmer arrivée / départ : vert et rouge en relief */
body.bx .b-sheet-yes { background: linear-gradient(180deg, #45b873, #2a8f52); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 4px rgba(0, 0, 0, .15), 0 10px 18px -10px rgba(42, 143, 82, .8); text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }
body.bx .b-sheet-yes.out { background: linear-gradient(180deg, #ea6479, #c63a52); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 4px rgba(0, 0, 0, .15), 0 10px 18px -10px rgba(198, 58, 82, .8); }

/* Barre d'onglets : pilule en verre bombé, onglet actif teinté et enfoncé-doux */
body.bx #b-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .7));
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: inset 0 1px 0 #fff, inset 0 -3px 8px rgba(var(--t-glow), .08), 0 18px 36px -16px rgba(var(--t-glow), .6);
}
body.bx #b-nav button.on {
  background: linear-gradient(180deg, color-mix(in srgb, var(--t-accent) 10%, #fff), color-mix(in srgb, var(--t-accent) 18%, #fff));
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(var(--t-glow), .12), 0 6px 14px -8px rgba(var(--t-glow), .6);
  color: var(--t-accent);
}

/* Carrés d'enfants : léger bombé aussi */
body.bx .disp-kid:not(.disp-kid--photo) {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .08)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1.5px 3px rgba(0, 0, 0, .12), 0 3px 6px -3px rgba(0, 0, 0, .25);
}
/* L'anneau de sélection passe par-dessus le relief des carrés */
body.bx .disp-kid.b-kid-sel { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--t-accent), 0 6px 12px -4px rgba(0, 0, 0, .3) !important; }
body.bx .b-theme.on { border-color: var(--t-accent); box-shadow: 0 0 0 1.5px var(--t-accent), var(--raise-light-shadow); }

/* =================== v8 : défilement fluide sur le visualiseur ===================
   staff.css met touch-action: none sur chaque carré (pour le glisser), ce qui
   bloque le défilement quand le doigt commence sur un enfant. On ne le garde
   qu'en mode ✎ Modifier (body.b-editing, posé par staff-b.js). */
body.bx .disp-kid, body.bx .disp-name, body.bx .b-abs-kid { touch-action: manipulation; }
body.bx.b-editing #disp-grid-main .disp-kid,
body.bx.b-editing #disp-unassigned .disp-name { touch-action: none; }
.b-cut-expected { font-weight: 600; opacity: .8; white-space: nowrap; }
/* Horaire : jours sans quart */
body.bx .b-shift--off .b-shift-time { color: var(--t-muted); }
body.bx .b-shift--tbd .b-shift-time { font-style: italic; font-weight: 600; }
body.bx .b-shift--tbd .b-shift-bar { background: repeating-linear-gradient(180deg, rgba(122, 101, 114, .25) 0 4px, transparent 4px 8px); }

/* =================== v9 : s'adapter à chaque téléphone (encoche, barre du bas) =================== */
/* Haut : la page commence par une bande unie de la même couleur que la barre
   d'état (meta theme-color, --bx-top posé par staff-b.html / staff-b.js),
   qui se fond ensuite dans les taches de couleur — plus de cassure sous
   l'heure / le wifi / la batterie. */
html:has(body.bx) { background: var(--bx-top, #ecd0ee); }
body.bx::before {
  background:
    linear-gradient(180deg,
      var(--bx-top, #ecd0ee) 0,
      var(--bx-top, #ecd0ee) env(safe-area-inset-top, 0px),
      transparent calc(env(safe-area-inset-top, 0px) + 140px)),
    var(--t-bg);
}

/* Bas : la barre se pose juste au-dessus de la barre d'accueil de l'iPhone
   (safe-area), ou à 10 px du bord sur un téléphone sans barre d'accueil. */
body.bx #b-nav { bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) - 8px)); }
body.bx #b-sheet, body.bx #a-sheet { bottom: calc(max(10px, calc(env(safe-area-inset-bottom, 0px) - 8px)) + 72px); }
body.bx #app-view { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
/* Voile sous la barre : le contenu qui défile s'efface au lieu de dépasser
   dessous — la barre paraît ancrée au bas de l'écran. */
body.bx #app-view::after {
  content: ''; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; pointer-events: none;
  height: calc(70px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bx-base, #f4d3e2) 35%, transparent);
}
body.bx #app-view.hidden::after { display: none; }

/* Moyenne d'heures : gros chiffre + tuiles */
.b-avg-hero { display: flex; align-items: center; gap: 14px; margin: 2px 0 14px; }
.b-avg-hero > b {
  font-size: 46px; font-weight: 900; letter-spacing: -0.04em; line-height: 1;
  background: var(--t-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.b-avg-hero div { display: flex; flex-direction: column; gap: 5px; }
.b-avg-hero span { font-size: 14px; font-weight: 800; }
.b-avg-hero em {
  font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--t-accent);
  padding: 3px 9px; border-radius: 999px; width: fit-content;
  background: color-mix(in srgb, var(--t-accent) 12%, #fff);
}
.b-avg-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.b-avg-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; border-radius: 16px;
  background: var(--raise-light); border: 1px solid rgba(255, 255, 255, .95); box-shadow: var(--raise-light-shadow);
}
.b-avg-tile b { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.b-avg-tile span { font-size: 11px; font-weight: 700; color: var(--t-muted); line-height: 1.3; }

/* =================== v10 : locaux du visualiseur en verre teinté ===================
   Au lieu de boîtes blanches qui ressortent : un verre léger teinté de la
   couleur du local, bordure fine de la même couleur, ombre très douce. */
body.bx .disp-room {
  --rc: #9aa3ad;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rc) 20%, transparent), color-mix(in srgb, var(--rc) 9%, transparent)),
    rgba(255, 255, 255, .28) !important;
  border: 1px solid color-mix(in srgb, var(--rc) 38%, rgba(255, 255, 255, .6));
  border-top: 1px solid color-mix(in srgb, var(--rc) 38%, rgba(255, 255, 255, .6));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 6px 16px -12px color-mix(in srgb, var(--rc) 70%, transparent);
  backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
body.bx .disp-room--pouponniere { --rc: #3dbb7f; } /* vert : pouponnière */
body.bx .disp-room--jaune       { --rc: #eab308; }
body.bx .disp-room--bleu        { --rc: #4f8fea; }
body.bx .disp-room--orange      { --rc: #f28a3c; }
body.bx .disp-room--rouge       { --rc: #ea5a4a; }
/* Titre du local dans sa couleur (plus foncée pour rester lisible) */
body.bx .disp-room-head { color: color-mix(in srgb, var(--rc) 55%, #2b1f2a) !important; }
body.bx .disp-room-count { background: rgba(255, 255, 255, .65); color: color-mix(in srgb, var(--rc) 55%, #2b1f2a); }
body.bx .disp-room-edus { color: color-mix(in srgb, var(--rc) 40%, #6b5d66); }
/* v10b : locaux un peu plus visibles (teinte, fond et bordure renforcés) */
body.bx .disp-room {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rc) 30%, transparent), color-mix(in srgb, var(--rc) 16%, transparent)),
    rgba(255, 255, 255, .45) !important;
  border: 1.5px solid color-mix(in srgb, var(--rc) 55%, rgba(255, 255, 255, .5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 8px 18px -10px color-mix(in srgb, var(--rc) 80%, transparent);
}

/* =================== v11 : Mes heures en cartes glissantes =================== */
body.bx .b-hrs-tabs { margin: 0 0 10px; display: flex; width: 100%; box-sizing: border-box; }
body.bx .b-hrs-tabs .disp-view-btn { flex: 1; white-space: nowrap; }
.b-hrs-slider {
  display: flex; gap: 12px; align-items: stretch;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 -16px 12px; padding: 2px 16px 10px; scroll-padding-inline: 16px; scrollbar-width: none;
  box-sizing: border-box; overflow-y: hidden; -webkit-overflow-scrolling: touch;
}
.b-hrs-slider::-webkit-scrollbar { display: none; }
/* Même hauteur pour les trois cartes (la plus haute, repliée) : le pied et
   le bouton Info restent en bas. Pas de flou d'arrière-plan sur ces cartes :
   c'est ce qui rendait le glissement saccadé sur iPhone. */
body.bx .b-hrs-slide {
  flex: 0 0 100%; box-sizing: border-box; margin: 0; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  background: var(--t-card-strong, rgba(255, 255, 255, .78)); contain: paint;
}
.b-hrs-slide > .b-pay-foot { margin-top: auto; padding-top: 10px; }
.b-hrs-slide .b-card-head { align-items: center; margin-bottom: 0; }
.b-hrs-when { margin: 1px 0 8px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.b-hrs-now {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 800; color: var(--t-accent);
}
.b-hrs-nav { display: flex; gap: 6px; }
.b-hrs-arrow {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; color: var(--t-text);
  background: var(--raise-light); border: 1px solid rgba(255, 255, 255, .95); box-shadow: var(--raise-light-shadow);
}
.b-hrs-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.b-hrs-arrow:disabled { opacity: .35; box-shadow: none; cursor: default; }
.b-pay-more.open .b-chev { transform: rotate(90deg); }

/* Détail déplié (bouton Info) */
.b-hrs-info { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--t-sep, rgba(122, 101, 114, .15)); }
.b-hrs-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; font-weight: 700; }
.b-hrs-row b { font-weight: 800; white-space: nowrap; }
.b-hrs-total { border-top: 1px dashed rgba(122, 101, 114, .25); margin-top: 3px; padding-top: 8px; font-size: 15px; }
.b-hrs-total b { font-size: 17px; font-weight: 900; }
.b-hrs-sub { margin: 12px 0 2px; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--t-muted); }
.b-hrs-dayrow span { display: flex; flex-direction: column; min-width: 0; }
.b-hrs-dayrow span b { font-size: 13px; }
.b-hrs-dayrow em { font-style: normal; font-size: 11.5px; color: var(--t-muted); font-weight: 600; }
.b-hrs-empty { margin: 8px 0 0; font-size: 13px; color: var(--t-muted); }

/* Jour : ligne du temps (prévu en fond, travaillé par-dessus) */
.b-tl { margin-top: 14px; }
.b-tl-track {
  position: relative; height: 26px; border-radius: 10px; overflow: hidden;
  background: rgba(255, 255, 255, .6); box-shadow: inset 0 1px 3px rgba(var(--t-glow), .12);
}
.b-tl-track i { position: absolute; top: 0; bottom: 0; }
.b-tl-track i.plan { background: repeating-linear-gradient(135deg, rgba(122, 101, 114, .10) 0 5px, rgba(122, 101, 114, .04) 5px 10px); }
.b-tl-track i.work {
  top: 4px; bottom: 4px; border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%), var(--t-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 5px -2px rgba(var(--t-glow), .6);
}
.b-tl-now { position: absolute; top: 2px; bottom: 2px; width: 2.5px; margin-left: -1px; border-radius: 2px; background: var(--t-text); opacity: .55; }
.b-tl-ticks { position: relative; height: 16px; margin-top: 4px; }
.b-tl-ticks span { position: absolute; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: var(--t-muted); }
.b-tl-ticks span:first-child { transform: none; }
.b-tl-legend { display: inline-flex; align-items: center; gap: 5px; }
.b-tl-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.b-tl-legend i.work { background: var(--t-grad); }
.b-tl-legend i.plan { margin-left: 6px; background: rgba(122, 101, 114, .14); }

/* Dates spécifiques */
.b-hrs-dates { display: flex; gap: 8px; margin: 8px 0 10px; }
.b-hrs-dates label { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 800; color: var(--t-muted); min-width: 0; }
.b-hrs-dates input {
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--t-text);
  padding: 7px 10px; border-radius: 12px; min-width: 0; width: 100%; box-sizing: border-box;
  background: var(--raise-light); border: 1px solid rgba(255, 255, 255, .95); box-shadow: var(--raise-light-shadow);
}

/* =================== v11 : beigne des présences (Aujourd'hui) =================== */
body.bx .b-donut { position: relative; z-index: 20; overflow: visible; }
.b-donut .b-card-head { margin-bottom: 4px; }
.b-donut .b-card-head .b-sub { font-size: 12px; font-weight: 700; }
.b-donut-row { display: flex; align-items: center; gap: 14px; }
body.bx .b-donut-svg { width: 148px; height: 148px; flex: none; overflow: visible; stroke: none; stroke-width: 0; fill: none; }
.b-donut-slice { cursor: pointer; stroke: none; transition: transform .15s, filter .15s; transform-origin: 80px 80px; }
.b-donut-slice.on { transform: scale(1.05); filter: brightness(1.06); stroke: #fff; stroke-width: 2; }
.b-donut-total { font-size: 32px; font-weight: 900; fill: var(--t-text); letter-spacing: -0.03em; }
.b-donut-cap { font-size: 11px; font-weight: 700; fill: var(--t-muted); }
.b-donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
body.bx .b-donut-pill {
  min-width: 0; display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 10px 6px 7px; border-radius: 999px; text-shadow: none;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--t-text); text-align: left;
  background: var(--raise-light); border: 1px solid rgba(255, 255, 255, .95); box-shadow: var(--raise-light-shadow);
}
.b-donut-pill i {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 60%), var(--gc);
  box-shadow: inset 0 -1.5px 2px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .15);
}
.b-donut-pill span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-donut-pill b { font-weight: 900; }
.b-donut-pill.zero { opacity: .55; }
body.bx .b-donut-pill.on { box-shadow: 0 0 0 2px var(--gc), var(--raise-light-shadow); filter: none; }
/* Barres de largeur égale même avec des chiffres sous certaines (30 jours) */
.b-bar { min-width: 0; }
.b-bar span { white-space: nowrap; min-height: 12px; }
.b-bars--dense { gap: 2px; }
.b-bars--dense .b-bar i { border-radius: 3px; }


/* =================== v12 : onglet Infos par sections =================== */
.b-group { margin-bottom: 18px; }
.b-group-title {
  display: flex; align-items: center; gap: 8px; margin: 4px 2px 10px;
  font-size: 13px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: var(--t-muted);
}
.b-group-title svg { width: 17px; height: 17px; fill: none; stroke: var(--t-accent); stroke-width: 2.2; stroke-linecap: round; }
.b-group-title::after { content: ''; flex: 1; height: 1px; background: rgba(122, 101, 114, .18); margin-left: 4px; }

/* Moyenne : historique par mois */
.b-avg-hero em:not(.b-avg-cut) { background: none; padding: 0; color: var(--t-muted); font-weight: 700; font-size: 12px; }
.b-avg-hero .b-hrs-now { font-size: 12px; text-align: left; }
.b-avg-bars { height: 64px; margin: 0 0 14px; }
.b-avg-bars .b-bar { border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; }
.b-avg-bars .b-bar.cur span { color: var(--t-accent); font-weight: 900; }
/* Jour : pauses (même orange que « Ma journée ») */
.b-tl-track i.pause {
  top: 4px; bottom: 4px; border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%), #efa43c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 5px -2px rgba(200, 120, 20, .5);
}
.b-tl-legend i.pause { margin-left: 6px; background: #efa43c; }
.b-hrs-note { margin: 10px 0 0; font-size: 12.5px; font-weight: 600; color: var(--t-muted); line-height: 1.45; }
.b-bar span { overflow: visible; }
/* Dates spécifiques : barres touchables, valeurs au-dessus, lecture dessous */
.b-rng-bars .b-bar { border: 0; background: none; padding: 0; font-family: inherit; cursor: pointer; position: relative; }
.b-rng-bars .b-bar.picked i { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--t-accent); }
.b-bars--values { margin-top: 14px; height: 96px; }
.b-bars--values .b-bar em {
  font-style: normal; font-size: 9.5px; font-weight: 800; color: var(--t-muted); white-space: nowrap;
}
.b-rng-read { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--t-muted); min-height: 17px; }
.b-rng-read b { color: var(--t-text); font-weight: 800; }
.b-hrs-warn {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 12px;
  background: rgba(229, 62, 62, .08); border: 1px solid rgba(229, 62, 62, .22);
  font-size: 12px; font-weight: 700; line-height: 1.4; color: #9b2c2c;
}
.b-hrs-warn b {
  flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #f56565, #d63a3a); color: #fff; font-size: 12px; font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 2px 4px -1px rgba(214, 58, 58, .5);
}

/* =================== v13 : beigne pleine largeur + pastilles à toucher =================== */
body.bx .b-donut-svg { display: block; width: 100%; height: auto; max-width: 330px; margin: -4px auto 0; }
.b-donut-bub { cursor: pointer; transition: transform .15s; transform-box: fill-box; transform-origin: center; }
.b-donut-bub.on { transform: scale(1.15); }
.b-donut-bubtxt { font-size: 15px; font-weight: 900; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, .18); stroke-width: 2px; pointer-events: none; }
.b-donut-total { font-size: 40px; }
.b-donut-cap { font-size: 12.5px; }
.b-donut-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; margin-top: 2px; }
body.bx .b-donut-key-item {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 0; border-radius: 999px; min-width: 0;
  background: none; box-shadow: none; text-shadow: none; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 700; color: var(--t-muted);
}
.b-donut-key-item i { width: 9px; height: 9px; border-radius: 50%; background: var(--gc); flex: none; }
body.bx .b-donut-key-item.on { background: rgba(255, 255, 255, .8); color: var(--t-text); box-shadow: 0 0 0 1.5px var(--gc); filter: none; }
/* v13b : noms à droite du beigne (carte plus basse → l'ordre de départ reste visible) */
body.bx .b-donut .b-donut-row { display: flex; align-items: center; gap: 4px; }
body.bx .b-donut .b-donut-svg { flex: 0 0 64%; width: 64%; max-width: 230px; margin: -6px 0 -4px -6px; }
body.bx .b-donut .b-donut-key { flex: 1; min-width: 0; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 1px; margin: 0; }
body.bx .b-donut-key-item { justify-content: flex-start; padding: 5px 8px; font-size: 12.5px; color: var(--t-text); }
.b-donut-key-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-donut-key-item i { width: 10px; height: 10px; }
.b-donut .b-donut-bubtxt { font-size: 17px; }
.b-worked span { flex: 1; min-width: 0; line-height: 1.3; }

/* =================== v14 : Mon temps — types d'heures en couleur, pastille « maintenant » =================== */
/* Pastille retour au présent : grise = touchez pour revenir, verte = vous y êtes */
.b-hrs-nav { align-items: center; }
.b-now-pill {
  height: 30px; padding: 0 11px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font-family: inherit; font-size: 12px; font-weight: 800; color: #6b6470;
  background: linear-gradient(180deg, #f4f2f4, #e3dfe3); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(0, 0, 0, .06), 0 4px 10px -6px rgba(0, 0, 0, .3);
}
.b-now-pill.is-now {
  cursor: default; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .15);
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #3ccf7f, #1fa85e);
  border-color: rgba(255, 255, 255, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 0, 0, .12), 0 6px 12px -6px rgba(31, 168, 94, .7);
}
.b-avg-hero .b-now-pill { height: 26px; font-size: 11.5px; width: fit-content; }

/* Barres empilées par type (le travail garde la couleur de la barre) */
.b-bar i.stack { display: flex; flex-direction: column-reverse; overflow: hidden; }
.b-bar i.stack u { display: block; min-height: 2px; text-decoration: none; }
.b-kind-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 11px; font-weight: 700; color: var(--t-muted); }
.b-kind-legend span { display: inline-flex; align-items: center; gap: 4px; }
.b-kind-legend i { width: 9px; height: 9px; border-radius: 3px; }
.b-kind-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.b-kind-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; font-style: normal;
  color: color-mix(in srgb, var(--kc) 75%, #1f1720); background: color-mix(in srgb, var(--kc) 14%, #fff);
}
.b-kind-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.b-rng-extra { font-weight: 600; }

/* Jour sans pointage mais avec une entrée du calendrier : toute la ligne colorée */
.b-tl-track--fill { display: flex; height: 34px; }
.b-tl-track--fill i.b-tl-fill {
  position: relative; top: auto; bottom: auto; height: 100%;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 4px rgba(0, 0, 0, .1);
}
.b-tl-fill span { color: #fff; font-size: 12.5px; font-weight: 900; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .2); padding: 0 8px; overflow: hidden; text-overflow: ellipsis; }
.b-tl-fill + .b-tl-fill { border-left: 2px solid rgba(255, 255, 255, .8); }
.b-tl-fill, .b-bar i { font-style: normal; }
.b-bar.neg i { box-shadow: inset 0 4px 0 #64748b; }

/* =================== v15 =================== */
/* Jour : tuiles arrivée / pause / départ sous la ligne du temps */
.b-day-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.b-day-tile {
  display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 14px;
  background: var(--raise-light); border: 1px solid rgba(255, 255, 255, .95); box-shadow: var(--raise-light-shadow);
}
.b-day-tile span { font-size: 10.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: var(--t-muted); }
.b-day-tile b { font-size: 18px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; }
.b-day-tile em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--t-muted); }
.b-day-note {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; font-size: 12.5px; font-weight: 700; line-height: 1.4;
  color: var(--t-muted); background: rgba(255, 255, 255, .6);
}

/* Sections Horaire / Heures : en-têtes plus marqués, plus d'air entre les deux */
.b-group + .b-group { margin-top: 30px; }
.b-group-title { margin: 6px 2px 12px; font-size: 15px; letter-spacing: .5px; color: var(--t-text); gap: 10px; }
.b-group-title svg {
  width: 30px; height: 30px; padding: 6px; box-sizing: border-box; border-radius: 10px; flex: none;
  stroke: #fff; stroke-width: 2.4;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%), var(--t-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 12px -6px rgba(var(--t-glow), .7);
}
.b-group-title::after { height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(var(--t-glow), .25), rgba(var(--t-glow), 0)); }

/* Beigne seul, centré (sans la liste des noms) */
body.bx .b-donut .b-donut-row { display: block; }
body.bx .b-donut .b-donut-svg { width: 100%; max-width: 232px; margin: -8px auto -6px; }

/* =================== v16 : mode sombre (Réglages → Couleurs → Sombre / Auto) ===================
   html[data-mode="dark"] posé par staff-b.html (avant l'affichage) et staff-b.js.
   Le thème choisi garde sa teinte : taches de couleur, dégradés et accent
   (tiré de la couleur douce du thème, lisible sur fond foncé). */
html[data-mode="dark"] { color-scheme: dark; }
html[data-mode="dark"] body.bx {
  --t-base: #141117;
  --t-bg:
    radial-gradient(70% 40% at 0% 0%, rgba(var(--t-glow), .38) 0%, transparent 65%),
    radial-gradient(70% 45% at 100% 35%, rgba(var(--t-glow), .22) 0%, transparent 65%),
    radial-gradient(80% 45% at 0% 85%, rgba(var(--t-glow), .20) 0%, transparent 62%),
    #141117;
  --t-card: rgba(36, 31, 41, .78);
  --t-card-strong: #262029;
  --t-line: rgba(255, 255, 255, .07);
  --t-sep: rgba(255, 255, 255, .08);
  --t-text: #f3edf5;
  --t-muted: #a99fb0;
  --t-accent: var(--t-soft);
  --t-cta-text: #1a1520;
  --t-shadow: 0 12px 30px -16px rgba(0, 0, 0, .7);
  --t-nav-bg: rgba(30, 26, 34, .82);
  --t-planned: rgba(255, 255, 255, .06);
  --raise-light: linear-gradient(180deg, #3a3240 0%, #2f2935 55%, #29232e 100%);
  --raise-light-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 -2px 4px rgba(0, 0, 0, .25), 0 6px 14px -8px rgba(0, 0, 0, .7);
  --dk-surface: rgba(255, 255, 255, .06);
  --dk-surface-2: rgba(255, 255, 255, .11);
  --dk-mix: #1d1821;
  color: var(--t-text);
}
/* Surfaces claires → surfaces foncées */
html[data-mode="dark"] body.bx :is(.b-icbtn, .b-pill, .b-day:not(.on), .b-pay-more, .b-sheet-no, #logout-btn, .b-theme, .disp-view-switch,
  .b-now-pill:not(.is-now), .b-hrs-arrow, .b-day-tile, .b-avg-tile, .b-donut-pill, .hours-nav-reset:not(.is-now),
  .b-cut-tile:not(.b-cut-tile--rank)) {
  background: var(--raise-light); border-color: rgba(255, 255, 255, .08); box-shadow: var(--raise-light-shadow); color: var(--t-text);
}
html[data-mode="dark"] body.bx .b-day.off:not(.on) { background: rgba(255, 255, 255, .04); box-shadow: none; }
html[data-mode="dark"] body.bx .b-day:not(.on) b { color: var(--t-text); }
html[data-mode="dark"] body.bx .b-now-pill:not(.is-now) { color: var(--t-muted); }
html[data-mode="dark"] body.bx .b-theme.on { background: var(--dk-surface-2); }
html[data-mode="dark"] body.bx #b-nav { background: linear-gradient(180deg, rgba(48, 41, 54, .94), rgba(32, 27, 37, .9)); border-color: rgba(255, 255, 255, .08); box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .8); }
html[data-mode="dark"] body.bx #b-nav button { color: var(--t-muted); }
html[data-mode="dark"] body.bx #b-nav button.on { background: var(--dk-surface-2); color: var(--t-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
html[data-mode="dark"] body.bx .b-hrs-slide { background: var(--t-card-strong); }
html[data-mode="dark"] body.bx :is(.b-tl-track, .myday-track, .b-day-note, #b-absent-confirm .kid-confirm, .disp-name, #donut-detail, .cutrank-bank, .cutrank-help) {
  background: var(--dk-surface) !important; border-color: rgba(255, 255, 255, .07);
}
/* Seulement les barres « neutres » : travaillé / aujourd'hui gardent les
   couleurs du thème (comme la légende), les tranches par type aussi. */
html[data-mode="dark"] body.bx .b-bar:not(.done):not(.today):not(.future):not(.none) i:not(.stack) { background: rgba(255, 255, 255, .14); }
html[data-mode="dark"] body.bx .b-bar.future i { background: rgba(255, 255, 255, .04); }
html[data-mode="dark"] body.bx .b-bar.none i { background: rgba(255, 255, 255, .18); }
html[data-mode="dark"] body.bx :is(#b-sheet, #a-sheet, .b-att-pop) { background: rgba(38, 32, 43, .97); border-color: rgba(255, 255, 255, .08); color: var(--t-text); }
html[data-mode="dark"] body.bx .b-att-pop-names span { background: color-mix(in srgb, var(--gc) 22%, var(--dk-mix)); border-color: color-mix(in srgb, var(--gc) 45%, var(--dk-mix)); color: var(--t-text); }
html[data-mode="dark"] body.bx .b-worked em { background: var(--dk-surface-2); }
html[data-mode="dark"] body.bx .b-avg-hero em.b-avg-cut { background: color-mix(in srgb, var(--t-accent) 18%, var(--dk-mix)); }
html[data-mode="dark"] body.bx .b-kind-tag { color: color-mix(in srgb, var(--kc) 55%, #fff); background: color-mix(in srgb, var(--kc) 22%, var(--dk-mix)); }
html[data-mode="dark"] body.bx .b-hrs-warn { background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .3); color: #fca5a5; }
html[data-mode="dark"] body.bx .b-group-title::after { background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0)); }
/* Visualiseur */
html[data-mode="dark"] body.bx .disp-room {
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 24%, transparent), color-mix(in srgb, var(--rc) 10%, transparent)), rgba(30, 25, 34, .7) !important;
  border-color: color-mix(in srgb, var(--rc) 45%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 18px -12px rgba(0, 0, 0, .7);
}
html[data-mode="dark"] body.bx .disp-room-head { color: color-mix(in srgb, var(--rc) 55%, #fff) !important; }
html[data-mode="dark"] body.bx .disp-room-count { background: rgba(0, 0, 0, .3); color: color-mix(in srgb, var(--rc) 55%, #fff); }
html[data-mode="dark"] body.bx .disp-room-edus { color: color-mix(in srgb, var(--rc) 40%, #c9bfcc); }
html[data-mode="dark"] body.bx .disp-subgrp { background: rgba(0, 0, 0, .22); border-color: color-mix(in srgb, var(--rc) 30%, transparent); }
html[data-mode="dark"] body.bx .disp-subgrp-label { color: color-mix(in srgb, var(--rc) 50%, #fff); }
html[data-mode="dark"] body.bx .disp-subgrp.disp-drop-hover { background: rgba(255, 255, 255, .1); }
/* Beigne */
html[data-mode="dark"] body.bx .b-donut-svg circle[stroke="rgba(255,255,255,.55)"] { stroke: rgba(255, 255, 255, .08); }
html[data-mode="dark"] body.bx .b-donut-svg circle[fill="url(#bd-center)"] { fill: #2c2531; }
html[data-mode="dark"] body.bx .b-donut-bub circle[stroke="#fff"] { stroke: #2c2531; }
/* Connexion, voile sous la barre */
html[data-mode="dark"] body.bx .login-card input { background: var(--dk-surface-2); color: var(--t-text); border-color: rgba(255, 255, 255, .1); }
/* Sélecteur Clair / Sombre / Auto */
body.bx .b-mode { margin-top: 12px; display: flex; width: 100%; box-sizing: border-box; }
.b-mode .disp-view-btn { flex: 1; }

/* =================== v17 =================== */
.b-kind-legend i.lg-done { background: var(--t-soft); }
.b-kind-legend i.lg-today { background: var(--t-accent); }
.b-kind-legend i.lg-future { background: transparent; border: 1.5px dashed var(--t-soft); box-sizing: border-box; }
/* Dates spécifiques : champs de date bien visibles comme « à toucher » */
.b-date-field {
  position: relative; display: flex; align-items: center;
  border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--t-accent) 45%, transparent);
  background: color-mix(in srgb, var(--t-accent) 9%, var(--t-card-strong, #fff));
  box-shadow: 0 4px 10px -6px rgba(var(--t-glow), .5);
}
.b-date-field svg { position: absolute; left: 9px; width: 16px; height: 16px; stroke: var(--t-accent); stroke-width: 2.2; pointer-events: none; }
body.bx .b-hrs-dates .b-date-field input {
  border: 0; box-shadow: none; background: transparent; padding: 8px 8px 8px 30px; color: var(--t-accent); font-weight: 800;
}
.b-hrs-dates input::-webkit-calendar-picker-indicator { opacity: .55; }
html[data-mode="dark"] body.bx .b-date-field { background: color-mix(in srgb, var(--t-accent) 14%, #262029); }
.b-avg-note { margin: 0; font-size: 12px; font-weight: 600; color: var(--t-muted); line-height: 1.4; }
.b-avg-hero .b-now-pill { margin-top: 2px; }
/* Réglages : cloche des notifications en haut à droite */
.b-bell { position: relative; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--t-text); }
.b-bell svg { width: 21px; height: 21px; stroke-width: 2; }
.b-bell-dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #9aa0a6; border: 2px solid var(--t-card-strong, #fff); display: none; }
.b-bell.on .b-bell-dot { display: block; background: #22c55e; }
.b-notif-pop { position: relative; z-index: 30; margin-top: -4px; }
/* Accueil : beigne à gauche, chiffres à droite (carte pleine) */
body.bx .b-donut .b-donut-row { display: flex; align-items: center; gap: 6px; }
body.bx .b-donut .b-donut-svg { flex: 0 0 58%; width: 58%; max-width: none; margin: -10px -4px -10px -12px; }
.b-donut-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.b-donut-title { font-size: 15px; font-weight: 900; line-height: 1.15; margin: 0 0 3px 2px; }
.b-donut-stat {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 14px; text-align: left;
  font-family: inherit; color: var(--t-text);
  background: var(--raise-light); border: 1px solid rgba(255, 255, 255, .95); box-shadow: var(--raise-light-shadow);
}
.b-donut-stat b { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; min-width: 26px; }
.b-donut-stat span { flex: 1; font-size: 11.5px; font-weight: 700; color: var(--t-muted); line-height: 1.2; }
button.b-donut-stat { cursor: pointer; }
.b-donut-stat .b-chev { width: 14px; height: 14px; }
html[data-mode="dark"] body.bx .b-donut-stat { background: var(--raise-light); border-color: rgba(255, 255, 255, .08); }
body.bx .b-donut .b-donut-svg { flex: 0 0 64%; width: 64%; margin: -14px -8px -14px -16px; }
.b-donut-stat { padding: 7px 9px; gap: 7px; }
.b-donut-stat b { font-size: 19px; min-width: 0; }
/* « Aujourd'hui » : dégradé du thème, pour ne pas se confondre avec Maladie (rouge) */
.b-bar.today i, .b-kind-legend i.lg-today { background: var(--t-grad); }

/* =================== v18 : Ma journée = même ligne que Mon temps → Jour =================== */
body.bx .b-worked { flex-wrap: nowrap; align-items: baseline; }
body.bx .b-worked span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
body.bx .b-worked em { flex: none; }
body.bx .myday-track {
  height: 26px; border: 0; border-radius: 10px; overflow: hidden;
  background: rgba(255, 255, 255, .6); box-shadow: inset 0 1px 3px rgba(var(--t-glow), .12);
}
body.bx .myday-seg--planned { background: repeating-linear-gradient(135deg, rgba(122, 101, 114, .10) 0 5px, rgba(122, 101, 114, .04) 5px 10px); }
body.bx :is(.myday-seg--work, .myday-seg--out, .myday-seg--break, .myday-seg--miss) {
  top: 4px; height: auto; bottom: 4px; border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 5px -2px rgba(var(--t-glow), .55);
}
body.bx .myday-seg--work  { background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%), var(--t-grad); }
body.bx .myday-seg--out   { background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%), #e5534b; }
body.bx .myday-seg--break { background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%), #efa43c; }
body.bx .myday-seg--miss  { background: repeating-linear-gradient(45deg, #e0952f 0 5px, #f8d29a 5px 10px); }
body.bx .myday-mark { top: 2px; bottom: 2px; width: 2px; border-radius: 2px; opacity: .7; }
body.bx .myday-now { top: 2px; bottom: 2px; width: 2.5px; margin-left: -1px; border-radius: 2px; background: var(--t-text); opacity: .55; }
body.bx .myday-dot--work { background: var(--t-grad); }

/* =================== v19 : couleur de pause par thème ===================
   Orange par défaut ; les thèmes dont le travail est déjà orangé (Pêche,
   Rouge) prennent un indigo pour que pause et heures ne se confondent pas. */
body.bx { --t-pause: #efa43c; --t-pause-text: #c27313; }
html[data-bt="peche"] body.bx, html[data-bt="rouge"] body.bx { --t-pause: #6c7ee0; --t-pause-text: #4f5fc4; }
html[data-mode="dark"][data-bt="peche"] body.bx, html[data-mode="dark"][data-bt="rouge"] body.bx { --t-pause-text: #9aa8f2; }
body.bx .b-tl-track i.pause { background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%), var(--t-pause); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 5px -2px rgba(0, 0, 0, .3); }
body.bx .b-tl-legend i.pause { background: var(--t-pause); }
body.bx .myday-seg--break { background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%), var(--t-pause); }
body.bx .myday-dot--break { background: var(--t-pause); }
body.bx .myday-mark-label--pause b, body.bx .myday-mark-label--pause i { color: var(--t-pause-text); }

/* =================== v20 : accueil — encore attendus / partis =================== */
.b-donut-stat { padding: 9px 9px 9px 11px; }
.b-donut-stat b { font-size: 22px; }
.b-donut-stat span { display: flex; flex-direction: column; gap: 1px; font-size: 12px; font-weight: 800; color: var(--t-text); }
.b-donut-stat span em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--t-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.bx .b-donut-stat.on { box-shadow: 0 0 0 2px var(--t-accent), var(--raise-light-shadow); }
.b-dlist { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.b-dlist div { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--t-sep); font-size: 13.5px; font-weight: 700; }
.b-dlist div:last-child { border-bottom: 0; }
.b-dlist i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.b-dlist span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-dlist b { font-size: 12.5px; font-weight: 800; color: var(--t-muted); white-space: nowrap; }
.b-dlist-note { margin: 8px 0 0; font-size: 11.5px; font-weight: 600; color: var(--t-muted); }
.b-donut-stat { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 1px; padding: 8px 10px 9px 12px; }
.b-donut-stat b { grid-column: 1; grid-row: 1; font-size: 22px; line-height: 1.05; }
.b-donut-stat .b-chev { grid-column: 2; grid-row: 1; }
.b-donut-stat span { grid-column: 1 / 3; grid-row: 2; min-width: 0; }

/* =================== v21 : Vacances en $ =================== */
.b-vac { display: flex; flex-direction: column; gap: 10px; }
.b-vac-block {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px;
  background: var(--raise-light); border: 1px solid rgba(255, 255, 255, .95); box-shadow: var(--raise-light-shadow);
}
.b-vac-lbl { font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: var(--t-muted); }
.b-vac-block b {
  font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1;
  background: var(--t-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.b-vac-next b { font-size: 24px; background: none; color: var(--t-text); }
.b-vac-block em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--t-text); }
.b-vac-block i { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--t-muted); }
.b-vac-block.neg b { background: none; color: #d64545; }
.b-vac-note { margin: 0; font-size: 12px; font-weight: 600; color: var(--t-muted); line-height: 1.4; }
html[data-mode="dark"] body.bx .b-vac-block { border-color: rgba(255, 255, 255, .08); }
/* Vacances : « bientôt disponible » */
.b-vac-soon { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 8px; }
.b-vac-soon svg { width: 34px; height: 34px; stroke: var(--t-accent); stroke-width: 2; opacity: .8; }
.b-vac-soon b { font-size: 17px; font-weight: 900; }
.b-vac-soon span { font-size: 12.5px; font-weight: 600; color: var(--t-muted); line-height: 1.4; max-width: 260px; }

/* =================== v22 : connexion simple et centrée =================== */
body.bx .login-card { justify-content: center; gap: 22px; min-height: 100dvh; }
.b-login-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.b-login-icon {
  width: 72px; height: 72px; border-radius: 20px; margin-bottom: 8px;
  box-shadow: 0 10px 24px -10px rgba(var(--t-glow), .6), 0 0 0 1px rgba(255, 255, 255, .8);
}
.b-login-head h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.02em; color: var(--t-text); }
.b-login-head p { margin: 0; font-size: 14px; font-weight: 700; color: var(--t-muted); }
body.bx .login-card form { display: flex; flex-direction: column; gap: 10px; }
/* Mode aide : pastilles en relief comme le reste */
html[data-mode="dark"] 
/* =================== v23 : visualiseur sans trous =================== */
/* Deux colonnes de même hauteur ; dans chaque colonne, les locaux se
   partagent toute la hauteur (base 0 + flex-grow) sans jamais devenir plus
   petits que leur contenu (base = contenu, l'espace en trop se partage). Les locaux à deux groupes (Bleu, Orange) ont
   une plus grande part — Orange reste plus grand que Jaune même vide. */
/* Grille des locaux : colonnes et cases viennent de Dev → Locaux (styles en
   ligne posés par staff.js : grid-template-columns, grid-column / grid-row). */
body.bx #disp-grid-main {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: none; grid-template-rows: none;
  grid-auto-rows: minmax(44px, auto); align-items: stretch; gap: 8px;
}
body.bx #disp-grid-main > .disp-room { align-self: stretch; min-height: 96px; min-width: 0; }
body.bx .disp-sleep-slots { font-size: 11px; font-weight: 700; color: var(--t-muted); border-top-color: color-mix(in srgb, var(--rc) 35%, transparent); }
body.bx .disp-sleep-slot u { color: #1d4ed8; }
html[data-mode="dark"] body.bx .disp-sleep-slot u { color: #93c5fd; }
body.bx .disp-room-edu--warn { color: #c47a12; }
body.bx #sleep-head .team-count { margin-left: auto; }

/* ---- Vue admin (onglet Admin, comptes cochés dans Dev → App) ---- */
[data-panel="admin"] { padding-top: 14px; }
.a-staff {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .6);
}
.a-staff > b { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.a-staff > b span { font-size: 15px; font-weight: 800; color: var(--t-muted); margin-left: 3px; }
.a-staff-txt { display: flex; flex-direction: column; font-size: 13px; font-weight: 800; line-height: 1.25; }
.a-staff-txt em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--t-muted); }
.a-staff--ok > b { color: #2a9d5c; }
.a-staff--extra > b { color: #2f7fd0; }
.a-staff--short > b { color: #d93a46; }
.a-staff--short .a-staff-txt em { color: #d93a46; }

/* Lignes du temps compactes : nom + heures à gauche, piste mince à droite. */
.a-tl { padding: 14px 14px 10px; }
.a-tl .b-card-head { margin-bottom: 4px; }
.a-tl-row { display: grid; grid-template-columns: 74px 1fr 38px; align-items: center; gap: 8px; padding: 3px 0; }
.a-tl-hrs { font-size: 12.5px; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.a-tl-hrs-head { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--t-muted); text-align: right; }
.a-tl-axisrow { padding: 0; }
.a-tl-axis { position: relative; height: 14px; }
.a-tl-name { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.a-tl-name b { font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-tl-name em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--t-muted); }
/* Sur place : point vert (orange en pause) ; pas là : point gris, ligne grisée. */
.a-tl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: #b8b0b6; }
.a-tl-row--clocked_in .a-tl-dot { background: #2ecc71; box-shadow: 0 0 0 3px rgba(46, 204, 113, .2); }
.a-tl-row--on_break .a-tl-dot { background: #f39c12; box-shadow: 0 0 0 3px rgba(243, 156, 18, .2); }
.a-tl-row--clocked_in .a-tl-name em { color: #2a9d5c; }
.a-tl-row--on_break .a-tl-name em { color: #c47a12; }
.a-tl-row--gone .a-tl-name, .a-tl-row--notyet .a-tl-name, .a-tl-row--gone .a-tl-hrs, .a-tl-row--notyet .a-tl-hrs { opacity: .55; }
/* Pas là : la piste garde ses couleurs, juste un peu pâlie. */
.a-tl-row--gone .a-tl-track, .a-tl-row--notyet .a-tl-track { opacity: .7; }
.a-tl-row--gone .a-tl-name em { color: var(--t-text); font-weight: 800; }
.a-tl-sec {
  display: flex; justify-content: space-between; margin: 8px 0 2px; padding-top: 6px;
  font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--t-muted);
}
.a-tl-sec + .a-tl-row { margin-top: 0; }
#a-tl-rows .a-tl-sec:not(:first-child) { border-top: 1px dashed rgba(122, 101, 114, .25); margin-top: 10px; }
.a-notif { display: flex; flex-direction: column; gap: 12px; }
.a-notif .b-card-head { margin-bottom: 0; }
.a-notif .b-helper-txt > span { font-size: 12.5px; color: var(--t-muted); font-weight: 600; line-height: 1.4; }
.a-notif select { font: inherit; font-weight: 800; color: var(--t-text); padding: 1px 4px; border-radius: 8px; border: 1px solid rgba(122, 101, 114, .3); background: rgba(255, 255, 255, .8); }
.a-notif-note { margin: 0; font-size: 12px; font-weight: 700; color: #c47a12; }
.a-notif-note:empty { display: none; }
body.bx .a-tl-track { height: 14px; border-radius: 6px; }
body.bx .a-tl-track .myday-mark { top: 0; bottom: 0; }
body.bx .a-tl-track .myday-now { top: 0; bottom: 0; width: 2px; }
.a-tl #a-tl-legend .myday-legend { margin-top: 8px; font-size: 11px; }
html[data-mode="dark"] body.bx .a-staff { background: var(--dk-surface-2); }

/* ---- Mode aide depuis Journées : nom touchable, en aide = bleu ---- */
.a-tl-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.a-tl-tap b { text-decoration: underline dotted rgba(122, 101, 114, .45); text-underline-offset: 3px; }
.a-tl-row--helper .a-tl-dot { background: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .22); }
.a-tl-row--helper .a-tl-name b { color: #1d4ed8; }
.a-tl-row--helper .a-tl-name em { color: #3b82f6; }
html[data-mode="dark"] .a-tl-row--helper .a-tl-name b { color: #93c5fd; }
.a-tl-hint { margin: 8px 0 0; font-size: 11px; font-weight: 700; color: var(--t-muted); line-height: 1.35; }

/* ---- Ordre de départ (app admin) ---- */
.a-order, .a-avg { padding: 14px 14px 12px; }
.a-order-pill {
  display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; line-height: 1.3; margin-bottom: 10px;
}
.a-order-pill--green { background: rgba(46, 204, 113, .16); color: #1f8a4c; }
.a-order-pill--yellow { background: rgba(243, 156, 18, .2); color: #a35c00; }
.a-order-pill--red { background: rgba(217, 72, 95, .16); color: #b4233c; }
html[data-mode="dark"] .a-order-pill--green { color: #6ee7a3; }
html[data-mode="dark"] .a-order-pill--yellow { color: #fbbf5a; }
html[data-mode="dark"] .a-order-pill--red { color: #fb8a9b; }
.a-order-list { display: flex; flex-direction: column; gap: 4px; }
.a-ord-team { font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--t-muted); margin: 8px 0 2px; }
.a-ord-row {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; width: 100%;
  padding: 7px 8px; border-radius: 14px; border: 0; background: rgba(122, 101, 114, .07); color: inherit; font: inherit; text-align: left; cursor: pointer;
}
html[data-mode="dark"] .a-ord-row { background: rgba(255, 255, 255, .06); }
.a-ord-row--cut { box-shadow: inset 0 0 0 1.5px rgba(217, 72, 95, .55); }
.a-ord-row--dim { opacity: .6; }
.a-ord-rank { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; font-weight: 900; background: rgba(255, 255, 255, .75); color: var(--t-text); }
html[data-mode="dark"] .a-ord-rank { background: rgba(255, 255, 255, .12); }
.a-ord-row--cut .a-ord-rank { background: #d9485f; color: #fff; }
.a-ord-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.a-ord-main b { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-ord-main em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--t-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-ord-main em .cut { color: #b4233c; }
.a-ord-main em .vol { color: #1f8a4c; }
.a-ord-main em .soon { color: #a35c00; }
.a-ord-avg { font-size: 12.5px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.a-ord-why { display: none; margin: -2px 0 4px 48px; font-size: 11.5px; font-weight: 700; color: var(--t-muted); line-height: 1.35; }
.a-ord-why.on { display: block; }
.a-ord-why b { color: var(--t-text); }
.a-order-extra { margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--t-muted); line-height: 1.5; }
.a-order-extra b { color: var(--t-text); font-weight: 800; }
.a-helper-chip {
  display: inline-flex; align-items: center; gap: 4px; border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px; background: #dbeafe; color: #1e3a8a; margin: 1px 4px 1px 0;
}
html[data-mode="dark"] .a-helper-chip { background: rgba(96, 165, 250, .25); color: #bfdbfe; }
/* Enfants encore attendus (comptés comme présents pour les coupures) */
.a-exp { margin: 2px 0 12px; padding: 10px 12px; border-radius: 14px; background: rgba(243, 156, 18, .1); }
html[data-mode="dark"] .a-exp { background: rgba(243, 156, 18, .14); }
.a-exp--none { background: rgba(46, 204, 113, .1); }
.a-exp-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--t-muted); margin-bottom: 6px; }
.a-exp-list { display: flex; flex-wrap: wrap; gap: 6px; }
.a-exp-kid { display: inline-flex; flex-direction: column; padding: 4px 10px; border-radius: 12px; background: rgba(255, 255, 255, .75); line-height: 1.15; }
html[data-mode="dark"] .a-exp-kid { background: rgba(255, 255, 255, .1); }
.a-exp-kid b { font-size: 12.5px; font-weight: 800; }
.a-exp-kid em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--t-muted); }
.a-exp-note { margin: 7px 0 0; font-size: 11px; font-weight: 700; color: var(--t-muted); line-height: 1.35; }
/* Moyenne d'heures du mois */
.a-avg-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; } /* fixed : Safari ignore max-width sur un td, le tableau ne s'élargit jamais */
.a-avg-table th.num { width: 58px; }
.a-avg-table th { font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--t-muted); text-align: left; padding: 0 4px 6px; }
.a-avg-table th.num, .a-avg-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.a-avg-table td { padding: 6px 4px; border-top: 1px solid rgba(122, 101, 114, .14); }
.a-avg-table tr.on-site td { font-weight: 800; }
.a-avg-table tr.off-site td { color: var(--t-muted); font-weight: 700; }
.a-avg-table td.name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.a-avg-table .a-avg-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: #2ecc71; vertical-align: 1px; }
.a-avg-table tr.off-site .a-avg-dot { background: #b8b0b6; }
.a-avg-table tr.is-helper .a-avg-dot { background: #60a5fa; }
.a-avg-table td.avg { font-weight: 900; }
.a-avg-note { margin: 8px 0 0; font-size: 11px; font-weight: 700; color: var(--t-muted); line-height: 1.35; }

/* ---- Logs (admin) ---- */
.a-logs { padding: 12px 14px; }
.a-logs-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.a-logs-nav .b-icbtn { width: 38px; height: 38px; flex: none; }
.a-logs-nav .b-icbtn:disabled { opacity: .35; }
.a-logs-day { flex: 1; font: inherit; font-size: 15px; font-weight: 900; border: 0; background: none; color: var(--t-text); cursor: pointer; }
.a-logs-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.a-logs-filters button {
  font: inherit; font-size: 12.5px; font-weight: 800; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(122, 101, 114, .25); background: transparent; color: var(--t-muted);
}
.a-logs-filters button i { font-style: normal; margin-left: 6px; opacity: .7; }
.a-logs-filters button.on { background: color-mix(in srgb, var(--t-accent) 14%, transparent); border-color: transparent; color: var(--t-accent); }
.a-log {
  display: grid; grid-template-columns: 42px 10px 1fr; gap: 8px; align-items: baseline;
  padding: 7px 8px; margin: 3px 0; border-radius: 10px; background: var(--lg-bg, transparent); color: var(--lg-fg, inherit);
}
.a-log-time { font-size: 12.5px; font-weight: 900; font-variant-numeric: tabular-nums; opacity: .75; }
.a-log-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lg-dot, #b8b0b6); align-self: center; }
.a-log-txt { font-size: 14px; font-weight: 700; line-height: 1.35; }
/* Ligne entière à la couleur de l'événement : foncé = personnel, pâle = enfants. */
.a-log-k--staff.a-log--in    { --lg-bg: rgba(22, 150, 75, .30);  --lg-fg: #13562f; --lg-dot: #1e8449; }
.a-log-k--kids.a-log--in     { --lg-bg: rgba(46, 204, 113, .13); --lg-fg: #23794a; --lg-dot: #2ecc71; }
.a-log-k--staff.a-log--out   { --lg-bg: rgba(30, 41, 110, .34);  --lg-fg: #141a4a; --lg-dot: #1e2a7a; } /* départ d'une employée : marine */
.a-log-k--kids.a-log--out    { --lg-bg: rgba(120, 110, 120, .08); --lg-fg: #6b6270; --lg-dot: #a49aa5; }
.a-log--break  { --lg-bg: rgba(243, 156, 18, .18);  --lg-fg: #8a5508; --lg-dot: #e08e0b; }
.a-log--help   { --lg-bg: rgba(96, 165, 250, .18);  --lg-fg: #1e4f8f; --lg-dot: #3b82f6; }
.a-log--move   { --lg-bg: rgba(165, 127, 240, .14); --lg-fg: #5b3aa8; --lg-dot: #a57ff0; }
.a-log--dispatch { --lg-bg: color-mix(in srgb, var(--t-accent) 14%, transparent); --lg-fg: var(--t-accent); --lg-dot: var(--t-accent); }
.a-log--dispatch .a-log-dot, .a-log--cancel .a-log-dot { border-radius: 2px; transform: rotate(45deg); }
.a-log--cancel { --lg-bg: rgba(217, 58, 70, .16); --lg-fg: #a8222f; --lg-dot: #d93a46; }
/* Pointage d'enfant retiré ou déplacé depuis Présences : gardé, barré, lisible. */
.a-log--removed { --lg-bg: rgba(217, 58, 70, .07); --lg-fg: #7a6a70; --lg-dot: #d93a46; }
.a-log--removed .a-log-dot { background: none; border: 2px solid var(--lg-dot); box-sizing: border-box; }
.a-log--struck .a-log-txt s { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: #d93a46; opacity: .8; }
/* Connexions (plan 2.3) : réussie = gris-vert discret, échec = ambre, verrou / refus = rouge. */
.a-log--auth-ok   { --lg-bg: rgba(46, 204, 113, .08);  --lg-fg: #3e6b52; --lg-dot: #58b47f; }
.a-log--auth-bad  { --lg-bg: rgba(243, 156, 18, .16);  --lg-fg: #8a5508; --lg-dot: #e08e0b; }
.a-log--auth-lock { --lg-bg: rgba(217, 58, 70, .16);   --lg-fg: #a8222f; --lg-dot: #d93a46; }
.a-log--auth-mfa  { --lg-bg: rgba(96, 165, 250, .12);  --lg-fg: #1e4f8f; --lg-dot: #3b82f6; }
.a-log--auth-reveal { --lg-bg: rgba(165, 127, 240, .14); --lg-fg: #5b3aa8; --lg-dot: #a57ff0; }
.a-log-note { display: block; font-size: 12px; font-weight: 600; opacity: .85; margin-top: 1px; }
html[data-mode="dark"] .a-log { --lg-fg: inherit; }
/* Total d'heures sous la colonne Heures. */
.a-tl-total { border-top: 1px solid rgba(122, 101, 114, .25); margin-top: 8px; padding-top: 8px; }
.a-tl-total > span:first-child { font-size: 12.5px; font-weight: 900; }
.a-tl-total-lbl { font-size: 11px; font-weight: 700; color: var(--t-muted); }
.a-tl-total .a-tl-hrs { font-size: 14px; }

/* Repères des lignes du temps admin : début / fin prévus (bleu), maintenant (sarcelle). */
body.bx .a-tl-track .myday-mark { background: #3b82f6; opacity: 1; width: 2.5px; }
body.bx .a-tl-track .myday-now { background: #0d9488; opacity: 1; width: 2.5px; }
.a-line { display: inline-block; width: 3px; height: 12px; border-radius: 2px; }
.a-line--mark { background: #3b82f6; }
.a-line--now { background: #0d9488; }
body.bx .a-dot--planned { background: repeating-linear-gradient(135deg, rgba(122, 101, 114, .35) 0 3px, rgba(122, 101, 114, .12) 3px 6px); }

/* Fin proposée par le dispatcher : trait pointillé foncé. */
.a-prop {
  position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; border-radius: 2px;
  background: repeating-linear-gradient(180deg, #1f2937 0 3px, transparent 3px 5px);
}
.a-line--prop { background: repeating-linear-gradient(180deg, #1f2937 0 2px, transparent 2px 4px); }
html[data-mode="dark"] .a-prop, html[data-mode="dark"] .a-line--prop { background: repeating-linear-gradient(180deg, #f3f4f6 0 3px, transparent 3px 5px); }

/* Recherche dans les logs */
.a-logs-search {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 0 12px;
  border-radius: 14px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(122, 101, 114, .2);
}
.a-logs-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--t-muted); stroke-width: 2.2; stroke-linecap: round; }
.a-logs-search input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 11px 0;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--t-text);
}
.a-logs-search input::-webkit-search-cancel-button { display: none; }
.a-logs-search button { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--t-muted); cursor: pointer; padding: 4px; }
html[data-mode="dark"] .a-logs-search { background: var(--dk-surface-2); }

/* ---- Journées : grille horaire + heures du quart sous la piste (2026-10-08) ---- */
.a-tl-mid { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.a-tl-grid { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: rgba(60, 40, 55, .10); pointer-events: none; }
.a-tl-grid--major { background: rgba(60, 40, 55, .22); }
html[data-mode="dark"] .a-tl-grid { background: rgba(255, 255, 255, .10); }
html[data-mode="dark"] .a-tl-grid--major { background: rgba(255, 255, 255, .22); }
.a-tl-cap { position: relative; height: 11px; font-size: 9.5px; font-weight: 800; line-height: 11px; font-variant-numeric: tabular-nums; color: #3b6fd6; }
.a-tl-cap span { position: absolute; top: 0; white-space: nowrap; }
.a-tl-cap .a-tl-cap-p { color: #6b7280; font-weight: 700; }
html[data-mode="dark"] .a-tl-cap { color: #93c5fd; }
.a-tl-axis .myday-tick { font-weight: 800; }

/* ---- Carte du haut : prochaine à partir ---- */
.a-next { margin-top: 8px; padding: 10px 14px 9px; border-radius: 16px; background: rgba(255, 255, 255, .6); }
.a-next-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 800; color: var(--t-muted); }
.a-next-head b { font-size: 15px; font-weight: 900; color: var(--t-text); }
.a-next-cats { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.a-next-or { font-size: 11px; font-weight: 800; color: var(--t-muted); }
.a-next-cat { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: baseline; padding: 6px 10px; border-radius: 12px; line-height: 1.15; }
.a-next-cat b { grid-row: span 2; font-size: 22px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.a-next-cat em { font-style: normal; font-size: 12px; font-weight: 800; }
.a-next-cat i { font-style: normal; font-size: 10.5px; font-weight: 700; opacity: .75; }
.a-next-cat--soon { background: #fdecc8; color: #a45f06; box-shadow: inset 0 0 0 1.5px #f5b84a; }
.a-next-cat--far { background: #e4e9f2; color: #475569; }
.a-next-cat--ok { background: #d5f3e1; color: #1f7a48; }
.a-next-cat--none { background: rgba(122, 101, 114, .1); color: var(--t-muted); }
.a-next-note { margin: 7px 0 0; font-size: 11px; font-weight: 700; color: var(--t-muted); line-height: 1.35; }
.a-next--soon { box-shadow: inset 0 0 0 1.5px rgba(245, 184, 74, .7); }
html[data-mode="dark"] .a-next { background: rgba(255, 255, 255, .06); }
html[data-mode="dark"] .a-next-cat--soon { background: rgba(245, 158, 11, .2); color: #fcd34d; }
html[data-mode="dark"] .a-next-cat--far { background: rgba(148, 163, 184, .16); color: #cbd5e1; }
html[data-mode="dark"] .a-next-cat--ok { background: rgba(46, 204, 113, .18); color: #86efac; }

/* ---- Vérification en deux étapes (TOTP, plan 2.4) ---- */
.b-login-mfa-txt { font-size: 13.5px; color: var(--t-muted); font-weight: 600; margin: 0 0 10px; line-height: 1.4; }
.b-login-back { background: none !important; border: 0; color: var(--t-accent); font: inherit; font-size: 13.5px; font-weight: 700; margin-top: 6px; cursor: pointer; width: 100%; }
#login-code { letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.b-totp-pill.on { color: #1e8449; } .b-totp-pill.warn { color: #c47a12; } .b-totp-pill.urgent { color: #d93a46; }
.b-totp-note { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: rgba(243, 156, 18, .16); color: #8a5508; font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.b-totp-note.urgent { background: rgba(217, 58, 70, .14); color: #a8222f; }
.b-totp-btns button { background: color-mix(in srgb, var(--t-text) 8%, transparent); color: var(--t-text); }
.b-totp-btns button.go { background: var(--t-accent); color: #fff; }
.b-totp-btns button.danger { color: #c0392b; }
.b-totp-qr { display: block; width: 200px; height: 200px; margin: 8px auto; border-radius: 10px; background: #fff; }
.b-totp-secret { margin: 4px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.b-totp-secret code { font-size: 13.5px; letter-spacing: .06em; word-break: break-all; text-align: center; }
.b-totp-secret small { font-size: 11.5px; color: var(--t-muted); font-weight: 600; }
.b-totp-input { width: 100%; box-sizing: border-box; height: 46px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--t-text) 18%, transparent); background: transparent; color: var(--t-text); font: inherit; font-size: 20px; font-weight: 800; letter-spacing: .16em; text-align: center; margin: 4px 0 8px; }
.b-totp-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.b-totp-codes code { display: block; text-align: center; padding: 10px 4px; border-radius: 10px; background: color-mix(in srgb, var(--t-text) 7%, transparent); font-size: 15px; font-weight: 800; letter-spacing: .08em; }

/* ---- Mot de passe (plan 2.6) ---- */
.b-pw-form { display: flex; flex-direction: column; gap: 8px; }
.b-pw-form input[type="password"] { height: 44px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--t-text) 18%, transparent); background: transparent; color: var(--t-text); font: inherit; font-size: 16px; padding: 0 12px; }
.b-pw-form .b-sub { margin: 0; }
.b-pw.is-forced { outline: 2px solid rgba(217, 58, 70, .5); }
