/* Women First Agent — interface de pilotage. Charte Women First : navy #082B5C, bleu pastel #D5ECFA, Inter / Cormorant Garamond. */
:root {
  --bg: #F5F7FB; --surface: #FFFFFF; --surface-2: #F9FAFC; --line: #E4E8F0; --line-2: #EEF1F6;
  --text: #0F1B2D; --muted: #5C6B82; --faint: #8A97AB;
  --navy: #082B5C; --navy-2: #0E3B78; --pastel: #D5ECFA; --pastel-2: #EAF5FD;
  --ok: #157F5B; --ok-bg: #E3F5EE; --warn: #9A6200; --warn-bg: #FDF1DC; --err: #B42318; --err-bg: #FDECEA; --info: #1D5FB8; --info-bg: #E8F0FC;
  --violet: #5B3FC4; --violet-bg: #EFEBFD;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 4px 16px rgba(15, 27, 45, .05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --display: "Cormorant Garamond", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--info); text-decoration: none; }
button { font: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------- coque ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 26px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--pastel); color: var(--navy); display: grid; place-items: center; font: 700 15px var(--display); }
.brand-name { font: 700 20px/1.05 var(--display); letter-spacing: .01em; }
.brand-sub { font-size: 11px; color: #A9C3E6; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #C9D8EE; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.on { background: rgba(213, 236, 250, .14); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .count { margin-left: auto; font-size: 11.5px; background: rgba(213, 236, 250, .18); padding: 1px 8px; border-radius: 99px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding: 14px 10px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--pastel); color: var(--navy); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.side-foot button { margin-left: auto; background: none; border: 0; color: #A9C3E6; cursor: pointer; font-size: 12.5px; }
.main { padding: 28px 36px 60px; min-width: 0; }
.topbar { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; font-weight: 700; }
.topbar .sub { color: var(--muted); margin-top: 3px; }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- briques ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-h h3 { font-size: 14.5px; font-weight: 600; }
.card-b { padding: 16px 18px 18px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g-main, .g2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } .main { padding: 18px; } }

.kpi { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi-l { color: var(--muted); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi-v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.kpi-dot { width: 8px; height: 8px; border-radius: 50%; }

.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 8px 13px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); border-color: #D3D9E4; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; } .btn.primary:hover { background: var(--navy-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); } .btn.ghost:hover { background: var(--line-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.b-reception { background: var(--info-bg); color: var(--info); } .b-a_relire { background: var(--warn-bg); color: var(--warn); }
.b-valide { background: var(--ok-bg); color: var(--ok); } .b-page { background: var(--violet-bg); color: var(--violet); } .b-erreur { background: var(--err-bg); color: var(--err); }
.b-neutre { background: var(--line-2); color: var(--muted); }
.pill { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--line-2); color: var(--muted); font-weight: 500; }
.spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tour .8s linear infinite; display: inline-block; }
@keyframes tour { to { transform: rotate(360deg); } }

/* ---------- pipeline ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 160px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 12px; font-weight: 600; font-size: 13px; }
.col-h .n { margin-left: auto; color: var(--faint); font-weight: 500; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; color: var(--text); transition: border-color .12s, transform .12s; }
.tile:hover { border-color: #C5D3E8; transform: translateY(-1px); }
.tile-n { font-weight: 600; } .tile-t { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-f { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.empty { color: var(--faint); font-size: 12.5px; padding: 10px 4px; }

/* ---------- listes ---------- */
.feed { display: flex; flex-direction: column; }
.feed-i { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.feed-i:last-child { border-bottom: 0; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pastel); border: 2px solid var(--info); margin-top: 6px; flex: none; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr.row { cursor: pointer; } .table tr.row:hover td { background: var(--pastel-2); }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { flex: 1; min-width: 220px; max-width: 360px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- formulaires ---------- */
.input, .textarea, select.input { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; font: inherit; color: var(--text); background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.input:focus, .textarea:focus { outline: none; border-color: #8BB3E8; box-shadow: 0 0 0 3px rgba(29, 95, 184, .12); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 360px; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.field { margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--faint); margin-top: 5px; }

/* ---------- dossier ---------- */
.dhead { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.dhead .avatar { width: 52px; height: 52px; font-size: 18px; background: var(--navy); color: var(--pastel); }
.dhead h1 { font-size: 24px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab { padding: 10px 14px; border: 0; background: none; color: var(--muted); font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.on { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }
.callout { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; display: flex; gap: 10px; }
.callout.warn { background: var(--warn-bg); color: #6F4700; } .callout.info { background: var(--info-bg); color: #18478A; } .callout.ok { background: var(--ok-bg); color: #0F5E43; } .callout.err { background: var(--err-bg); color: #8E1C12; }
.callout ul { margin: 4px 0 0; padding-left: 18px; }
.validbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--surface-2); margin-top: 16px; flex-wrap: wrap; }
.validbar.on { border-style: solid; border-color: #A8DCC6; background: var(--ok-bg); }

/* apercus */
.lp { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.lp-top { background: var(--navy); color: #fff; padding: 22px 22px 18px; }
.lp-top .k { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #A9C3E6; }
.lp-top .n { font: 700 28px/1.1 var(--display); margin-top: 8px; }
.lp-top .t { color: var(--pastel); margin-top: 6px; white-space: pre-line; font-size: 13.5px; }
.lp-b { padding: 18px 22px; background: #FAFBFD; } .lp-b p { margin: 0 0 11px; color: #2A3A52; font-size: 13.5px; }
.mail { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.mail-h { padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.mail-b { padding: 16px; font-size: 13.5px; color: #24324A; } .mail-b p { margin: 0 0 11px; }
.cvbtn { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #0a2540; color: #fff; border-radius: 4px; padding: 12px 16px; margin: 6px 0 14px; }
.cvbtn small { display: block; color: #a5b8d4; font-size: 11.5px; } .cvbtn span { background: #fff; color: #0a2540; border-radius: 3px; padding: 6px 12px; font-weight: 700; font-size: 12px; white-space: nowrap; }

.kv { display: grid; grid-template-columns: 210px 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .pill { background: var(--pastel-2); color: var(--navy); }
.fgroup { padding: 12px 0; border-bottom: 1px solid var(--line-2); } .fgroup:last-child { border-bottom: 0; }
.fgroup .lbl { margin-bottom: 8px; }
.md { font-size: 13.5px; } .md h1, .md h2, .md h3 { font-size: 14.5px; margin: 16px 0 6px; } .md ul { padding-left: 20px; margin: 6px 0; } .md p { margin: 6px 0; }
.md code { font-family: var(--mono); font-size: 12px; background: var(--line-2); padding: 1px 5px; border-radius: 4px; }
.pdf { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.cvtext { white-space: pre-wrap; font-size: 13px; max-height: 70vh; overflow: auto; background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; }

/* consignes */
.split { display: grid; grid-template-columns: 300px 1fr; gap: 16px; } @media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.clist a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: var(--text); }
.clist a.on { background: var(--pastel-2); } .clist a small { display: block; color: var(--faint); }
.group-t { padding: 12px 14px 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; }

/* connexion */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-l { background: radial-gradient(1200px 600px at 10% 10%, #0E3B78, var(--navy)); color: #fff; padding: 56px; display: flex; flex-direction: column; }
.auth-l h1 { font: 700 46px/1.05 var(--display); margin-top: auto; max-width: 460px; }
.auth-l p { color: #C9D8EE; max-width: 420px; }
.auth-r { display: grid; place-items: center; padding: 40px; }
.auth-box { width: 100%; max-width: 360px; }
.auth-box h2 { font-size: 22px; margin-bottom: 6px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-l { display: none; } }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--text); color: #fff; padding: 11px 15px; border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 27, 45, .25); font-size: 13px; max-width: 380px; }
.toast.err { background: var(--err); }
.skeleton { background: linear-gradient(90deg, var(--line-2), #F6F8FB, var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }
a.btn { text-decoration: none; }
