/* Privatam Hub — style inspiré du Suivi DCI : sobre, aéré, lisible. */
:root {
  --bg: #F5F5F7; --side: #FBFBFD; --surface: #FFFFFF; --surface2: #EDEDF0;
  --ink: #1D1D1F; --ink2: #6E6E73; --ink3: #86868B;
  --line: rgba(0,0,0,.08); --field: rgba(0,0,0,.16); --bar: rgba(245,245,247,.72);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.06);
  --ok: #1F7A36; --ok-bg: rgba(52,199,89,.14);
  --soon: #A04800; --soon-bg: rgba(255,159,10,.14);
  --late: #C4001A; --late-bg: rgba(255,59,48,.09);
  --accent: #3D0377; --on-accent: #FFFFFF; --accent-text: #3D0377; --accent-soft: rgba(61,3,119,.07);
  --brand: #FF500F;
  --switch-on: #34C759; --switch-off: #E9E9EB;
  --focus: 0 0 0 3px rgba(61,3,119,.35);
  --radius-l: 18px; --radius-m: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #000000; --side: #0E0E10; --surface: #1C1C1E; --surface2: #2C2C2E;
    --ink: #F5F5F7; --ink2: #AEAEB2; --ink3: #8E8E93;
    --line: rgba(255,255,255,.10); --field: rgba(255,255,255,.22); --bar: rgba(0,0,0,.72); --shadow: none;
    --ok: #30D158; --ok-bg: rgba(48,209,88,.16); --soon: #FFB340; --soon-bg: rgba(255,179,64,.14);
    --late: #FF6961; --late-bg: rgba(255,69,58,.16);
    --accent: #B9A0E8; --on-accent: #111113; --accent-text: #C9B4F0; --accent-soft: rgba(185,160,232,.16);
    --switch-on: #30D158; --switch-off: #39393D; --focus: 0 0 0 3px rgba(185,160,232,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --side: #0E0E10; --surface: #1C1C1E; --surface2: #2C2C2E;
  --ink: #F5F5F7; --ink2: #AEAEB2; --ink3: #8E8E93;
  --line: rgba(255,255,255,.10); --field: rgba(255,255,255,.22); --bar: rgba(0,0,0,.72); --shadow: none;
  --ok: #30D158; --ok-bg: rgba(48,209,88,.16); --soon: #FFB340; --soon-bg: rgba(255,179,64,.14);
  --late: #FF6961; --late-bg: rgba(255,69,58,.16);
  --accent: #B9A0E8; --on-accent: #111113; --accent-text: #C9B4F0; --accent-soft: rgba(185,160,232,.16);
  --switch-on: #30D158; --switch-off: #39393D; --focus: 0 0 0 3px rgba(185,160,232,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.47; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); }
h1, h2, h3 { margin: 0; letter-spacing: -0.022em; }
p { margin: 0; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Shell ---------- */
.app { min-height: 100vh; display: flex; }
.side {
  width: 252px; flex-shrink: 0; padding: 22px 14px; display: flex; flex-direction: column; gap: 26px;
  background: var(--side); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { padding: 6px 10px 0; }
.brand img { height: 21px; width: auto; display: block; }
.brand span { display: block; margin-top: 8px; font-size: 12px; font-weight: 500; color: var(--ink3); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin: 16px 12px 6px; font-size: 12px; font-weight: 600; color: var(--ink3); }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 11px; min-height: 40px; padding: 0 12px;
  border-radius: 10px; font-weight: 500; font-size: 14px; color: var(--ink); text-decoration: none;
}
.nav a > span { display: flex; align-items: center; gap: 11px; }
.nav a:hover { background: var(--surface2); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--late); }
.me {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-m);
  background: var(--surface); border: 1px solid var(--line);
}
.me .who { display: flex; flex-direction: column; min-width: 0; flex-grow: 1; }
.me .who b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12px; color: var(--ink2); }
.avatar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; background: var(--surface2); color: var(--ink2);
}
.avatar.strong { background: var(--accent); color: var(--on-accent); }
.icon-btn {
  width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer; background: transparent; color: var(--ink2);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 3vw, 36px); background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar .left { display: flex; align-items: center; gap: 10px; }
.topbar h1 { font-size: 18px; font-weight: 600; }
.menu-btn { display: none; }
.content { width: 100%; max-width: 1120px; margin: 0 auto; padding: 36px clamp(16px, 3vw, 36px) 64px; display: flex; flex-direction: column; gap: 28px; }
.content.wide { max-width: 1240px; }
.content.narrow { max-width: 920px; }
.scrim { display: none; }

@media (max-width: 860px) {
  .side { position: fixed; z-index: 40; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .app.nav-open .side { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.3); }
  .menu-btn { display: inline-flex; }
}

/* ---------- Typo & blocs ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .t { display: flex; flex-direction: column; gap: 6px; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--ink2); }
.display { font-size: 34px; font-weight: 600; letter-spacing: -0.028em; line-height: 1.12; }
.lead { font-size: 15px; color: var(--ink2); max-width: 70ch; }
.section { display: flex; flex-direction: column; gap: 14px; }
.section > h2 { font-size: 20px; font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); }
.card.pad { padding: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Boutons & contrôles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px;
  border: 0; border-radius: 980px; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  background: var(--surface2); color: var(--ink);
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--late-bg); color: var(--late); }
.btn.big { min-height: 48px; font-size: 15px; padding: 0 22px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 980px; background: var(--surface2); }
.seg button {
  border: 0; cursor: pointer; min-height: 32px; padding: 0 14px; border-radius: 980px; font-size: 13px; font-weight: 500;
  background: transparent; color: var(--ink2);
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink2); }
.input, .select {
  min-height: 44px; width: 100%; padding: 0 14px; border-radius: var(--radius-m); border: 1px solid var(--field);
  background: var(--surface); color: var(--ink); font-size: 15px;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.hint { font-size: 12px; font-weight: 400; color: var(--ink2); }

.switch {
  position: relative; flex-shrink: 0; width: 51px; height: 31px; border: 0; padding: 0; border-radius: 980px; cursor: pointer;
  background: var(--switch-off); transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: left .2s;
}
.switch[aria-checked="true"] { background: var(--switch-on); }
.switch[aria-checked="true"]::after { left: 22px; }

.pill { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 980px; background: var(--surface2); color: var(--ink2); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.soon { background: var(--soon-bg); color: var(--soon); }
.pill.late { background: var(--late-bg); color: var(--late); }
.pill.accent { background: var(--accent-soft); color: var(--accent-text); }

.alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: 14px; }
.alert.err { background: var(--late-bg); color: var(--late); }
.alert.info { background: var(--accent-soft); color: var(--accent-text); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- Accueil ---------- */
.todo { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; }
.todo-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.todo-head h2 { font-size: 17px; font-weight: 600; }
.todo-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; }
.todo-item.late { background: var(--late-bg); }
.todo-item.soon { background: var(--soon-bg); }
.todo-item .txt { display: flex; flex-direction: column; }
.todo-item .txt b { font-weight: 600; }
.todo-item .txt span { font-size: 13px; color: var(--ink2); }
.tile { display: flex; flex-direction: column; gap: 18px; padding: 22px; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.tile:hover { text-decoration: none; border-color: var(--field); }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tile-icon { width: 44px; height: 44px; border-radius: var(--radius-m); display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); }
.tile-icon svg { width: 22px; height: 22px; }
.tile-body { display: flex; flex-direction: column; gap: 4px; }
.tile-body b { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.tile-body span { font-size: 14px; color: var(--ink2); }
.tile-foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.tile-foot b { color: var(--accent-text); font-weight: 600; }
.quick { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; color: var(--ink); text-decoration: none; }
.quick:hover { text-decoration: none; border-color: var(--field); }
.quick b { font-weight: 600; }
.quick span { font-size: 13px; color: var(--ink2); }
.empty { padding: 40px 24px; text-align: center; color: var(--ink2); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.empty b { color: var(--ink); font-size: 17px; }

/* ---------- Tableaux d'accès ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .l-strong { background: var(--accent); }
.legend .l-mid { background: var(--ink3); }
.legend .l-none { border: 1px dashed var(--ink3); }
.legend .l-custom { width: 8px; height: 8px; border-radius: 50%; background: var(--soon); }
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { text-align: left; padding: 14px 12px; font-size: 12px; font-weight: 600; color: var(--ink3); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid th:first-child, table.grid td:first-child { padding-left: 20px; }
table.grid th:last-child, table.grid td:last-child { padding-right: 20px; }
.person { display: flex; align-items: center; gap: 12px; }
.person .n { display: flex; flex-direction: column; min-width: 0; }
.person .n b { font-weight: 600; }
.person .n span { font-size: 12px; color: var(--ink2); }
.st-active { color: var(--ok) !important; }
.st-invited { color: var(--soon) !important; }
.st-disabled { color: var(--late) !important; }
.lvl {
  min-height: 32px; min-width: 104px; padding: 0 12px; border-radius: 980px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px dashed var(--field); background: transparent; color: var(--ink3); white-space: nowrap;
}
.lvl.mid { border: 1px solid transparent; background: var(--surface2); color: var(--ink); }
.lvl.strong { border: 1px solid transparent; background: var(--accent); color: var(--on-accent); }
.lvl.custom { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--soon); }
.lvl[disabled] { cursor: default; opacity: .85; }
.cellwrap { display: flex; align-items: center; gap: 6px; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.reset-btn { background: var(--soon-bg); color: var(--soon); font-weight: 700; font-size: 16px; }
.approver { min-height: 34px; padding: 0 10px; font-size: 13px; border-radius: 10px; max-width: 200px; }

/* ---------- Fenêtres ---------- */
dialog {
  width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 22px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
dialog::backdrop { background: rgba(29,29,31,.38); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 26px 6px; }
.dlg-head h2 { font-size: 22px; font-weight: 600; }
.dlg-body { padding: 14px 26px 22px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; max-height: calc(100vh - 220px); }
.dlg-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 26px; background: var(--bg); border-top: 1px solid var(--line); }
.dlg-foot .actions { display: flex; gap: 10px; margin-left: auto; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .two { grid-template-columns: minmax(0, 1fr); } }
.acc-list { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.acc-row:last-child { border-bottom: 0; }
.acc-row b { font-size: 14px; }
.danger-zone { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }

/* ---------- Fichiers ---------- */
.src { overflow: hidden; }
.src-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 22px; }
@media (max-width: 900px) { .src-grid { grid-template-columns: minmax(0, 1fr); } }
.src-col { display: flex; flex-direction: column; gap: 16px; }
.src-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.src-title h2 { font-size: 19px; font-weight: 600; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv span:first-child { font-size: 12px; font-weight: 600; color: var(--ink3); }
.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.drop {
  flex-grow: 1; min-height: 200px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border-radius: 14px; cursor: pointer; border: 2px dashed var(--field); background: var(--surface2); color: var(--ink2); text-align: center; padding: 16px;
}
.drop:hover, .drop.over { border-color: var(--accent); color: var(--ink); }
.drop b { color: var(--ink); font-size: 15px; }
.drop svg { width: 28px; height: 28px; }
.preview { flex-grow: 1; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 14px; background: var(--surface2); }
.preview table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview td, .preview th { padding: 6px 0; text-align: left; border-bottom: 1px solid var(--line); }
.preview th { color: var(--ink3); font-weight: 600; }
.preview .num { text-align: right; }
.preview .up { color: var(--ok); }
.preview .down { color: var(--late); }
.src-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.versions { padding: 0 22px 14px; }
.versions li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.versions ul { list-style: none; margin: 0; padding: 0; }
details > summary { cursor: pointer; color: var(--accent-text); font-weight: 600; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ---------- Historique ---------- */
.day h3 { font-size: 13px; font-weight: 600; color: var(--ink3); margin-bottom: 10px; }
.ev { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev .ic { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.ev .ic svg { width: 18px; height: 18px; }
.ev .ic.files { background: var(--accent-soft); color: var(--accent-text); }
.ev .ic.access { background: var(--surface2); color: var(--ink2); }
.ev .ic.security { background: var(--late-bg); color: var(--late); }
.ev .ic.bonus { background: var(--ok-bg); color: var(--ok); }
.ev .ic.system { background: var(--surface2); color: var(--ink3); }
.ev .body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ev .diff { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.ev .diff .b { padding: 2px 8px; border-radius: 6px; background: var(--late-bg); color: var(--late); text-decoration: line-through; }
.ev .diff .a { padding: 2px 8px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); }
.ev time { flex-shrink: 0; font-size: 13px; color: var(--ink2); }
.search { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 980px; background: var(--surface); border: 1px solid var(--line); color: var(--ink2); }
.search input { border: 0; outline: none; background: transparent; width: 200px; font-size: 14px; color: var(--ink); }
.search svg { width: 16px; height: 16px; }

/* ---------- Pages d'accès (connexion, activation) ---------- */
.auth { min-height: 100vh; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.auth .logo { width: 220px; max-width: 70%; height: auto; }
.auth .logo.small { width: auto; height: 26px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px; display: flex; flex-direction: column; gap: 18px; border-radius: 22px; }
.auth-card h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.026em; }
.auth-foot { font-size: 12px; color: var(--ink2); text-align: center; max-width: 420px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code-boxes input { min-height: 56px; min-width: 0; text-align: center; border-radius: var(--radius-m); border: 1px solid var(--field); background: var(--surface); font-size: 24px; font-weight: 600; }
.code-boxes input:focus { outline: none; border: 2px solid var(--accent); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink2); }
.checks li::before { content: "○"; display: inline-block; width: 18px; }
.checks li.ok { color: var(--ok); }
.checks li.ok::before { content: "●"; }
.step { font-size: 13px; font-weight: 500; color: var(--ink2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 100;
  padding: 12px 18px; border-radius: 980px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500;
  transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--late); color: #FFFFFF; }
.reset-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* ---------- Outil intégré ---------- */
.tool-full { flex-grow: 1; display: flex; }
.tool-frame { flex-grow: 1; width: 100%; min-height: calc(100vh - 57px); border: 0; background: var(--bg); display: block; }

/* ============ Outils natifs (Dashboard CA, Bonus, P&L) ============ */
:root { --y24: #AEAEB2; --y25: #0071E3; --y26: var(--accent); --proj: rgba(61,3,119,.22); --pos-bar: rgba(52,199,89,.55); --neg-bar: rgba(255,59,48,.5); }
:root[data-theme="dark"] { --y24: #8E8E93; --y25: #0A84FF; --proj: rgba(185,160,232,.38); --pos-bar: rgba(48,209,88,.55); --neg-bar: rgba(255,69,58,.55); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --y24: #8E8E93; --y25: #0A84FF; --proj: rgba(185,160,232,.38); --pos-bar: rgba(48,209,88,.55); --neg-bar: rgba(255,69,58,.55); } }
.content.tool { max-width: 1200px; gap: 20px; padding-top: 0; }
.tool-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-top: 22px; }
.tool-head .fresh { font-size: 13px; color: var(--ink2); }
.tool-head .ctrls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.utabs { display: flex; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-top: -4px; }
.utabs button { flex-shrink: 0; border: 0; background: transparent; cursor: pointer; padding: 10px 0 12px; font-size: 14px; font-weight: 500; color: var(--ink2); border-bottom: 2px solid transparent; }
.utabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kgrid.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .kgrid, .kgrid.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kgrid, .kgrid.k3 { grid-template-columns: minmax(0, 1fr); } }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 20px; }
.kpi .l { font-size: 13px; font-weight: 500; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.kpi .v { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.kpi .s { font-size: 13px; color: var(--ink2); }
.up { color: var(--ok); font-weight: 600; } .down { color: var(--late); font-weight: 600; } .flat { color: var(--ink3); font-weight: 600; }
.panel { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.panel h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.panel .sub { font-size: 13px; color: var(--ink2); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart { width: 100%; height: auto; display: block; min-width: 620px; }
.chart-wrap { overflow-x: auto; }
.chart text { font-family: inherit; font-size: 11px; fill: var(--ink3); }
.chart .xl { font-size: 12px; fill: var(--ink2); }
.chart .val { font-size: 13px; font-weight: 600; fill: var(--ink); }
.chart .gl { stroke: var(--line); }
.chart .zero { stroke: var(--ink3); }
.chart .y2024 { fill: var(--y24); } .chart .y2025 { fill: var(--y25); } .chart .y2026 { fill: var(--y26); }
.chart .s2024 { stroke: var(--y24); } .chart .s2025 { stroke: var(--y25); } .chart .s2026 { stroke: var(--y26); }
.chart .real { fill: var(--accent); } .chart .proj { fill: var(--proj); }
.chart .pos { fill: var(--pos-bar); } .chart .neg { fill: var(--neg-bar); }
.chart .acc-line { stroke: var(--accent); fill: none; stroke-width: 2.5; } .chart .acc-dot { fill: var(--accent); }
.chart .ref25 { stroke: var(--y25); stroke-dasharray: 6 5; stroke-width: 1.5; } .chart .ref24 { stroke: var(--ink3); stroke-dasharray: 6 5; stroke-width: 1.5; }
.chart .reflab25 { fill: var(--y25); font-size: 12px; } .chart .reflab24 { fill: var(--ink2); font-size: 12px; }
.chart .fx0 { stroke: var(--ink); } .chart .fx1 { stroke: #C99A00; } .chart .fx2 { stroke: #E08600; } .chart .fx3 { stroke: #E5622D; } .chart .fx4 { stroke: #D70015; } .chart .fx5 { stroke: #9E0012; }
.chart .fxt { stroke-width: 2.5; } .chart .leg { font-size: 12px; fill: var(--ink2); } .chart .legh { font-size: 12px; font-weight: 600; fill: var(--ink); }
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.y2024 { background: var(--y24); } .sw.y2025 { background: var(--y25); } .sw.y2026, .sw.real { background: var(--accent); } .sw.proj { background: var(--proj); } .sw.ok { background: var(--switch-on); }
.ychip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px; border-radius: 980px; cursor: pointer; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.ychip[aria-pressed="false"] { background: transparent; color: var(--ink3); }
.ychip[aria-pressed="false"] .sw { background: var(--line); }
.track { height: 8px; border-radius: 6px; background: var(--surface2); overflow: hidden; display: block; }
.track.t10 { height: 10px; } .track.t26 { height: 26px; border-radius: 8px; position: relative; }
.fill { display: block; height: 100%; border-radius: 6px; background: var(--accent); width: 0; }
.fill.ok { background: var(--ok); } .fill.soon { background: var(--soon); } .fill.y2024 { background: var(--y24); } .fill.y2025 { background: var(--y25); }
.hbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px 56px; gap: 14px; align-items: center; font-size: 14px; }
.hbar b { text-align: right; font-weight: 600; } .hbar .p { text-align: right; color: var(--ink2); font-size: 13px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: right; padding: 12px; font-size: 12px; font-weight: 600; color: var(--ink3); }
table.data td { text-align: right; padding: 11px 12px; border-top: 1px solid var(--line); }
table.data th:first-child, table.data td:first-child { text-align: left; padding-left: 22px; }
table.data th:last-child, table.data td:last-child { padding-right: 22px; }
table.data tr.grp td { background: var(--surface2); font-weight: 700; font-size: 13px; }
table.data tr.tot td { background: var(--accent-soft); font-weight: 700; }
table.data tr.dim td { color: var(--ink3); }
table.data .strong { font-weight: 600; } table.data .muted { color: var(--ink2); }
table.data .small { font-size: 12px; }
.tag { margin-left: 8px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 980px; background: var(--surface2); color: var(--ink2); }
.tgt { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; align-items: center; }
.tgt span:last-child { text-align: right; font-size: 13px; color: var(--ink2); }
details.more > summary { padding: 14px 22px; color: var(--accent-text); font-weight: 600; font-size: 14px; }
.footnote { font-size: 12px; color: var(--ink2); }
/* Bonus natif */
.hsplit { grid-template-columns: 150px minmax(0, 1fr); }
.split { display: flex; height: 30px; border-radius: 8px; overflow: hidden; }
.split .sb, .split .ss { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; color: #fff; }
.split .sb { background: var(--accent); color: var(--on-accent); } .split .ss { background: var(--switch-on); }
.pcard { display: flex; flex-direction: column; gap: 10px; padding: 20px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.pcard:hover, button.quick:hover { border-color: var(--field); }
button.quick { text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.pc-top { display: flex; justify-content: space-between; gap: 12px; } .pc-top > span:first-child { display: flex; flex-direction: column; }
.pc-v { font-size: 28px; font-weight: 600; letter-spacing: -0.025em; }
.block { display: block; }
table.data tr.click { cursor: pointer; } table.data tr.click:hover td { background: var(--surface2); }
.grid-rev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid-rev { grid-template-columns: minmax(0, 1fr); } }
.listrow { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink); text-align: left; }
.listrow.on { background: var(--accent-soft); font-weight: 600; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--surface2); font-size: 12px; color: var(--ink2); }
.mini b { font-size: 20px; color: var(--ink); } .mini b.up { color: var(--ok); } .mini b.down { color: var(--late); }
.qrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0; font-size: 14px; }
.input.area { min-height: 72px; padding: 10px 12px; resize: vertical; }
.wfrow { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.wfrow b { font-weight: 600; } .wfrow.strong { font-weight: 600; }
.wfrow.net { margin-top: 4px; padding: 14px; border: 0; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.btn.back { min-height: 30px; padding: 0 12px; margin-right: 8px; }
.h3 { grid-template-columns: 170px minmax(0, 1fr) 90px; }
/* P&L natif */
table.data.pl td.ind { padding-left: 40px; }
table.data tr.dim td { font-style: italic; }
.toolbar .ctrls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tool-frame.settings { min-height: 80vh; border-radius: 18px; border: 1px solid var(--line); }
.chev { color: var(--ink3); margin-right: 6px; }
.dh { font-size: 14px; font-weight: 600; margin-top: 6px; }
.dco { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.dco-h { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.dac { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink2); }
.input.num { width: 110px; min-height: 36px; text-align: right; }
/* Graphiques interactifs */
.cbox { position: relative; height: 320px; } .cbox.small { height: 240px; } .cbox.tall { height: 380px; }
.scope { display: inline-flex; align-items: center; gap: 8px; } .scope .select { min-height: 34px; width: auto; max-width: 280px; font-size: 13px; padding: 0 10px; border-radius: 980px; }
.grid-ana { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 980px) { .grid-ana { grid-template-columns: minmax(0, 1fr); } }
.verdict { justify-content: center; } .vbig { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.vbig div { display: flex; flex-direction: column; gap: 2px; } .vbig b { font-size: 30px; letter-spacing: -0.025em; }
.vrows { display: flex; flex-direction: column; } .vrows div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.vrows span { display: inline-flex; align-items: center; gap: 8px; }
table.data tr.sel td { background: var(--accent-soft); font-weight: 600; } table.data tr.grp.click:hover td, table.data tr.grp.sel td { background: var(--accent-soft); }
.pill.accent { background: var(--accent-soft); color: var(--accent-text); }
.fxctl { display: flex; align-items: center; gap: 12px; } .fxctl input[type=range] { width: 220px; accent-color: var(--accent); } .fxctl b { min-width: 110px; }
.cmpsel { min-height: 34px; width: auto; max-width: 220px; font-size: 13px; padding: 0 10px; border-radius: 980px; }

/* ============ Summary « à la DCI Tracker » (tuiles) ============ */
:root { --b-green: #248A3D; --b-red: #D70015; --b-blue: #0071E3; --b-teal: #0E8FA8; --b-orange: #C77700; --b-purple: #3D0377; --b-pink: #C2185B; --b-indigo: #5856D6; }
:root[data-theme="dark"] { --b-green: #30D158; --b-red: #FF453A; --b-blue: #0A84FF; --b-teal: #64D2FF; --b-orange: #FF9F0A; --b-purple: #BF5AF2; --b-pink: #FF375F; --b-indigo: #7D7AFF; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --b-green: #30D158; --b-red: #FF453A; --b-blue: #0A84FF; --b-teal: #64D2FF; --b-orange: #FF9F0A; --b-purple: #BF5AF2; --b-pink: #FF375F; --b-indigo: #7D7AFF; } }
.b-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 8px; }
.b-title { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.b-alert { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: var(--soon-bg); font-size: 14px; }
.b-alert.ok { background: var(--ok-bg); } .b-alert.bad { background: var(--late-bg); }
.b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.b-tile { position: relative; background: var(--surface); border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); cursor: pointer;
  display: flex; flex-direction: column; min-height: 150px; transition: transform .15s, box-shadow .15s; outline: none; }
.b-tile:hover, .b-tile:focus-visible { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 14px 34px rgba(0,0,0,.09); }
.b-tile:not([data-b-open]) { cursor: default; } .b-tile:not([data-b-open]):hover { transform: none; }
.b-tile.wide { grid-column: span 2; }
@media (max-width: 600px) { .b-tile.wide { grid-column: auto; } }
.b-tt { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; color: var(--c); }
.b-tt i { font-style: normal; color: var(--ink3); font-size: 20px; font-weight: 400; line-height: 1; }
.b-tv { font-size: 30px; font-weight: 700; letter-spacing: -0.035em; margin-top: 10px; line-height: 1.1; }
.b-tv small { font-size: .5em; font-weight: 600; color: var(--ink3); margin-left: 4px; }
.b-ts { font-size: 13px; color: var(--ink2); margin-top: 3px; }
.b-mini { position: relative; height: 110px; margin-top: auto; padding-top: 10px; }
.b-tile.wide .b-mini { height: 130px; }
.b-ins { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.b-ins li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.b-ins li::before { content: "i"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface2); color: var(--ink2); font-weight: 700; font-size: 12px; }
.b-ins li.good::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.b-ins li.bad::before { content: "!"; background: var(--late-bg); color: var(--late); }
.b-ins li.warn::before { content: "!"; background: var(--soon-bg); color: var(--soon); }
.b-grid.editing .b-tile { cursor: grab; animation: jiggle .32s ease-in-out infinite alternate; box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); user-select: none; }
.b-grid.editing .b-tile:nth-child(2n) { animation-delay: -.16s; animation-direction: alternate-reverse; }
.b-grid.editing .b-tile canvas { pointer-events: none; }
.b-tile.dragging { opacity: .4; }
@keyframes jiggle { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
@media (prefers-reduced-motion: reduce) { .b-grid.editing .b-tile { animation: none; } }
.c-green{--c:var(--b-green)}.c-red{--c:var(--b-red)}.c-blue{--c:var(--b-blue)}.c-teal{--c:var(--b-teal)}.c-orange{--c:var(--b-orange)}.c-purple{--c:var(--b-purple)}.c-pink{--c:var(--b-pink)}.c-indigo{--c:var(--b-indigo)}.c-gray{--c:var(--ink2)}
.sumbox { display: flex; flex-direction: column; gap: 14px; }
:root { --fx0: #1D1D1F; --fx1: #C99A00; --fx2: #E08600; --fx3: #E5622D; --fx4: #D70015; --fx5: #9E0012; }
:root[data-theme="dark"] { --fx0: #F5F5F7; --fx1: #FFD60A; --fx2: #FF9F0A; --fx3: #FF7A45; --fx4: #FF453A; --fx5: #D70015; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --fx0: #F5F5F7; --fx1: #FFD60A; --fx2: #FF9F0A; --fx3: #FF7A45; --fx4: #FF453A; --fx5: #D70015; } }
.ratechips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rchip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border-radius: 980px; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); cursor: pointer; font-size: 13px; font-weight: 600; }
.rchip i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.rchip.fx0 i { background: var(--fx0); } .rchip.fx1 i { background: var(--fx1); } .rchip.fx2 i { background: var(--fx2); } .rchip.fx3 i { background: var(--fx3); } .rchip.fx4 i { background: var(--fx4); } .rchip.fx5 i { background: var(--fx5); }
.rchip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink3); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.atrate { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.atrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.atrow div { display: flex; flex-direction: column; gap: 2px; } .atrow b { font-size: 24px; letter-spacing: -0.02em; }
@media (max-width: 700px) { .atrow { grid-template-columns: minmax(0, 1fr); } }
details.card.more { padding: 0; }
.ratechips .refs { margin-left: auto; display: inline-flex; gap: 14px; }
.refleg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink2); }
.refleg i { width: 18px; border-top: 2px dashed var(--y25); display: inline-block; } .refleg i.r24 { border-top-color: var(--ink3); }
/* Margin analysis : lecture immédiate */
.mhero { gap: 14px; } .mbig { margin: 0; font-size: 22px; line-height: 1.35; letter-spacing: -0.015em; } .mbig b { font-weight: 700; }
.mpath { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mpath > div { display: flex; flex-direction: column; padding: 10px 16px; border-radius: 14px; background: var(--surface2); min-width: 92px; }
.mpath > div b { font-size: 22px; letter-spacing: -0.02em; } .mpath > div.now { background: var(--accent-soft); }
.mstep { font-size: 13px; }
.mover { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto 80px; gap: 12px; align-items: center; padding: 11px 4px; border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.mover:hover { background: var(--surface2); } .mover b { text-align: right; }
details.card.more > summary { cursor: pointer; padding: 16px 22px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; }
details.card.more > summary::after { content: "›"; color: var(--ink3); transform: rotate(90deg); transition: transform .15s; } details.card.more[open] > summary::after { transform: rotate(-90deg); }
details.card.more > summary::-webkit-details-marker { display: none; }
:root { --proj-hover: rgba(61,3,119,.36); } :root[data-theme="dark"] { --proj-hover: rgba(185,160,232,.55); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --proj-hover: rgba(185,160,232,.55); } }
.rleg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink2); padding: 0 4px; }
.rleg i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.rleg.fx0 i { background: var(--fx0); } .rleg.fx1 i { background: var(--fx1); } .rleg.fx2 i { background: var(--fx2); } .rleg.fx3 i { background: var(--fx3); } .rleg.fx4 i { background: var(--fx4); } .rleg.fx5 i { background: var(--fx5); }
/* Sélecteur de comparaison discret (P&L) */
.cmpline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmp-pick { appearance: none; -webkit-appearance: none; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2386868B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; min-height: 30px; padding: 0 28px 0 12px; border-radius: 980px; cursor: pointer; }
.cmp-pick:hover { border-color: var(--field); } .cmp-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Détail P&L (fenêtre) — contenu du P&L d'origine, mis au propre */
dialog.pl-dlg { width: min(760px, 94vw); }
.pld { max-height: 70vh; overflow: auto; }
.pld table, .pld-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.pld td, .pld th { padding: 7px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.pld td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pld b { font-weight: 600; } .pld tr:first-child td { border-top: 0; }
.pld .pld-link { cursor: pointer; color: var(--accent-text); } .pld .pld-link:hover td { background: var(--accent-soft); }
.pld .pld-link td:first-child::after { content: " ›"; color: var(--ink3); }
.pld div { line-height: 1.45; }
.pld td:only-child { text-align: left; white-space: normal; }
.pld div:has(> span + span), .pld div:has(> b + span), .pld div:has(> span + b) { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; border-top: 1px solid var(--line); }
.pld div:has(> span + span) > span:last-child, .pld div:has(> b + span) > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pld td > span:last-child:not(:first-child) { color: var(--ink3); font-size: 12px; }
.pld summary { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px solid var(--line); cursor: pointer; font-weight: 600; list-style: none; }
.pld summary::-webkit-details-marker { display: none; }
.pld summary > span:first-child::before { content: "›"; display: inline-block; width: 14px; color: var(--ink3); transition: transform .15s; }
.pld details[open] > summary > span:first-child::before { transform: rotate(90deg); }
.pld summary > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pld summary span span { color: var(--ink3); font-weight: 400; }
.pld details > div { padding-left: 14px; font-size: 12.5px; }
/* Choix des colonnes du P&L : pilules + menu, façon Apple */
.pk-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); }
.pk { position: relative; display: inline-block; }
.pk-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px 0 14px; border: 0; border-radius: 980px; background: var(--surface2); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s; }
.pk-btn:hover, .pk-btn[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-text); }
.pk-btn svg { color: var(--ink3); } .pk-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.pk-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 210px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0,0,0,.14); display: flex; flex-direction: column; }
.pk-menu[hidden] { display: none; }
.pk-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.pk-opt:hover { background: var(--surface2); }
.pk-opt[aria-selected="true"] { font-weight: 600; color: var(--accent-text); }
.pk-opt[aria-selected="true"]::after { content: "✓"; color: var(--accent-text); }
/* Détail P&L : hiérarchie claire (groupes > personnes > écritures) */
.pld-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; }
.pld-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.pld-sub { font-size: 13px; color: var(--ink2); }
.pld-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface2); font-size: 14px; color: var(--ink2); }
.pld-total b { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.pld details.grp { margin-top: 14px; }
.pld details.grp > summary { border-top: 0; padding: 6px 2px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); }
.pld details.grp > summary span span { text-transform: none; letter-spacing: 0; }
.pld details.grp > summary > span:last-child { color: var(--ink); font-size: 13px; letter-spacing: 0; text-transform: none; }
.pld details.grp > div, .pld details.grp > details { padding-left: 0; }
.pld details.per > summary { font-weight: 500; color: var(--ink); padding: 9px 4px; border-radius: 8px; }
.pld details.per > summary:hover { background: var(--surface2); }
.pld details.per > summary > span:last-child { font-weight: 600; color: var(--ink); }
.pld details.per[open] > summary { background: var(--accent-soft); }
.pld .ent { display: flex; justify-content: space-between; gap: 14px; margin-left: 18px; padding: 5px 10px; border-left: 2px solid var(--line); border-top: 0; font-size: 12.5px; color: var(--ink2); }
.pld .ent span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pld details summary > span:first-child::before { color: var(--ink3); }
.pld .pld-total { padding: 12px 16px; border-top: 0; margin-bottom: 4px; }
.pld .pld-head > div { border-top: 0; }
.build { font-size: 11px; color: var(--ink3); padding: 6px 12px 0; }
/* Détail P&L v2 : listes groupées façon Réglages iOS */
.pld .pld-total { background: none; margin-top: 12px; padding: 0 2px 4px; border-radius: 0; font-size: 13px; }
.pld .pld-total b { font-size: 22px; }
.pld details.grp { margin-top: 12px; background: var(--surface2); border-radius: 14px; padding: 2px 6px 6px; }
.pld details.grp > summary { padding: 12px 8px 10px; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); border-top: 0; }
.pld details.grp > summary > span:first-child::before { display: none; }
.pld details.grp > summary span span { color: var(--ink3); font-weight: 400; }
.pld details.grp > summary > span:last-child { font-size: 14px; font-weight: 700; }
.pld details.per { background: var(--surface); border-radius: 10px; margin-top: 4px; }
.pld details.per > summary { border-top: 0; padding: 10px 10px; border-radius: 10px; }
.pld details.per > summary:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pld details.per[open] > summary { background: var(--surface); box-shadow: none; }
.pld details.per[open] { box-shadow: inset 0 0 0 1px var(--accent-soft); }
.pld .ent { margin: 0 10px 0 28px; padding: 6px 4px; border-left: 0; border-top: 1px solid var(--line); }
.pld .ent:last-child { margin-bottom: 6px; }
.pld .pld-head { padding-bottom: 0; }
.pld .pld-head + div > details.grp:first-of-type, .pld .pld-head + details.grp { margin-top: 6px; }
.pld .pld-head + div { padding: 0; border: 0; }
.dlg-body.pld { gap: 0; } .pld details.grp:first-of-type { margin-top: 10px; }
/* Détail P&L v3 : d'abord l'essentiel en barres, le reste replié */
.pv { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pv-leg { display: flex; gap: 16px; font-size: 12px; color: var(--ink2); } .pv-leg span { display: inline-flex; align-items: center; gap: 6px; }
.pv-leg i, .pv-bar i { display: inline-block; border-radius: 4px; }
.pv-leg i { width: 10px; height: 10px; }
.pv i.g0 { background: var(--accent); } .pv i.g1 { background: var(--b-teal); } .pv i.g2 { background: var(--b-orange); }
.pv-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 90px 40px; gap: 12px; align-items: center; font-size: 13.5px; border: 0; padding: 0; }
.pv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.pv-bar { height: 10px; border-radius: 6px; background: var(--surface2); overflow: hidden; display: block; }
.pv-bar i { height: 100%; display: block; }
.pv-row b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; } .pv-pct { text-align: right; font-size: 12px; color: var(--ink3); }
.pv-more { font-size: 12px; color: var(--ink3); padding-left: 2px; border: 0; }
@media (max-width: 600px) { .pv-row { grid-template-columns: 110px minmax(0, 1fr) 72px; } .pv-pct { display: none; } }
.pld details.pld-all { margin-top: 18px; border-top: 1px solid var(--line); }
.pld details.pld-all > summary { border-top: 0; padding: 14px 2px 6px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.pld details.pld-all > summary::before { content: none; }
.pld .pv .pv-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 90px 40px; gap: 12px; padding: 0; border-top: 0; justify-content: initial; }
.pld .pv .pv-leg { display: flex; justify-content: flex-start; gap: 16px; padding: 0 0 2px; border-top: 0; }
.pld .pv .pv-bar { height: 10px; }
@media (max-width: 600px) { .pld .pv .pv-row { grid-template-columns: 110px minmax(0, 1fr) 72px; } }
.pv-cap { font-size: 13px; color: var(--ink2); border: 0; padding: 0; }
.pld .pv .pv-row.pv-go { cursor: pointer; border-radius: 8px; } .pld .pv .pv-row.pv-go:hover { background: var(--surface2); }
.pld .pv .pv-row.pv-go .pv-pct { font-size: 18px; color: var(--ink3); }
.pld .pv .pv-link { align-self: flex-start; margin-top: 4px; }
.pld .pv .pv-tot { display: flex; justify-content: space-between; padding: 10px 0 0; margin-top: 2px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink2); }
.pld .pv .pv-tot b { color: var(--ink); font-size: 15px; }
.pld .pv .pv-hint { font-size: 12px; color: var(--ink3); border: 0; padding: 0; }
/* ============ Leave ============ */
.lv-hello { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.lv-tiles .b-tile { min-height: 120px; cursor: default; } .lv-tiles .b-tile:hover { transform: none; }
.lv-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--surface2); }
.lv-bar i { display: block; height: 100%; } .lv-bar i.t { background: var(--ink2); } .lv-bar i.p { background: var(--accent); } .lv-bar i.q { background: var(--soon); }
.sw.lv-t { background: var(--ink2); } .sw.lv-p { background: var(--accent); } .sw.lv-q { background: var(--soon); } .sw.lv-l { background: var(--surface2); border: 1px solid var(--line); }
.lv-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 12px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 14px; }
.lv-days { text-align: right; } .lv-st { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.lv-hol { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.lv-form .lv-dates { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.lv-form .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); }
.lv-prev { padding: 12px 14px; border-radius: 12px; background: var(--surface2); font-size: 14px; }
.lv-req-top { display: flex; gap: 14px; } .lv-req-main { display: flex; flex-direction: column; gap: 2px; } .warn { color: var(--soon); font-weight: 600; }
.lv-req .ctrls .input { flex: 1; min-width: 180px; }
.btn.danger { color: var(--late); }
.lv-search { max-width: 280px; } .lv-h3 { font-size: 14px; font-weight: 600; margin-top: 8px; } .lv-list { display: flex; flex-direction: column; }
.lc-grid { display: grid; min-width: 900px; font-size: 11px; gap: 0; }
.lc-grid[data-n="28"] { grid-template-columns: 170px repeat(28, minmax(20px, 1fr)); } .lc-grid[data-n="29"] { grid-template-columns: 170px repeat(29, minmax(20px, 1fr)); }
.lc-grid[data-n="30"] { grid-template-columns: 170px repeat(30, minmax(20px, 1fr)); } .lc-grid[data-n="31"] { grid-template-columns: 170px repeat(31, minmax(20px, 1fr)); }
.lc-h { text-align: center; padding: 6px 0; font-weight: 600; color: var(--ink2); display: flex; flex-direction: column; } .lc-h small { font-weight: 400; color: var(--ink3); } .lc-h.we { color: var(--ink3); }
.lc-name { padding: 8px 10px 8px 0; font-size: 13px; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lc-name small { margin-left: 6px; color: var(--ink3); font-size: 10px; }
.lc-c { border-top: 1px solid var(--line); min-height: 30px; position: relative; }
.lc-c.we { background: var(--surface2); } .lc-c.hol { background: rgba(14,143,168,.16); }
.lc-c.away::after, .lc-c.pend::after, .lc-c.sick::after { content: ""; position: absolute; inset: 7px 1px; border-radius: 4px; background: var(--accent); }
.lc-c.pend::after { background: var(--soon); } .lc-c.sick::after { background: var(--late); } .lc-c.half::after { opacity: .5; }
.sw.lc-away { background: var(--accent); } .sw.lc-pend { background: var(--soon); } .sw.lc-sick { background: var(--late); } .sw.lc-hol { background: rgba(14,143,168,.35); }
.card.panel .ctrls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card.panel .ctrls h2 { margin: 0 6px; }
.card.panel .ctrls .input { width: auto; min-width: 160px; }
.card.panel .ctrls .input.num { min-width: 0; width: 90px; }
/* ============ Expenses ============ */
.ex-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; border: 2px dashed var(--field); border-radius: 18px; background: var(--surface2); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.ex-drop:hover, .ex-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.ex-drop-ic svg { width: 30px; height: 30px; color: var(--accent-text); }
.ex-form { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.ex-form:not(:has(.ex-thumb)) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) { .ex-form { grid-template-columns: minmax(0, 1fr); } }
.ex-thumb { border: 1px solid var(--line); border-radius: 14px; padding: 0; overflow: hidden; background: var(--surface2); cursor: zoom-in; max-height: 320px; display: flex; align-items: center; justify-content: center; min-height: 140px; }
.ex-thumb img { width: 100%; height: auto; display: block; }
.ex-fields { display: flex; flex-direction: column; gap: 12px; } .ex-fields .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); }
.ex-row { display: flex; gap: 12px; flex-wrap: wrap; } .ex-row .field { flex: 1; min-width: 120px; } .ex-mil { font-size: 22px; color: var(--ink); }
.ex-r { display: grid; grid-template-columns: 22px 46px minmax(0, 1fr) 120px auto; gap: 12px; align-items: center; padding: 11px 22px; border-top: 1px solid var(--line); font-size: 14px; }
.ex-ck { width: 18px; height: 18px; accent-color: var(--accent); }
.ex-mini { width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; padding: 0; background: var(--surface2); cursor: zoom-in; display: flex; align-items: center; justify-content: center; color: var(--ink3); font-size: 12px; }
.ex-mini img { width: 100%; height: 100%; object-fit: cover; } .ex-mini.none { cursor: default; }
.ex-pdf { font-size: 11px; font-weight: 700; color: var(--late); }
.ex-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ex-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; } .ex-flags .pill { font-size: 11px; }
.ex-amt { text-align: right; } .ex-st { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.ex-exp { display: flex; align-items: baseline; gap: 10px; } .ex-exp b { font-size: 34px; letter-spacing: -0.03em; }
.ex-view { display: flex; flex-direction: column; gap: 12px; align-items: center; } .ex-view img { max-width: 100%; max-height: 70vh; border-radius: 12px; }
@media (max-width: 700px) { .ex-r { grid-template-columns: 22px 40px minmax(0, 1fr); } .ex-amt, .ex-st { grid-column: 3; text-align: left; justify-content: flex-start; } }
/* Expenses : déplacements */
.ex-trips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ex-trip { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); min-height: 130px; transition: transform .15s; }
.ex-trip:hover { transform: translateY(-2px); } .ex-trip-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ex-trip-v { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin-top: auto; }
.ex-trip-new { border: 2px dashed var(--field); background: transparent; box-shadow: none; justify-content: center; align-items: center; text-align: center; color: var(--accent-text); }
.ex-trip-sum { display: flex; gap: 22px; flex-wrap: wrap; } .ex-trip-sum div { display: flex; flex-direction: column; } .ex-trip-sum b { font-size: 20px; letter-spacing: -0.02em; }
.ex-trip-sum div:first-child b { font-size: 28px; }
.ex-set .input { min-height: 32px; font-size: 13px; padding: 0 8px; width: 100%; } .ex-set .input.acc { width: 96px; } .ex-set .input.code { width: 64px; } .ex-set .select { min-height: 32px; font-size: 13px; }
.ex-set td { padding: 6px 8px; } .ex-set td:first-child { padding-left: 22px; }
.ex-cat .select { min-height: 30px; font-size: 12.5px; max-width: 280px; margin-top: 4px; }
.ex-filters .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink2); }
.ex-inc { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.ex-xbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.ex-grp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; }
/* ============ My space ============ */
.pd-hero { display: flex; gap: 22px; align-items: center; padding: 24px; }
.pd-av { width: 78px; height: 78px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); flex-shrink: 0; }
.pd-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .pd-who .b-title { margin: 0; }
.pd-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 10px; } .pd-facts div { display: flex; flex-direction: column; } .pd-facts b { font-size: 14px; font-weight: 600; }
.pd-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 22px; border-top: 1px solid var(--line); font-size: 14px; }
.pd-ic { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--surface2); color: var(--ink2); }
.pd-ic.pdf { color: var(--late); background: var(--late-bg); } .pd-main { display: flex; flex-direction: column; min-width: 0; }
.pd-k { padding: 8px 22px 0; } .pd-row .select { max-width: 240px; }
@media (max-width: 640px) { .pd-hero { flex-direction: column; align-items: flex-start; } .pd-row { grid-template-columns: 42px minmax(0, 1fr); } .pd-row .ctrls, .pd-row .select { grid-column: 2; } }
.card > .panel.panel-head { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; flex-wrap: wrap; }
.card > .panel.panel-head > div { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
/* Accueil */
.home-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.home-act { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); transition: transform .15s; }
.home-act:hover { transform: translateY(-2px); } .home-act b { font-size: 15px; }
.home-wide { max-width: 640px; }
#meBox .b-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
/* Bonus · coûts détaillés */
.bc-line { border-top: 1px solid var(--line); }
.bc-line > summary { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(0, 2fr) 90px 110px; gap: 14px; align-items: center; padding: 13px 22px; cursor: pointer; list-style: none; font-size: 14px; }
.bc-line > summary::-webkit-details-marker { display: none; }
.bc-line > summary:hover { background: var(--surface2); }
.bc-name::before { content: "›"; display: inline-block; width: 14px; color: var(--ink3); transition: transform .15s; } .bc-line[open] .bc-name::before { transform: rotate(90deg); }
.bc-bar { height: 8px; border-radius: 5px; background: var(--surface2); overflow: hidden; display: block; } .bc-bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.bc-line > summary b { text-align: right; } .bc-25 { text-align: right; }
.bc-detail { padding: 4px 22px 14px 50px; display: flex; flex-direction: column; }
.bc-e { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.bc-e span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
@media (max-width: 640px) { .bc-line > summary { grid-template-columns: minmax(0, 1fr) 80px; } .bc-bar, .bc-25 { display: none; } .bc-detail { padding-left: 22px; } }
.bc-line > summary { color: var(--ink); } .bc-line > summary b { color: var(--ink); }
.bc-detail .bc-more { display: none; } .bc-detail.all .bc-more { display: flex; } .bc-detail .bc-all { align-self: flex-start; margin-top: 8px; }
.bc-e span.up { color: var(--ok); }
.bc-head { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(0, 1.6fr) 90px 110px 100px; gap: 14px; padding: 8px 22px; font-size: 12px; color: var(--ink3); border-top: 1px solid var(--line); }
.bc-head span:nth-child(n+3) { text-align: right; }
.bc-line > summary { grid-template-columns: minmax(150px, 1.2fr) minmax(0, 1.6fr) 90px 110px 100px; }
.bc-full { text-align: right; color: var(--ink2); }
@media (max-width: 640px) { .bc-head { display: none; } .bc-line > summary { grid-template-columns: minmax(0, 1fr) 80px; } .bc-full { display: none; } }
/* Bonus · simulateur et alertes KPI */
.sim-big { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.sim-big > div { display: flex; flex-direction: column; } .sim-big b { font-size: 36px; letter-spacing: -0.03em; } .sim-arrow { font-size: 28px; color: var(--ink3); }
.sim-range { width: 100%; accent-color: var(--accent); height: 28px; }
.sim-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); }
.sim-inv { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 24px; align-items: center; }
.sim-inv .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); }
.sim-ans { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 14px; background: var(--accent-soft); } .sim-ans b { font-size: 30px; letter-spacing: -0.03em; color: var(--accent-text); }
@media (max-width: 640px) { .sim-inv { grid-template-columns: minmax(0, 1fr); } }
.kpi-al .kpi-al-t { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-right: 8px; color: var(--late); }
.b-alert.warn .kpi-al-t { color: var(--soon); } .b-alert.warn { background: var(--soon-bg); }
/* Bonus · simulateur et alertes KPI */
.sim-big { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.sim-big > div { display: flex; flex-direction: column; } .sim-big b { font-size: 36px; letter-spacing: -0.03em; } .sim-arrow { font-size: 28px; color: var(--ink3); }
.sim-range { width: 100%; accent-color: var(--accent); height: 28px; }
.sim-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); }
.sim-inv { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 24px; align-items: center; }
.sim-inv .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); }
.sim-ans { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 14px; background: var(--accent-soft); } .sim-ans b { font-size: 30px; letter-spacing: -0.03em; color: var(--accent-text); }
@media (max-width: 640px) { .sim-inv { grid-template-columns: minmax(0, 1fr); } }
.kpi-al .kpi-al-t { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-right: 8px; color: var(--late); }
.b-alert.warn .kpi-al-t { color: var(--soon); } .b-alert.warn { background: var(--soon-bg); }
.sim-ans .small b { font-size: inherit; letter-spacing: 0; }
/* Bascule administrateur ⇄ salarié */
.viewsw { margin: 8px 0 0; width: 100%; display: flex; } .viewsw button { flex: 1; }
.viewpill { margin-left: 10px; background: var(--soon-bg); color: var(--soon); font-weight: 600; }
.topbar .left { display: flex; align-items: center; }
/* Dossier salarié */
.pd-two { align-items: start; }
.tl { display: flex; flex-direction: column; margin-top: 6px; }
.tl-i { display: grid; grid-template-columns: 96px 18px minmax(0, 1fr); align-items: start; gap: 8px; position: relative; padding-bottom: 14px; font-size: 14px; }
.tl-i::before { content: ""; position: absolute; left: 104px; top: 14px; bottom: -2px; width: 2px; background: var(--line); }
.tl-i:last-child::before { display: none; }
.tl-d { color: var(--ink3); font-size: 12px; padding-top: 2px; text-align: right; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin-top: 3px; position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--surface); }
.tl-i.join .tl-dot { background: var(--ok); } .tl-t a { color: var(--ink); text-decoration: none; } .tl-t a:hover { color: var(--accent-text); text-decoration: underline; }
.dl-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.dl-row:first-of-type { border-top: 0; }
.pd-docs-head { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 -4px; } .pd-docs-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.dz-sec h2 .small { font-weight: 500; margin-left: 6px; }
/* Dossier salarié · version épurée */
.pd-docs-head { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pd-docs-head > div { display: flex; flex-direction: column; gap: 2px; }
.dz-chips { flex-wrap: wrap; align-self: flex-start; }
.dz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 900px) { .dz-grid { grid-template-columns: minmax(0, 1fr); } }
.dz-card { padding: 6px 0 8px; }
.dz-h { display: flex; align-items: center; gap: 10px; padding: 12px 18px 8px; } .dz-h h3 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; }
.dr { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 18px; }
.dr:hover { background: var(--surface2); }
.dr-ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--surface2); color: var(--ink2); flex-shrink: 0; }
.dz-h .dr-ic { width: 30px; height: 30px; border-radius: 9px; }
.th-identity { background: var(--accent-soft); color: var(--accent-text); } .th-employment { background: var(--ok-bg); color: var(--ok); }
.th-payroll { background: var(--soon-bg); color: var(--soon); } .th-health { background: var(--late-bg); color: var(--late); }
.th-training { background: var(--accent-soft); color: var(--accent-text); } .th-screening { background: var(--late-bg); color: var(--late); }
.dr-main { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: var(--ink); }
.dr-main b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-main span { font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-act { display: flex; gap: 4px; opacity: .55; transition: opacity .15s; } .dr:hover .dr-act { opacity: 1; }
.dr-b { min-width: 30px; height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); cursor: pointer; font: inherit; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.dr-b:hover { background: var(--surface); color: var(--ink); } .dr-b svg { width: 14px; height: 14px; }
@media (hover: none) { .dr-act { opacity: 1; } }
.dz-card .dr { grid-template-columns: minmax(0, 1fr) auto; padding-left: 58px; }
/* Dossier : cartes en colonnes « maçonnerie » (pas de trou sous une carte courte) */
.dz-grid { display: block; columns: 2; column-gap: 16px; }
.dz-grid > .dz-card { break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 16px; }
@media (max-width: 900px) { .dz-grid { columns: 1; } }
.pf-auto { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ok); background: var(--ok-bg); border-radius: 6px; padding: 1px 5px; margin-left: 6px; }
/* Congés · RH */
.lv-start .field, .lv-book .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink2); }
.lv-start .input.num { width: 120px; }
.lv-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); } .lv-chk input { accent-color: var(--accent); }
.lv-steps { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; } .lv-steps > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
table.data tr.bad td { color: var(--late); }
.lv-book .select { width: auto; min-width: 170px; } .lv-book .input:not([type=date]) { flex: 1; min-width: 160px; }
.lv-cx { display: flex; gap: 8px; padding: 12px 0 0; }
/* Bonus · vue équipe commune */
.ts-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 110px; gap: 14px; align-items: center; width: 100%; padding: 7px 0; border: 0; background: transparent; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.ts-row:hover .ts-n b { color: var(--accent-text); }
.ts-n { display: flex; flex-direction: column; min-width: 0; } .ts-n b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-bar { display: block; height: 22px; } .ts-in { display: flex; height: 100%; border-radius: 6px; overflow: hidden; background: var(--surface2); }
.ts-in i { display: block; height: 100%; }
.ts-net { background: var(--accent); } .ts-ch { background: #f5a524; } .ts-cost { background: var(--ink3); opacity: .55; } .ts-soc { background: var(--ok); }
.legend-row i.sw.ts-net, .legend-row i.sw.ts-ch, .legend-row i.sw.ts-cost, .legend-row i.sw.ts-soc { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.ts-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .ts-row { grid-template-columns: 110px minmax(0, 1fr) 80px; } }
.card > .panel.panel-head > div.seg { flex-direction: row; align-items: center; }
/* Accueil · mon quotidien */
.hw-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .hw-grid { grid-template-columns: minmax(0, 1fr); } }
.hw-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hw { display: flex; flex-direction: column; gap: 10px; }
.hw-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; } .hw-h h2 { margin: 0; font-size: 17px; }
.hw-l { font-size: 13px; font-weight: 600; color: var(--accent-text); text-decoration: none; } .hw-l:hover { text-decoration: underline; }
.hw-bar { display: flex; height: 12px; border-radius: 7px; overflow: hidden; background: var(--surface2); margin-top: 4px; }
.hw-bar i { display: block; height: 100%; }
.hb-taken { background: var(--accent); } .hb-planned { background: #8f6bd8; } .hb-pending { background: #f5a524; } .hb-left { background: var(--ok); opacity: .85; }
.hw-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink2); } .hw-leg i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; } .hw-leg b { color: var(--ink); margin-left: 3px; }
.hw-list { display: flex; flex-direction: column; }
.hw-it { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hw-it:first-child { border-top: 0; }
.hw-r { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.hw-who { display: inline-flex; align-items: center; gap: 10px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; flex-shrink: 0; }
.hw-date { width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; flex-shrink: 0; }
.hw-date b { font-size: 17px; } .hw-date span { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.hw-grow { flex: 1; display: flex; flex-direction: column; }
.hw-empty { margin: 4px 0; font-size: 14px; color: var(--ink2); }
.hw-foot { display: flex; justify-content: flex-end; }
.utabs .tab-sep { width: 1px; align-self: stretch; margin: 8px 4px 10px; background: var(--line); }
.utabs .tab-grp { align-self: center; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink3); padding: 0 2px; white-space: nowrap; }
.ex-space button { font-weight: 600; }
.ex-badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--late); color: #fff; font-size: 11px; align-items: center; justify-content: center; }
.pb-row { grid-template-columns: 42px minmax(0, 1fr) auto auto; } .pb-m { width: 160px; }
/* Contrôle Finance des notes de frais */
.fc { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .fc { grid-template-columns: minmax(0, 1fr); } }
.fc-people { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 76px; }
.fc-p { display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.fc-p:hover { background: var(--surface2); } .fc-p.on { background: var(--accent-soft); }
.fc-pn { display: flex; flex-direction: column; flex: 1; min-width: 0; } .fc-pn b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-bad { min-width: 22px; height: 22px; border-radius: 11px; background: var(--late); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.fc-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; } .fc-head h2 { margin: 0; }
.fc-trip { display: flex; align-items: center; gap: 12px; padding: 14px 22px 10px; } .fc-trip b { font-size: 15px; } .fc-trip .btn { margin-left: auto; }
.fc-r.warn { background: var(--late-bg); }
.fc-open { border: 0; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.fc-open:hover b { color: var(--accent-text); text-decoration: underline; }
.fc-dlg { width: min(1180px, 96vw); }
.fc-rv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .fc-rv { grid-template-columns: minmax(0, 1fr); } }
.fc-img { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.fc-img img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: var(--surface2); }
.fc-img iframe { width: 100%; height: 66vh; border: 1px solid var(--line); border-radius: 12px; }
.fc-noimg { width: 100%; padding: 80px 20px; text-align: center; border-radius: 12px; background: var(--late-bg); color: var(--late); font-weight: 600; }
.fc-form { display: flex; flex-direction: column; gap: 12px; } .fc-form .field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink2); flex: 1; }
.fc-read { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; } .fc-read b { color: var(--accent-text); }
.fc-hist { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--soon-bg); }
.fc-btns { justify-content: flex-end; }
.card.panel.fc-head { flex-direction: row; align-items: center; text-align: left; } .fc-head > div:first-child { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.fc-open .pill, .ex-main .pill { align-self: flex-start; width: auto; }
.fc-open { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.fc-dup { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--late-bg); color: var(--late); font-size: 14px; } .fc-dup span { color: var(--ink2); }
.ex-flags { flex-wrap: wrap; } .ex-flags .pill { white-space: normal; text-align: left; line-height: 1.3; max-width: 100%; }
/* Photos de profil */
.avatar.has-photo, .pd-av.has-photo { padding: 0; overflow: hidden; background: var(--surface2); }
.av-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.pd-av-wrap { position: relative; cursor: pointer; border-radius: 50%; flex-shrink: 0; }
.pd-av-edit { position: absolute; inset: 0; border-radius: 50%; background: rgba(23,21,28,.55); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; text-align: center; opacity: 0; transition: opacity .15s; padding: 6px; }
.pd-av-wrap:hover .pd-av-edit, .pd-av-wrap:focus-within .pd-av-edit { opacity: 1; }
.pd-name { display: inline-flex; align-items: center; gap: 10px; }
.pd-photo-act { display: flex; gap: 8px; margin-top: 6px; } .pd-photo-act:empty { display: none; }

/* Photos de profil · une seule échelle de tailles dans tout le hub */
.avatar { width: 40px; height: 40px; font-size: 13px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.pd-av { width: 88px; height: 88px; font-size: 30px; }
.avatar.has-photo, .pd-av.has-photo { box-shadow: 0 0 0 2px var(--surface), 0 2px 8px rgba(20,10,40,.12); }
.sidebar .me .avatar, #side .me .avatar { width: 36px; height: 36px; }
.av-img { image-rendering: auto; }
.home-hello { display: flex; align-items: center; gap: 18px; }
.lc-name { display: inline-flex; align-items: center; gap: 8px; }
.fc-dlg .dlg-head h2 { display: inline-flex; align-items: center; gap: 12px; }
.ph-head { display: inline-flex; align-items: center; gap: 10px; }

/* Aperçu « View as » */
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 28px; background: #FFF1E0; border-bottom: 2px solid #E8A33D; color: #5A3200; font-size: 14px; position: sticky; top: 0; z-index: 20; }
.preview-bar .btn { background: #8A4B00; color: #fff; }
/* Modules (Home, My space, sous-modules) : des cases de même taille */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mod-tile { display: flex; flex-direction: column; justify-content: space-between; min-height: 196px; box-sizing: border-box; padding: 20px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow, 0 10px 30px rgba(30,10,60,.08)); text-decoration: none; color: var(--ink); border: 1px solid var(--line); transition: transform .12s ease, box-shadow .12s ease; }
.mod-tile:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(30,10,60,.12); }
.mod-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mod-top { display: flex; justify-content: space-between; align-items: flex-start; }
.mod-ic { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--accent); }
.mod-ic svg { width: 24px; height: 24px; } .mod-ic.soon { background: var(--ink3); opacity: .7; }
.mod-badge { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--late); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.mod-badge.warn { background: #B36B00; } .mod-badge.hidden { display: none; }
.mod-body { display: flex; flex-direction: column; gap: 4px; }
.mod-body b { font-size: 16px; font-weight: 650; }
.mod-big { font-size: 26px; font-weight: 750; letter-spacing: -.03em; line-height: 1.15; }
.mod-big.soon { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--ink2); }
.mod-sub { font-size: 13px; color: var(--ink2); }
.section-h h2 { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); margin: 8px 0 12px; }
.pd-back { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .pd-back h2 { margin: 0; flex: 1; font-size: 22px; }
/* Console d'administration */
.cc-viewas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 18px 22px; border-radius: 20px; background: #17151C; color: #fff; margin-bottom: 18px; }
.cc-viewas > div:first-child { display: flex; flex-direction: column; gap: 4px; } .cc-viewas span { color: #CFCBD9; font-size: 14px; }
.cc-viewas .select { min-width: 190px; } .cc-viewas .btn { background: #2E2B36; color: #fff; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.cc-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; text-decoration: none; color: var(--ink); }
a.cc-card:hover { box-shadow: 0 16px 36px rgba(30,10,60,.12); }
.cc-top { display: flex; justify-content: space-between; align-items: flex-start; } .cc-t { display: flex; flex-direction: column; gap: 3px; } .cc-t b { font-size: 17px; } .cc-t span { font-size: 13px; color: var(--ink2); }
.cc-rows { list-style: none; margin: 0; padding: 0; } .cc-rows li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; } .cc-rows li span:last-child { color: var(--ink2); text-align: right; }
table.mx th[scope=row] { text-align: left; white-space: nowrap; font-weight: 600; } table.mx td { text-align: center; padding: 6px 4px; } table.mx thead th { font-size: 12px; white-space: nowrap; }
tr.mx-cat td { text-align: left !important; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); padding: 16px 12px 6px !important; }
tr.mx-sub th { font-weight: 500 !important; color: var(--ink2); padding-left: 28px !important; }
.lvl.lv-none { background: var(--surface2); color: var(--ink3); } .lvl.lv-own { background: #E8F0FB; color: #0A5AAE; } .lvl.lv-read { background: var(--accent-soft); color: var(--accent-text); } .lvl.lv-edit { background: var(--accent); color: #fff; } .lvl.lv-inh { background: transparent; color: var(--ink3); font-style: italic; border: 1px dashed var(--line); }
.mx .lvl { min-width: 62px; border: 0; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.mx-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); } .mx-legend .lvl { display: inline-block; min-width: 44px; padding: 3px 8px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 700; text-align: center; }
.st-fields .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); min-width: 200px; }
.cur-list { flex-wrap: wrap; } .cur-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface2); font-weight: 600; font-size: 14px; }
.mode-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; } .mode-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; }
.mode-opt.on { border-color: var(--accent); background: var(--accent-soft); } .mode-opt > span { display: flex; flex-direction: column; gap: 3px; }
.input.num { width: 110px; }
.mod-tile, .mod-tile:hover, .mod-tile *, a.cc-card, a.cc-card:hover, a.cc-card * { text-decoration: none; }
.mod-big.long { font-size: 19px; letter-spacing: -.01em; }
.cc-viewas .ctrls { flex-wrap: wrap; } .cc-viewas .select { width: auto; min-width: 200px; flex: 0 0 auto; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--accent-text); display: block; }
.logo-text { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--accent-text); text-align: center; margin-bottom: 18px; }
/* ---------- Modules sur mesure ---------- */
.cm-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.cm-head .mod-ic { width: 60px; height: 60px; border-radius: 18px; } .cm-head .mod-ic svg { width: 30px; height: 30px; }
.cm-t { flex: 1 1 320px; } .cm-t .display { margin: 0; } .cm-t .lead { margin: 4px 0 0; }
.cm-kpis { margin-bottom: 18px; } .cm-kpi { min-height: 120px; cursor: default; } button.cm-kpi { cursor: pointer; text-align: left; font: inherit; }
.cm-kpi.on { outline: 3px solid var(--accent); } .cm-bad { color: var(--late); }
.cm-search { min-width: 240px; }
.cm-table tr.warn { background: var(--late-bg); } .cm-flags .pill { white-space: normal; }
.cm-rules { padding: 14px 20px; margin-top: 16px; } .cm-rules summary { cursor: pointer; font-weight: 600; } .cm-rules ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink2); }
.cm-dlg { width: min(860px, 96vw); }
.cm-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; } .cm-form .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); } .cm-form .field.wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .cm-form { grid-template-columns: minmax(0, 1fr); } }
.cm-ro { padding: 10px 12px; border-radius: 10px; background: var(--surface2); color: var(--ink); font-size: 15px; min-height: 20px; }
.cm-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.cm-drop, .mb-drop { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 20px; border-radius: 16px; border: 2px dashed var(--line); cursor: pointer; margin-bottom: 14px; }
.cm-drop:hover, .mb-drop:hover { border-color: var(--accent); background: var(--accent-soft); } .cm-drop span, .mb-drop span { font-size: 13px; color: var(--ink2); }
.cm-btns { justify-content: flex-end; margin-top: 16px; }
/* ---------- Créateur de modules ---------- */
.mb-hero { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 22px 26px; border-radius: 22px; background: linear-gradient(120deg, #3D0377, #7B3FF2); color: #fff; margin-bottom: 18px; }
.mb-hero > div { display: flex; flex-direction: column; gap: 6px; max-width: 780px; } .mb-hero b { font-size: 21px; } .mb-hero span { opacity: .9; font-size: 15px; line-height: 1.5; }
.mb-new { align-items: center; justify-content: center; text-align: center; gap: 8px; border: 3px dashed var(--line); box-shadow: none; background: transparent; }
.mb-plus { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; }
.mb-steps { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; padding: 0; margin: 0 0 20px; }
.mb-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; color: var(--ink2); }
.mb-steps li span { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface2); font-size: 13px; }
.mb-steps li.on { color: var(--accent-text); border-color: var(--accent); } .mb-steps li.on span { background: var(--accent); color: #fff; } .mb-steps li.done span { background: var(--ok, #1E8E4E); color: #fff; }
.mb-describe { max-width: 900px; } .mb-describe h2 { margin: 0; } .mb-describe textarea { width: 100%; box-sizing: border-box; font-size: 16px; line-height: 1.5; margin: 14px 0 10px; }
.mb-ex { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; } .mb-ex .pill { cursor: pointer; border: 0; font: inherit; font-size: 13px; }
.mb-go { justify-content: flex-end; }
.mb-notes { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 16px; background: #F1EBFF; color: #4A2380; margin-bottom: 14px; font-size: 14px; } .mb-notes b { color: #5B2A9A; }
.mb-ask { display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--surface); border: 2px solid var(--accent-soft); margin-bottom: 18px; }
.mb-ask > span { color: #7B3FF2; font-size: 20px; } .mb-ask .input { flex: 1; border: 0; background: transparent; font-size: 15px; } .mb-ask .input:focus { outline: none; }
.mb-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .mb-grid { grid-template-columns: minmax(0, 1fr); } }
.mb-edit { display: flex; flex-direction: column; gap: 16px; } .mb-edit h3 { margin: 0 0 10px; font-size: 17px; }
.mb-edit .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); flex: 1 1 200px; } .mb-row { display: flex; gap: 12px; flex-wrap: wrap; }
.mb-pick { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.mb-ic { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink2); display: flex; align-items: center; justify-content: center; cursor: pointer; } .mb-ic svg { width: 20px; height: 20px; }
.mb-ic.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.mb-sw { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; } .mb-sw.on { box-shadow: 0 0 0 3px var(--accent); }
.mb-fields { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.mb-field { display: grid; grid-template-columns: 34px minmax(0, 1.3fr) 130px minmax(0, 1fr) auto auto 40px; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface2); }
@media (max-width: 900px) { .mb-field { grid-template-columns: 34px minmax(0, 1fr) 120px; } }
.mb-mv { display: flex; flex-direction: column; } .mb-mv button { border: 0; background: none; cursor: pointer; color: var(--ink3); font-size: 12px; line-height: 1.1; padding: 2px; }
.mb-inline { flex-direction: row !important; align-items: center; gap: 8px !important; }
.mb-kpi, .mb-rule { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px; border-radius: 12px; background: var(--surface2); margin-bottom: 8px; }
.mb-kpi .input, .mb-rule .input { flex: 1 1 140px; } .mb-rule b { font-size: 13px; color: var(--accent-text); }
.mb-ver { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); } .mb-ver span:nth-child(2) { flex: 1; }
.mb-side { position: sticky; top: 76px; } .mb-prev { display: flex; flex-direction: column; gap: 10px; }
.mb-lab { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; } .mb-tile { min-height: 170px; pointer-events: none; }
.mb-form { padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mb-fi { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink2); } .mb-fv { padding: 8px 10px; border-radius: 8px; background: var(--surface2); color: var(--ink3); font-size: 13px; }
.mb-fdrop { grid-column: 1 / -1; padding: 10px; border-radius: 10px; border: 2px dashed var(--line); text-align: center; font-size: 13px; color: var(--ink2); }
.mb-rules { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink2); line-height: 1.6; }
.mb-bar { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 14px 0; margin-top: 18px; background: linear-gradient(transparent, var(--bg) 30%); }
.mb-bar > span { flex: 1; text-align: right; }
.mb-done { text-align: center; align-items: center; display: flex; flex-direction: column; gap: 12px; padding: 40px; }
.mb-check { width: 72px; height: 72px; border-radius: 50%; background: #1E8E4E; color: #fff; font-size: 38px; display: flex; align-items: center; justify-content: center; }
.mb-edit .panel > .field { flex: none; }
/* ---------- Assistant ---------- */
.ax-btn { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px 13px 16px; border: 0; border-radius: 999px; background: linear-gradient(120deg, #3D0377, #7B3FF2); color: #fff; font: inherit; font-weight: 700; box-shadow: 0 14px 34px rgba(61,3,119,.35); cursor: pointer; }
.ax-btn span { font-size: 18px; } .ax-btn.on { opacity: .9; }
.ax-box { position: fixed; right: 22px; bottom: 82px; z-index: 61; width: min(420px, calc(100vw - 32px)); height: min(620px, calc(100vh - 120px)); display: flex; flex-direction: column; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(20,10,40,.28); overflow: hidden; }
.ax-box.hidden { display: none; }
.ax-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px; background: linear-gradient(120deg, #3D0377, #7B3FF2); color: #fff; }
.ax-head div { display: flex; flex-direction: column; gap: 2px; } .ax-head b { font-size: 16px; } .ax-head span { font-size: 12px; opacity: .85; }
.ax-x { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.ax-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ax-hello { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--accent-soft); font-size: 14px; color: var(--ink2); } .ax-hello b { color: var(--ink); font-size: 16px; }
.ax-m { display: flex; gap: 8px; align-items: flex-start; } .ax-m.user { justify-content: flex-end; }
.ax-av { width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; background: linear-gradient(135deg, #7B3FF2, #3D0377); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.ax-b { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; background: var(--surface2); color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.ax-m.user .ax-b { background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; }
.ax-link { font-weight: 700; font-size: 13px; color: var(--accent-text); text-decoration: none; }
.ax-prop { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 2px solid var(--accent-soft); }
.ax-act { display: flex; gap: 8px; } .ax-yes, .ax-no { border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.ax-yes { background: var(--accent); color: #fff; } .ax-no { background: var(--surface2); color: var(--ink2); } .ax-ok { font-size: 13px; color: var(--ink2); }
.ax-dots { flex-direction: row; gap: 4px; padding: 14px; } .ax-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink3); animation: axd 1s infinite ease-in-out; } .ax-dots i:nth-child(2) { animation-delay: .15s; } .ax-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes axd { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ax-dots i { animation: none; } }
.ax-sug { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; } .ax-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 11px; font: inherit; font-size: 12px; color: var(--ink2); cursor: pointer; }
.ax-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); } .ax-form input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; font: inherit; font-size: 14px; background: var(--surface); color: var(--ink); }
.ax-form button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; }
@media print { .ax-btn, .ax-box { display: none !important; } }
.mb-bar { padding-right: 130px; }
.ax-t b { font-weight: 800; }
/* ---------- Comptabilité ---------- */
.ac-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; } .ac-head .display { margin: 0; } .ac-head .lead { margin: 4px 0 0; }
.ac-tabs { margin-bottom: 18px; } button.mod-tile { cursor: pointer; text-align: left; font: inherit; }
.field-in { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.ac-short { width: 110px; } .ac-exp { margin: 0 0 12px; flex-wrap: wrap; }
td.num, th.num, .input.num { text-align: right; font-variant-numeric: tabular-nums; }
.ac-dlg { width: min(1080px, 97vw); }
.ac-top { display: grid; grid-template-columns: 220px 160px 160px minmax(0, 1fr); gap: 12px; margin-bottom: 14px; } .ac-top .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); }
@media (max-width: 800px) { .ac-top { grid-template-columns: 1fr 1fr; } .ac-wide { grid-column: 1 / -1; } }
.ac-lines td { vertical-align: top; } .ac-lines .input { width: 100%; box-sizing: border-box; } .ac-lines td:nth-child(1) { width: 190px; } .ac-lines td:nth-child(3) { width: 130px; } .ac-lines td:nth-child(4), .ac-lines td:nth-child(5) { width: 130px; }
.ac-al { display: block; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.ac-bal { margin-top: 10px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; } .ac-bal.ok { background: var(--ok-bg, #E3F2E8); color: #1B6B3A; } .ac-bal.bad { background: var(--late-bg); color: var(--late); }
.ac-btns { justify-content: flex-end; margin-top: 14px; }
.ac-ledger { margin-bottom: 14px; } .ac-lh { padding: 14px 18px 4px; font-size: 15px; }
tr.ac-tot td { font-weight: 700; background: var(--surface2); } tr.ac-grand td { font-weight: 800; background: var(--accent-soft); color: var(--accent-text); }
.ac-secs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ac-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; } .ac-map .field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink2); }
.ac-form { display: flex; flex-direction: column; gap: 12px; } .ac-form .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); }
.ac-lines td:nth-child(2) { min-width: 220px; } .ac-dlg .table-wrap { overflow-x: auto; }
.ac-t td:not(.num), .ac-t th:not(.num) { text-align: left; }
:root { --css-build: "20261009q"; }
