@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20CF; }
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20CF; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20CF; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF; }
@font-face { font-family: "PlexMono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --ink: #10262e; --ink2: #3a5059; --muted: #6d7f85; --paper: #f5f2ec; --card: #fff; --line: #e3ddd2; --line2: #efeae1;
  --accent: #d4502a; --accent-soft: #fbe9e2; --ok: #1d7757; --ok-soft: #e2f1ea; --warn: #9a6a12; --warn-soft: #f8eed6; --bad: #b3261e;
  --side: #10262e; --side2: #1b3640; --r: 10px; --sh: 0 1px 2px rgba(16, 38, 46, .06), 0 8px 24px -12px rgba(16, 38, 46, .18);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 "Plex", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
h1 { font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 16px; font-weight: 600; margin: 0; }
h3 { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: "PlexMono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; } .grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; } .wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 14px; } .between { justify-content: space-between; }
.hidden { display: none !important; }

/* structure */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.side { background: var(--side); color: #dfe8ea; display: flex; flex-direction: column; padding: 18px 12px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; color: #fff; }
.beacon { width: 26px; height: 26px; flex: none; }
.orgname { padding: 0 8px 12px; font-size: 12.5px; color: #9fb4ba; }
.side select { width: 100%; margin-bottom: 12px; background: var(--side2); border: 1px solid #2c4a55; color: #fff; border-radius: 8px; padding: 7px 8px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #c5d3d7; text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--side2); color: #fff; }
.nav a.on { background: #fff; color: var(--ink); }
.nav a.on svg { color: var(--accent); }
.nav svg { width: 17px; height: 17px; flex: none; }
.nav .sep { margin: 14px 10px 6px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #7f989f; }
.quota { margin-top: auto; padding: 14px 8px 4px; border-top: 1px solid #23414c; }
.quota h3 { color: #7f989f; }
.meter { margin-bottom: 9px; font-size: 12px; color: #b9c9cd; }
.meter .row { justify-content: space-between; gap: 6px; }
.bar { height: 4px; background: #2a4853; border-radius: 9px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: #f0a184; border-radius: 9px; }
.bar.light { background: var(--line2); height: 6px; } .bar.light i { background: var(--accent); transition: width .4s; }
.me { display: flex; align-items: center; gap: 8px; padding: 10px 8px 0; font-size: 12.5px; }
.me a { color: #9fb4ba; }
.main { padding: 30px 36px 110px; min-width: 0; max-width: 1280px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head p { color: var(--ink2); margin-top: 4px; max-width: 64ch; }

/* éléments */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #c9c1b2; background: #fdfcfa; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #bf4522; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line2); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn.big { padding: 11px 20px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.btn.danger { color: var(--bad); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=month], select, textarea { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; width: 100%; }
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink2); margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 400; color: var(--ink); margin: 8px 0; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.banner { border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; }
.banner.warn { background: var(--warn-soft); color: #6b4a08; } .banner.bad { background: #fbe4e2; color: #7f1d17; } .banner.info { background: #e6eef0; color: var(--ink2); }
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 1px 8px; font-size: 11.5px; font-weight: 500; background: var(--line2); color: var(--ink2); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--warn-soft); color: var(--warn); } .tag.bad { background: #fbe4e2; color: var(--bad); } .tag.acc { background: var(--accent-soft); color: #a33b1c; }
.prio { display: inline-block; min-width: 28px; text-align: center; border-radius: 6px; padding: 1px 6px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; }
.prio.Ap { background: var(--accent); color: #fff; } .prio.A { border-color: var(--accent); color: #a33b1c; } .prio.B { background: #e6eef0; color: var(--ink2); } .prio.C { color: var(--muted); border-color: var(--line); }
.score { font-family: "PlexMono", monospace; font-weight: 500; font-size: 15px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover { background: #fbf9f5; } tbody tr.sel { background: #fdf3ee; }
td.c, th.c { width: 34px; padding-right: 0; } td.c input, th.c input { accent-color: var(--accent); width: 15px; height: 15px; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }

/* recherche */
.searchbox { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh); padding: 22px 24px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; cursor: pointer; font-weight: 500; }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.searchbox textarea { font-size: 16px; min-height: 76px; border-color: #d6cec0; }
.vsum { font-size: 13px; color: var(--ink2); background: #faf8f4; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.vsum b { font-weight: 600; color: var(--ink); }
.job { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 14px 0; border-bottom: 1px solid var(--line2); }
.job:last-child { border-bottom: 0; padding-bottom: 2px; } .job:first-child { padding-top: 2px; }
.job .t { font-weight: 600; }
.spin { width: 13px; height: 13px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* leads */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select { width: auto; } .filters input[type=text] { width: 250px; }
.tabs { display: flex; gap: 2px; background: var(--line2); border-radius: 9px; padding: 3px; }
.tabs button { border: 0; background: transparent; border-radius: 7px; padding: 5px 11px; cursor: pointer; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.tabs .n { color: var(--muted); font-size: 12px; margin-left: 4px; }
.cname { font-weight: 600; } .csub { font-size: 12.5px; color: var(--muted); }
.selbar { position: fixed; left: 236px; right: 0; bottom: 0; background: var(--ink); color: #fff; padding: 12px 36px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; z-index: 20; box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .4); }
.selbar .btn { background: #1f3d48; border-color: #2f5360; color: #fff; } .selbar .btn:hover { background: #2a4d5a; } .selbar .btn.primary { background: var(--accent); border-color: var(--accent); }
.selbar .sp { width: 1px; height: 22px; background: #2f5360; margin: 0 4px; }

/* tiroir et fenêtres */
.veil { position: fixed; inset: 0; background: rgba(16, 38, 46, .38); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--paper); z-index: 41; overflow-y: auto; box-shadow: -12px 0 40px -18px rgba(0, 0, 0, .5); padding: 24px 26px 60px; }
.modal { position: fixed; z-index: 51; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 14px; padding: 22px 24px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.modal.wide { width: min(640px, calc(100vw - 32px)); }
.modal h2 { margin-bottom: 14px; font-size: 18px; } .veil.top { z-index: 50; }
.dhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.bigscore { font-family: "PlexMono", monospace; font-size: 44px; line-height: 1; font-weight: 500; letter-spacing: -.03em; }
.crit { display: grid; grid-template-columns: 92px auto 1fr; gap: 4px 12px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.crit:last-of-type { border-bottom: 0; }
.dots { display: flex; gap: 4px; padding-top: 3px; }
.dots button { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #c9c1b2; background: #fff; padding: 0; cursor: pointer; }
.dots button.on { background: var(--ink); border-color: var(--ink); } .dots button:hover { border-color: var(--accent); }
.sec { margin-top: 18px; }
.kv { margin-bottom: 10px; } .kv div:first-child { font-size: 12px; font-weight: 500; color: var(--muted); }
.src { display: flex; gap: 8px; align-items: baseline; font-size: 13px; padding: 3px 0; overflow-wrap: anywhere; }
.src .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; transform: translateY(-1px); } .src .dot.no { background: #d2a23a; }
.person { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; }
.person .n { font-weight: 600; } .person .l { font-size: 13px; display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 4px; overflow-wrap: anywhere; }
.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 9px; z-index: 99; box-shadow: var(--sh); max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); }

/* connexion */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: var(--side); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login .art h1 { font-size: 40px; max-width: 13ch; } .login .art p { color: #a9bdc3; margin-top: 14px; max-width: 34ch; font-size: 16px; }
.login .art svg.mast { position: absolute; right: -30px; bottom: -10px; width: 360px; height: 520px; opacity: .9; }
.login form { align-self: center; justify-self: center; width: min(340px, 86vw); }
.login form h2 { font-size: 22px; margin-bottom: 18px; }

.vcard { margin-bottom: 16px; } .vcard summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; align-items: center; justify-content: space-between; } .vcard summary::-webkit-details-marker { display: none; }
.vcard[open] summary { margin-bottom: 16px; }
.critrow { display: grid; grid-template-columns: 150px 80px 1fr 32px; gap: 8px; margin-bottom: 8px; align-items: start; }
.stat { font-family: "PlexMono", monospace; font-size: 22px; font-weight: 500; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } .quota { margin-top: 12px; } .main { padding: 20px 16px 130px; }
  .selbar { left: 0; padding: 10px 14px; } .login { grid-template-columns: 1fr; } .login .art { display: none; } .grid2, .grid3 { grid-template-columns: 1fr; } .critrow { grid-template-columns: 1fr 70px; } .hide-m { display: none; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } .bar.light i { transition: none; } }
