/* tasteskill / app.css
   A neutral foundation for app screens (dashboards, admin, settings, inboxes), set to the defaults
   measured in the study of real product screens (references/app-screens.md). Copy it into the project,
   replace the token values with the ones on the app sheet (draw.mjs --app), and build on top.
   Delete what you do not use. It has no brand of its own: neutral grounds, one quiet line, one accent. */

/* ---------- tokens (replace with the dealt style) ---------- */
:root {
  /* names match the app sheet printed by draw.mjs --app */
  --ground: #f9fafb;          /* the app chrome and page */
  --surface: #ffffff;         /* panels and the work sheet */
  --raised: #f4f5f6;          /* a filled inner well, hover rows */
  --active: #eeeeee;          /* the active nav pill */
  --border: #e8e8e8;          /* panel edges: about 1.2:1 on white */
  --rule: #f1f2f3;            /* row rules inside tables */
  --control: #d1d5db;         /* inputs and outlined buttons: one step stronger */
  --text: #111111;
  --muted: #5f6368;           /* secondary text, labels (4.5:1 or more on its ground) */
  --faint: #6b6b6b;           /* meta and placeholders: the lightest grey that holds 4.5:1 on white */
  --accent: #1f6f5c;          /* one hue: data, focus, the selected thing */
  --primary: #1d1f20;         /* the primary button is near-black unless the style says otherwise */
  --primary-ink: #ffffff;
  --positive: #247b50; --negative: #c4242a; --warning: #92400e;  /* references/app-screens.md §9.5; a green accent is also --positive */
  --pill-positive-bg: #dcfae5; --pill-positive-ink: #04250e;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb; --pill-warning-ink: #92400e;
  --pill-neutral-bg: #eeeeee; --pill-neutral-ink: #3d3d3d;
  --chart-1: var(--accent); --chart-2: #8fb8ad; --chart-3: #b08a2e; --chart-muted: #cfd3d6;
  --chart-mark: var(--text);  /* a marked period in Charts.diverging: the second tone */
  --chart-span: 0.06;         /* opacity of a shaded span (a selling window, an outage) */
  --grid: var(--rule);        /* chart gridlines (charts.js) */
  --axis-ink: var(--muted);   /* chart tick labels (charts.js) */
  --ink: var(--text);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-title: 24px; --fs-section: 16px; --fs-kpi: 28px; --fs-body: 14px; --fs-small: 12px;

  --sidebar-width: 232px;
  --pad: 24px;                /* canvas padding */
  --gap: 16px;                /* one gutter, horizontal and vertical */
  --card-pad: 20px;
  --radius-card: 8px;         /* radius is bimodal: tight 4–8 (controls 6) or soft 16–24 (controls full); never 11–12 */
  --radius-control: 6px;
  --control-height: 32px;     /* every control in the title and filter rows */
  --row-height: 48px;         /* single-line table row */
  --nav-row: 32px;            /* sidebar item height, on a 34px pitch */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 120ms; --t-hover: 150ms; --t-ui: 200ms;
}
/* dark: one true-neutral ground, elevation by lightness; two greys that read apart (not #aaa beside #969696) */
:root[data-theme="dark"] {
  --ground: #000000; --surface: #111111; --raised: #222222; --active: #222222;
  --border: #1a1a1a; --rule: #161616; --control: #444444;
  --text: #ffffff; --muted: #b4b4b4; --faint: #949494;
  --primary: #ffffff; --primary-ink: #000000;
  --positive: #3fc07a; --negative: #e5566f; --warning: #e5a93b;  /* a green or yellow-green accent is also --positive */
  --pill-positive-bg: #172a1d; --pill-positive-ink: #3fc07a;
  --pill-negative-bg: #2c1a20; --pill-negative-ink: #e5566f;
  --pill-warning-bg: #2b2414; --pill-warning-ink: #e5a93b;
  --pill-neutral-bg: #222222; --pill-neutral-ink: #ffffff;
  --chart-muted: #4a4a4a; --grid: #2b2b2b;
  --chart-span: 0.12;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: var(--fs-body)/20px var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, table, .kpi-value { font-variant-numeric: tabular-nums; }

/* ---------- shell: sidebar + canvas ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; overflow: auto; }
.sidebar .group-label { margin: 20px 8px 6px; font-size: var(--fs-small); color: var(--faint); }
.nav-item { display: flex; align-items: center; gap: 10px; height: var(--nav-row); padding: 0 8px; border-radius: 8px; color: var(--muted); transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.nav-item svg { width: 16px; height: 16px; flex: none; stroke-width: 1.5; }
.nav-item:hover { background: var(--raised); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--active); color: var(--text); }
.sidebar .bottom { margin-top: auto; }
.canvas { min-width: 0; padding: var(--pad); }

/* ---------- title block and filters ---------- */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.title-row h1 { font-size: var(--fs-title); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.title-row .sub { margin-top: 4px; color: var(--muted); }
.filters { display: flex; align-items: center; gap: 8px; margin-bottom: var(--gap); flex-wrap: wrap; }
.filters .spacer { flex: 1; }
.stamp { color: var(--faint); font-size: var(--fs-small); }

/* ---------- panels and grid ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--card-pad); min-width: 0; }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel h2 { font-size: var(--fs-section); line-height: 1.3; font-weight: 600; }
.panel .meta { color: var(--faint); font-size: var(--fs-small); }
/* paired cards in one row: a card stretches to its neighbour only when it has content to fill. Otherwise it keeps
   its own height (add .top to the row), and only an action or a total may be pinned to a stretched card's bottom */
.grid.top { align-items: start; }

/* a chart's heading row: its title (and legend or period) with a fixed 8px to the svg */
.chart-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.chart-head h3 { font-size: var(--fs-body); line-height: 20px; font-weight: 500; }
.chart { position: relative; min-width: 0; }

/* a link at a card's foot or header ("Show all 7", "Sell-out history"): ink, a 12px chevron, an underline on hover,
   and no inline padding, so its text sits on the card's content edge */
.card-link { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--text); font-weight: 500; cursor: pointer; text-underline-offset: 3px; }
.card-link::after { content: ""; width: 12px; height: 12px; flex: none; background: currentColor; -webkit-mask: var(--chevron) center / 12px no-repeat; mask: var(--chevron) center / 12px no-repeat; }
.card-link:hover { text-decoration: underline; }
:root { --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 2.5 8 6l-3.5 3.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* list rows: a rule between rows and none above the first. A rule on a rounded box curls up at both ends, so a row
   that carries a rule has square corners */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; }
.row + .row { border-top: 1px solid var(--rule); border-radius: 0; }

/* KPIs as one divided strip: a label above a number, no icons, no tiles */
.kpis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.kpi { padding: 16px var(--card-pad); }
.kpi + .kpi { border-left: 1px solid var(--border); }
.kpi-label { color: var(--muted); }
.kpi-value { margin-top: 6px; font-size: var(--fs-kpi); line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; }
.kpi-value small { font-size: 0.55em; color: var(--muted); font-weight: 400; margin-left: 2px; }
.delta { margin-top: 4px; font-size: var(--fs-small); color: var(--muted); }
.delta .up { color: var(--positive); } .delta .down { color: var(--negative); }
/* KPIs as the chart's tabs: the selected one carries a 2px rule and an ink label; the others keep a grey label and
   their value in ink at a lighter weight (a grey value reads as disabled). When the tabs are the per-entity
   breakdown the brief asks for (takings by shop), add .entities: nothing changes but the rule */
.kpis[role="tablist"] .kpi { position: relative; cursor: pointer; }
.kpis[role="tablist"] .kpi[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
.kpis[role="tablist"]:not(.entities) .kpi[aria-selected="true"] .kpi-label { color: var(--text); }
.kpis[role="tablist"]:not(.entities) .kpi[aria-selected="false"] .kpi-value { color: var(--text); font-weight: 400; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 36px; padding: 0 12px; text-align: left; font-weight: 400; font-size: var(--fs-small); color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
/* cells share one baseline, so a figure never sits 2px below the name beside it; the row height comes from padding */
td { padding: calc((var(--row-height) - 20px) / 2) 12px; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
tbody tr:last-child td { border-bottom: 0; }
/* no hover that changes the fill; a row that drives a detail pane takes the nav pill's fill when selected */
tbody tr[aria-selected="true"] td { background: var(--active); }
th.n, td.n { text-align: right; }
td .sub { display: block; font-size: var(--fs-small); color: var(--muted); }
.truncate { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* status pill: a pale tint with dark ink of the same hue, one per row */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-small); font-weight: 500; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); white-space: nowrap; }
.pill.pos { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill.neg { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-height); padding: 0 12px; border-radius: var(--radius-control); border: 1px solid var(--control); background: var(--surface); font-weight: 500; cursor: pointer; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.btn:hover { background: var(--raised); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn.ghost { border-color: transparent; background: transparent; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; }
.field .hint { color: var(--muted); font-size: var(--fs-small); }
.input, select.input { height: 38px; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); }
.input::placeholder { color: var(--faint); }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: var(--gap); }
.tabs a { position: relative; padding: 10px 0; color: var(--muted); transition: color var(--t-hover) ease; }
.tabs a[aria-selected="true"] { color: var(--text); }
.tabs a[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
/* as wide as its options; full width only on a narrow phone */
.segmented { display: inline-flex; width: max-content; max-width: 100%; padding: 2px; border-radius: 8px; background: var(--raised); }
.segmented button { height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); }
.switch { appearance: none; width: 32px; height: 20px; border-radius: 999px; background: var(--control); position: relative; cursor: pointer; transition: background-color var(--t-ui) ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--t-ui) var(--ease-out); }
.switch:checked { background: var(--text); } .switch:checked::after { transform: translateX(12px); }

/* empty and loading states keep the frame; a loading value is a flat grey bar at its real size, with no shimmer */
.empty { display: grid; place-items: center; min-height: 96px; padding: 16px; border: 1px dashed var(--control); border-radius: var(--radius-control); color: var(--muted); text-align: center; }
.skeleton { background: var(--raised); border-radius: 4px; }

/* ---------- phone: the navigation folds away and the canvas takes the width ---------- */
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  /* the menu opens as a full-screen sheet */
  .sidebar { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; background: var(--surface); transform: translateX(-100%); transition: transform var(--t-ui) var(--ease-out); }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .canvas { padding: 16px; }
  .grid > * { grid-column: 1 / -1 !important; }
  .kpis { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi + .kpi { border-left: 0; }
  .kpi:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .kpi:nth-child(2n) { border-left: 1px solid var(--border); }
  /* an odd count leaves no half-empty row: the last cell takes the full width */
  .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* KPI tabs in a 2-up grid: the selected cell takes a fill, never an underline floating mid-grid */
  .kpis[role="tablist"] .kpi[aria-selected="true"] { background: var(--active); }
  .kpis[role="tablist"] .kpi[aria-selected="true"]::after { content: none; }
  .title-row { flex-wrap: wrap; align-items: flex-start; }
}
@media (max-width: 480px) {
  .segmented { display: flex; width: 100%; }
  .segmented button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; } }

/* an empty message spans the block it stands in, never one squeezed column */
.rows .empty, .grid > .empty, li > .empty { grid-column: 1 / -1; width: 100%; }

/* Dexe — couche propre au produit, posee sur app.css (style « achromatic ledger », seed 1637188916).
   Visage : un sol pierre (#f4f3f1, une boutique) au lieu du gris de kit ; la seule teinte (#1d5fbf) sur la donnee
   principale (la colonne du jour). Element propre : le duel — Mohamed et Achraf cote a cote, sur toute la hauteur.
   Grille : colonne centree 1152px = 12 x 85 + 11 x 12 ; les paires de cartes 570 + 12 + 570 = 1152. */
:root {
  --ground: #f4f3f1; --surface: #ffffff; --raised: #eeeeee; --active: #ececec;
  --border: #e6e6e6; --rule: #f0f0f0; --control: #d4d4d4;
  --text: #0a0a0a; --muted: #6b6b6b; --faint: #6b6b6b;
  --accent: #141414; --primary: #141414; --primary-ink: #ffffff;
  --positive: #2e7d32; --negative: #c4242a; --warning: #92400e;
  --chart-1: #1d5fbf; --chart-muted: #141414; --grid: #ececec; --axis-ink: #6b6b6b;
  --pill-neutral-bg: #eeeeee; --pill-neutral-ink: #3d3d3d;
  --font: "Geist", Inter, system-ui, sans-serif;
  --fs-title: 24px; --fs-section: 16px; --fs-kpi: 30px; --fs-body: 14px; --fs-small: 12px;
  --gap: 12px; --pad: 24px; --card-pad: 20px; --radius-card: 8px; --radius-control: 6px; --control-height: 36px; --row-height: 44px;
  --col: 1152px;
  /* identite des vendeurs : teintes pales a plus de 60 degres l'une de l'autre, jamais dans les graphiques */
  --seller-a: #f1e6d6; --seller-a-ink: #5c3d14;   /* Mohamed : sable */
  --seller-b: #dceee3; --seller-b-ink: #1f4d33;   /* Achraf : sauge */
}

/* ---------- barre du haut : logo sur le bord gauche de la colonne ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--ground); }
.top.scrolled { box-shadow: 0 1px 0 var(--border); }   /* taste-skill-ignore: barre collante, un trait quand le contenu passe dessous */
.top-in { max-width: var(--col); margin: 0 auto; height: 48px; display: flex; align-items: center; gap: 24px; padding: 0 var(--pad); box-sizing: content-box; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.brand img { width: 22px; height: 22px; }
.brand span { color: var(--muted); font-weight: 400; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: var(--muted); font-weight: 500; font-size: 14px; transition: color var(--t-hover) ease; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-small); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); }
.live.off i { background: var(--control); }
.top .out { color: var(--muted); font-size: var(--fs-small); }
.top .out:hover { color: var(--text); }

.rows { grid-template-columns: minmax(0, 1fr); }
.rows > * { min-width: 0; }
.wrap { max-width: var(--col); margin: 0 auto; padding: 28px var(--pad) 56px; box-sizing: content-box; }
.title-row .sub b { font-weight: 500; color: var(--text); }

/* ---------- le duel ---------- */
.duel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.seller > header { margin-bottom: 18px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; flex: none; background: var(--seller-a); color: var(--seller-a-ink); }
.seller.b .avatar, .ini.b { background: var(--seller-b); color: var(--seller-b-ink); }
.who h2 { font-size: var(--fs-section); }
.who .num { color: var(--muted); font-size: var(--fs-small); }
.seller .kpis { border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; margin: 0 calc(-1 * var(--card-pad)); }
.seller .kpi { padding: 14px var(--card-pad); }
.kpi-value.zero { color: var(--muted); }
.kpi .of { margin-top: 2px; color: var(--muted); font-size: var(--fs-small); }
.money { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 0 14px; border-bottom: 1px solid var(--rule); }
.money .lbl { color: var(--muted); }
.money .v { font-size: 20px; font-weight: 700; }
.money .v small, .kpi-value small { font-size: 0.6em; color: var(--muted); font-weight: 400; margin-left: 3px; }
.money .rate { color: var(--muted); font-size: var(--fs-small); text-align: right; }
.money .rate b { color: var(--text); font-weight: 500; }
.pipe-h { display: flex; justify-content: space-between; margin: 14px 0 6px; color: var(--muted); font-size: var(--fs-small); }
.pipe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; }
.pipe div { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.pipe div:nth-last-child(-n + 3) { border-bottom: 0; }
.pipe span { color: var(--muted); }
.pipe b { font-weight: 500; font-variant-numeric: tabular-nums; }
.pipe b.zero { color: var(--muted); font-weight: 400; }
.pipe b.alert { color: var(--negative); }
.seller.empty-seller .kpis, .seller.empty-seller .money, .seller.empty-seller .pipe-h, .seller.empty-seller .pipe { opacity: 1; }
.seller .head-r { display: flex; align-items: center; gap: 8px; flex: none; }

/* ---------- connexion ---------- */
.login { min-height: 100svh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 360px; display: grid; gap: 16px; }
.login .brand { margin-bottom: 8px; }
.login h1 { font-size: var(--fs-title); }
.login .err { color: var(--negative); font-size: var(--fs-small); }
.login .btn { height: 40px; }

/* ---------- numeros ---------- */
.nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.qr { display: grid; place-items: center; min-height: 280px; margin-top: 14px; border-radius: var(--radius-control); background: var(--raised); }
.qr img { width: 264px; height: 264px; image-rendering: pixelated; }
.steps { margin: 14px 0 0; padding-left: 18px; color: var(--muted); }
.steps li + li { margin-top: 4px; }

/* ---------- fiches + bilan ---------- */
.ini { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; background: var(--seller-a); color: var(--seller-a-ink); }
.ini.b { background: var(--seller-b); color: var(--seller-b-ink); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: stretch; }
.bilan { margin-top: 32px; }
.b-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.b-head h2 { font-size: 20px; font-weight: 600; }
.b-head .meta { color: var(--muted); font-size: var(--fs-small); }
.b-lead { margin: 6px 0 16px; color: var(--muted); }
.b-lead b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

/* cinq chiffres d'un trait, le benefice porte la seule teinte */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.tile { background: var(--surface); padding: 16px var(--card-pad); min-width: 0; }
.tile-v { margin-top: 2px; font-size: var(--fs-kpi); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; white-space: nowrap; }
.tile-v small { font-size: 0.45em; color: var(--muted); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.tile .of { margin-top: 4px; color: var(--muted); font-size: var(--fs-small); }
.tile.main .tile-v { color: var(--chart-1); }
.tile.main.neg .tile-v { color: var(--negative); }

/* l'escalier : meme echelle a gauche et a droite, on compare les deux d'un coup d'oeil */
.falls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.fall > header { margin-bottom: 10px; }
.fall .who h2 { font-size: var(--fs-section); }
.stairs { display: grid; }
.st { display: grid; grid-template-columns: 136px minmax(0, 1fr) 118px; column-gap: 12px; align-items: center; min-height: 38px; padding: 4px 0; }
.st-l { min-width: 0; line-height: 1.2; }
.st-l b { display: block; font-weight: 400; }
.st-l span { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-t { position: relative; height: 12px; }
.st-b { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: #c9c7c3; }
.zero-line { position: absolute; top: -13px; bottom: -13px; width: 1px; background: var(--control); }
.st-v { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-v small { display: inline-block; width: 40px; color: var(--muted); font-size: var(--fs-small); }
.st.start .st-b, .st.sub .st-b { background: var(--text); }
.st.start .st-l b, .st.sub .st-l b, .st.end .st-l b { font-weight: 600; }
.st.sub, .st.end { border-top: 1px solid var(--border); }
.st.sub .st-v, .st.start .st-v { font-weight: 600; }
.st.end .st-b { background: var(--chart-1); }
.st.end.neg .st-b { background: var(--negative); }
.st.end .st-v { font-weight: 700; }
.st.end.neg .st-v { color: var(--negative); }
.soon { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--muted); font-size: var(--fs-small); }
.soon b { color: var(--text); font-weight: 500; }

/* compte de resultat : un registre, Total en dernier */
.ledcard { margin-top: var(--gap); }
.led { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.led th, .led td { padding: 7px 0 7px 12px; text-align: right; font-weight: 400; vertical-align: baseline; }
.led th:first-child, .led .grp th { padding-left: 0; text-align: left; }
.led thead th { color: var(--muted); font-size: var(--fs-small); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; }
.led thead .ini { margin-right: 6px; width: 20px; height: 20px; font-size: 10px; vertical-align: middle; }
.led th[scope="row"] { color: var(--text); }
.led th[scope="row"] span { margin-left: 6px; color: var(--muted); font-size: 11px; }
.led tbody tr { border-bottom: 1px solid var(--rule); }
.led tbody .grp { border-bottom: 1px solid var(--border); }
.led .grp th { padding-top: 18px; color: var(--muted); font-size: var(--fs-small); font-weight: 500; }
.led .tot { font-weight: 500; }
.led .hl th, .led .hl td { font-weight: 500; }
.led .sum th, .led .sum td { font-weight: 600; background: var(--raised); }
.led .sum th { padding-left: 8px; border-radius: 4px 0 0 4px; }
.led .sum td:last-child { padding-right: 8px; border-radius: 0 4px 4px 0; }
.led .big th, .led .big td { font-size: 15px; font-weight: 700; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.notes { margin-top: var(--gap); }
.notes h3 { font-size: var(--fs-small); font-weight: 500; color: var(--muted); }
.src ul { margin: 8px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; columns: 2; column-gap: 32px; }
.src li { padding: 7px 0; break-inside: avoid; }
.src li b { display: block; color: var(--text); font-weight: 500; }
/* ---------- telephone ---------- */
@media (max-width: 860px) {
  .top-in { gap: 14px; padding: 0 16px; }
  .top nav { display: none; }
  .top .right .who-am { display: none; }
  .wrap { padding: 16px 16px 40px; }
  .duel, .nums, .cols, .falls { grid-template-columns: minmax(0, 1fr); }
  .src ul { columns: 1; }
  .cols > * { grid-column: 1 !important; }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe div:nth-last-child(-n + 3) { border-bottom: 1px solid var(--rule); }
  .pipe div:nth-last-child(-n + 2) { border-bottom: 0; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.main { grid-column: 1 / -1; order: -1; }
  .st { grid-template-columns: 96px minmax(0, 1fr) 72px; column-gap: 8px; }
  .st-v small { display: none; }
  .ledcard { padding-left: 12px; padding-right: 12px; }
  .led { font-size: 12px; }
  .led th[scope="row"] span { display: block; margin-left: 0; }
  .led thead .ini { display: none; }
  .led th, .led td { padding-left: 6px; }
  .led .big th, .led .big td { font-size: 13px; }
  .mobile-nav { display: flex !important; }
}
.mobile-nav { display: none; gap: 18px; margin: -4px 0 14px; }
.mobile-nav a { color: var(--muted); font-weight: 500; }
.mobile-nav a[aria-current="page"] { color: var(--text); }
