/* Cap CEE CRM — feuille de style */
:root {
  --navy: #12284a; --navy-2: #1d3a66; --navy-50: #eef2f8;
  --teal: #0a9396; --teal-600: #087f82; --teal-700: #066a6c; --teal-50: #e8f6f6; --teal-100: #cdeceb;
  --gold: #c9a14a;
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f8fafc; --hover: #f1f5f9;
  --border: #e3e8ef; --border-2: #cfd7e3;
  --text: #0f1b2d; --text-2: #3f4b5f; --muted: #64748b; --faint: #94a3b8;
  --green: #15803d; --green-bg: #e3f7ea; --amber: #a15c07; --amber-bg: #fdf1d8; --red: #b42318; --red-bg: #fde8e7;
  --blue: #1d4ed8; --blue-bg: #e3ecfd; --violet: #6d28d9; --violet-bg: #efe9fd; --slate-bg: #eef1f5;
  --radius: 12px; --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .05);
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 4px 14px rgba(15, 27, 45, .05);
  --shadow-lg: 0 18px 50px rgba(15, 27, 45, .22);
  --sidebar-w: 244px; --topbar-h: 60px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.ic { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.strong { font-weight: 600; }
.hide { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; }
.row-w { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.sp { flex: 1; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------- Structure ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 14px 12px 12px; z-index: 30; }
.sb-logo { display: flex; align-items: center; padding: 4px 8px 16px; }
.sb-logo img { height: 40px; width: auto; mix-blend-mode: multiply; }
.sb-cta { margin: 0 4px 14px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-h { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; text-decoration: none; transition: background .12s, color .12s; }
.nav a .ic { color: var(--faint); }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { background: var(--teal-50); color: var(--teal-700); font-weight: 600; }
.nav a.on .ic { color: var(--teal); }
.nav .nb { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--slate-bg); color: var(--text-2); font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.nav .nb.hot { background: var(--red); color: #fff; }
.sb-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 10px; }
.sb-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; }
.sb-user:hover { background: var(--hover); }
.sb-user .who { min-width: 0; flex: 1; }
.sb-user .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .who small { color: var(--muted); font-size: 12px; }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--amber); background: var(--amber-bg); border-radius: 20px; padding: 3px 9px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: rgba(244, 246, 250, .88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.tb-burger { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { width: 100%; height: 38px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 0 12px 0 36px; outline: none; transition: border .12s, box-shadow .12s; }
.search input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10, 147, 150, .14); }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); }
.search-res { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 420px; overflow: auto; z-index: 50; }
.sr-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 8px 10px 4px; }
.sr-i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); cursor: pointer; text-decoration: none !important; }
.sr-i:hover, .sr-i.on { background: var(--hover); }
.sr-i small { color: var(--muted); margin-left: auto; }
.clocks { display: flex; gap: 4px; margin-left: auto; }
.clock { display: flex; flex-direction: column; align-items: center; padding: 3px 10px; border-radius: 8px; line-height: 1.15; }
.clock span { font-size: 10.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.clock b { font-size: 14px; font-variant-numeric: tabular-nums; }
.clock.hl { background: var(--teal-50); }
.clock.hl b { color: var(--teal-700); }
.tb-btn { position: relative; }
.tb-btn .badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--bg); }

.page { padding: 22px 28px 40px; width: 100%; max-width: 1480px; margin: 0 auto; }
.page-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h h1 { font-size: 23px; font-weight: 700; }
.page-h .sub { color: var(--muted); margin-top: 3px; }
.page-h .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.back:hover { color: var(--text); text-decoration: none; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent; background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s; text-decoration: none !important; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 1px 2px rgba(10, 147, 150, .3); }
.btn-primary:hover { background: var(--teal-600); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-outline { border-color: var(--border-2); background: var(--surface); }
.btn-outline:hover { background: var(--hover); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-bg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn-xl { height: 56px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--border-2); border-bottom-width: 2px; background: var(--surface); font: 600 11px var(--font); color: var(--muted); }

/* ---------- Puces ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tone-neutral { background: var(--slate-bg); color: var(--text-2); }
.tone-muted { background: var(--slate-bg); color: var(--muted); }
.tone-info { background: var(--blue-bg); color: var(--blue); }
.tone-teal { background: var(--teal-50); color: var(--teal-700); }
.tone-success { background: var(--green-bg); color: var(--green); }
.tone-warning { background: var(--amber-bg); color: var(--amber); }
.tone-danger { background: var(--red-bg); color: var(--red); }
.tone-violet { background: var(--violet-bg); color: var(--violet); }
.tone-dark { background: var(--navy); color: #fff; }
.pchip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--pc); background: color-mix(in srgb, var(--pc) 10%, white); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.avatar { width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: calc(var(--s) * .38); font-weight: 700; flex-shrink: 0; letter-spacing: .02em; }
.avatar-empty { background: var(--slate-bg); color: var(--faint); border: 1px dashed var(--border-2); }
.terr { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.terr b { font-size: 11px; font-weight: 700; color: var(--navy); background: var(--navy-50); border-radius: 5px; padding: 2px 5px; }
.terr-t { color: var(--muted); font-variant-numeric: tabular-nums; }
.tel { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 500; white-space: nowrap; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-h h3 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-h h3 .ic { color: var(--teal); }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.card-h .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-side { grid-template-columns: 380px minmax(0, 1fr); align-items: start; }
.stack > * + * { margin-top: 16px; }

/* KPI */
.kpi { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.kpi-ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi-b { min-width: 0; }
.kpi-l { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 1px; }
.kpi-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.plain { box-shadow: none; }
.progress { height: 8px; border-radius: 6px; background: var(--slate-bg); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 6px; background: var(--teal); transition: width .4s; }
.progress.tone-navy span { background: var(--navy); }
.progress.tone-warning span { background: #d98a0b; }
.progress.tone-danger span { background: var(--red); }
.progress.tone-success span { background: #16a34a; }

/* ---------- Formulaires ---------- */
.input { width: 100%; height: 36px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface); padding: 0 10px; outline: none; transition: border .12s, box-shadow .12s; }
select.input { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
textarea.input { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10, 147, 150, .14); }
.input-sm { height: 30px; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-l { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field-h { font-size: 12px; color: var(--muted); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fgrid .full { grid-column: 1 / -1; }
.fgrid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--teal); }
.yn { display: inline-flex; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; }
.yn button { border: 0; background: var(--surface); padding: 5px 12px; font-weight: 600; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.yn button + button { border-left: 1px solid var(--border-2); }
.yn button.on-yes { background: var(--teal-50); color: var(--teal-700); }
.yn button.on-no { background: var(--red-bg); color: var(--red); }
.seg { display: inline-flex; background: var(--slate-bg); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg-b { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg-b:hover { color: var(--text); }
.seg-b.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 27, 45, .12); }
.seg-n { font-size: 11px; background: var(--border); color: var(--text-2); border-radius: 9px; padding: 1px 6px; }
.seg-b.on .seg-n { background: var(--teal-50); color: var(--teal-700); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 140px; height: 34px; font-size: 13px; }
.filters .search-in { min-width: 240px; flex: 1; max-width: 340px; }

/* ---------- Tableaux ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th .ic { opacity: .6; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--surface-2); }
.tbl tbody tr.sel { background: var(--teal-50); }
.tbl .chk { width: 36px; }
.tbl .chk input { width: 16px; height: 16px; accent-color: var(--teal); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-compact td { padding: 8px 12px; }
.cell-main { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.cell-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.tbl td.col-lead { min-width: 190px; }
.tbl .cell-src { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.bulk { position: sticky; bottom: 16px; display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); margin-top: 12px; z-index: 5; }
.bulk .btn { height: 30px; font-size: 12.5px; }
.bulk .btn-ghost { color: #fff; }
.bulk .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

/* ---------- Ma journée ---------- */
.hello h1 { font-size: 25px; }
.goal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 20px 22px; background: linear-gradient(120deg, #12284a 0%, #173864 55%, #0b5f6b 100%); color: #fff; border-radius: 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.goal::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(10, 147, 150, .45), transparent 70%); pointer-events: none; }
.goal-l { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.goal-v { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0 10px; }
.goal-v small { font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, .65); }
.goal .progress { background: rgba(255, 255, 255, .16); height: 10px; }
.goal .progress span { background: linear-gradient(90deg, #2fc1bd, #7fe0d9); }
.goal-stats { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.goal-stats div { font-size: 12.5px; color: rgba(255, 255, 255, .72); }
.goal-stats b { display: block; font-size: 19px; color: #fff; font-variant-numeric: tabular-nums; }
.goal .btn-cta { position: relative; z-index: 1; background: #fff; color: var(--navy); height: 58px; padding: 0 26px; border-radius: 14px; font-size: 16px; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.goal .btn-cta .ic { color: var(--teal); }
.goal .btn-cta:hover { background: #f2fbfb; }
.goal .cta-sub { position: relative; z-index: 1; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .7); margin-top: 8px; }
.todo { display: flex; flex-direction: column; }
.todo-i { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; transition: background .1s; cursor: pointer; }
.todo-i:last-child { border-bottom: 0; }
.todo-i:hover { background: var(--surface-2); }
.todo-ic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.todo-n { font-size: 22px; font-weight: 800; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.todo-t { font-weight: 650; }
.todo-x { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.todo-i .chev { color: var(--faint); }
.todo-i.zero { opacity: .55; }
.todo-done { display: flex; align-items: center; gap: 12px; padding: 22px 18px; color: var(--green); font-weight: 600; }
.agenda-i { display: flex; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border); cursor: pointer; }
.agenda-i:hover { background: var(--surface-2); }
.agenda-i:last-child { border-bottom: 0; }
.agenda-t { width: 52px; font-weight: 700; font-variant-numeric: tabular-nums; }
.agenda-t small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.agenda-i.due .agenda-t { color: var(--red); }
.team-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 70px; gap: 10px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.team-row:last-child { border-bottom: 0; }
.team-row .progress { margin-top: 5px; height: 6px; }

/* ---------- Accueil : tableau en 4 colonnes ---------- */
.cta-n { margin-left: 4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(255, 255, 255, .22); font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bcol { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; border-top: 3px solid var(--bc, var(--border-2)); }
.bcol-info { --bc: #3b6fe0; } .bcol-warning { --bc: #d98a0b; } .bcol-violet { --bc: #7c3aed; } .bcol-success { --bc: #16a34a; }
.bcol-h { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--border); }
.bcol-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bcol-t { font-weight: 700; font-size: 15px; }
.bcol-x { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.bcol-n { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bcol-b { overflow-y: auto; max-height: calc(100vh - 250px); min-height: 200px; }
.bsec { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.bsec span { margin-left: auto; color: var(--text-2); }
.bi { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s; }
.bi:hover { background: var(--surface-2); }
.bi.hot { box-shadow: inset 3px 0 0 var(--red); }
.bi-ic { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.bi-b { min-width: 0; flex: 1; }
.bi-t { display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: 13.5px; }
.bi-t > .ellipsis { flex: 1; min-width: 0; }
.bi-t .chip { height: 20px; font-size: 11px; padding: 0 6px; flex-shrink: 0; }
.bi-m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.bi-m .pchip { height: 20px; font-size: 11px; }
.bi-s { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.35; }
.bi-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.bi-a .btn-sm { height: 27px; font-size: 12px; padding: 0 9px; }
.bnone { padding: 14px; font-size: 12.5px; color: var(--faint); text-align: center; border-bottom: 1px solid var(--border); }
.blot { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 12.5px; color: var(--text-2); border-bottom: 1px solid var(--border); text-decoration: none !important; }
.blot > span { flex: 1; min-width: 0; }
.blot b { color: var(--text); font-variant-numeric: tabular-nums; }
a.blot:hover { background: var(--surface-2); }
.bstats { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.bstats .chip { height: 21px; font-size: 11px; }
.ro-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--slate-bg); color: var(--text-2); font-size: 13px; margin-bottom: 12px; }
.lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 14px; }
.lot { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.lot h4 { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.lot .lot-m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lot .lot-k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 10px; font-size: 11.5px; color: var(--muted); }
.lot .lot-k b { display: block; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 1320px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bcol-b { max-height: 520px; } }
@media (max-width: 760px) { .board { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Connexion & synchronisation (version en ligne) ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, var(--teal-50), var(--bg)); }
.login-card { width: 380px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 30px 28px; display: flex; flex-direction: column; gap: 12px; }
.login-logo { height: 44px; align-self: flex-start; mix-blend-mode: multiply; margin-bottom: 6px; }
.login-card h1 { font-size: 21px; }
.login-card p { margin: 0 0 4px; font-size: 13.5px; }
.login-card .input { height: 44px; font-size: 15px; }
.login-card .lg-code { letter-spacing: .5em; text-align: center; font-size: 22px; font-weight: 700; }
.login-msg { font-size: 13px; color: var(--teal-700); }
.login-msg.err { color: var(--red); }
.sync { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.sync-ok { color: var(--green); }
.sync-saving { color: var(--muted); }
.sync-saving .ic { animation: spin 1s linear infinite; }
.sync-error { color: var(--red); background: var(--red-bg); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .sync { font-size: 0; padding: 4px; } }
/* Pièces : fichiers rangés dans Drive */
.piece { flex-wrap: wrap; }
.piece .pfiles { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 30px; }
.pfile { display: inline-flex; align-items: center; gap: 5px; max-width: 260px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--slate-bg); color: var(--text-2); font-size: 12px; text-decoration: none !important; }
.pfile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.pfile:hover { background: var(--teal-50); color: var(--teal-700); }
.piece .up { height: 28px; padding: 0 8px; font-size: 12px; color: var(--teal-700); }
.piece.uploading { opacity: .6; pointer-events: none; }
.att-list { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.att-list label { font-size: 13px; }

/* ---------- Barre latérale réduite (bouton ☰) ---------- */
.topbar .tb-burger { display: inline-flex; }
.sb-logo .logo-mini { display: none; height: 34px; width: 34px; }
.app { transition: grid-template-columns .18s ease; }
.app.sb-mini { grid-template-columns: 72px minmax(0, 1fr); }
.app.sb-mini .sidebar { padding: 14px 10px 12px; }
.app.sb-mini .sb-logo { justify-content: center; padding: 4px 0 16px; }
.app.sb-mini .sb-logo .logo-full { display: none; }
.app.sb-mini .sb-logo .logo-mini { display: block; }
.app.sb-mini .nav-h { height: 1px; padding: 0; margin: 10px 8px; background: var(--border); overflow: hidden; color: transparent; }
.app.sb-mini .nav a { justify-content: center; padding: 10px 0; position: relative; }
.app.sb-mini .nav a > span:not(.nb) { display: none; }
.app.sb-mini .nav .nb { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.app.sb-mini .sb-user { justify-content: center; padding: 6px 0; }
.app.sb-mini .sb-user .who, .app.sb-mini .sb-user > .ic { display: none; }
.app.sb-mini .demo-pill { font-size: 0; padding: 4px; }
.app.sb-mini .demo-pill .ic { margin: 0; }
@media (max-width: 860px) { .app.sb-mini { grid-template-columns: minmax(0, 1fr); } .app.sb-mini .sidebar { padding: 14px 12px 12px; } .app.sb-mini .nav a > span:not(.nb), .app.sb-mini .sb-user .who { display: initial; } .app.sb-mini .sb-logo .logo-full { display: block; } .app.sb-mini .sb-logo .logo-mini { display: none; } .app.sb-mini .nav a { justify-content: flex-start; padding: 9px 12px; } }

/* ---------- Deux canaux : acquisition web / leads intégrés ---------- */
:root { --web: #e8590c; --web-50: #fff1e8; --web-100: #ffd8bf; --int: #1d3a66; --int-50: #eaf0f8; --int-100: #cdd9ea; }
.chan { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chan-web { background: var(--web-50); color: #b8440a; }
.chan-int { background: var(--int-50); color: var(--int); }
.band { display: flex; flex-direction: column; min-height: 0; }
.band + .band { margin-top: 12px; }
.band-h { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--bandc); cursor: pointer; user-select: none; box-shadow: var(--shadow-sm); min-height: 46px; flex-wrap: wrap; row-gap: 4px; }
.band-h:hover { background: var(--surface-2); }
.band-web { --bandc: var(--web); --bandbg: var(--web-50); }
.band-int { --bandc: var(--int); --bandbg: var(--int-50); }
.band-ic { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--bandbg); color: var(--bandc); flex-shrink: 0; }
.band-t { font-weight: 750; font-size: 15px; letter-spacing: -.01em; }
.band-sum { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.band-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.band-sum .dotsep { color: var(--faint); }
.band-chev .ic { transition: transform .15s; }
.band.closed .band-chev .ic { transform: rotate(-90deg); }
.band-b { margin-top: 10px; min-height: 0; }
.band.closed .band-b { display: none; }
.band-max span { font-size: 12px; }
/* Accueil : écran partagé en deux, hauteur fixe sur ordinateur */
.split-fixed { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 118px); min-height: 520px; }
.split-fixed .band { flex: 1 1 0; }
.split-fixed .band.closed { flex: 0 0 auto; }
.split-fixed .band-b { flex: 1; display: flex; flex-direction: column; }
.split-fixed .board { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
.split-fixed .bcol { min-height: 0; }
.split-fixed .bcol-b { max-height: none; flex: 1; min-height: 0; }
.split-fixed .bcol-h { padding: 8px 12px; }
.split-fixed .bcol-x { display: none; }
.split-fixed .bcol-ic { width: 28px; height: 28px; border-radius: 8px; }
.split-fixed .bcol-n { font-size: 19px; }
.split-fixed .bcol-t { font-size: 14px; }
.band-web .bcol { border-top-color: var(--bc); }
.tasks-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border-radius: 12px; background: var(--violet-bg); color: #4c1d95; font-size: 13px; }
.tasks-strip .btn { height: 26px; font-size: 12px; }
.req-strip { background: var(--amber-bg); color: #7c4a03; }
.assign { display: flex; gap: 4px; flex-wrap: wrap; }
.assign .btn { padding: 0 8px 0 4px; gap: 5px; height: 27px; font-size: 12px; }
.assign .avatar { font-size: 8px; }
.assign-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--amber-bg); color: #7c4a03; margin-bottom: 12px; font-size: 13.5px; }
.assign-banner .grow { min-width: 200px; }
@media (max-width: 1000px), (max-height: 640px) {
  .split-fixed { height: auto; min-height: 0; }
  .split-fixed .bcol-b { max-height: 440px; }
}
.fiche-web, .lead-card.lc-web { border-top: 4px solid var(--web); }
.fiche-int, .lead-card.lc-int { border-top: 4px solid var(--int); }
.lot.on { border-color: var(--int); box-shadow: 0 0 0 2px var(--int-100); }
.chan-cmp { display: grid; grid-template-columns: 170px repeat(2, minmax(0, 1fr)); }
.chan-cmp > div { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-variant-numeric: tabular-nums; }
.chan-cmp .h { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.chan-cmp .l { color: var(--muted); }
.chan-cmp .v { font-weight: 650; }
.chan-cmp .v small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.band .kanban { padding-bottom: 4px; }
.band .kcol { max-height: 560px; overflow-y: auto; }
.band .card { margin: 0; }
.band-mini .band-h { min-height: 38px; padding: 5px 6px 5px 10px; border-radius: 9px; box-shadow: none; }
.band-mini .band-t { font-size: 13.5px; }
.band-mini .band-ic { width: 24px; height: 24px; }
.band-mini .band-max { display: none; }
.band-mini .band-h { flex-wrap: nowrap; gap: 8px; }
.band-mini .band-t { white-space: nowrap; }
.band-mini .band-sum { white-space: nowrap; overflow: hidden; }
.band-mini .band-b { margin-top: 6px; }
.band-mini + .band-mini { margin-top: 8px; }

/* ---------- Session d'appels ---------- */
.call-page { padding: 16px 20px 20px; max-width: none; }
.call-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.call-top h1 { font-size: 20px; }
.session-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.sstat { display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.sstat b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.call-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.call-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.call-grid .panel.ov { position: static; max-height: none; }
.ov-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.ov-t { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.ov-t .muted { font-size: 12.5px; font-weight: 500; }
.ov-h .seg-b { padding: 4px 10px; font-size: 12.5px; }
.ov-b { padding: 8px; }
.band-ov .band-max { display: inline-flex; }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 6px; max-height: 336px; overflow-y: auto; padding: 2px; }
.ov.has-card .ov-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); max-height: 90px; }
.ov-tile.compact { padding: 7px 10px; }
.ov-tile.compact .ov-l1 { font-size: 13px; }
.ov-tile.compact .chip { height: 20px; font-size: 11px; padding: 0 6px; flex-shrink: 0; }
.ov-tile { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; min-width: 0; transition: border-color .12s, box-shadow .12s, background .12s; }
.ov-tile:hover { border-color: var(--border-2); background: var(--surface-2); }
.ov-tile:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.ov-tile.on { border-color: var(--teal); background: var(--teal-50); box-shadow: 0 0 0 2px var(--teal); }
.ov-tile.next { border-color: var(--teal); border-style: dashed; }
.ov-tile.skipped { opacity: .55; }
.ov-l1 { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; }
.ov-l1 b { min-width: 0; flex: 1; }
.ov-l2 { display: flex; gap: 5px; flex-wrap: wrap; }
.ov-l2 .chip { height: 21px; font-size: 11.5px; padding: 0 7px; }
.ov-l3 { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-next { flex-shrink: 0; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--teal-700, #0b6b63); background: var(--teal-50); border-radius: 6px; padding: 2px 6px; }
.ov-skip { flex-shrink: 0; font-size: 11px; color: var(--muted); }
.ov-hint { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; border: 1px dashed var(--border-2); border-radius: var(--radius); background: var(--surface); font-size: 13.5px; }
.ov-hint kbd { margin-left: 8px; background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .35); color: inherit; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; min-height: 0; }
.panel-h { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.panel-b { overflow: auto; }
.call-grid .panel { position: sticky; top: calc(var(--topbar-h) + 14px); max-height: calc(100vh - var(--topbar-h) - 28px); }
.q-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.q-tab { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 4px 9px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.q-tab b { color: var(--text); }
.q-tab.on { background: var(--navy); border-color: var(--navy); color: rgba(255, 255, 255, .8); }
.q-tab.on b { color: #fff; }
.q-tab.hot b { color: var(--red); }
.q-tab.on.hot b { color: #ffb4ad; }
.q-filters { display: flex; gap: 6px; }
.q-filters .input { height: 30px; font-size: 12.5px; }
.q-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: center; }
.q-item:hover { background: var(--surface-2); }
.q-item.on { background: var(--teal-50); box-shadow: inset 3px 0 0 var(--teal); }
.q-item .grow { min-width: 0; }
.q-item .q-name { font-weight: 600; font-size: 13.5px; }
.q-item .q-meta { display: flex; gap: 6px; align-items: center; margin-top: 3px; font-size: 12px; color: var(--muted); flex-wrap: wrap; row-gap: 4px; }
.q-reason { margin-left: auto; text-align: right; flex-shrink: 0; align-self: flex-start; }
.q-reason .chip { height: 21px; font-size: 11.5px; padding: 0 7px; }
.q-more { padding: 10px 14px; color: var(--muted); font-size: 12.5px; text-align: center; }
.lead-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.lc-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.lc-name { font-size: 22px; font-weight: 750; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lc-contact { color: var(--muted); margin-top: 2px; }
.lc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.lc-phone { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.lc-phone .big { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; color: var(--text); }
.lc-local { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; }
.lc-local b { color: var(--text); font-variant-numeric: tabular-nums; }
.lc-body { padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.lc-sec-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 10px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.qual { display: flex; flex-direction: column; gap: 8px; }
.qual-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 13px; }
.qual-row .ql { color: var(--text-2); }
.qual-row .ql .req { color: var(--red); }
.qual-row .input { width: 150px; height: 30px; font-size: 13px; }
.qual-row .unit { display: flex; align-items: center; gap: 6px; }
.qual-row .unit small { color: var(--muted); }
.results { padding: 14px 20px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.results-t { display: flex; align-items: center; gap: 8px; font-weight: 650; margin-bottom: 10px; }
.res-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.res-btn { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 64px; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px; line-height: 1.25; text-align: left; transition: border .1s, background .1s, transform .05s; }
.res-btn:hover { border-color: var(--teal); background: var(--teal-50); }
.res-btn:active { transform: translateY(1px); }
.res-btn kbd { position: absolute; top: 8px; right: 8px; }
.lead-card { container-type: inline-size; }
@container (max-width: 720px) { .lc-body { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 470px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lc-phone .big { font-size: 20px; } .lc-head > .row { flex-wrap: wrap; } .lc-head > .row > .grow { flex-basis: 100%; } .lc-name { font-size: 20px; } }
.res-btn .ic { color: var(--muted); }
.res-btn.tone-teal-b { border-color: var(--teal); background: var(--teal); color: #fff; }
.res-btn.tone-teal-b .ic, .res-btn.tone-teal-b kbd { color: #fff; }
.res-btn.tone-teal-b kbd { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); }
.res-btn.tone-teal-b:hover { background: var(--teal-600); }
.res-btn.tone-warning-b { border-color: #e9b65b; background: var(--amber-bg); }
.res-btn.tone-danger-b { color: var(--red); }
.res-btn.tone-danger-b .ic { color: var(--red); }
.callbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--navy); color: #fff; font-weight: 600; }
.callbar .pulse { width: 10px; height: 10px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: pulse 1.4s infinite; }
.callbar .timer { font-variant-numeric: tabular-nums; font-size: 18px; }
.callbar small { color: rgba(255, 255, 255, .65); font-weight: 500; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); } 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.note-area { width: 100%; }
.hist-mini { display: flex; flex-direction: column; gap: 6px; }
.hist-mini div { display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
.hist-mini time { color: var(--muted); width: 92px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.script-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.script-sec { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.script-sec:last-child { border-bottom: 0; }
.script-sec h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--teal-700); margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.script-sec p { margin: 0; white-space: pre-line; font-size: 13.5px; color: var(--text-2); }
.obj { border: 1px solid var(--border); border-radius: 9px; margin-top: 7px; overflow: hidden; }
.obj summary { padding: 8px 11px; cursor: pointer; font-weight: 600; font-size: 13px; list-style: none; display: flex; gap: 6px; align-items: center; }
.obj summary::-webkit-details-marker { display: none; }
.obj[open] summary { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.obj p { padding: 9px 11px; }
.cross { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 13px; }
.cross .ic { color: #c2620f; margin-top: 1px; }

/* ---------- Fiches ---------- */
.fiche-h { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding: 20px 22px; }
.fiche-av { width: 56px; height: 56px; border-radius: 14px; background: var(--navy-50); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; flex-shrink: 0; }
.fiche-t { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.fiche-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.next-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); border: 1px solid; }
.next-card .ic-w { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(255, 255, 255, .7); }
.next-card .nt { font-weight: 700; font-size: 15px; }
.next-card .nx { font-size: 13px; margin-top: 2px; opacity: .9; }
.next-card.tone-warning { border-color: #f3d38f; }
.next-card.tone-info { border-color: #bcd0fb; }
.next-card.tone-violet { border-color: #d6c8fb; }
.next-card.tone-teal { border-color: #9fd9d7; }
.next-card.tone-success { border-color: #a9e2bd; }
.next-card.tone-danger { border-color: #f6b9b4; }
.next-card.tone-muted { border-color: var(--border); }
.pieces { display: flex; flex-direction: column; }
.piece { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--border); cursor: pointer; user-select: none; }
.piece:last-child { border-bottom: 0; }
.piece .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-2); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; transition: background .12s, border-color .12s; }
.piece.ok .box { background: var(--teal); border-color: var(--teal); }
.piece.ok span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.piece:hover .box { border-color: var(--teal); }
.timeline { display: flex; flex-direction: column; }
.tl-i { display: flex; gap: 12px; padding: 11px 0; position: relative; }
.tl-i:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 40px; bottom: -4px; width: 2px; background: var(--border); }
.tl-ic { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tl-b { min-width: 0; flex: 1; }
.tl-t { font-size: 13.5px; }
.tl-t b { font-weight: 650; }
.tl-x { font-size: 13px; color: var(--text-2); margin-top: 3px; white-space: pre-line; }
.tl-d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.note-box { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.note-box textarea { min-height: 40px; height: 40px; }
.note-box textarea:focus { min-height: 76px; }
.mini-d { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface); }
.mini-d:hover { border-color: var(--teal); }
.mini-d + .mini-d { margin-top: 8px; }
.dates { display: flex; flex-direction: column; gap: 0; }
.date-i { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
.date-i .dt-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border-2); background: var(--surface); flex-shrink: 0; }
.date-i.done .dt-dot { background: var(--teal); border-color: var(--teal); }
.date-i.late .dt-dot { background: var(--red); border-color: var(--red); }
.date-i .dl { color: var(--text-2); flex: 1; }
.date-i .dv { font-variant-numeric: tabular-nums; font-weight: 600; }
.date-i.todo .dv { color: var(--muted); font-weight: 500; }

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: center; gap: 0; flex-wrap: wrap; row-gap: 8px; }
.step { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.step:hover:not([disabled]) { background: var(--hover); }
.step[disabled] { cursor: default; }
.step-n { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-2); display: flex; align-items: center; justify-content: center; font-size: 11.5px; background: var(--surface); }
.step.done { color: var(--teal-700); }
.step.done .step-n { background: var(--teal); border-color: var(--teal); color: #fff; }
.step.on { color: var(--text); }
.step.on .step-n { border-color: var(--teal); color: var(--teal-700); box-shadow: 0 0 0 4px var(--teal-50); }
.step-sep { width: 22px; height: 2px; background: var(--border); flex-shrink: 0; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(208px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--slate-bg); border-radius: 12px; padding: 8px; min-height: 160px; transition: background .12s, box-shadow .12s; }
.kcol.drop { background: var(--teal-50); box-shadow: inset 0 0 0 2px var(--teal); }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 6px 6px 10px; }
.kcol-h b { font-size: 13.5px; }
.kcol-h .cnt { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface); border-radius: 10px; padding: 1px 7px; }
.kcol-h .sum { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; box-shadow: var(--shadow-sm); cursor: pointer; transition: box-shadow .12s, border-color .12s, transform .12s; }
.kcard + .kcard { margin-top: 8px; }
.kcard:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.kcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.kcard.late { border-left: 3px solid var(--red); }
.kc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.kc-ref { font-size: 11.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: auto; }
.kc-foot > span:not(.kc-amt) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kc-amt { flex-shrink: 0; }
.kc-name { font-weight: 650; font-size: 13.5px; }
.kc-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.kc-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 12px; color: var(--muted); }
.kc-amt { margin-left: auto; font-weight: 700; color: var(--text); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.kc-prog { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.kc-prog .progress { flex: 1; height: 5px; }
.kcol-empty { text-align: center; color: var(--faint); font-size: 12.5px; padding: 18px 8px; border: 1.5px dashed var(--border-2); border-radius: 10px; }

/* ---------- Graphiques ---------- */
.chart-wrap { position: relative; }
.chart { width: 100%; height: var(--h); display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .base { stroke: var(--border-2); stroke-width: 1; }
.chart .axis { font-size: 11px; fill: var(--muted); font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: rgba(15, 27, 45, .04); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tip { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; background: var(--navy); color: #fff; font-size: 12.5px; padding: 8px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .1s; max-width: 280px; line-height: 1.5; }
.tip.on { opacity: 1; }
.tip-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hb { display: grid; grid-template-columns: 140px minmax(0, 1fr) 90px; gap: 12px; align-items: center; font-size: 13px; }
.hb-l { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-bar { height: 12px; background: var(--slate-bg); border-radius: 4px; overflow: hidden; }
.hb-bar span { display: block; height: 100%; background: var(--teal); border-radius: 0 4px 4px 0; }
.hb-v { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.hb-v small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.bullet { position: relative; height: 26px; background: var(--slate-bg); border-radius: 7px; margin: 30px 0 34px; }
.bullet .val { position: absolute; left: 0; top: 0; bottom: 0; background: var(--teal); border-radius: 7px; }
.bullet .proj { position: absolute; left: 0; top: 7px; bottom: 7px; border: 2px dashed var(--teal); border-left: 0; border-radius: 0 5px 5px 0; }
.bullet .mk { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--navy); }
.bullet .mk span { position: absolute; top: -20px; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.bullet .mk em { position: absolute; bottom: -20px; transform: translateX(-50%); font-size: 11.5px; font-style: normal; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Trésorerie ---------- */
.treso-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.big-num { font-size: 38px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big-num small { font-size: 16px; font-weight: 600; color: var(--muted); }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.flow > div { padding: 14px 16px; border-right: 1px solid var(--border); position: relative; }
.flow > div:last-child { border-right: 0; }
.flow .fl { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.flow .fv { font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 3px; }
.flow .fs { font-size: 12px; color: var(--muted); }

/* ---------- Paramètres ---------- */
.set-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--topbar-h) + 22px); }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.set-nav a:hover { background: var(--hover); }
.set-nav a.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.set-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.prod-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.prod-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12px; background: #0f1b2d; color: #d6e2f0; border-radius: 10px; padding: 14px; overflow: auto; max-height: 320px; white-space: pre; line-height: 1.5; }
.code-inline { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--slate-bg); padding: 2px 6px; border-radius: 5px; }
.q-edit { display: grid; grid-template-columns: minmax(0, 1.6fr) 130px 90px minmax(0, 1.2fr) 70px 36px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.list-edit { display: flex; flex-direction: column; gap: 6px; }
.list-edit .row .input { flex: 1; }
.conn { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.conn-ic { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.steps-list { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); font-size: 13.5px; }
.steps-list li { margin: 4px 0; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--blue-bg); color: #1e3a8a; font-size: 13px; align-items: flex-start; }
.callout.warn { background: var(--amber-bg); color: #7c4a03; }
.callout .ic { margin-top: 1px; }

/* ---------- Modales, menus, notifications ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow: auto; }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 27, 45, .42); opacity: 0; transition: opacity .14s; }
.modal { position: relative; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 560px; max-width: 100%; transform: translateY(8px) scale(.985); opacity: 0; transition: transform .16s, opacity .16s; display: flex; flex-direction: column; max-height: 88vh; }
.modal-wrap.in .modal-bg { opacity: 1; }
.modal-wrap.in .modal { transform: none; opacity: 1; }
.modal-wrap.out .modal, .modal-wrap.out .modal-bg { opacity: 0; }
.modal-sm { width: 420px; }
.modal-lg { width: 780px; }
.modal-xl { width: 1000px; }
.modal-h { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px 12px 20px; border-bottom: 1px solid var(--border); }
.modal-h > div { flex: 1; min-width: 0; }
.modal-t { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.modal-t .ic { color: var(--teal); }
.modal-s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.modal-b { padding: 18px 20px; overflow: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.confirm-t { margin: 0; color: var(--text-2); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.quick button { border: 1px solid var(--border-2); background: var(--surface); border-radius: 8px; padding: 6px 10px; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.quick button:hover, .quick button.on { border-color: var(--teal); background: var(--teal-50); color: var(--teal-700); }
.pop-menu { position: fixed; z-index: 150; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; }
.pop-i { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13.5px; }
.pop-i:hover { background: var(--hover); }
.pop-i .ic { color: var(--muted); }
.pop-i small { margin-left: auto; color: var(--faint); font-size: 11.5px; }
.pop-i.on { background: var(--teal-50); color: var(--teal-700); font-weight: 600; }
.pop-i.danger { color: var(--red); }
.pop-i.danger .ic { color: var(--red); }
.pop-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.pop-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 8px 10px 4px; }
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; transform: translateY(10px); opacity: 0; transition: transform .2s, opacity .2s; pointer-events: auto; max-width: min(560px, 92vw); }
.toast.in { transform: none; opacity: 1; }
.toast.tone-dark { background: var(--navy); color: #fff; }
.toast.tone-dark .ic { color: #5fd3cf; }
.toast.tone-danger { background: var(--red); color: #fff; }
.toast-a { border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; padding: 5px 10px; border-radius: 7px; cursor: pointer; margin-left: 6px; }
.toast-a:hover { background: rgba(255, 255, 255, .26); }
.notif-i { display: flex; gap: 10px; padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.notif-i:hover { background: var(--hover); }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .ic { color: var(--faint); margin-bottom: 4px; }
.empty-t { font-weight: 650; color: var(--text-2); }
.empty-x { font-size: 13px; max-width: 420px; }
.dropzone { border: 2px dashed var(--border-2); border-radius: 14px; padding: 34px 20px; text-align: center; color: var(--muted); cursor: pointer; transition: border .12s, background .12s; display: block; }
.dropzone:hover, .dropzone.over { border-color: var(--teal); background: var(--teal-50); }
.dropzone b { color: var(--text); }
.map-tbl td { padding: 7px 10px; }
.map-tbl .input { height: 32px; font-size: 13px; }
.preview { font-size: 12px; color: var(--muted); max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .call-grid { grid-template-columns: minmax(0, 1fr); }
  .call-grid .script-panel { position: static; max-height: none; }
  .g-main { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-side, .treso-hero { grid-template-columns: minmax(0, 1fr); }
  .clocks .clock:nth-child(3) { display: none; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow > div:nth-child(2) { border-right: 0; }
  .flow > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(15, 27, 45, .35); z-index: 25; }
  .tb-burger { display: inline-flex; }
  .topbar { padding: 0 14px; gap: 8px; }
  .clocks { display: none; }
  .page { padding: 16px 16px 40px; }
  .call-page { padding: 12px 12px 20px; }
  .call-grid { grid-template-columns: minmax(0, 1fr); }
  .call-grid .panel { position: static; }
  .ov-grid, .ov.has-card .ov-grid { grid-template-columns: minmax(0, 1fr); max-height: 300px; }
  .ov.has-card .ov-grid { max-height: 128px; }
  .band-ov .band-max { display: none; }
  .call-grid .script-panel { max-height: none; }
  .g2, .g3, .g4, .fgrid, .fgrid3 { grid-template-columns: minmax(0, 1fr); }
  .goal { grid-template-columns: minmax(0, 1fr); }
  .goal .btn-cta { width: 100%; }
  .set-grid { grid-template-columns: minmax(0, 1fr); }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; }
  .hb { grid-template-columns: 100px minmax(0, 1fr) 70px; }
  .q-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .page-h .actions { margin-left: 0; }
  .search kbd { display: none; }
}
@media (max-width: 520px) {
  #newBtn span { display: none; }
  #newBtn { width: 38px; padding: 0; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .lc-phone .big { font-size: 20px; }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Fichiers analysés : priorités, catégories, assistant prospection ---------- */
.prio { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0; flex-shrink: 0; }
.prio-A { background: #15803d; color: #fff; }
.prio-B { background: #f5c451; color: #5c3b00; }
.prio-C { background: var(--slate-bg); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-2); }
.tbl th.c, .tbl td.c { text-align: center; width: 54px; }
.cell-act { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; margin-top: 1px; }
.cell-why { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

.catbar { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; margin: 0 0 12px; }
.cat { --cc: var(--text-2); --cbg: var(--surface); position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 11px 13px 12px 15px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; box-shadow: var(--shadow-sm); min-width: 0; overflow: hidden; }
.cat:hover { border-color: var(--border-2); }
.cat .cat-top { display: flex; align-items: center; gap: 8px; color: var(--cc); }
.cat .cat-top b { font-size: 21px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.cat .cat-l { font-weight: 650; font-size: 13px; color: var(--text); }
.cat .cat-d { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.cat .cat-p { display: flex; flex-wrap: wrap; gap: 3px 7px; font-size: 12px; font-weight: 600; color: var(--text-2); margin-top: 3px; align-items: center; }
.cat .cat-p .prio { width: 16px; height: 16px; font-size: 10px; border-radius: 4px; margin-right: 2px; }
.cat.on { border-color: var(--cc); background: var(--cbg); box-shadow: 0 0 0 1px var(--cc); }
.cat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cc); }
.cat-success { --cc: var(--green); --cbg: var(--green-bg); }
.cat-warning { --cc: #c07a06; --cbg: var(--amber-bg); }
.cat-muted { --cc: #64748b; --cbg: var(--slate-bg); }
.cat-danger { --cc: var(--red); --cbg: var(--red-bg); }
.cat-neutral { --cc: #475569; --cbg: var(--slate-bg); }
.cat-info { --cc: var(--blue); --cbg: var(--blue-bg); }
.cat-all { --cc: var(--navy); --cbg: var(--navy-50); }
.cat-off { background: repeating-linear-gradient(135deg, var(--surface) 0 8px, var(--surface-2) 8px 16px); }
.cat-off .cat-top b { color: var(--muted); }
.cat-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); margin: -2px 0 12px; }
.cat-hint .ic { color: var(--faint); }

.lot-bar { display: flex; gap: 2px; height: 8px; border-radius: 6px; overflow: hidden; margin: 12px 0 8px; background: var(--slate-bg); }
.lot-bar span { display: block; min-width: 3px; }
.seg-success { background: #16a34a; } .seg-warning { background: #e3a008; } .seg-muted { background: #94a3b8; } .seg-danger { background: #dc2626; } .seg-neutral { background: #64748b; } .seg-info { background: var(--blue); }
.lot-leg { display: flex; flex-wrap: wrap; gap: 0 12px; margin-bottom: 2px; }
.lot-leg button, .lot-leg .lot-dbl { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 5px; margin: 0 -5px; border-radius: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; text-align: left; }
.lot-leg button:hover { background: var(--hover); }
.lot-leg button.on { background: var(--int-50); color: var(--int); font-weight: 600; }
.lot-leg i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.lot-leg .lot-dbl { cursor: default; color: var(--muted); }
.lot-leg .lot-dbl i, .ana-imp-list .off i { background: repeating-linear-gradient(135deg, #cbd5e1 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px #cbd5e1; }

.assist { overflow: hidden; border-color: #c9d8f0; }
.assist-h { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: linear-gradient(120deg, #f2f7ff 0%, #eefaf9 100%); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.assist-ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, var(--navy) 0%, var(--teal) 100%); color: #fff; flex-shrink: 0; box-shadow: 0 4px 12px rgba(18, 40, 74, .22); }
.assist-t { font-weight: 750; font-size: 16px; letter-spacing: -.01em; }
.assist-s { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.prio-big { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); }
.prio-big b { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; }
.prio-big span { font-size: 11.5px; line-height: 1.25; color: var(--muted); }
.prio-big.prio-A, .prio-big.prio-B, .prio-big.prio-C { background: var(--surface); color: inherit; box-shadow: none; }
.prio-big.prio-A b { background: #15803d; color: #fff; }
.prio-big.prio-B b { background: #f5c451; color: #5c3b00; }
.prio-big.prio-C b { background: var(--slate-bg); color: var(--text-2); }
.assist-b { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
.assist-col { padding: 16px 20px; min-width: 0; }
.assist-col + .assist-col { border-left: 1px solid var(--border); }
.assist-col h4 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.assist-col h4 .ic { color: var(--teal); }
.ap { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.ap + .ap { margin-top: 8px; }
.ap-h { display: flex; align-items: center; gap: 8px; }
.ap-n { font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 6px; }
.ap-why { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.ap-angle { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--teal-700); margin-top: 6px; }
.ap-angle .ic { margin-top: 2px; }
.ap-key { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: #fff8e6; border: 1px solid #f3dca0; font-size: 12.5px; color: #6b4a00; }
.ap-key .ic { color: #c9a14a; margin-top: 1px; }
.sdots { display: inline-flex; gap: 3px; }
.sdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); }
.sdots i.on { background: var(--teal); }
.akv { grid-template-columns: 104px minmax(0, 1fr); font-size: 12.5px; }
.assist-more { margin-top: 12px; display: flex; gap: 5px; flex-direction: column; }
.assist-more .chip { white-space: normal; height: auto; min-height: 22px; padding: 2px 8px; align-self: flex-start; }
.assist-f { display: flex; gap: 8px; align-items: flex-start; padding: 11px 20px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.assist-f .ic { color: var(--green); margin-top: 1px; }

/* Fenêtre d'analyse d'un fichier */
.ana-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ana-step { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.ana-step-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ana-step-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--teal-50); color: var(--teal-700); }
.ana-step-n { font-size: 11px; font-weight: 700; color: var(--faint); }
.ana-step b { font-size: 13.5px; }
.ana-step p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.fgrid.ana-lot { margin-top: 16px; grid-template-columns: 2fr 1fr 1fr; }
.ana-run { max-width: 560px; margin: 18px auto 10px; text-align: center; }
.ana-run-ic { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(140deg, var(--navy) 0%, var(--teal) 100%); animation: anaPulse 1.6s ease-in-out infinite; }
@keyframes anaPulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(10, 147, 150, .35); } 50% { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(10, 147, 150, 0); } }
.ana-run-t { font-weight: 700; font-size: 15px; }
.ana-run-s { font-size: 12.5px; color: var(--muted); margin: 3px 0 14px; min-height: 18px; }
.progress.ana-bar { height: 10px; }
.ana-run-k { display: flex; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.ana-run-k b { color: var(--text); font-variant-numeric: tabular-nums; }
.ana-run-steps { list-style: none; padding: 0; margin: 18px 0 0; display: flex; justify-content: center; gap: 18px; font-size: 12.5px; color: var(--faint); flex-wrap: wrap; }
.ana-run-steps li { display: flex; align-items: center; gap: 6px; }
.ana-run-steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.ana-run-steps li.on { color: var(--teal-700); font-weight: 600; }
.ana-run-steps li.on::before { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-100); }
.ana-run-steps li.done { color: var(--text-2); }
.ana-run-steps li.done::before { background: var(--green); }
.catbar.ana-cats { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.ana-cats .cat-d { font-size: 11px; }
.ana-f { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ana-f-l { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 2px 0 8px; }
.ana-f-l:first-child { margin-left: 0; }
.ana-f .search-in { height: 32px; font-size: 13px; width: 230px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.fchip:hover { border-color: var(--border-2); }
.fchip.on { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-100); color: var(--text); }
.ana-tbl { max-height: 330px; overflow: auto; }
.ana-tbl .cell-main, .ana-tbl .cell-sub { max-width: 230px; }
.ana-why { max-width: 320px; color: var(--text-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tbl tr.ana-off td { color: var(--muted); background: var(--surface-2); }
.tbl tr.ana-off .cell-main { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-2); }
.ana-imp { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-top: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); align-items: start; }
.ana-imp-t { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.ana-imp-t .ic { color: var(--teal); }
.ana-imp-list { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.ana-imp-list span { display: flex; align-items: center; gap: 7px; }
.ana-imp-list i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.ana-imp-list .off { color: var(--muted); }
.ana-done { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0 4px; }
@media (max-width: 1100px) { .assist-b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .assist-prod { grid-column: 1 / -1; border-bottom: 1px solid var(--border); } .assist-col + .assist-col { border-left: 0; } .assist-b .assist-col:last-child { border-left: 1px solid var(--border); } }
@media (max-width: 900px) { .ana-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ana-imp { grid-template-columns: minmax(0, 1fr); } .fgrid.ana-lot { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .assist-b { grid-template-columns: minmax(0, 1fr); } .assist-b .assist-col:last-child { border-left: 0; border-top: 1px solid var(--border); } .catbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ana-steps { grid-template-columns: minmax(0, 1fr); } }
.lc-assist { border: 1px solid #c9d8f0; background: linear-gradient(120deg, #f2f7ff 0%, #eefaf9 100%); border-radius: 10px; padding: 10px 12px 12px; margin-bottom: 16px; }
.lc-assist .lc-sec-t { display: flex; align-items: center; gap: 6px; }
.lc-assist .lc-sec-t .ic { color: var(--teal); }
.lca-p { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.lca-p .pchip { flex-shrink: 0; }
.lotpick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.lotpick-l { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.lotpick .fchip { max-width: 320px; }
.lotpick .fchip > span:last-child { color: var(--muted); font-weight: 600; }
.lp-n { min-width: 0; color: var(--text-2); }
.lp-box { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--border-2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface); }
.lp-box.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.lg-google { gap: 10px; font-weight: 600; margin-bottom: 4px; }
.lg-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 14px 0 10px; }
.lg-sep::before, .lg-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.lg-steps { font-size: 13px; line-height: 1.5; color: var(--text-2); background: var(--teal-50); border: 1px solid var(--teal-100); border-radius: 10px; padding: 10px 12px; }
/* En-tête de fiche : sur écran étroit, les boutons passent sous le nom au lieu de l'écraser */
.fiche-h > .grow { min-width: min(100%, 300px); flex: 1 1 300px; }
.lc-phone .big { white-space: nowrap; }
