:root {
  --bg: #f4f5f7; --surface: #fff; --line: #e7e9ee; --ink: #111827; --muted: #6b7280; --faint: #a3a9b5;
  /* Liseré du bus = exploitation : plus c'est engagé, plus c'est marqué */
  --none: #d3d7de; --pre: #8fb1ff; --aff: #1d4ed8; --late: #111827;
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.4 system-ui, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h2, h3, p { margin: 0; }
#app { height: 100%; display: flex; flex-direction: column; }
.attente { margin: auto; color: var(--muted); }

/* Barre du haut */
.top { display: flex; align-items: center; gap: 18px; height: 48px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex: none; }
.brand { font-weight: 700; font-size: 14px; }
.crumb { display: flex; align-items: center; gap: 2px; color: var(--faint); }
.crumb select { border: 0; background: none; padding: 4px 2px; color: var(--muted); cursor: pointer; border-radius: 6px; max-width: 220px; }
.crumb select:hover { background: var(--bg); }
.crumb select.fin { color: var(--ink); font-weight: 600; }
.top nav { display: flex; gap: 20px; margin-left: 8px; align-self: stretch; }
.top nav a { display: flex; align-items: center; white-space: nowrap; color: var(--muted); border-bottom: 2px solid transparent; border-top: 2px solid transparent; cursor: pointer; }
.top nav a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.top .sp { flex: 1; }
.clock { display: flex; align-items: baseline; gap: 8px; color: var(--muted); white-space: nowrap; }
.clock i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); align-self: center; }
.clock b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.who { display: flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.who input { width: 110px; border: 1px solid transparent; border-radius: 6px; padding: 3px 6px; background: none; color: var(--ink); }
.who input:hover, .who input:focus { border-color: var(--line); background: #fff; outline: none; }

.main { flex: 1; min-height: 0; display: flex; }

/* Scène : le plan cadastral */
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 14px 8px 0 20px; }
.head { display: flex; align-items: baseline; gap: 14px; flex: none; }
.head h2 { font-size: 16px; font-weight: 650; }
.head span { color: var(--muted); }
.lien { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.lien:hover { color: var(--ink); }
.map { position: relative; flex: 1; min-height: 0; }
.map > svg { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; touch-action: none; }
.legend { position: absolute; left: 0; bottom: 10px; display: flex; gap: 18px; font-size: 11px; color: var(--muted); background: #f4f5f7e6; padding: 5px 10px 5px 0; border-radius: 8px; pointer-events: none; }
.legend div { display: flex; align-items: center; gap: 9px; }
.legend b { font-weight: 600; color: var(--ink); }
.legend span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.legend i { width: 18px; height: 11px; border-radius: 3px; display: inline-block; background: #fff; border: 1px solid var(--none); }
.legend .legend-bascule { pointer-events: auto; flex: none; font: inherit; font-size: 11px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; cursor: pointer; }
.legend .legend-bascule:hover { color: var(--ink); border-color: var(--faint); }

.site { fill: #fff; stroke: #d9dde4; stroke-width: 1.5; }
.sitel { font-size: 11px; fill: #6b7280; font-weight: 600; }
.sitel2 { font-size: 10px; fill: #a3a9b5; }
.bld { fill: #eef0f3; }
.bldl { font-size: 9.5px; fill: #a3a9b5; text-anchor: middle; letter-spacing: .3px; }
.zl { font-size: 10px; fill: #b3b8c2; }
.ll { font-size: 10px; fill: #9aa1ad; font-weight: 600; }
.wall { stroke: #c3c8d1; stroke-width: 3; stroke-linecap: round; }
.pl { fill: #fafbfc; stroke: #e3e6eb; stroke-width: 1; }
.place { cursor: pointer; }
.place:hover .pl { stroke: #b9c0cc; }
.pl.closed { fill: url(#hachures); }
.pl.sel { stroke: var(--aff); stroke-width: 1.6; }
.pl.best { fill: #dcfce7; stroke: var(--ok); stroke-width: 2.2; }
.pl.ok { fill: #f0fdf4; stroke: #86d9a4; stroke-width: 1.4; }
.pl.warn { fill: #fff7e6; stroke: var(--warn); stroke-width: 1.6; }
.pl.dim { opacity: .35; }
.eq { opacity: .75; }
.closedl { font-size: 9px; fill: #9aa1ad; text-anchor: middle; }
.pcode { font-size: 9px; fill: #c2c7d0; font-variant-numeric: tabular-nums; }
/* Place réservée : elle attend un bus précis, dont elle affiche le numéro */
.pl.res { stroke: #8f99ad; stroke-width: 1.4; stroke-dasharray: 5 4; fill: #fff; }
.resl { font-size: 13px; font-weight: 700; fill: #b3b9c5; text-anchor: middle; font-variant-numeric: tabular-nums; }
.bus { cursor: grab; }
.bus.dimmed { opacity: .45; }
.bus.source { opacity: .2; }
.b { stroke: var(--none); stroke-width: 1.2; }
.b.pre { stroke: var(--pre); stroke-width: 3.4; }
.b.aff { stroke: var(--aff); stroke-width: 3.4; }
.b.retard { stroke: var(--late); stroke-width: 3.8; }
.n { font-size: 13px; font-weight: 700; fill: #111827; font-variant-numeric: tabular-nums; }
.t { font-size: 10.5px; fill: #374151; text-anchor: end; font-variant-numeric: tabular-nums; }
.t.soon { fill: var(--aff); font-weight: 700; }
.t .ln { fill: #9aa1ad; font-size: 9px; font-weight: 400; }
.dot { fill: var(--bad); stroke: #fff; stroke-width: 1.5; }
.selr { fill: none; stroke: var(--aff); stroke-width: 1.5; opacity: .6; }
.tip rect { fill: #111827; }
.tip text { fill: #fff; font-size: 11px; text-anchor: middle; }
.tip circle.conseillee, .tip circle.libre { fill: #4ade80; }
.tip circle.avertissement { fill: #fbbf24; }
.tip circle.interdite { fill: #f87171; }
.tip circle.actuelle { fill: #9ca3af; }
/* Un site posé sur une image : c'est elle qui montre le terrain */
.fondp { pointer-events: none; }
/* Zoom du plan : trois boutons discrets dans le coin */
.cadrage { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; align-items: center; }
.cadrage button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 16px; line-height: 1; color: var(--muted); padding: 0; }
.cadrage button:hover { color: var(--ink); border-color: #c5cad3; }
.cadrage button.tout { width: auto; border-radius: 999px; padding: 0 13px; font-size: 12px; }

/* Éditeur de plan : le même plan, dont on déplace et règle les rangées */
.edition .place { cursor: grab; }
.pl.choisie { stroke: var(--aff); stroke-width: 1.3; fill: #f6f9ff; }
.pl.seule { stroke: var(--aff); stroke-width: 2.6; fill: #e6eeff; }
.pcode.ed { fill: #8d95a3; }
.occ { font-size: 12px; font-weight: 600; fill: #c2c7d0; text-anchor: middle; font-variant-numeric: tabular-nums; }
.sens { fill: none; stroke: #b3bac6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sens.choisi { stroke: var(--aff); }
.cadre-sel { fill: none; stroke: var(--aff); stroke-width: 1.4; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.tige { stroke: var(--aff); stroke-width: 1.4; vector-effect: non-scaling-stroke; pointer-events: none; }
.poignee { fill: #fff; stroke: var(--aff); stroke-width: 2.2; vector-effect: non-scaling-stroke; cursor: grab; }
.poignee:hover { fill: #e6eeff; }
.poignee.coin { cursor: nwse-resize; }
.surface-fond { fill: transparent; cursor: move; }
.cadre-fond { fill: none; stroke: var(--aff); stroke-width: 1.5; stroke-dasharray: 9 6; vector-effect: non-scaling-stroke; pointer-events: none; }
.vif { font-weight: 700; fill: var(--aff); text-anchor: middle; pointer-events: none; }
.legend i.pt { width: 8px; height: 8px; border-radius: 50%; border: 0; }
.legend svg { flex: none; }
.legend span.gris { color: var(--faint); }

.vide { margin: auto; color: var(--muted); text-align: center; }
.avis { background: #fef2f2; color: var(--bad); border-radius: 8px; padding: 6px 12px; margin-bottom: 8px; cursor: pointer; }

/* Volet : une seule colonne, des lignes courtes */
.rail { width: 280px; flex: none; background: var(--surface); border-left: 1px solid var(--line); padding: 16px 18px; overflow: auto; display: flex; flex-direction: column; }
.rail h3 { margin: 0 0 6px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.rail h3 b { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; letter-spacing: 0; }
.rail h3 a { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; cursor: pointer; color: var(--muted); }
.rail h3 a:hover { color: var(--ink); }
.rail h4 { margin: 18px 0 2px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.rail .title { font-size: 20px; font-weight: 650; margin: 2px 0 2px; }
.rail .sub { color: var(--muted); margin-bottom: 8px; }
.it { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.it:last-of-type { border-bottom: 0; }
.it.clic { cursor: pointer; }
.it.prise { cursor: grab; user-select: none; touch-action: none; }
.it.clic:hover, .it.prise:hover { background: linear-gradient(to right, transparent, #f4f5f7); }
.it .k { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.k.ok { background: var(--ok); } .k.aff { background: var(--aff); } .k.late { background: var(--late); } .k.warn { background: var(--warn); } .k.bad { background: var(--bad); }
.it b { font-variant-numeric: tabular-nums; }
.it em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 12px; white-space: nowrap; }
.it small { color: var(--muted); display: block; }
.hist { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.hist:last-of-type { border-bottom: 0; }
.hist small { color: var(--faint); display: block; }
.foot { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 16px; }
.btn:hover { border-color: #c5cad3; }
.btn.p { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.btn:disabled { opacity: .45; cursor: default; }
.mini { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 11px; font-size: 12px; white-space: nowrap; }
.mini.p { background: var(--ink); border-color: var(--ink); color: #fff; }
.champ { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; min-width: 0; }
.champ:focus { outline: none; border-color: var(--aff); }
.hint { margin-top: auto; color: var(--faint); font-size: 11.5px; padding-top: 14px; }
/* Pendant un glisser, la colonne entière reçoit le bus à sortir */
.rail.sortie { padding: 12px; }
.zone-sortie { flex: 1; border: 2px dashed #b9c0cc; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px; color: var(--muted); pointer-events: none; }
.zone-sortie b { font-size: 17px; color: var(--ink); }
.rail.sortie:hover .zone-sortie { border-color: var(--aff); background: #eff4ff; color: var(--ink); }
.msg { background: #fef2f2; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.msg.clic { cursor: pointer; color: #991b1b; }
/* Réglages de l'éditeur : un libellé, puis son contrôle */
.rail h3 a.annuler { color: var(--aff); }
.rail h3 a.suite { margin-left: 12px; }
.reg { margin-top: 14px; }
.reg .lib { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 6px; }
.reg .seg { margin-bottom: 0; }
.reg .seg button { padding: 4px 11px; }
.reg small { display: block; color: var(--muted); margin-top: 5px; font-size: 12px; }
.reg .mini { margin-left: 0; }
.pasapas { display: inline-flex; align-items: center; gap: 4px; }
.pasapas button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; padding: 0; font-size: 15px; line-height: 1; }
.pasapas button:hover:not(:disabled) { border-color: #c5cad3; }
.pasapas button:disabled { opacity: .4; cursor: default; }
.pasapas b { min-width: 32px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.champ.court { width: 78px; }
.rail .titre { font-size: 20px; font-weight: 650; border: 1px solid transparent; border-radius: 8px; padding: 1px 6px; margin: 2px -7px; width: calc(100% + 14px); background: none; }
.rail .titre:hover, .rail .titre:focus { border-color: var(--line); background: #fff; outline: none; }
.rail input[type=range] { width: 100%; accent-color: var(--ink); margin: 2px 0; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }

/* Réglages */
.page { flex: 1; overflow: auto; padding: 24px 28px 60px; }
.page section { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 0 0 18px; max-width: 880px; }
.page h2 { font-size: 15px; margin-bottom: 4px; }
.page .aide { color: var(--muted); margin-bottom: 14px; }
.arbre { border-top: 1px solid var(--line); padding: 10px 0; }
.arbre .org { font-weight: 650; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.arbre .org em { font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 1px 9px; }
.arbre :is(.org, .dep) .suppr { margin-left: auto; font-weight: 400; color: var(--faint); cursor: pointer; }
.arbre :is(.org, .dep) .suppr:hover { color: var(--bad); }
.arbre :is(.org, .dep) .confirme { margin-left: auto; font-weight: 400; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.arbre :is(.org, .dep) .confirme .mini { margin-left: 0; }
.arbre .dep { margin: 8px 0 0 16px; display: flex; align-items: center; gap: 0 8px; flex-wrap: wrap; }
.arbre .dep small { color: var(--muted); }
.arbre input.nom { font: inherit; color: inherit; border: 1px solid transparent; border-radius: 6px; padding: 2px 6px; margin-left: -7px; background: none; field-sizing: content; min-width: 8ch; max-width: 100%; }
.arbre input.nom:hover, .arbre input.nom:focus { border-color: var(--line); background: #fff; outline: none; }
.fait { color: var(--ok); margin-top: 8px; }
.erreur.d2, .fait.d2 { margin-left: 32px; }
.erreur.d1 { margin-left: 16px; }
.arbre .sit { margin: 4px 0 0 32px; color: var(--muted); display: flex; gap: 8px; }
.arbre .sit b { color: var(--ink); font-weight: 500; }
.ligne { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.ligne.d1 { margin-left: 16px; } .ligne.d2 { margin-left: 32px; }
.ligne input[type=number] { width: 64px; }
.seg { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 3px; margin-bottom: 12px; }
.seg button { border: 0; background: none; padding: 4px 14px; border-radius: 999px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px #0000001f; }
.seg button:disabled { opacity: .4; cursor: default; }
table.regl { width: 100%; border-collapse: collapse; }
table.regl td { border-top: 1px solid var(--line); padding: 8px 6px 8px 0; vertical-align: middle; }
table.regl td.prov { color: var(--muted); font-size: 12px; white-space: nowrap; }
table.regl a { color: var(--aff); cursor: pointer; margin-left: 8px; }
.erreur { color: var(--bad); margin-top: 8px; }

/* Écran « Services » : la liste des sorties devenue une frise */
.stage.large { padding-right: 0; }
.head .sp { flex: 1; }
.stage.large .head { align-items: center; min-height: 30px; flex-wrap: wrap; row-gap: 8px; }
.stage.large .head > span, .seg.vue button { white-space: nowrap; }
.head b.fort { color: var(--ink); font-weight: 600; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; color: var(--muted); white-space: nowrap; }
.chip b { color: var(--ink); font-weight: 600; }
.chip.on { border-color: var(--ink); background: var(--ink); color: #fff; font-weight: 600; }
.chip.nav { display: inline-flex; align-items: center; gap: 10px; padding: 3px 6px; }
.chip.nav a { cursor: pointer; width: 20px; text-align: center; border-radius: 50%; color: var(--muted); font-size: 15px; line-height: 20px; }
.chip.nav a:hover { background: var(--bg); color: var(--ink); }
select.chip { cursor: pointer; }
.head .chip:last-child { margin-right: 16px; }
.seg.vue { margin-bottom: 0; background: #e6e9ee; }
.frise { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin-top: 10px; --g: 204px; }
.frise.glisse { user-select: none; cursor: grabbing; }
.corps { position: relative; }
.fr { display: grid; grid-template-columns: var(--g) 1fr; align-items: center; height: 30px; border-bottom: 1px solid var(--line); }
.fr.clic { cursor: pointer; }
.fr.clic:hover { background: #eceef2; }
.fr.tete { position: sticky; top: 0; z-index: 3; background: var(--bg); height: 26px; border-bottom: 1px solid #d9dde4; }
.fr.jour { height: 26px; border-bottom: 0; }
.fr.jour span { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.fr.sel, .fr.sel:hover { background: #e4ecff; }
.g { display: flex; align-items: center; gap: 8px; padding-right: 12px; min-width: 0; }
.g .h { width: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.g .h.fini { color: var(--faint); font-weight: 400; }
.fr.tete .g span { font-size: 10.5px; color: var(--faint); letter-spacing: .4px; }
.fr.tete .g .c1 { width: 40px; }
.fr.tete .g .c3 { margin-left: auto; padding-right: 16px; }
.lg { min-width: 24px; text-align: center; border-radius: 5px; background: #e9ebf0; color: #374151; font-size: 11.5px; font-weight: 600; padding: 1px 5px; font-variant-numeric: tabular-nums; }
.nb { margin-left: auto; min-width: 54px; text-align: center; border-radius: 999px; border: 1px solid var(--line); background: #fff; padding: 1px 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nb.vide { border-style: dashed; border-color: #b9c0cc; color: var(--muted); font-weight: 400; background: none; }
.nb.vide.fini { border-color: transparent; color: var(--faint); }
.nb.prise { cursor: grab; touch-action: none; user-select: none; }
.nb.clic { cursor: pointer; }
.nb.prise:hover, .nb.clic:hover { box-shadow: 0 0 0 3px #11182714; }
.tl { position: relative; height: 100%; overflow: hidden; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: var(--col, 7.1429%) 100%; }
.fr.tete .tl { background-image: none; overflow: visible; }
.fr.tete .tl span { position: absolute; top: 5px; font-size: 10px; color: var(--faint); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.fr.tete .tl b.mnt { position: absolute; top: 4px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 10px; line-height: 17px; padding: 0 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
/* Un service : une barre de sa sortie à sa rentrée, au liseré du bus qui le fait */
.sv { position: absolute; top: 4px; height: 21px; border-radius: 5px; background: #fff; border: 1.5px dashed #aab1bd; overflow: hidden; }
.sv.pre { border: 3px solid var(--pre); }
.sv.aff { border: 3px solid var(--aff); }
.sv.late { border: 3px solid var(--late); }
.sv i { position: absolute; top: 0; bottom: 0; left: 0; background: #6b728030; pointer-events: none; }    /* la part déjà faite */
/* Dans la barre, une case par service agent : à son numéro, d'une relève à la suivante */
.ag { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 4px; overflow: hidden; font-size: 10px; color: #4b5563; font-variant-numeric: tabular-nums; }
.ag + .ag { border-left: 1px solid #aab1bd; }
.ag.pair { background: #eef0f4; }
/* Ce qui ne tient pas en entier dans la case passe à la ligne, donc hors de vue : jamais de numéro coupé */
.ag > span { flex: 1 1 0; min-width: 0; height: 14px; line-height: 14px; display: flex; flex-wrap: wrap; overflow: hidden; white-space: nowrap; }
.ag > span::before { content: ''; width: 1px; height: 14px; }
.ag b { color: var(--ink); font-size: 11px; margin-right: 5px; }
.sv.prise { cursor: grab; touch-action: none; }
.sv.choisie { box-shadow: 0 0 0 2px #1d4ed84d; }
.sv.autre { opacity: .3; }
.sv.source { opacity: .35; }
.sfin { position: absolute; top: 8px; font-size: 10.5px; color: var(--faint); padding-left: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.sfin.bad { color: var(--bad); font-weight: 600; }
.cur { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .5; z-index: 2; pointer-events: none; }
/* La frise par bus : une ligne par bus, et au-dessus, toujours visibles, les services qui n'en ont pas */
.frise.bus .g .nb { margin-left: 0; }
.frise.bus .g small { color: var(--muted); font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool { position: sticky; top: 26px; z-index: 2; background: var(--bg); border-bottom: 2px solid #d9dde4; max-height: 154px; overflow-y: auto; }
.pool .fr { border-bottom-color: transparent; }
.pool .g b { font-weight: 600; }
.pool .g em { font-style: normal; background: var(--ink); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 600; }
.pool .rien { position: absolute; left: 10px; top: 0; line-height: 30px; color: var(--faint); font-size: 12px; white-space: nowrap; }
.pool.cible { background: #eff4ff; box-shadow: inset 0 0 0 2px var(--aff); }
/* Pendant un glisser, chaque ligne dit ce qu'elle vaut pour ce qu'on tient */
.frise.glisse .fr.clic { cursor: grabbing; }
.frise.glisse .fr.clic:hover { background: none; }
.frise.glisse .fr.ok, .frise.glisse .fr.ok:hover { background: #effcf3; }
.frise.glisse .fr.warn, .frise.glisse .fr.warn:hover { background: #fff7e6; }
.frise.glisse .fr.conf, .frise.glisse .fr.conf:hover { background: #eef3ff; }
.frise.glisse .fr.non > * { opacity: .34; }
.frise.glisse .fr.source > * { opacity: .5; }
.frise.glisse .fr.cible { box-shadow: inset 0 0 0 2px var(--muted); }
.frise.glisse .fr.cible.ok { box-shadow: inset 0 0 0 2px var(--ok); }
.frise.glisse .fr.cible.warn { box-shadow: inset 0 0 0 2px var(--warn); }
.frise.glisse .fr.cible.conf { box-shadow: inset 0 0 0 2px var(--aff); }
.frise.glisse .fr.cible.non { box-shadow: inset 0 0 0 2px var(--bad); }
/* L'infobulle d'un service, et ce qu'on tient au bout du pointeur pendant un glisser */
.bulle { position: fixed; z-index: 30; width: 400px; background: var(--ink); color: #d1d5db; border-radius: 10px; padding: 10px 13px 11px; font-size: 12px; line-height: 1.45; pointer-events: none; box-shadow: 0 8px 24px #00000033; }
.bulle > b { color: #fff; font-size: 13px; }
.bulle .bloc { float: right; color: #9ca3af; font-size: 11px; line-height: 19px; }
.bulle p { margin: 1px 0 0; }
.bulle p.bad { color: #fca5a5; }
.bulle table { border-collapse: collapse; margin-top: 8px; width: 100%; border-top: 1px solid #374151; }
.bulle td { padding: 4px 12px 0 0; white-space: nowrap; vertical-align: top; font-variant-numeric: tabular-nums; }
.bulle td:first-child { color: #fff; font-weight: 600; }
.bulle td:last-child { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; padding-right: 0; }
.bulle tr.ici td { color: #fde68a; }
.aimant { position: fixed; z-index: 31; pointer-events: none; background: var(--ink); color: #fff; border-radius: 8px; padding: 5px 10px; font-size: 12px; max-width: 300px; box-shadow: 0 8px 24px #00000033; }
.aimant b { font-variant-numeric: tabular-nums; }
.aimant span { display: block; color: #d1d5db; }
.aimant span.ok { color: #86efac; } .aimant span.warn { color: #fcd34d; } .aimant span.conf { color: #bfdbfe; } .aimant span.non { color: #fca5a5; }
/* Dans le volet : les bus sans service, à saisir pour les poser sur un service */
.rail h4 em { font-style: normal; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.parc { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.parc .nb { margin-left: 0; min-width: 50px; }
/* Récapitulatif : ce qu'on fait de l'autre service quand il y a conflit d'horaires */
.opt { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-top: 8px; display: flex; gap: 9px; align-items: center; cursor: pointer; }
.opt:hover { border-color: #c5cad3; }
.opt.on { border-color: var(--aff); background: #eff4ff; }
.opt i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--faint); flex: none; }
.opt.on i { border: 4.5px solid var(--aff); }
.opt small { color: var(--muted); display: block; }
.libres { margin-top: 10px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.libres span { width: 100%; font-size: 12px; }
.libres a { border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.libres a:hover { border-color: var(--aff); background: #eff4ff; }
.libres a i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.libres a i.w { background: var(--warn); }

/* Lot 4 : découper un service à une relève, regrouper des services qu'un même bus enchaîne */
/* Le trajet entre le dépôt et le lieu de relève, qu'un découpage ajoute à un bout du morceau : estimé, donc hachuré */
.traj { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #11182726 0 3px, transparent 3px 6px); pointer-events: none; }
.traj.avant { border-right: 1px solid #aab1bd; }
.traj.apres { border-left: 1px solid #aab1bd; }
.it .k.traj-k { border-radius: 2px; width: 14px; background: repeating-linear-gradient(45deg, #11182759 0 2px, transparent 2px 4px); border: 1px solid #c5cad3; }
/* Une relève où l'on peut découper : des ciseaux sur la barre survolée */
.ciseau { position: absolute; top: 5px; width: 19px; height: 19px; margin-left: -9.5px; border-radius: 50%; background: #fff; border: 1px solid #b9c0cc; color: var(--muted);
  font-size: 11px; line-height: 17px; text-align: center; z-index: 2; cursor: pointer; user-select: none; box-shadow: 0 1px 3px #0000001f; }
.ciseau:hover, .ciseau.on { border-color: var(--aff); background: var(--aff); color: #fff; }
.ciseau.on { cursor: default; }
/* Un morceau porte son rang ; ses autres morceaux et les services de son groupe se mettent en valeur avec lui */
.etq { font-size: 10px; font-weight: 700; color: var(--aff); background: #eff4ff; border-radius: 999px; padding: 0 6px; white-space: nowrap; line-height: 16px; flex: none; }
.rail .title .etq { font-size: 10.5px; vertical-align: 4px; margin-left: 4px; }
.g .etq + .nb { min-width: 46px; padding: 1px 6px; }
.fr.lie, .fr.lie:hover { background: #eef3ff; }
.sv.lie { box-shadow: 0 0 0 2px #1d4ed840; }
.fr.en-groupe .lg { box-shadow: inset 0 -2px 0 #8b929e; }
/* Pendant l'examen d'un découpage : le second morceau, sous le service, tel qu'il serait */
.fr.apercu-mc, .fr.apercu-mc:hover { background: #f0fdf4; border-bottom: 1px dashed #86d9a4; }
.g .h.est { font-weight: 400; font-style: italic; color: var(--ok); }
.sv.fantome { border: 2px dashed var(--ok); background: #fff; }
/* Deux services regroupés : un trait les relie, le bus est au dépôt entre les deux */
.chaine { position: absolute; top: 14px; height: 0; border-top: 2px solid #8b929e; pointer-events: none; }
.chaine em { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); font-style: normal; font-size: 10px; line-height: 16px; color: var(--muted); background: var(--bg); padding: 0 6px; white-space: nowrap; }
/* Glisser un service sur la barre d'un autre : ils se regroupent */
.sv.vise { box-shadow: 0 0 0 3px var(--aff); }
/* La relève entre deux morceaux, d'une ligne de bus à l'autre */
.relv { position: absolute; width: 0; border-left: 2px dashed #1d4ed88c; z-index: 1; pointer-events: none; }
.relv b { position: absolute; left: 8px; top: -8px; font-size: 10.5px; font-weight: 600; color: var(--aff); background: #fff; border: 1px solid #c7d6fb; border-radius: 999px; padding: 0 8px; line-height: 14px; white-space: nowrap; }
.relv b.agauche { left: auto; right: 8px; }
/* Infobulle : morceau, regroupement, conducteur */
.bulle p.parente { color: #bfdbfe; }
.bulle td.qui { color: #d1d5db; font-weight: 400; }
/* Le bouton « Regrouper » de l'en-tête, avec le nombre de suggestions */
.chip .pastille { display: inline-block; margin-left: 7px; background: var(--ink); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; line-height: 16px; font-weight: 600; }
.chip.on .pastille { background: #fff; color: var(--ink); }
.bilan-tout { margin-top: 10px; font-size: 12px; color: var(--muted); }
.bilan-tout p { margin: 0 0 3px; }
.bilan-tout b { color: var(--ink); font-weight: 600; }
/* Fiche d'un service : où découper entre deux services agents, ce qu'a fait le dernier import, ce qui vient de CLEO */
.coupe-ici { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 11.5px; padding: 2px 0 2px 18px; }
.coupe-ici::before, .coupe-ici::after { content: ""; flex: 1; border-top: 1px dashed #c5cad3; }
.coupe-ici a { color: var(--aff); white-space: nowrap; cursor: pointer; }
.coupe-ici a:hover { text-decoration: underline; }
.tag-cleo { display: inline-block; margin-left: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .4px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; line-height: 14px; vertical-align: 1px; }
.it small.niv-avertissement, td .niv-avertissement { color: var(--warn); }
.it small.niv-blocage, td .niv-blocage { color: var(--bad); }

/* Glisser un service sur un bus : ce que vaut chaque bus se lit sur le plan */
.pl.rangee { stroke: #b9c7ee; fill: #f6f9ff; }
.cible { fill: none; stroke: none; }
.cand.ok .cible { stroke: var(--ok); stroke-width: 2.2; }
.cand.warn .cible { stroke: var(--warn); stroke-width: 2.2; }
.bus.cand.conf { opacity: .62; }
.porte rect { fill: var(--ink); }
.porte text { fill: #fff; font-size: 11.5px; font-weight: 600; text-anchor: middle; }

/* Bande de temps d'une rangée, dépliée sous le plan */
.bande { flex: none; position: relative; margin: 8px 8px 10px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 2px; --ug: 58px; }
.ur { display: grid; grid-template-columns: var(--ug) 1fr; align-items: center; height: 26px; border-top: 1px solid var(--line); }
.ur.tete, .ur.pied { border-top: 0; }
.ur.tete { height: 30px; grid-template-columns: auto 1fr; column-gap: 14px; }
.ur.pied { height: 18px; }
.ur.sel { background: #eef3ff; }
.ug { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.ur.tete .ug { color: var(--ink); font-size: 13px; }
.ut { position: relative; height: 100%; min-width: 0; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: var(--col, 10%) 100%; }
.ur.tete .ut, .ur.pied .ut { background-image: none; }
.ur.tete .ut { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.ur.tete .ut a { margin-left: auto; border: 1px solid var(--line); border-radius: 999px; padding: 1px 11px; cursor: pointer; }
.ur.tete .ut a:hover { color: var(--ink); border-color: #c5cad3; }
.ubar { position: absolute; top: 4px; height: 18px; border-radius: 5px; border: 1.2px solid var(--none); font-size: 11.5px; font-weight: 700; padding-left: 6px; line-height: 15px; overflow: hidden; white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; }
.ubar.pre { border: 3px solid var(--pre); line-height: 12px; }
.ubar.aff { border: 3px solid var(--aff); line-height: 12px; }
.ubar.retard { border: 3px solid var(--late); line-height: 12px; }
.ubar.reste { border-right-style: dashed; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ublk { position: absolute; top: 4px; height: 18px; border-radius: 0 5px 5px 0; border: 1.5px dashed var(--late); border-left: 0; background: repeating-linear-gradient(45deg, #1118271f 0 4px, transparent 4px 8px); }
.ulab { position: absolute; top: 4px; line-height: 18px; font-size: 11px; color: #374151; padding-left: 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ulab.bad { color: var(--bad); font-weight: 600; }
.uh { position: absolute; top: 2px; font-size: 10px; color: var(--faint); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.ucur { position: absolute; top: 34px; bottom: 18px; width: 1px; margin-left: 14px; background: var(--ink); opacity: .45; pointer-events: none; }

/* Pages en cartes : interfaces, listes */
.page.large > h2 { font-size: 16px; font-weight: 650; }
.page.large > .aide { color: var(--muted); margin: 2px 0 16px; }
.onglets { display: flex; gap: 6px; margin: 0 0 16px; flex-wrap: wrap; }
.onglets span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 13px; color: var(--faint); background: #fff; }
.onglets span.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.carte { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 0 0 14px; max-width: 880px; }
.carte h3 { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.carte h3 i { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-style: normal; font-size: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.carte h3 small { font-weight: 400; color: var(--muted); margin-left: auto; text-align: right; }
.carte .ligne { color: var(--muted); margin-top: 8px; }
.carte .ligne b { color: var(--ink); }
.carte .lib2 { width: 64px; }
.carte table { width: 100%; border-collapse: collapse; }
.carte td, .carte th { border-top: 1px solid var(--line); padding: 6px 10px 6px 0; text-align: left; vertical-align: middle; }
.carte th { border-top: 0; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--faint); font-weight: 600; padding-top: 0; }
.carte td.n { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; }
.page section .carte td.n { font-size: 12px; }
.carte td.code { font-weight: 700; font-variant-numeric: tabular-nums; }
.carte .note { color: var(--faint); font-size: 12px; margin-top: 10px; }
.carte .discret { color: var(--muted); }
.champ.manque { border-color: var(--warn); color: var(--warn); }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 2px 11px; color: var(--faint); font-variant-numeric: tabular-nums; cursor: pointer; }
.tag.on { border-color: var(--ink); background: var(--ink); color: #fff; font-weight: 600; }
.bilan { display: flex; gap: 26px; margin: 4px 0 12px; flex-wrap: wrap; }
.bilan div b { display: block; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.bilan div span { color: var(--muted); }
/* Listes de référence, dans Réglages : des cartes sans cadre, à l'intérieur de la section */
.page section .carte { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 0; margin: 14px 0 0; max-width: none; background: none; }
.deux { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0 28px; }
.carte input.nom { border: 1px solid transparent; border-radius: 6px; padding: 3px 6px; margin-left: -7px; background: none; font-weight: 600; width: 100%; min-width: 70px; }
.carte input.nom:hover, .carte input.nom:focus { border-color: var(--line); background: #fff; outline: none; }
.carte td.ordre { width: 44px; white-space: nowrap; }
.carte td.ordre a { cursor: pointer; color: var(--muted); padding: 0 3px; border-radius: 4px; }
.carte td.ordre a:hover { color: var(--ink); background: var(--bg); }
.carte td.ordre a.off { color: #dfe2e8; cursor: default; background: none; }
.carte a.suppr { color: var(--faint); cursor: pointer; }
.carte a.suppr:hover { color: var(--bad); }
.carte input.couleur { width: 30px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.page h3.famille { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 16px 0 4px; }

/* Interfaces, lot 4 : onglets, écarts d'un réimport, CLEO simulé */
.onglets a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 13px; color: var(--muted); background: #fff; cursor: pointer; }
.onglets a:hover { border-color: #c5cad3; color: var(--ink); }
.onglets a.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.bilan div.w b { color: var(--warn); }
.carte table.ecarts { margin-top: 4px; }
.carte table.ecarts td { vertical-align: top; padding-top: 7px; padding-bottom: 7px; }
.carte table.ecarts td.code { white-space: nowrap; }
.carte table.ecarts td small { display: block; font-weight: 400; color: var(--muted); }
.carte tr.deplie > td { background: var(--bg); padding: 8px 12px; }
.carte tr.deplie table.ecarts td { border-top-color: #e1e4ea; }
.niv-avertissement { color: var(--warn); font-weight: 600; }
.niv-blocage { color: var(--bad); font-weight: 600; }
.cleo-deux { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; max-width: 1240px; }
.cleo-deux .carte { margin: 0; max-width: none; min-width: 0; }
.cleo-deux .lib { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 14px 0 6px; }
.cleo-deux .seg { margin-bottom: 0; flex-wrap: wrap; }
.champ.large { width: 100%; }
.carte h3 .filtres { margin-left: auto; display: flex; gap: 6px; font-weight: 400; }
.carte table.messages td { vertical-align: top; }
.carte table.messages td small { display: block; color: var(--muted); }
.carte td.dir { white-space: nowrap; color: var(--muted); }
.carte td.dir b { display: inline-block; width: 18px; height: 18px; border-radius: 50%; text-align: center; line-height: 18px; font-size: 11px; margin-right: 6px; background: #eef0f4; color: var(--ink); }
.carte td.dir.env b { background: var(--ink); color: #fff; }
.carte td.discret { color: var(--muted); }

/* Codes de dépôt Hastus : dans l'import, une ligne par code ; dans Réglages, de petites étiquettes sur leur site */
.carte table.codes-depot td small { display: block; font-size: 11.5px; margin-top: 2px; }
.carte table.codes-depot td small.propose { color: var(--muted); }
.carte table.codes-depot td small.nonrat { color: var(--warn); font-weight: 600; }
.carte table.codes-depot td .lien { margin-left: 8px; font-size: 12px; }
.carte table.codes-depot select.champ { max-width: 300px; }
.carte table.par-depot { margin: 0 0 12px; }
.arbre .sit { align-items: center; flex-wrap: wrap; }
.codes-site { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: 4px; }
.code-hastus { border: 1px solid var(--line); border-radius: 4px; padding: 0 2px 0 6px; font-size: 11.5px; font-weight: 600; color: var(--ink); background: #fff; font-variant-numeric: tabular-nums; }
.code-hastus a { cursor: pointer; color: var(--faint); padding: 0 4px; }
.code-hastus a:hover { color: var(--bad); }
.champ.code-ajout { width: 112px; padding: 2px 8px; font-size: 12px; }
.codes-site .mini { margin-left: 0; padding: 1px 9px; }

/* Lot 5 : l'horloge, la bande du temps, le réel, le SAE */
/* La barre du haut : un clic sur le point met l'horloge en lecture ou en pause */
.clock .clock-point { align-self: center; display: flex; padding: 6px; margin: -6px -2px -6px -6px; border-radius: 50%; cursor: pointer; }
.clock .clock-point:hover { background: var(--bg); }
.clock .clock-point i { background: var(--faint); }
.clock .clock-point i.marche { background: var(--ok); box-shadow: 0 0 0 3px #16a34a26; }
.clock .clock-jour { color: var(--muted); margin-right: -4px; }
/* La bande du temps du dépôt, sous le plan : les commandes de l'horloge, puis ce qui sort (en haut) et ce qui rentre (en bas) */
.temps-depot { flex: none; margin: 8px 8px 10px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px 6px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: center; }
.temps-cmd { display: flex; align-items: center; gap: 6px; }
.temps-rond { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--ink); padding: 0; flex: none; }
.temps-rond:hover { border-color: #c5cad3; }
.temps-rond.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg.temps-vitesse { margin: 0; background: #e6e9ee; }
.seg.temps-vitesse button { padding: 3px 9px; }
.temps-pas { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); background: #fff; white-space: nowrap; }
.temps-pas:hover { color: var(--ink); border-color: #c5cad3; }
.temps-pas.p { background: var(--ink); border-color: var(--ink); color: #fff; }
.temps-aller { display: inline-flex; align-items: center; gap: 5px; }
.temps-aller .champ { width: 136px; padding: 3px 8px; }
.temps-aller a { cursor: pointer; color: var(--faint); padding: 0 3px; font-size: 15px; }
.temps-aller a:hover { color: var(--ink); }
.temps-axe { position: relative; min-width: 0; overflow: hidden; }
.temps-trait { position: absolute; left: 0; right: 0; border-top: 1px solid #c5cad3; }
.temps-h { position: absolute; height: 10px; border-left: 1px solid #c5cad3; }
.temps-h span { position: absolute; top: -1px; left: 4px; font-size: 10px; font-style: normal; color: var(--faint); font-variant-numeric: tabular-nums; background: var(--surface); padding-right: 3px; }
.temps-mnt { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); opacity: .55; pointer-events: none; z-index: 2; }
.temps-mnt b { position: absolute; left: -21px; font-size: 10px; line-height: 17px; background: var(--ink); color: #fff; border-radius: 999px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.temps-mv { position: absolute; transform: translateX(-50%); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; border-radius: 999px; padding: 0 7px;
  line-height: 15px; background: #fff; border: 1px solid #c5cad3; white-space: nowrap; cursor: pointer; z-index: 1; color: var(--ink); }
.temps-mv:hover { z-index: 3; box-shadow: 0 0 0 3px #11182714; }
.temps-mv.s { border: 2px solid var(--none); line-height: 13px; }
.temps-mv.s.aff { border-color: var(--aff); }
.temps-mv.s.pre { border-color: var(--pre); }
.temps-mv.s.vide { border: 1.5px dashed #aab1bd; font-weight: 400; color: var(--muted); line-height: 14px; }
.temps-mv.fait { opacity: .45; }
.temps-mv.plus, .temps-mv.s.plus { border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-weight: 600; line-height: 15px; }
.temps-mv.retard, .temps-mv.s.retard { border-color: var(--bad); color: var(--bad); }
.temps-cote { position: absolute; left: 0; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); pointer-events: none; }
.temps-note { grid-column: 1 / -1; margin: 4px 0 0; font-size: 11.5px; color: var(--faint); }
.temps-note.refus { color: var(--bad); }
/* Dans la colonne de droite */
.it small.bad, .it em.bad { color: var(--bad); }
.it .alerte-texte { color: var(--bad); font-weight: 600; }
/* Services : le réel, en trait plein sous la barre de l'horaire */
.trait-reel { position: absolute; top: 26px; height: 3px; border-radius: 2px; background: var(--ink); pointer-events: none; }
.trait-reel.retard { background: var(--bad); }
.sfin b { color: var(--ink); font-weight: 600; }
.sfin.bad b { color: var(--bad); }
.bulle p.reel-bulle { color: #e5e7eb; }
.bulle p.reel-bulle.bad { color: #fca5a5; }
/* Interfaces, onglet SAE */
.sae-ou { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.cleo-deux .lib .facultatif { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 4px; }
.sae-reponse { margin-top: 8px; }
.sae-reponse p { margin: 4px 0 0; }
.carte table.messages td small.niv-avertissement { color: var(--warn); font-weight: 600; }
.bascule-sae { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.bascule-sae small { display: block; color: var(--muted); }
.interrupteur { width: 34px; height: 20px; border-radius: 999px; border: 0; padding: 0; background: #d3d7de; position: relative; flex: none; margin-top: 1px; }
.interrupteur.on { background: var(--ink); }
.interrupteur i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.interrupteur.on i { left: 17px; }
.interrupteur:disabled { opacity: .5; cursor: default; }

/* Lot 6 : bornes, charge, place proposée */
/* La marque d'une borne, dans le coin de sa place, toujours visible (même sous un bus) */
.borne-marque { cursor: pointer; }
.borne-pt { fill: #fff; stroke: var(--ok); stroke-width: 1.6; }
.borne-pt.charge { fill: var(--ok); }
.borne-pt.branche { fill: #bbf7d0; }
.borne-pt.ko { fill: #fee2e2; stroke: var(--bad); stroke-width: 2; }
.borne-pt.injoignable { fill: #fff; stroke: #9aa1ad; stroke-dasharray: 2 1.6; }
/* La jauge d'un bus électrique : verte, orange s'il est à charger, un éclair s'il charge */
.jauge-fond { fill: #e5e7eb; }
.jauge-niv { fill: var(--ok); }
.jauge.bas .jauge-niv { fill: var(--warn); }
.jauge-pc { font-size: 8.5px; fill: #4b5563; font-variant-numeric: tabular-nums; }
.jauge.bas .jauge-pc { fill: var(--warn); font-weight: 700; }
.jauge-eclair { fill: var(--ok); }
/* La place proposée (pointillé vert, au numéro du bus) et les places écartées (orange) */
.place-proposee { fill: #f0fdf4; stroke: var(--ok); stroke-width: 2; stroke-dasharray: 5 4; }
.place-proposee-n { font-size: 13px; font-weight: 700; fill: var(--ok); font-variant-numeric: tabular-nums; }
.place-ecartee { fill: #fff7e61a; stroke: var(--warn); stroke-width: 1.6; stroke-dasharray: 3 3; }
/* L'en-tête du dépôt : mode de placement et bornes ; il passe à la ligne plutôt que de déborder */
.head.depot-tete { flex-wrap: wrap; align-items: center; row-gap: 6px; min-height: 30px; }
.head.depot-tete .chip { font-size: 12px; }
.chip-mode select { border: 0; background: none; font-weight: 600; color: var(--ink); padding: 0 2px; cursor: pointer; }
.chip-mode select:focus { outline: none; }
.legend { flex-wrap: wrap; row-gap: 3px; max-width: calc(100% - 140px); }
.legend div { flex-wrap: wrap; row-gap: 3px; }
/* Modifier le plan, volet « Placement » : une colonne plus large, les groupes en couleur sur le plan */
.head.editeur-tete { align-items: center; min-height: 30px; flex-wrap: wrap; row-gap: 6px; }
.head.editeur-tete .seg.vue { margin-right: 16px; }
.rail.rail-placement { width: 360px; }
.pl.groupe-vise { stroke-width: 2.4; }
.grp-chip { display: inline-block; border-radius: 7px; padding: 1px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.grp-fleche { color: var(--faint); margin: 0 3px; }
.groupe-ligne { padding: 6px 0; }
.groupe-ligne.choisi { background: #eff4ff; box-shadow: -8px 0 0 #eff4ff, 8px 0 0 #eff4ff; }
.groupe-ligne small { font-size: 11.5px; }
.rail input.nom-groupe { font-weight: 600; border: 1px solid transparent; border-radius: 6px; padding: 1px 5px; margin-left: -6px; background: none; width: 100%; }
.rail input.nom-groupe:hover, .rail input.nom-groupe:focus { border-color: var(--line); background: #fff; outline: none; }
.fleches { display: inline-flex; gap: 2px; margin-left: auto; flex: none; }
.fleches a { cursor: pointer; color: var(--muted); padding: 0 4px; border-radius: 4px; }
.fleches a:hover { color: var(--ink); background: var(--bg); }
.fleches a.off { color: #dfe2e8; cursor: default; background: none; }
.groupe-choisi { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--aff); padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.groupe-choisi span { flex: 1 1 140px; }
.groupe-choisi .btn { padding: 3px 11px; font-size: 12px; }
.ordre-plage { border-bottom: 1px solid var(--line); }
.ordre-plage-tete { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; cursor: pointer; }
.ordre-plage-tete:hover { background: linear-gradient(to right, transparent, #f4f5f7); }
.ordre-plage-quand small { display: block; color: var(--muted); }
.ordre-plage-quand .etq { margin-left: 6px; color: var(--ok); background: #f0fdf4; }
.ordre-plage-groupes { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; }
.ordre-plage-reglage { padding: 0 0 12px; }
.ordre-plage-reglage .reg { margin-top: 10px; }
.ordre-plage-reglage .reg .champ:not(.court) { width: 100%; }
.jours { display: inline-flex; gap: 3px; }
.jours button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; padding: 0; font-size: 11.5px; color: var(--muted); }
.jours button.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.ordre-groupe { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.ordre-groupe .rang { width: 14px; color: var(--faint); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.simu-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 10px; }
.simu-champs label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--faint); letter-spacing: .4px; }
.simu-champs .champ { width: 100%; font-size: 13px; letter-spacing: 0; color: var(--ink); }
.simu-resultat { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 9px 12px; margin-top: 10px; font-size: 12.5px; }
.simu-resultat.rien { background: #fef2f2; border-color: #fecaca; }
.simu-resultat > b { font-size: 13.5px; }
.simu-resultat > small { display: block; color: var(--muted); margin-bottom: 4px; }
.simu-ligne { padding: 2px 0; }
.simu-ligne.avert { color: var(--warn); }
.simu-ecarte { margin-top: 6px; color: #92400e; }
.simu-ecarte > span { display: block; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--warn); font-weight: 600; }
.rail h4 em { text-transform: none; }
/* Interfaces : CPMS et télématique */
.ligne-champs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.ligne-champs .champ { width: 100%; }
.ligne-champs.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* lot 7 : une date et son heure demandent plus de place */
.cleo-deux label.case { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--muted); cursor: pointer; }
.carte table.bornes-liste td small { display: block; color: var(--muted); font-size: 11.5px; }
.carte table.bornes-liste tr.clic { cursor: pointer; }
.carte table.bornes-liste tr.clic:hover td { background: var(--bg); }
.etat-borne { font-weight: 600; color: var(--ok); }
.etat-borne.ko { color: var(--bad); }
.etat-borne.injoignable { color: var(--muted); }
.etat-borne.ok { color: var(--ink); font-weight: 500; }
/* Interfaces : SIP2 · parc */
.parc-reglage { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); color: var(--muted); }
.parc-reglage:first-of-type { margin-top: 10px; }
.parc-quand { width: 200px; flex: none; color: var(--muted); font-size: 12px; }
.parc-quand b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.parc-colonnes { flex: 1; min-width: 0; color: var(--ink); font-size: 12px; }
.carte h4.parc-genre { margin: 14px 0 4px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); font-weight: 600; display: flex; gap: 10px; }
.carte h4.parc-genre small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--faint); }
.carte table.corresp-parc td { padding-top: 5px; padding-bottom: 5px; }
.carte table.corresp-parc td:first-child { width: 190px; }
.carte table.corresp-parc td:nth-child(2) { width: 110px; }
.carte table.corresp-parc select.champ { max-width: 280px; }
.tag-propose, .discret-parc { margin-left: 8px; font-size: 11px; }
.tag-propose { color: var(--aff); background: #eff4ff; border-radius: 999px; padding: 1px 8px; }
.discret-parc { color: var(--faint); }
.creer-valeur { margin-left: 10px; font-size: 12px; color: var(--aff); }
.parc-table { overflow-x: auto; }
.carte table.apercu-parc td { white-space: nowrap; }
.carte table.apercu-parc td:last-child { white-space: normal; min-width: 160px; }
.carte table.apercu-parc td small { display: block; color: var(--muted); font-size: 11.5px; }
.niv-avertissement-doux { color: var(--warn); }
.fiche-parc { color: var(--faint); font-size: 11.5px; margin: -4px 0 6px; line-height: 1.45; font-variant-numeric: tabular-nums; }

/* Lot 6 bis : autonomie estimée. La ligne de calcul, discrète ; le bloc vert des solutions proposées */
.it.haut { align-items: flex-start; }
.it.haut > .k { margin-top: 6px; }
.it.haut > span { flex: 1; min-width: 0; }
.calcul { color: var(--faint); display: block; font-size: 11.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.calcul.manque { color: #b45309; }
.solution { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 8px 10px; margin: 6px 0 0; cursor: default; color: var(--ink); }
.solution b { font-variant-numeric: tabular-nums; }
.solution small, .it .solution small { display: block; color: #3f6b4f; }
.solution small.a-confirmer, .it .solution small.a-confirmer { color: var(--warn); }
.solution .ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 0; color: var(--ink); }
.solution .ligne + .ligne { margin-top: 8px; padding-top: 8px; border-top: 1px solid #bbf7d0; }
.solution .ligne > span { flex: 1 1 120px; min-width: 0; }
.msg-titre { margin: 10px 0 0; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.libres a small { font-weight: 400; color: var(--muted); font-size: 11px; }
.libres a small.manque { color: var(--warn); }

/* Lot 7 : bons de travail. Un statut dans sa couleur ; un bon à venir, plus discret ; sa période sur la frise par bus */
.statut-bt { white-space: nowrap; }
.bons-liste td small { display: block; color: var(--muted); font-size: 11.5px; }
.statut-bt i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; border: 1px solid #0000001a; }
tr.a-venir td, .it.a-venir { opacity: .6; }
.it.a-venir .k { background: transparent !important; border: 2px solid var(--k-couleur, var(--faint)); width: 6px; height: 6px; }
.statuts-bt table { width: 100%; }
.statuts-bt td { vertical-align: middle; white-space: nowrap; }
.it small.pourquoi { color: var(--warn); }
.bande-bt { position: absolute; top: 1px; bottom: 1px; border-radius: 4px; opacity: .45;
  background-image: repeating-linear-gradient(135deg, transparent 0 4px, #ffffff99 4px 7px); pointer-events: auto; }
.bande-bt.a-venir { opacity: .22; }

/* Lot 7 bis : les opérations d'exploitation. Cinq états, des teintes douces : vert (à jour), jaune (proche), orange (en retard),
   rouge (très en retard), gris (à saisir). Le point d'une opération dans la fiche du bus suit les mêmes. */
:root { --e-jour: #ecfdf3; --e-jour-t: #166534; --e-proche: #fef9c3; --e-proche-t: #854d0e; --e-retard: #ffedd5; --e-retard-t: #9a3412;
  --e-tres: #fee2e2; --e-tres-t: #991b1b; --e-saisir: #f3f4f6; --e-saisir-t: #6b7280; }
.k.proche { background: #eab308; }
.entretien .onglets { align-items: center; }
.entretien .onglets .sp { flex: 1; }
.entretien .onglets .seg { margin: 0; }
.tablo-entretien { overflow-x: auto; }
/* La carte prend toute la largeur (une colonne par opération) ; le numéro du bus reste visible quand le tableau défile
   de côté ; les barres de saisie restent à l'écran quand on descend dans une longue liste de bus. */
.entretien .carte { max-width: none; }
.entretien-table td.bus, .entretien-table th.bus { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.barre-masse { position: sticky; top: 0; z-index: 3; }
.barre-case { position: sticky; bottom: 0; z-index: 3; background: var(--surface); padding: 10px 0 6px; box-shadow: 0 -8px 12px -10px #0000003a; }
.entretien-table { border-collapse: separate; border-spacing: 4px; min-width: 100%; }
.entretien-table th { text-align: left; font-size: 12px; font-weight: 650; padding: 0 4px 4px; vertical-align: bottom; white-space: nowrap; }
.entretien-table th small { display: block; font-weight: 400; color: var(--faint); font-size: 11px; }
.entretien-table td { padding: 0; vertical-align: top; min-width: 150px; }
.entretien-table td.bus, .entretien-table th.bus { min-width: 0; width: 1%; white-space: nowrap; padding: 6px 8px 0 0; }
.entretien-table td.bus input { vertical-align: -2px; margin: 0 6px 0 0; }
.entretien-table td.bus small { display: block; color: var(--faint); font-size: 11px; margin-left: 21px; }
.cel { border-radius: 8px; padding: 5px 9px; cursor: pointer; border: 1.5px solid transparent; line-height: 1.3; }
.cel b { display: block; font-weight: 600; font-size: 12.5px; }
.cel small { display: block; font-size: 11px; opacity: .85; }
.cel small.empeche { font-weight: 600; opacity: 1; }
.cel:hover { border-color: #0000002a; }
.cel.ouverte { border-color: var(--ink); }
.cel.a_jour, .cel-pt.a_jour { background: var(--e-jour); color: var(--e-jour-t); }
.cel.proche, .cel-pt.proche { background: var(--e-proche); color: var(--e-proche-t); }
.cel.retard, .cel-pt.retard { background: var(--e-retard); color: var(--e-retard-t); }
.cel.tres_retard, .cel-pt.tres_retard { background: var(--e-tres); color: var(--e-tres-t); }
.cel.a_saisir, .cel-pt.a_saisir { background: var(--e-saisir); color: var(--e-saisir-t); }
.etats { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: 12px; }
.etats span { display: inline-flex; align-items: center; gap: 6px; }
.cel-pt { display: inline-block; width: 14px; height: 10px; border-radius: 3px; border: 1px solid #0000001a; }
.barre-masse { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 10px; padding: 7px 12px; margin-bottom: 10px; }
.barre-masse .mini { margin-left: 0; }
.barre-masse .mini:not(.p) { background: none; color: #fff; border-color: #ffffff55; }
.barre-masse .mini.p { background: #fff; color: var(--ink); border-color: #fff; }
.barre-masse .lien { color: #ffffffbb; }
.barre-masse .champ { padding: 3px 8px; }
.barre-case { align-items: center; }
.barre-case .mini { margin-left: 0; }
/* Lot 9 : la simulation. Sa teinte (cyan sombre) ne sert qu'à elle : le bandeau, le choix du mode, le curseur, une teinte légère du dépôt. */
:root { --sim: #0e7490; --sim-clair: #ecfeff; }
.mode-sim { margin: 0; }
.mode-sim button { padding: 3px 11px; font-size: 12px; white-space: nowrap; }
/* Avec le choix du mode, la barre du haut se partage : la navigation, le mode, l'heure et le nom ne rétrécissent pas, le fil d'Ariane si */
.top nav, .top .mode-sim, .top .clock, .top .who { flex: none; }
.top .crumb { flex: 0 1 auto; min-width: 0; overflow: hidden; }
@media (max-width: 1250px) {
  .top .who input { width: 80px; }
  .mode-sim button { padding: 3px 8px; }
}
.mode-sim button.on.sim { background: var(--sim); color: #fff; }
.clock-sim .point-sim { width: 8px; height: 8px; border-radius: 50%; background: var(--sim); align-self: center; }
.clock-sim b { color: var(--sim); }
.bandeau-sim { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--sim); color: #fff; padding: 6px 20px; font-size: 12.5px; }
.bandeau-sim .sp { flex: 1; }
.bandeau-sim button { background: #fff; color: var(--sim); border: 0; border-radius: 999px; padding: 3px 12px; font-weight: 600; font-size: 12px; cursor: pointer; }
.bandeau-sim button.vide { background: none; color: #fff; border: 1px solid #ffffff88; }
.bandeau-sim button.vide.on { background: #ffffff2a; }
body.en-sim .stage { background: var(--sim-clair); }
.k.sim-k { background: var(--sim); }
.sim-btn.btn.p, .sim-btn.mini.p { background: var(--sim); border-color: var(--sim); }
.rail h3 b.sim-b { background: var(--bad); }
.bande-sim { background: var(--surface); border: 1px solid #a5f3fc; border-radius: 10px; padding: 8px 12px 6px; margin-top: 10px; }
.bande-sim-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bande-sim-tete .mini { margin-left: 0; }
.bande-sim-tete .seg { margin: 0; }
.sim-heure { color: var(--sim); font-variant-numeric: tabular-nums; }
.legende-sim { margin-left: auto; display: flex; gap: 12px; font-size: 11px; color: var(--muted); }
.legende-sim i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.legende-sim .l-bus { background: #cffafe; border: 1px solid var(--sim); }
.legende-sim .l-essai { border-top: 2px dashed #7c3aed; height: 0; border-radius: 0; }
.legende-sim .l-ano { background: var(--bad); width: 3px; }
.bande-sim-corps { position: relative; margin-top: 6px; }
.courbe-sim { display: block; width: 100%; height: 60px; }
.aire-sim { fill: #cffafe; stroke: var(--sim); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.essai-sim { fill: none; stroke: #7c3aed; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.rep-sim { stroke: var(--line); vector-effect: non-scaling-stroke; }
.cur-sim { stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.heures-sim { position: relative; height: 14px; font-size: 10px; color: var(--faint); }
.heures-sim span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.anos-sim { position: absolute; left: 0; right: 0; top: 0; height: 60px; pointer-events: none; }
.ano-sim { position: absolute; top: 0; width: 7px; height: 60px; margin-left: -3px; cursor: pointer; pointer-events: auto;
  background: linear-gradient(to right, transparent 2px, var(--bad) 2px, var(--bad) 5px, transparent 5px); }
.curseur-sim { width: 100%; margin: 2px 0 0; accent-color: var(--sim); }
.comparaison-sim { width: 100%; border-collapse: collapse; font-size: 12px; }
.comparaison-sim td, .comparaison-sim th { padding: 3px 6px 3px 0; border-top: 1px solid var(--line); text-align: left; }
.comparaison-sim th { border-top: 0; font-size: 11px; color: var(--faint); font-weight: 600; }
.comparaison-sim .mieux { color: var(--ok); font-weight: 700; }
.comparaison-sim .pire { color: var(--bad); font-weight: 700; }
.comparaison-sim tr.total td { font-weight: 600; }

/* Lot 8 : une proposition ouverte. Le violet ne sert qu'à elle ; le rouge, à ce qu'elle ne sait pas pourvoir. */
:root { --prop: #7c3aed; }
.sv.prop { border: 2px dashed var(--prop); background: #f5f3ff; }
.sv.prop-sans { border: 2px dashed var(--bad); background: #fef2f2; }
.sv.mis { box-shadow: 0 0 0 3px #7c3aed40; }
.sv.prop-sans.mis { box-shadow: 0 0 0 3px #dc262633; }
.marque-prop { position: absolute; right: 4px; top: 0; bottom: 0; display: flex; align-items: center; font-size: 10.5px; font-weight: 700; color: var(--prop); background: #f5f3ffdd; padding: 0 3px; pointer-events: none; }
.sv.prop-sans .marque-prop { color: var(--bad); background: #fef2f2dd; font-weight: 600; }
.resume-prop { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.resume-prop span { border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.resume-prop .p1 { background: #f5f3ff; color: var(--prop); }
.resume-prop .p2 { background: #fef2f2; color: var(--bad); }
.resume-prop .p3 { background: var(--bg); color: var(--muted); font-weight: 400; }
.it .prop-bus { color: var(--prop); }
.nb.nb-prop { color: var(--prop); border: 1.5px dashed var(--prop); background: #f5f3ff; font-weight: 700; }
.nb.nb-sans { color: var(--bad); border: 1.5px dashed var(--bad); background: #fef2f2; font-weight: 600; }
.it small.ecarte-prop { color: var(--faint); }
.it.mis { background: linear-gradient(to right, transparent, #f5f3ff); }
.it > input[type=checkbox] { margin: 3px 0 0; flex: none; }
.periode-prop .champ { flex: 1; min-width: 0; font-size: 12px; padding: 4px 6px; }
.rail label.case { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; cursor: pointer; flex-wrap: wrap; }
.rail label.case input { margin-top: 3px; }
.rail label.case small { flex-basis: 100%; padding-left: 21px; color: var(--faint); font-size: 11.5px; }

.operations-reglage { overflow-x: auto; }
.page section[data-bloc="operations"] { max-width: 1100px; }
.operations-reglage td { vertical-align: middle; white-space: nowrap; }
.operations-reglage input.champ.court { width: 56px; }
.it .k.bt-k { border-radius: 2px; width: 14px; opacity: .6; background-color: #fdba74;
  background-image: repeating-linear-gradient(135deg, transparent 0 3px, #ffffffb3 3px 5px); }

/* Écrans de 1150 à 1360 px : la barre du haut se resserre plutôt que de déborder (lot 8 : relevé de 1250 à 1360 px,
   la barre déborde à 1280 px depuis l'entrée « Entretien ») */
@media (max-width: 1360px) {
  .top { gap: 12px; padding: 0 14px; }
  .top nav { gap: 14px; margin-left: 2px; }
  .crumb { min-width: 0; }
  .crumb select { max-width: 140px; }
  .clock .clock-jour { display: none; }   /* le jour reste au survol de l'heure */
}

/* ------------------------------------------------------------------------------------------------------------------
   Identité visuelle de DathyPark, d'après le masque RATP Cap Île-de-France 2026 (diapositives 1 et 3) :
   la barre du haut en sarcelle, le bloc blanc du logo bordé du ruban jaune, les titres en sarcelle, le texte en bleu,
   le fond en menthe très pâle, et la fourche de la diapositive 3, à peine visible, à droite des pages de réglage.
   Polices de la charte (Fulgence, Parisine) si le poste les a, sinon celles du système. Les dessins sont en SVG dans
   cette feuille : ni police, ni logo de la charte, ni rien chargé d'ailleurs.
   ------------------------------------------------------------------------------------------------------------------ */
:root {
  --bg: #f3f8f7; --surface: #fff; --line: #dfe9e7; --ink: #0a0082; --muted: #5d5c8e; --faint: #a4a3c7;
  --none: #cfd8d6; --pre: #8ccde8; --aff: #0096c8; --late: #5a0a46;
  --ok: #009a93; --warn: #f0aa00; --bad: #b41e46;
  --titre: #009a93; --sarcelle: #009a93; --sarcelle-fonce: #005a64; --sarcelle-claire: #64c3b9; --jaune: #f0aa00;
  --menthe: #c2fff3; --doux: #e4f5f1;
  --ombre: 0 1px 2px rgba(0, 90, 100, .05), 0 4px 14px rgba(0, 90, 100, .05);
  --ruban-marque: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='54' viewBox='0 0 46 54'%3E%3Cpath d='M0 0h12c15 12 2 40 30 54H0z' fill='%23fff'/%3E%3Cpath d='M12-2c15 13 2 41 31 57' fill='none' stroke='%23F0AA00' stroke-width='7'/%3E%3C/svg%3E");
  --fourche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='560' viewBox='0 0 420 560'%3E%3Cg fill='none' stroke='%23DDEFEC' stroke-width='26' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M262-20c-10 170-14 280-4 350 6 42-44 112-116 240'/%3E%3Cpath d='M440 218c-80 44-122 82-170 126'/%3E%3C/g%3E%3C/svg%3E");
  --souligne: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='8' viewBox='0 0 72 8'%3E%3Cpath d='M2 5.5C22 2 46 2 70 4' fill='none' stroke='%23F0AA00' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}
/* La simulation prend le violet de la charte : avec une barre sarcelle, son ancien cyan ne se distinguait plus du réel */
:root { --sim: #8c50aa; --sim-clair: #f8f2fb; }
.bande-sim { border-color: #dcc6e8; }
.legende-sim .l-bus, .aire-sim { background: #ecdcf4; fill: #ecdcf4; }

body { font-family: "Parisine Office", "ParisineTT", "Parisine", system-ui, "Segoe UI", Roboto, Arial, sans-serif; }
.brand, .head h2, .page h2, .page.large > h2, .rail .title, .rail .titre {
  font-family: "Fulgence Office", "Fulgence", "Parisine Office", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}

/* La barre du haut, comme la diapositive 1 : le bloc blanc du logo, le ruban jaune, puis la sarcelle */
.top { height: 54px; gap: 14px; padding: 0 16px 0 0; background: var(--sarcelle); border-bottom: 0; box-shadow: none; color: #fff; }
.top .brand { align-self: stretch; display: flex; align-items: center; gap: 9px; padding: 0 12px 0 18px; margin-right: 38px; background: #fff; color: var(--ink);
  font-size: 16px; font-weight: 600; white-space: nowrap; flex: none; position: relative; }
.top .brand b { font-weight: 700; color: var(--sarcelle); margin-left: -9px; }
.top .brand .logo { width: 30px; height: 30px; flex: none; }
.top .brand::after { content: ""; position: absolute; left: 100%; top: 0; width: 46px; height: 54px; background: var(--ruban-marque) no-repeat; pointer-events: none; }
.top .crumb { color: #ffffff80; min-width: 150px; }
.top .crumb select, .top .crumb select.fin { color: #fff; }
.top .crumb select:hover { background: #ffffff26; }
.top .crumb select option { color: var(--ink); background: #fff; }
.top nav { align-self: center; gap: 2px; margin-left: 0; }
.top nav a { height: 30px; padding: 0 11px; border: 0; border-radius: 999px; color: #fff; font-weight: 500; }
.top nav a:hover { background: #ffffff26; }
.top nav a.on { background: #fff; color: var(--sarcelle-fonce); font-weight: 700; }
.top .clock, .top .clock .clock-jour { color: #ffffffe6; }
.top .clock b { color: #fff; }
.top .clock .clock-point:hover { background: #ffffff26; }
.top .clock .clock-point i { background: #ffffff80; }
.top .clock .clock-point i.marche { background: var(--jaune); box-shadow: 0 0 0 3px #f0aa0055; }
.top .clock-sim b { color: #fff; }
.top .clock-sim .point-sim { background: #fff; }
.top .who { color: #ffffffe6; }
.top .who input { color: #fff; width: 84px; }
.top .who input::placeholder { color: #ffffffa6; }
.top .who input:hover, .top .who input:focus { border-color: #ffffff80; background: #ffffff1f; }
.top .seg { background: #00000024; }
.top .seg button { color: #fff; }
.top .seg button.on { background: #fff; color: var(--sarcelle-fonce); box-shadow: none; }
.top .mode-sim button.on.sim { background: var(--sim); color: #fff; }
/* Sous 1520 px, le jour laisse sa place au fil d'Ariane : il reste au survol de l'heure */
@media (max-width: 1520px) { .top .clock .clock-jour { display: none; } }

/* Titres en sarcelle, soulignés de la courbe jaune ; la pastille de compte en jaune, comme l'étiquette de la diapositive 3 */
.head h2, .page.large > h2 { color: var(--titre); position: relative; }
.head h2::after, .page.large > h2::after { content: ""; position: absolute; left: 0; bottom: -7px; width: 72px; height: 8px; background: var(--souligne) no-repeat; pointer-events: none; }
.page.large > h2 { display: inline-block; margin-bottom: 8px; }
.head { padding-bottom: 5px; }
.rail h3 { color: var(--ink); }
.rail h3 b, .chip .pastille { background: var(--jaune); color: var(--ink); }

/* La fourche de la diapositive 3, très pâle, à droite des pages (pas derrière le plan du dépôt) */
.page { background: var(--fourche) no-repeat right -40px bottom -20px / auto 100%; }

/* Cartes et panneaux : un trait fin, des coins ronds, une ombre à peine visible */
.carte, .page section, .temps-depot { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--ombre); }
.carte th { background: var(--doux); color: var(--ink); letter-spacing: .6px; padding: 6px 10px; }
.carte th:first-child { border-radius: 8px 0 0 8px; }
.carte th:last-child { border-radius: 0 8px 8px 0; }
.carte td { padding-left: 10px; }
.carte tr:hover td { background: #f6fbfa; }
.carte h3 i { background: var(--sarcelle); }

/* Boutons et champs */
.btn, .mini { background: var(--doux); border-color: transparent; color: var(--ink); }
.btn:hover, .mini:hover { background: #d3eee8; border-color: transparent; }
.btn.p, .mini.p { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.p:hover, .mini.p:hover { background: #1b14a0; }
.champ:focus { border-color: var(--sarcelle); box-shadow: 0 0 0 3px #009a9320; }
.seg.vue { background: #e2ecea; }

/* Les solutions proposées : la menthe de la charte */
.solution { background: #f1fcf9; border-color: #c9ece5; }
.solution small, .it .solution small { color: #1f6b64; }
.solution .ligne + .ligne { border-top-color: #c9ece5; }

/* ------------------------------------------------------------------------------------------------------------------
   L'assistant : un bouton volant en bas à droite, sur tous les écrans, et son panneau de conseils.
   ------------------------------------------------------------------------------------------------------------------ */
.assistant-bouton { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0;
  background: conic-gradient(from 210deg, #0a0082, #009a93, #64c3b9, #0a0082); box-shadow: 0 6px 20px rgba(10, 0, 130, .30), 0 0 0 4px #ffffffd9;
  display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.assistant-bouton:hover { transform: scale(1.06); }
.assistant-bouton svg { width: 30px; height: 30px; }
.assistant-bouton .pastille { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; background: var(--jaune);
  color: var(--ink); font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }
.assistant-bulle { position: fixed; right: 92px; bottom: 38px; z-index: 40; background: #fff; color: var(--ink); border-radius: 12px; padding: 7px 12px; font-size: 12.5px;
  box-shadow: 0 4px 16px rgba(10, 0, 130, .16); white-space: nowrap; cursor: pointer; }
.assistant-bulle b { color: var(--sarcelle); }
.assistant-panneau { position: fixed; right: 22px; bottom: 94px; z-index: 41; width: 400px; max-width: calc(100vw - 44px); max-height: calc(100vh - 130px);
  background: #fff; border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 18px 50px rgba(10, 0, 130, .22), 0 0 0 1px #e6eeec; }
.assistant-panneau .entete { padding: 14px 16px 10px; background: linear-gradient(120deg, #0a0082 0%, #005a64 70%, #009a93 100%); color: #fff; position: relative; flex: none; }
.assistant-panneau .titre { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.assistant-panneau .titre svg { width: 26px; height: 26px; }
.assistant-panneau .sous { color: #ffffffcc; margin: 2px 0 0 36px; font-size: 12.5px; }
.assistant-panneau .fermer { position: absolute; right: 14px; top: 9px; color: #fff; opacity: .8; font-size: 20px; cursor: pointer; }
.assistant-panneau .filtres { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; flex: none; }
.assistant-panneau .filtres span { border-radius: 999px; padding: 3px 10px; background: #eef6f4; color: var(--muted); font-size: 12px; cursor: pointer; }
.assistant-panneau .filtres span.on { background: var(--ink); color: #fff; font-weight: 600; }
.assistant-panneau .liste { overflow: auto; padding: 4px 0; flex: 1; min-height: 0; }
.assistant-panneau .conseil { padding: 11px 16px; border-bottom: 1px solid #eef3f2; display: grid; grid-template-columns: 30px 1fr; gap: 2px 10px; }
.assistant-panneau .conseil:last-child { border-bottom: 0; }
.assistant-panneau .ico { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; grid-row: span 3; }
.assistant-panneau .ico.placement { background: #e6f6f4; color: var(--sarcelle-fonce); } .assistant-panneau .ico.services { background: #eceafc; color: var(--ink); }
.assistant-panneau .ico.charge { background: #fff4d6; color: #8a5a00; } .assistant-panneau .ico.entretien { background: #fdecef; color: var(--bad); }
.assistant-panneau .phrase { font-weight: 600; font-size: 13.5px; }
.assistant-panneau .cat { color: var(--muted); font-size: 11.5px; }
.assistant-panneau .actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.assistant-panneau .actions .btn { padding: 4px 13px; }
.assistant-panneau .pourquoi { color: var(--sarcelle-fonce); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.assistant-panneau .raisons { grid-column: 2; margin-top: 8px; background: #effffb; border: 1px solid #cdeee8; border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: #1f4b47; }
.assistant-panneau .raisons ul { margin: 0; padding-left: 16px; }
.assistant-panneau .raisons li { margin: 2px 0; }
.assistant-panneau .raisons .a-confirmer { color: #8a5a00; margin-top: 4px; }
.assistant-panneau .raisons .ecartes { margin-top: 6px; color: var(--muted); }
.assistant-panneau .raisons .autres { margin-top: 6px; }
.assistant-panneau .raisons .autre { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-top: 4px; }
.assistant-panneau .vide-assistant { color: var(--muted); padding: 18px 16px; margin: 0; }
.assistant-panneau .pied { padding: 9px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; display: flex; gap: 6px; align-items: center; flex: none; }
.assistant-panneau .pied svg { width: 14px; height: 14px; flex: none; background: var(--sarcelle); border-radius: 4px; }
/* Dans « À traiter », le renvoi vers le conseil */
.mini.conseil { background: #e9f6f3; color: var(--sarcelle-fonce); font-weight: 600; }
.mini.conseil:hover { background: #d3eee8; }
.mini.conseil.bloc { margin: 6px 0 0; display: inline-block; }

/* ------------------------------------------------------------------------------------------------------------------
   L'écran « Sorties » : le tableau des sorties, leurs trois jalons, le trait jaune de maintenant, le détail à droite.
   ------------------------------------------------------------------------------------------------------------------ */
.sorties-ecran { padding-right: 16px; }
.sorties-ecran .head { flex-wrap: wrap; row-gap: 8px; align-items: center; }
.sorties-ecran .compteurs { display: flex; gap: 6px; }
.sorties-ecran .compteurs .chip.al b { color: var(--bad); }
.outils-sorties { display: flex; gap: 8px; align-items: center; margin: 12px 0 10px; flex-wrap: wrap; flex: none; }
.outils-sorties .aide { margin-left: auto; font-size: 12px; }
.muted { color: var(--muted); }
.carte.sorties { max-width: none; padding: 0; margin: 0 0 14px; flex: 1; min-height: 0; overflow: auto; background: var(--surface); }
.carte.sorties .vide { padding: 40px 20px; }
.table-sorties { width: 100%; border-collapse: collapse; }
.carte .table-sorties th { position: sticky; top: 0; z-index: 1; font-size: 11px; text-transform: uppercase; text-align: left; padding: 8px 10px; border-radius: 0; white-space: nowrap; }
.carte .table-sorties td { padding: 7px 10px; border-top: 1px solid #edf3f2; vertical-align: middle; white-space: nowrap; }
.table-sorties tr[data-sortie] { cursor: pointer; }
.table-sorties tr.prise { cursor: grab; }
.table-sorties tr.faite td { color: #9fa8b8; }
.table-sorties tr.faite .pastille-ligne, .table-sorties tr.faite .bus b { opacity: .55; }
.carte .table-sorties tr.sel td { background: #eef9f7; }
.table-sorties tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--sarcelle); }
.table-sorties tr.source td { opacity: .5; }
.carte .table-sorties tr.cible td { background: #e6f6f4; box-shadow: inset 0 2px 0 var(--sarcelle), inset 0 -2px 0 var(--sarcelle); }
.carte .table-sorties tr.maintenant td { padding: 0; border: 0; height: 0; background: none; }
.table-sorties tr.maintenant div { position: relative; height: 2px; background: var(--jaune); }
.table-sorties tr.maintenant span { position: absolute; left: 10px; top: -9px; background: var(--jaune); color: var(--ink); font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px; }
.table-sorties .heure { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-sorties .dans { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.pastille-ligne { display: inline-flex; min-width: 30px; justify-content: center; border-radius: 6px; padding: 1px 6px; font-weight: 800; color: #fff; }
.table-sorties .sv { font-weight: 600; }
.table-sorties .sa small { color: var(--muted); }
.table-sorties .bus b { font-size: 14px; }
.table-sorties .bus small { color: var(--muted); margin-left: 4px; }
.pourvoir { color: var(--bad); font-weight: 700; }
.table-sorties .mini.conseil { margin-left: 6px; }
.jalon { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font: inherit; font-size: 12px; background: none; border: 0; padding: 0; color: inherit; }
.jalon i { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; flex: none; }
.jalon small { color: var(--muted); }
.j-ok i { background: var(--ok); } .j-att i { background: #fff; border: 2px solid #c9d6d3; } .j-warn i { background: var(--warn); color: var(--ink); } .j-bad i { background: var(--bad); }
.j-non i { background: #eef1f1; color: var(--faint); }
.j-ok { color: var(--sarcelle-fonce); } .j-att { color: var(--faint); } .j-warn { color: #8a5a00; font-weight: 600; } .j-bad { color: var(--bad); font-weight: 700; } .j-non { color: var(--faint); }
/* Maquette seulement : un jalon qui se valide d'un clic porte un contour pointillé (VALIDER_A_LA_MAIN dans sorties.js) */
.jalon.a-la-main { cursor: pointer; border: 1px dashed #c9d6d3; border-radius: 999px; padding: 1px 8px 1px 2px; }
.jalon.a-la-main:hover { border-color: var(--sarcelle); background: #f1fcf9; }
.mini.a-la-main { margin-top: 4px; border: 1px dashed var(--sarcelle-claire); background: #f1fcf9; }
.maquette-note { margin-top: 14px; color: var(--muted); border-left: 3px dashed var(--sarcelle-claire); padding: 2px 0 2px 8px; }
.rail.rail-sorties { width: 320px; }
.rail .alerte-sortie { background: #fff6e0; border: 1px solid #f3d99a; border-radius: 10px; padding: 8px 10px; margin: 6px 0 12px; color: #6b4a00; }
.rail .alerte-sortie.rouge { background: #fdecef; border-color: #f2c2cd; color: var(--bad); }
.rail .etapes { border-left: 2px solid #dbe9e6; margin: 4px 0 14px 8px; padding-left: 16px; }
.rail .etape { position: relative; margin: 0 0 12px; }
.rail .etape::before { content: ""; position: absolute; left: -24px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #c9d6d3; }
.rail .etape.ok::before { background: var(--ok); border-color: var(--ok); }
.rail .etape.warn::before { background: var(--warn); border-color: var(--warn); }
.rail .etape.bad::before { background: var(--bad); border-color: var(--bad); }
.rail .etape b { display: block; }
.rail .etape small { color: var(--muted); display: block; }
.rail .btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
/* Le tableau des sorties tient dans la largeur d'un écran de 1440 px : cellules plus serrées, jalons sur deux lignes au besoin */
.carte .table-sorties th, .carte .table-sorties td { padding-left: 8px; padding-right: 6px; }
.table-sorties .jalon { white-space: normal; max-width: 150px; text-align: left; }

/* ------------------------------------------------------------------------------------------------------------------
   L'écran « En ligne » : les bus sortis (même tableau que « Sorties »), leur état en pastille, et à droite le panneau
   « Remplacer en ligne » (lieu et heure de reprise, bus de remplacement, ce qui se passera).
   ------------------------------------------------------------------------------------------------------------------ */
.table-enligne tr[data-bus] { cursor: pointer; }
.table-enligne .bus b { font-size: 15px; font-weight: 800; }
.etat-bus { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.etat-bus.e-ok { background: var(--doux); color: var(--sarcelle-fonce); }
.etat-bus.e-retard { background: #fff1d6; color: #8a5a00; }
.etat-bus.e-sans { background: #eceafc; color: var(--ink); }
.etat-bus.e-pass { background: #f3e9f8; color: #6b3a86; }
.rail-enligne .it { display: flex; align-items: baseline; gap: 6px; margin: 4px 0; }
.btn.mini-btn { padding: 3px 11px; font-size: 12.5px; }
.rail.rail-enligne { width: 360px; }
.deux-champs { display: flex; gap: 10px; margin: 6px 0 10px; }
.champ-bloc { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.champ-bloc span { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.champ-bloc .champ { width: 100%; box-sizing: border-box; }
.choix-bus { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.choix-bus:hover { border-color: var(--sarcelle-claire); }
.choix-bus.on { border-color: var(--sarcelle); background: #effffb; }
.choix-bus b { font-size: 14px; }
.choix-bus small { display: block; color: var(--muted); }
.choix-bus small.a-confirmer { color: #8a5a00; }
.choix-bus .ast { margin-left: auto; font-size: 11.5px; color: var(--sarcelle-fonce); font-weight: 600; white-space: nowrap; }
.resume-remplacement { background: #f6fbfa; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin: 10px 0; font-size: 12.5px; }
.resume-remplacement ol { margin: 4px 0 0; padding-left: 18px; }
.resume-remplacement li { margin: 3px 0; }
.rail-enligne .msg small { display: block; }
.rail-enligne .msg small.solution { color: var(--sarcelle-fonce); }
.rail-enligne .msg.ok { background: var(--doux); }
.rail-enligne .msg.ok small { color: var(--muted); }
