/* Loading and navigation (DESIGN.md « Progress and loading »; operator request of 2026-11-05, « ça doit être vraiment fluide »):
   skeletons shaped like the content they stand for, a soft entry of the main region on a page change, and scroll gutters that
   never move the layout. The shimmer itself is kit.css `.skel` (Sunken to Raised Row over 1.6s, flat under reduced motion). */

/* A segmented option whose count is still on its way keeps a digit's room for it (Segmented Counting). */
.segmented .n-wait { visibility: hidden; }

/* Shaped skeletons: a panel (title bar, fact rows or a chart block) and a page head (back, tile, title, chips, meta, actions). */
.skel-panel .panel-head { min-height: 38px; display: flex; align-items: center; }
.skel-panel-body { display: grid; gap: 12px; padding-top: 6px; }
.skel-fact { display: flex; justify-content: space-between; align-items: center; gap: 17px; min-height: 17px; }
.skel-head .skel-ghost { visibility: hidden; }
.skel-head .skel-pill { border-color: transparent; background: none; padding-left: 0; padding-right: 0; }
.skel-head > .skel-note { flex-basis: 100%; margin: 6px 0 0; font-size: 11.5px; min-height: 18.75px; }
.skel-actions { display: flex; flex-wrap: wrap; gap: 7px; }
/* Tabs while their page loads use the real .tabs and .tab elements, with a block in each label's place. */
.tabs.skel-tabs .tab { pointer-events: none; }

/* A skeleton standing in for text on its line (a title, a meta line): inline, so the line keeps its own height. */
.skel.skel-line { display: inline-block; vertical-align: middle; max-width: 100%; }

/* Loading rows shaped like a panel's row list (SkeletonRows AsRows; app.css `.rows`, `.row`): same sides, tile and line heights. */
.spec-stack.as-rows { gap: 0; padding: 0 0 7px; }
.spec-stack.as-rows > .skel-row { gap: 12px; min-height: 55.5px; padding: 9.5px 17px; }

/* A key figure while it loads (Kpi Loading): blocks on the figure's and the subline's own lines, so the strip keeps its height. */
.skel.skel-kpi-value { display: inline-block; width: 56px; height: 20px; border-radius: 6px; vertical-align: -2px; }
.skel.skel-kpi-sub { display: inline-block; width: 62%; height: 9px; vertical-align: middle; }
/* The subline is a flex row: its block alone would make it 9px high, so the line keeps the text's own height (11.5px at 1.5). */
.kpi-sub { min-height: 17.25px; }

/* Data table rows while they load (datatable.css): a table that fills its page keeps its toolbar and pager at their own height
   instead of spreading the free space over every row of its grid, and stacked mobile rows get a title and a subline block, like
   the rows that replace them. */
.dt { align-content: start; }
.dt-skel-sub { display: none; }
/* A skeleton row is as tall as a row of one text line (13px at 1.5 in its cell padding), so a page of rows replaces the skeleton
   at the same height. */
.dt-table tbody tr.dt-skel td > .skel:first-child { margin: 4.75px 0; }
@media (max-width: 860px) {
  .dt[data-stack="true"] .dt-table tbody tr.dt-skel td > .skel:first-child { height: 12px; }
  .dt[data-stack="true"] .dt-table tbody tr.dt-skel .dt-skel-sub { display: block; width: 34%; height: 9px; margin-top: 8px; }
}

/* The bell's count arrives with a short pop rather than blinking in (app.css `pop`). */
.topbar .icon-btn > .badge { animation: badge-in 0.18s var(--ease-out); }
@keyframes badge-in { from { opacity: 0; transform: scale(0.6); } }

/* A section list's current entry turns 600 (kit.css .account-nav): each label keeps the width it has at 600 (a hidden copy from
   data-label), so the current entry never moves its neighbours in the phone's row of sections. */
.account-nav a > span[data-label] { display: inline-grid; }
.account-nav a > span[data-label]::after { content: attr(data-label); content: attr(data-label) / ""; font-weight: 600; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }

/* No layout jump when a page, a fixed frame or a table's rows grow a scrollbar: the document scrolls the page (app.css). */
html, .frame-scroll, .frame .dt > .dt-scroll, .dt[data-virtual="true"] .dt-scroll { scrollbar-gutter: stable; }

/* A page change fades the new content of main in over 0.15s, rising 3px; the shell never moves. The frame flips between two
   identical keyframes so the animation restarts on every page change, including pages that reuse their elements, and holds the
   class only 0.22s, so data landing later replaces its skeleton in place without a second fade. Opacity and transform only:
   nothing is laid out again. */
@keyframes page-in-a { from { opacity: 0.3; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes page-in-b { from { opacity: 0.3; transform: translateY(3px); } to { opacity: 1; transform: none; } }
main.page-in-a > * { animation: page-in-a 0.15s ease-out both; }
main.page-in-b > * { animation: page-in-b 0.15s ease-out both; }
/* Content that replaces its skeleton in place eases in, so the swap reads as one surface settling. */
@keyframes settle-in { from { opacity: 0.55; } to { opacity: 1; } }
.settle-in { animation: settle-in 0.18s ease-out both; }

/* A list row leaving (a notification read under « Non lues », a removed item) folds its height instead of disappearing. */
.row-leave { display: grid; grid-template-rows: 1fr; overflow: hidden; transition: grid-template-rows 0.2s ease, opacity 0.2s ease; }
.row-leave.is-leaving { grid-template-rows: 0fr; opacity: 0; }
.row-leave > * { min-height: 0; }

@media (prefers-reduced-motion: reduce) {
  main.page-in-a > *, main.page-in-b > *, .settle-in, .topbar .icon-btn > .badge { animation: none; }
  .row-leave { transition: none; }
}
html.reduce-motion main.page-in-a > *, html.reduce-motion main.page-in-b > *, html.reduce-motion .settle-in,
html.reduce-motion .topbar .icon-btn > .badge { animation: none !important; }
html.reduce-motion .row-leave { transition: none !important; }
