/* Plan de travail à deux zones : file d'actions / agenda / pipeline à gauche, fiche contact collante à droite (plein écran sur téléphone). */
:root {
  --bg: #EDF1F0; --surface: #FFFFFF; --surface-2: #F4F7F6; --ink: #10242B; --muted: #587076; --line: #D4DDDB;
  --accent: #0A6B7C; --accent-ink: #FFFFFF; --accent-soft: #D9EEF1;
  --ok: #1E7F52; --ok-soft: #DDF1E6; --warn: #8F5F0A; --warn-soft: #F7ECCF; --crit: #B3342A; --crit-soft: #F8E0DD;
  --s-todo: #8A9A9E; --s-contacted: #2F6FD0; --s-relance: #C9A227; --s-talk: #E07B2D; --s-demo: #8A55D6; --s-quote: #D1558B; --s-won: #1E9E62; --s-lost: #C0392B; --s-pause: #8B6B4A;
  --f-display: 'Bricolage Grotesque', 'Avenir Next', system-ui, sans-serif;
  --f-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D181C; --surface: #14242A; --surface-2: #1A2D34; --ink: #E4EEEE; --muted: #8CA4A9; --line: #263A41;
    --accent: #52C2D4; --accent-ink: #07191D; --accent-soft: #123640;
    --ok: #4CC38A; --ok-soft: #12362A; --warn: #E0B04A; --warn-soft: #3A2F14; --crit: #F0877D; --crit-soft: #3D1D1A;
    --s-todo: #8FA1A5; --s-contacted: #5B93F0; --s-relance: #E0BC45; --s-talk: #F09450; --s-demo: #AC82F0; --s-quote: #EC7FAE; --s-won: #43C98A; --s-lost: #F0877D; --s-pause: #B89570;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D181C; --surface: #14242A; --surface-2: #1A2D34; --ink: #E4EEEE; --muted: #8CA4A9; --line: #263A41;
  --accent: #52C2D4; --accent-ink: #07191D; --accent-soft: #123640;
  --ok: #4CC38A; --ok-soft: #12362A; --warn: #E0B04A; --warn-soft: #3A2F14; --crit: #F0877D; --crit-soft: #3D1D1A;
  --s-todo: #8FA1A5; --s-contacted: #5B93F0; --s-relance: #E0BC45; --s-talk: #F09450; --s-demo: #AC82F0; --s-quote: #EC7FAE; --s-won: #43C98A; --s-lost: #F0877D; --s-pause: #B89570;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.45; padding-inline: 16px; padding-block: 0 48px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); font-size: 12.5px; }

/* En-tête */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-block: 12px; border-bottom: 1px solid var(--line); margin-inline: -16px; padding-inline: 16px; }
.brand { font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin: 0; }
.brand span { color: var(--accent); }
.today-label { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.top .sp { flex: 1; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; font-weight: 500; min-height: 34px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.sm { min-height: 28px; padding: 3px 9px; font-size: 12.5px; border-radius: 7px; }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-block: 16px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kpi { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; min-width: 0; }
.kpi .k-l { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kpi .k-v { font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; }
.kpi .k-v small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.kpi .k-s { font-size: 12px; color: var(--muted); }
.bar { height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 6px; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar.over i { background: var(--crit); }
.kpi.crit .k-v { color: var(--crit); }
.note { color: var(--muted); font-size: 12.5px; margin: 6px 2px 0; }

/* Bandeau de replanification */
.banner { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 10px; padding: 10px 14px; margin-block: 12px 0; }
.banner b { color: var(--warn); }
.banner .t { flex: 1 1 280px; min-width: 0; }

/* Onglets */
.tabs { display: flex; gap: 4px; margin-block: 16px 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; font-weight: 600; color: var(--muted); white-space: nowrap; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab .c { font-weight: 500; color: var(--muted); margin-left: 4px; }

/* Mise en page principale */
.work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.work.has-sheet { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); }
.view { min-width: 0; }
h2.sec { font-family: var(--f-display); font-size: 16px; margin: 20px 0 8px; display: flex; align-items: baseline; gap: 8px; letter-spacing: -0.005em; }
h2.sec:first-child { margin-top: 4px; }
h2.sec .c { color: var(--muted); font-family: var(--f-body); font-weight: 500; font-size: 13px; }
.empty { color: var(--muted); padding: 18px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); }

/* Lignes d'action */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row.sel { background: var(--accent-soft); }
.r-main { flex: 1 1 220px; min-width: 0; }
.r-main strong { display: block; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 12.5px; }
.r-act { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; flex-wrap: wrap; }
.r-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.due { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.late { background: var(--crit-soft); color: var(--crit); }
.due.now { background: var(--ok-soft); color: var(--ok); }
.due.later { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.more { width: 100%; text-align: center; padding: 9px; background: var(--surface-2); border: 0; border-top: 1px solid var(--line); color: var(--accent); font-weight: 600; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.st i { width: 8px; height: 8px; border-radius: 50%; background: var(--s-todo); display: inline-block; }
.st.contacted i { background: var(--s-contacted); } .st.relance i { background: var(--s-relance); } .st.talk i { background: var(--s-talk); }
.st.demo i { background: var(--s-demo); } .st.quote i { background: var(--s-quote); } .st.won i { background: var(--s-won); }
.st.lost i { background: var(--s-lost); } .st.pause i { background: var(--s-pause); }
.chip { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); font-family: var(--f-mono); }

/* Agenda */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.day.is-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.day.late { border-color: var(--crit); }
.day h3 { margin: 0; font-family: var(--f-display); font-size: 14.5px; text-transform: capitalize; display: flex; justify-content: space-between; gap: 8px; }
.day .meta { margin-top: 2px; }
.day ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.day li button { width: 100%; text-align: left; background: none; border: 0; padding: 3px 4px; border-radius: 6px; display: flex; justify-content: space-between; gap: 8px; }
.day li button:hover { background: var(--surface-2); }
.day li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.day li .k { color: var(--muted); font-size: 12px; white-space: nowrap; }
.day summary { cursor: pointer; color: var(--accent); font-size: 12.5px; margin-top: 6px; }

/* Pipeline */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-width: 0; }
.col h3 { margin: 2px 4px 8px; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.col h3 .meta { font-weight: 400; }
.card { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; margin-bottom: 6px; }
.card:hover { border-color: var(--accent); }
.card b { display: block; overflow-wrap: anywhere; font-size: 13px; }

/* Contacts */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.filters input, .filters select, .field input, .field select, .field textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 10px; min-height: 34px; }
.filters input { flex: 1 1 200px; min-width: 0; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }

/* Fiche contact */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); max-height: calc(100vh - 80px); overflow-y: auto; min-width: 0; }
.sheet-h { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.sheet-h h2 { margin: 0; font-family: var(--f-display); font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; flex: 1; letter-spacing: -0.01em; }
.sb { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.sb:last-child { border-bottom: 0; }
.sb h4 { margin: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.kv { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.field { display: grid; gap: 4px; }
.field label { font-size: 12px; color: var(--muted); }
.field textarea { min-height: 70px; resize: vertical; width: 100%; }
.msg { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; }
.evgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.evgrid .btn { justify-content: center; }
.evgrid .btn.on { background: var(--accent-soft); border-color: var(--accent); }
.form { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tl li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; font-size: 13px; }
.tl .d { color: var(--muted); font-family: var(--f-mono); font-size: 12px; }
.tl b { font-weight: 600; }
.tl .est { color: var(--muted); font-style: italic; }
details.obj summary { cursor: pointer; font-weight: 600; }
details.obj .o { display: grid; gap: 6px; margin-top: 8px; }
.close { background: none; border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 34px; font-size: 18px; line-height: 1; }

/* Panneaux d'en-tête */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; display: grid; gap: 10px; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper b { min-width: 24px; text-align: center; font-size: 16px; }
.prog { color: var(--muted); font-size: 13px; }

/* Message flottant */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); margin-inline: auto; max-width: 460px; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; z-index: 60; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.toast button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; padding: 0; }
.toast.err { background: var(--crit); color: #fff; }

@media (max-width: 960px) {
  .work.has-sheet { grid-template-columns: minmax(0, 1fr); }
  .sheet { position: fixed; inset: 0; z-index: 40; border-radius: 0; max-height: none; top: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (prefers-reduced-motion: no-preference) {
  .bar i { transition: width .3s ease; }
}
.kpis:empty, .note:empty, #panel:empty, #banner:empty { display: none; }

/* ---------- Ajouts CRM multi-utilisateurs ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
form.inline { display: inline; margin: 0; }
.scope select { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 10px; min-height: 34px; font-weight: 600; }
.who { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); white-space: nowrap; }
.summary { display: flex; flex-wrap: wrap; gap: 6px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.summary b { color: var(--ink); }
.feed { padding: 4px 14px 0; }
.feed .tl { margin-bottom: 12px; }
.feed .tl li { grid-template-columns: 92px minmax(0, 1fr); }
.feed-day { font-family: var(--f-display); font-size: 13.5px; margin: 12px 0 8px; text-transform: capitalize; color: var(--muted); }
.feed .more { margin-inline: -14px; width: calc(100% + 28px); }
.tl li.est { color: var(--muted); font-style: italic; }
.tl .n { overflow-wrap: anywhere; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 10px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 10px; align-items: end; }
.grid2 .wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; }
.chips { gap: 4px; }
.count { margin-bottom: 6px; }
.more-btn { margin-top: 8px; }
tbody tr.sel { background: var(--accent-soft); }
tbody tr.static { cursor: default; }
tbody tr.static:hover { background: none; }
tr.off td { color: var(--muted); }
.users { min-width: 560px; }
.users select { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 2px 6px; }
.nowrap { white-space: nowrap; }
.card.sel { border-color: var(--accent); background: var(--accent-soft); }
.sheet .sb .field label.meta { font-size: 11.5px; }

/* Connexion */
.login-page { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding-bottom: 0; }
.login { width: 100%; max-width: 360px; padding-block: 32px; }
.login .brand { font-size: 26px; margin-bottom: 12px; }
.login .panel { gap: 14px; }
.login .btn { justify-content: center; }
.form-err { margin: 0; color: var(--crit); background: var(--crit-soft); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
[hidden], .toast[hidden] { display: none !important; }
.tabs { overflow-y: hidden; }

/* ---------- Aujourd'hui : qui relancer, qui contacter, d'un coup d'œil ---------- */
.focus-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin: 4px 0 14px; }
.focus-h h2 { margin: 0; font-family: var(--f-display); font-size: 22px; letter-spacing: -0.01em; }
.big { margin: 2px 0 0; font-size: 17px; color: var(--muted); }
.big b { color: var(--ink); font-family: var(--f-display); font-size: 24px; }
.done-today { color: var(--muted); font-size: 13.5px; }
.done-today b { color: var(--ok); }
.focus { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.fcol { min-width: 0; }
.fcol + .fcol, .focus + .fcol { margin-top: 0; }
.focus + .fcol { margin-top: 18px; }
.fh { margin: 0; font-family: var(--f-display); font-size: 17px; display: flex; align-items: baseline; gap: 8px; }
.fh b { font-size: 14px; font-weight: 600; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 9px; line-height: 22px; }
.fhint { margin: 2px 0 8px; }
.todo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.todo:last-child { border-bottom: 0; }
.todo:hover { background: var(--surface-2); }
.todo.sel { background: var(--accent-soft); }
.t-main { flex: 1 1 180px; min-width: 0; }
.t-main strong { font-size: 15px; overflow-wrap: anywhere; margin-right: 6px; }
.t-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.t-btns .btn { min-height: 36px; }
.kpiline { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.kpiline b { color: var(--ink); }
.kpi-close { background: var(--surface-2); border: 0; color: var(--accent); font-weight: 600; cursor: pointer; }

/* ---------- Import ---------- */
.imp { display: grid; gap: 12px; }
.imp .panel { margin-top: 0; }
.imp .kv .sp { flex: 1; }
.maptable { min-width: 520px; }
.maptable select { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 4px 6px; min-width: 190px; }
.radios { display: grid; gap: 4px; }
.radios label { display: flex; gap: 8px; align-items: center; }
.field.narrow { max-width: 360px; }
.chips-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-sum span { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 13px; }
.chips-sum .ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chips-sum .bad { background: var(--crit-soft); color: var(--crit); border-color: transparent; }
.ik { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); border: 1px solid var(--line); }
.ik.new { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.ik.error { background: var(--crit-soft); color: var(--crit); border-color: transparent; }
.ik.dup, .ik.dup_file { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.issues { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.issues .bad { color: var(--crit); }
.banner { padding: 6px 12px; margin-block: 10px 0; }
/* Une colonne vide passe après celle qui a du travail. */
.fcol.is-empty { order: 2; }
@media (max-width: 600px) {
  .top { position: static; gap: 6px 8px; padding-block: 8px; }
  .top .btn { min-height: 30px; padding: 3px 9px; font-size: 12.5px; }
  .top .brand { font-size: 18px; }
  .today-label { display: none; }
  .scope select { min-height: 30px; padding: 3px 8px; }
  .focus-h h2 { font-size: 19px; }
  .fcol.is-empty .empty { padding: 8px 12px; }
}

/* ---------- Equipo hoy · ranking · tú hoy ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; margin: 12px 0 0; }
.team:empty { display: none; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 0; display: grid; gap: 4px; align-content: start; }
.tcard .k-l { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tbig b { font-family: var(--f-display); font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; }
.tbig small { color: var(--muted); font-size: 14px; margin-left: 2px; }
.tcard.mine { border-color: var(--accent); }
.tcard .linkish { justify-self: start; font-size: 12.5px; }
.bar.full i { background: var(--ok); }
.ok { color: var(--ok); }
.rank ol { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 6px; }
.rank li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; }
.rank li .bar { grid-column: 2 / -1; margin-top: 0; height: 4px; }
.rank .pos { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.rank li.lead .pos { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rank .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank li.me .nm::after { content: " (tú)"; color: var(--muted); font-weight: 400; }
.rank .crown { color: var(--warn); }
.rank .sc { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rank .sc b { color: var(--ink); }
.kpis:empty { display: none; }
.person + .person { margin-top: 8px; }
.switch { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.today-label, .feed-day { text-transform: none; }
@media (max-width: 600px) {
  /* Les trois cartes défilent à l'horizontale : les listes du jour restent visibles sans faire défiler. */
  .team { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .tcard { scroll-snap-align: start; }
  .tbig b { font-size: 24px; }
}
