@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: 'Garet';
  src: url('/static/fonts/Garet-Book.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}


:root {
  --deep:    #230B2E;
  --deep2:   #1A0821;
  --lav:     #C294E9;
  --lav-dim: rgba(194,148,233,.18);
  --lav-mid: rgba(194,148,233,.35);
  --yellow:  #FFCE4E;
  --yellow2: #FFB800;
  --bg:      #F6F2FF;
  --surface: #FFFFFF;
  --border:  #EAE0F5;
  --text:    #1C0E2A;
  --muted:   #7A6A8A;
  --danger:  #E53E3E;
  --success: #38A169;
  --warn:    #DD6B20;
  --info:    #3182CE;
  --sidebar: 230px;
  --r:       10px;
  --r-lg:    16px;
  --sh:      0 1px 3px rgba(35,11,46,.08), 0 4px 16px rgba(35,11,46,.06);
  --sh-md:   0 4px 20px rgba(35,11,46,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

strong, b, h1, h2, h3, h4, h5, h6 { font-weight: 600; }

html { font-size: 15px; }

#app {
  display: flex;
  flex: 1;
  min-width: 0;
}

body {
  font-family: 'Garet', 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* ── Login ─────────────────────────────────────────────────────────────────── */

.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--deep2) 0%, var(--deep) 60%, #3d1060 100%);
}

.login-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 40px;
  width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.login-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.4rem; font-weight: 600; color: var(--deep);
  margin-bottom: 24px;
}

.login-card h2 { font-size: 1.3rem; font-weight: 600; }
.login-sub { color: var(--muted); font-size: .85rem; margin-bottom: 24px; }
.error-msg { color: var(--danger); font-size: .82rem; margin-bottom: 10px; }

/* ── Sidebar ────────────────────────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar);
  background: linear-gradient(180deg, var(--deep2) 0%, var(--deep) 100%);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 50;
  padding: 0 0 16px;
}

.logo-area {
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(194,148,233,.15);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.logo-mark { flex-shrink: 0; }
.logo-text-wrap { min-width: 0; }
.logo-text {
  font-size: 17px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  font-family: 'Garet', sans-serif;
}
.logo-sub {
  font-size: 10px;
  color: rgba(194,148,233,0.6);
  font-weight: 500;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Notification bell ── */
.notif-bell {
  position: relative;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  color: rgba(255,255,255,.55);
  transition: all .15s;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-bell:hover { color: #fff; background: rgba(194,148,233,.18); }
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  background: #E24B4A;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--deep);
  padding: 0 2px;
}
.notif-badge.hidden { display: none; }

/* ── Notification drawer items ── */
.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.notif-item:hover { background: var(--off); }
.notif-item.non-lue { background: rgba(194,148,233,.26); border-left: 3px solid var(--purple); }
.notif-item.lue { background: var(--surface); }
.notif-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.notif-titre { font-size: 12px; font-weight: 700; color: var(--deep); margin-bottom: 2px; }
.notif-message { font-size: 11px; color: var(--muted); line-height: 1.5; margin-bottom: 3px; }
.notif-date { font-size: 10px; color: var(--muted); }
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
  margin-top: 4px;
  align-self: flex-start;
}

@keyframes bellRing {
  0%   { transform: rotate(0); }
  15%  { transform: rotate(16deg); }
  30%  { transform: rotate(-13deg); }
  45%  { transform: rotate(10deg); }
  60%  { transform: rotate(-7deg); }
  75%  { transform: rotate(4deg); }
  90%  { transform: rotate(-2deg); }
  100% { transform: rotate(0); }
}
.bell-ring { animation: bellRing 0.75s ease-in-out; }

.toggle-wrap { position:relative; display:inline-block; width:38px; height:22px; flex-shrink:0; }
.toggle-wrap input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; cursor:pointer; inset:0; background:#D1C4E9; border-radius:22px; transition:.25s; }
.toggle-slider:before { position:absolute; content:""; height:16px; width:16px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:.25s; }
.toggle-wrap input:checked + .toggle-slider { background:var(--lav); }
.toggle-wrap input:checked + .toggle-slider:before { transform:translateX(16px); }

.field-with-suffix { display:flex; align-items:center; gap:0; border:1.5px solid var(--border); border-radius:9px; overflow:hidden; background:var(--surface); transition:border-color .15s; }
.field-with-suffix:focus-within { border-color:var(--lav); }
.field-with-suffix input { border:none; outline:none; padding:10px 12px; font-size:13px; background:transparent; flex:1; color:var(--deep); min-width:0; }
.field-with-suffix .field-suffix { padding:10px 12px; background:var(--bg); border-left:1px solid var(--border); font-size:12px; font-weight:600; color:var(--muted); white-space:nowrap; user-select:none; flex-shrink:0; }

.nav-list { list-style: none; flex: 1; }

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .88rem; font-weight: 600;
  border-left: 3px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-link.active { color: var(--yellow); background: rgba(255,206,78,.1); border-left-color: var(--yellow); }

.nav-icon { font-size: 1rem; width: 18px; text-align: center; }

.sidebar-footer {
  padding: 12px 12px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 8px;
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px;
  color: rgba(255,255,255,.6);
  font-size: .78rem; font-weight: 600;
  border-radius: var(--r);
  transition: background .15s;
  position: relative;
}
.user-chip:hover { background: rgba(194,148,233,.2); color: rgba(255,255,255,.85); }
.user-chip-gear { opacity: 0; transition: opacity .15s; font-size: .85rem; margin-left: auto; }
.user-chip:hover .user-chip-gear { opacity: 1; }

.btn-logout {
  width: 100%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.55);
  padding: 7px;
  border-radius: var(--r);
  font-size: .78rem; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  margin-top: 4px;
}
.btn-logout:hover { background: rgba(229,62,62,.2); color: #ff8c8c; border-color: rgba(229,62,62,.3); }

/* ── Main content ───────────────────────────────────────────────────────────── */

.main-content {
  margin-left: var(--sidebar);
  flex: 1;
  padding: 28px 32px;
  max-width: calc(100vw - var(--sidebar));
  min-height: 100vh;
}

.page { display: none; }
.page.active { display: block; }

/* ── Page header ────────────────────────────────────────────────────────────── */

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.page-title { font-size: 1.5rem; font-weight: 600; color: var(--deep); }
.page-title small { font-size: .8rem; color: var(--muted); font-weight: 500; margin-left: 8px; }

/* ── Stats grid ─────────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: var(--sh);
}

.stat-value { font-size: 2rem; font-weight: 600; color: var(--deep); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--muted); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.stat-accent .stat-value { color: var(--lav); }
.stat-warn .stat-value { color: var(--warn); }
.stat-success .stat-value { color: var(--success); }

/* ── KPI grid (analytics page) ──────────────────────────────────────────────── */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

@media (min-width: 1400px) {
  .kpi-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ── Filters ────────────────────────────────────────────────────────────────── */

.filters { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }

.search-input, .filter-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: .88rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  font-weight: 500;
}

.search-input { min-width: 220px; }
.search-input:focus, .filter-select:focus { border-color: var(--lav); }

/* ── Jobs split layout ──────────────────────────────────────────────────────── */

.jobs-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: calc(100vh - 58px);
  overflow: hidden;
}

.jobs-list-panel {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  height: 100%;
  padding: 0 16px 24px 0;
}

.quick-view-panel {
  width: 360px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  flex-shrink: 0;
  transition: max-width 0.25s cubic-bezier(.4,0,.2,1),
              opacity 0.22s ease;
}

.jobs-layout.with-preview .quick-view-panel {
  max-width: 360px;
  overflow-y: auto;
  height: 100%;
  border-left: 1.5px solid #EAE4F5;
  background: white;
  padding: 20px 24px;
  opacity: 1;
  pointer-events: auto;
}

.qv-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 300px; color: var(--muted); gap: 12px;
}
.qv-empty-icon { font-size: 2.5rem; }
.qv-empty-text { font-size: .88rem; text-align: center; }

.qv-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--muted);
  line-height: 1; padding: 4px;
}
.qv-close:hover { color: var(--danger); }

.qv-title { font-weight: 600; font-size: 1rem; color: var(--deep); margin-bottom: 4px; }
.qv-sub { font-size: .8rem; color: var(--muted); margin-bottom: 16px; }

.qv-pipeline {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.qv-stage {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px;
  cursor: pointer; text-decoration: none;
  transition: border-color .15s;
  min-width: 56px;
}
.qv-stage:hover { border-color: var(--lav); }
.qv-stage-count { font-weight: 600; font-size: 1rem; color: var(--deep); }
.qv-stage-label { font-size: .65rem; color: var(--muted); text-align: center; }

.qv-info { font-size: .83rem; }
.qv-info-row { display: flex; gap: 8px; margin-bottom: 6px; }
.qv-info-label { color: var(--muted); min-width: 90px; font-size: .78rem; }
.qv-info-value { font-weight: 600; flex: 1; }

.card.selected { border-color: var(--lav); box-shadow: 0 0 0 3px rgba(194,148,233,.25); }

/* ── Cards grid ─────────────────────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--sh);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}

.card:hover { border-color: var(--lav); box-shadow: 0 6px 24px rgba(194,148,233,.18); transform: translateY(-1px); }
.card.npc-card { border-color: rgba(229,62,62,.4); background: rgba(229,62,62,.03); }

.card-name { font-weight: 600; font-size: 1rem; color: var(--deep); }
.card-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }

/* ── Tags / Keywords ────────────────────────────────────────────────────────── */

.tag {
  display: inline-block;
  background: var(--lav-dim);
  color: var(--deep);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
}

.tag-match { background: rgba(255,206,78,.25); color: #7a5a00; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: .71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.badge-actif          { background: #C6F6D5; color: #22543D; }
.badge-en_attente     { background: #FEFCBF; color: #744210; }
.badge-ferme          { background: #FED7D7; color: #742A2A; }
.badge-gagne          { background: #BEE3F8; color: #2A4365; }
.badge-cv_importe     { background: #E9D8FD; color: #44337A; }
.badge-shortliste     { background: #BEE3F8; color: #2A4365; }
.badge-entretien      { background: #FEFCBF; color: #744210; }
.badge-envoye         { background: #C6F6D5; color: #22543D; }
.badge-presente       { background: #B2F5EA; color: #1D4044; }
.badge-accepte        { background: #C6F6D5; color: #22543D; font-weight: 600; }
.badge-npc            { background: #FED7D7; color: #742A2A; }
.badge-cdi            { background: #EBF8FF; color: #2B6CB0; }
.badge-freelance      { background: #FAF5FF; color: #553C9A; }
.badge-les_deux       { background: #E9D8FD; color: #44337A; }
.badge-inconnu        { background: #F7FAFC; color: #4A5568; }
.badge-ic             { background: rgba(255,206,78,.3); color: #7a5a00; }
.badge-npc-flag       { background: #FED7D7; color: #742A2A; }
.badge-zone-ok        { background: #C6F6D5; color: #22543D; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r);
  border: none;
  font-size: .88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s, transform .12s, background .15s, box-shadow .15s;
  white-space: nowrap;
}

.btn:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(35,11,46,.12); }
.btn:active { transform: scale(.97) translateY(0); box-shadow: none; }

.btn-primary  { background: var(--lav); color: var(--deep); }
.btn-cta      { background: var(--yellow); color: var(--deep); }
.btn-ghost    { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-full     { width: 100%; justify-content: center; }
.btn-sm       { padding: 5px 11px; font-size: .8rem; }
.btn-icon     { padding: 6px 8px; }

/* ── Forms ───────────────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }

input[type="text"], input[type="email"], input[type="number"], input[type="password"],
input[type="url"], input[type="date"], select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
}

input:focus, select:focus, textarea:focus { border-color: var(--lav); }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

.tag-input-container {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  background: var(--surface);
  cursor: text;
  min-height: 40px;
  transition: border-color .15s;
}
.tag-input-container:focus-within { border-color: var(--lav); }
.tag-input-container .tag { cursor: pointer; }
.tag-input-container .tag:hover { background: rgba(229,62,62,.15); }
.tag-input-item { border: none; outline: none; font-family: inherit; font-size: .85rem; font-weight: 500; flex: 1; min-width: 120px; }

/* ── Mobility Tag Picker ─────────────────────────────────────────────────────── */

.mob-picker {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  background: var(--surface);
  cursor: text;
  min-height: 38px;
  transition: border-color .15s;
  position: relative;
}
.mob-picker:focus-within { border-color: var(--lav); }
.mob-picker-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mob-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(194,148,233,.2); color: var(--deep);
  border-radius: 5px; padding: 2px 7px; font-size: .76rem; font-weight: 600;
}
.mob-badge-rm { cursor: pointer; opacity: .5; line-height: 1; font-size: .9em; }
.mob-badge-rm:hover { opacity: 1; color: #B91C1C; }
.mob-picker-input {
  border: none; outline: none; font-family: inherit; font-size: .84rem; font-weight: 500;
  flex: 1; min-width: 90px; background: transparent; padding: 3px 0;
}
.mob-picker-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(35,11,46,.14);
  z-index: 150; max-height: 210px; overflow-y: auto;
}
.mob-drop-group {
  padding: 7px 11px 3px; font-size: .68rem; font-weight: 700;
  color: var(--muted); letter-spacing: .07em; text-transform: uppercase;
}
.mob-opt {
  padding: 6px 12px; font-size: .84rem; cursor: pointer; transition: background .1s;
}
.mob-opt:hover { background: var(--lav-dim); color: var(--deep); }
.mob-drop-empty { padding: 10px 12px; font-size: .82rem; color: var(--muted); font-style: italic; }

/* ── Action Bar ─────────────────────────────────────────────────────────────── */

.action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--lav-dim);
  border-radius: 9px;
  margin: 10px 0;
  border: 1.5px solid var(--lav);
}

.selection-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--deep);
  flex: 1;
}

/* ── Credits Bar ─────────────────────────────────────────────────────────────── */

.credits-bar-bg {
  width: 100%; height: 5px;
  background: rgba(255,255,255,.1);
  border-radius: 3px; overflow: hidden; margin: 6px 0 0;
}
.credits-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width .3s ease;
}

/* ── Modal ───────────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 0, 20, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  backdrop-filter: blur(3px);
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 600px;
  max-width: 96vw;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(35,11,46,.3);
}
.modal-lg { width: 780px; }
.modal-xl { width: 960px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 600; color: var(--deep); }
.modal-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--border); }
.modal-body { padding: 20px 24px 24px; }

/* ── Toast ───────────────────────────────────────────────────────────────────── */

.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 20px;
  border-radius: var(--r);
  font-size: .88rem; font-weight: 600;
  box-shadow: var(--sh-md);
  z-index: 300;
  max-width: 340px;
  transition: opacity .3s;
}
.toast.hidden { display: none; }
.toast.success { background: var(--success); color: #fff; }
.toast.error   { background: var(--danger);  color: #fff; }
.toast.warn    { background: var(--yellow);  color: var(--deep); }
.toast.info    { background: var(--info);    color: #fff; }

/* ── Kanban ──────────────────────────────────────────────────────────────────── */

.kanban-board {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
}

.kanban-col {
  min-width: 200px; width: 200px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 10px;
}

.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}

.kanban-col-title {
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted);
}

.kanban-count {
  background: var(--lav-dim);
  color: var(--deep);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: .7rem; font-weight: 600;
}

.kanban-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 7px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .1s;
}
.kanban-card:hover { border-color: var(--lav); box-shadow: 0 2px 8px var(--lav-dim); }
.kanban-card .kc-name { font-weight: 600; font-size: .85rem; color: var(--deep); }
.kanban-card .kc-meta { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.kanban-card .kc-badges { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.kanban-card.ic-card { border-color: rgba(255,206,78,.5); }

/* ── Detail panel ────────────────────────────────────────────────────────────── */

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin-bottom: 16px; }
.detail-item { display: flex; flex-direction: column; }
.detail-label { font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.detail-value { font-size: .88rem; font-weight: 600; color: var(--deep); margin-top: 1px; }

.section-title {
  font-size: .75rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin: 16px 0 8px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Empty state ─────────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--muted);
  width: 100%; display: block;
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--deep); }
.empty-state p { font-size: .85rem; margin-top: 4px; }

/* ── Score bar ───────────────────────────────────────────────────────────────── */

.score-bar { display: flex; align-items: center; gap: 8px; }
.score-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }

/* ── Dossier preview modal (full-height iframe) ──────────────────────────────── */

.modal-xl { width: min(96vw, 1100px); max-height: 92vh; }
#dossier-preview-frame { background: #F1F5F9; }
#preview-iframe { display: block; }

/* ── Settings — color picker row ─────────────────────────────────────────────── */

input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  background: none;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }

/* ── User profile modal — password strength ──────────────────────────────────── */

#mp-pwd-strength { background: var(--border); }

/* ── Dossier branding section ────────────────────────────────────────────────── */

#logo-preview { transition: opacity .2s; }
#logo-preview:hover { opacity: .85; }
.score-fill { height: 100%; border-radius: 3px; background: var(--lav); transition: width .4s; }
.score-fill.high { background: var(--success); }
.score-fill.ic   { background: var(--yellow2); }
.score-num { font-size: .75rem; font-weight: 600; color: var(--muted); min-width: 32px; text-align: right; }

/* ── Table ───────────────────────────────────────────────────────────────────── */

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 12px; border-bottom: 2px solid var(--border); }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .88rem; vertical-align: middle; }
.data-table tr:hover td { background: var(--lav-dim); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Progress bar ────────────────────────────────────────────────────────────── */

.progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--lav); }

/* ── Page Aide ───────────────────────────────────────────────────────────────── */

.aide-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.aide-nav {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 13px;
  padding: 10px;
  position: sticky;
  top: 0;
}

.aide-nav-section {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}
.aide-nav-section:hover { background: var(--lav-dim); color: var(--deep); }
.aide-nav-section.active { background: rgba(194,148,233,.3); color: var(--deep); }

.aide-content { padding-right: 4px; }

.aide-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border);
}
.aide-section-title:first-child { margin-top: 0; }

.aide-article {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  margin-bottom: 8px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.aide-article-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.aide-article-header:hover { background: var(--bg); }
.aide-article-header.open { background: var(--lav-dim); border-bottom: 1px solid var(--border); }

.aide-article-title { font-size: 13px; font-weight: 700; color: var(--deep); }

.aide-chevron { transition: transform 0.2s; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.aide-article-header.open .aide-chevron { transform: rotate(90deg); }

.aide-article-body {
  display: none;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
}
.aide-article-body.open { display: block; }
.aide-article-body p { margin-bottom: 10px; }
.aide-article-body p:last-child { margin-bottom: 0; }
.aide-article-body strong { color: var(--deep); }
.aide-article-body ul { padding-left: 18px; margin-bottom: 10px; }
.aide-article-body li { margin-bottom: 3px; }

.aide-search-bar {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-size: 14px;
  font-family: 'Garet', sans-serif;
  background: var(--surface);
  color: var(--text);
  margin-bottom: 20px;
  outline: none;
  transition: border-color 0.15s;
}
.aide-search-bar:focus { border-color: var(--lav); }

/* ── Animations globales ─────────────────────────────────────────────────────── */

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-content {
  animation: pageEnter 0.25s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-animated {
  opacity: 0;
  animation: cardIn 0.28s ease both;
}
.card-animated:nth-child(1) { animation-delay: 0.03s; }
.card-animated:nth-child(2) { animation-delay: 0.07s; }
.card-animated:nth-child(3) { animation-delay: 0.11s; }
.card-animated:nth-child(4) { animation-delay: 0.15s; }
.card-animated:nth-child(5) { animation-delay: 0.19s; }
.card-animated:nth-child(n+6) { animation-delay: 0.22s; }

/* Hover amélioré pour les cards candidat/affaire */
.card { transition: border-color .18s, box-shadow .18s, transform .18s; }
.affaire-card { transition: border-color .18s, box-shadow .18s, transform .18s; }
.candidate-card { transition: border-color .18s, box-shadow .18s, transform .18s; }

/* Modal fade-in */
@keyframes modalOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalContentIn {
  from { opacity: 0; transform: scale(.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-overlay:not(.hidden) {
  animation: modalOverlayIn .2s ease both;
}
.modal-overlay:not(.hidden) .modal {
  animation: modalContentIn .22s ease both;
}

/* Notification drawer — glisse depuis derrière la nav */
#notif-drawer-overlay {
  position: fixed;
  top: 0; left: 220px; right: 0; bottom: 0;
  z-index: 39;
  background: rgba(0,0,0,0);
  pointer-events: none;
  transition: background .28s ease;
}
#notif-drawer-overlay.open {
  background: rgba(0,0,0,0.18);
  pointer-events: auto;
}
.notif-drawer-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  height: 100vh;
  background: var(--surface);
  box-shadow: 4px 0 24px rgba(0,0,0,.1);
  z-index: 40; /* en dessous de la nav (z-index:50) */
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.notif-drawer-panel.open {
  transform: translateX(220px); /* glisse jusqu'à droite de la nav */
}

/* KPI info icons & tooltip */
.kpi-info-icon {
  color: var(--muted);
  font-size: 11px;
  cursor: help;
  line-height: 1;
  opacity: .7;
  transition: opacity .15s;
}
.kpi-info-icon:hover { opacity: 1; color: var(--lav); }
.kpi-tooltip {
  position: fixed;
  background: var(--deep);
  color: #fff;
  font-size: .75rem;
  padding: 7px 11px;
  border-radius: 8px;
  max-width: 220px;
  z-index: 9999;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

/* Disponibilité intercontrat */
.dispo-maintenant { color: var(--success); font-weight: 700; }
.dispo-future     { color: var(--success); font-weight: 600; }
.dispo-inconnue   { color: var(--muted); }

/* IC extraction spinner */
.ic-extract-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--lav);
  border-top-color: transparent;
  border-radius: 50%;
  animation: btnSpin .7s linear infinite;
  flex-shrink: 0;
}

/* Nav item transitions */
.nav-link {
  transition: background .15s, color .15s, padding-left .15s;
}

/* Credits bar fill */
.credits-bar-fill {
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* ── Wisteria Loader v2 ───────────────────────────────────────────────────────── */

.wisteria-loader-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 28px 0; gap: 12px; min-height: 80px;
}
.wisteria-loader-track {
  width: 220px; max-width: 90%; height: 4px;
  background: rgba(194,148,233,.15); border-radius: 99px; overflow: hidden;
  position: relative;
}
.wisteria-loader-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(194,148,233,.6) 40%,
    rgba(255,255,255,.9) 55%,
    rgba(194,148,233,.6) 70%,
    transparent 100%);
  border-radius: 99px;
  animation: loaderShimmer 1.5s ease-in-out infinite;
}
@keyframes loaderShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
.wisteria-loader-msg {
  font-size: .8rem; color: var(--muted); font-weight: 500; letter-spacing: .01em;
  transition: opacity .3s;
}
.wisteria-loader-msg.fading { opacity: 0; }

/* ── Global AI progress bar ──────────────────────────────────────────────────── */
#ai-progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
#ai-progress-bar.active { opacity: 1; }
#ai-progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--lav) 0%, rgba(255,255,255,.8) 50%, var(--lav) 100%);
  background-size: 200% 100%;
  animation: aiBarSlide 1.2s linear infinite;
}
@keyframes aiBarSlide {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ── Button loading spinner ──────────────────────────────────────────────────── */
@keyframes btnSpin { to { transform: rotate(360deg); } }
.btn.loading {
  pointer-events: none;
  opacity: 0.75;
}
.btn.loading::after {
  content: '';
  display: inline-block;
  width: 11px; height: 11px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btnSpin 0.65s linear infinite;
  margin-left: 7px;
  vertical-align: middle;
}

/* ── Toast notifications ─────────────────────────────────────────────────────── */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 6px 24px rgba(35,11,46,.14);
  pointer-events: all;
  cursor: pointer;
  animation: toastIn .28s cubic-bezier(.34,1.56,.64,1) both;
  transition: opacity .22s, transform .22s;
}
.toast.dismissing {
  opacity: 0;
  transform: translateX(20px);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-body { flex: 1; }
.toast-title {
  font-weight: 600;
  font-size: .85rem;
  color: var(--deep);
  margin-bottom: 2px;
}
.toast-msg {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.45;
}
.toast-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: .9rem; padding: 2px 4px;
  border-radius: 5px; line-height: 1; flex-shrink: 0;
  opacity: .7;
}
.toast-close:hover { opacity: 1; background: var(--border); }

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error   { border-left: 4px solid var(--danger); }
.toast.toast-info    { border-left: 4px solid var(--lav); }
.toast.toast-warn    { border-left: 4px solid var(--warn); }

.aide-support-footer {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--lav-dim);
  border-radius: 13px;
  text-align: center;
  border: 1.5px solid var(--border);
}

.aide-section { margin-bottom: 32px; }

.page-subtitle { font-size: .88rem; color: var(--muted); margin-top: 4px; }

.aide-article-body ol { padding-left: 18px; margin-bottom: 10px; }
.aide-article-body ol li { margin-bottom: 3px; }
.aide-article-body dl { margin: 0; }
.aide-article-body dt { font-weight: 700; color: var(--deep); margin-top: 8px; }
.aide-article-body dd { margin-left: 14px; color: var(--text); margin-bottom: 4px; }

@media (max-width: 900px) {
  .aide-container { grid-template-columns: 1fr; }
  .aide-nav { position: static; }
}

/* ── Alert banner ────────────────────────────────────────────────────────────── */

.alert-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r);
  margin-bottom: 12px;
  font-size: .88rem; font-weight: 600;
}
.alert-warn { background: rgba(221,107,32,.1); border: 1.5px solid rgba(221,107,32,.3); color: var(--warn); }
.alert-danger { background: rgba(229,62,62,.08); border: 1.5px solid rgba(229,62,62,.25); color: var(--danger); }
.alert-info { background: var(--lav-dim); border: 1.5px solid var(--lav-mid); color: var(--deep); }

/* ── NPC banner ──────────────────────────────────────────────────────────────── */

.npc-banner { background: rgba(229,62,62,.08); border: 1.5px solid rgba(229,62,62,.3); border-radius: var(--r); padding: 8px 14px; display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--danger); margin-bottom: 12px; }

/* ── AI result ───────────────────────────────────────────────────────────────── */

.ai-result {
  background: linear-gradient(135deg, var(--lav-dim) 0%, rgba(255,206,78,.08) 100%);
  border: 1.5px solid var(--lav-mid);
  border-radius: var(--r);
  padding: 16px;
  position: relative;
}

.ai-result pre { white-space: pre-wrap; font-family: inherit; font-size: .85rem; line-height: 1.6; }

.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--lav); color: var(--deep);
  border: none; border-radius: 6px;
  padding: 4px 10px; font-size: .72rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.copy-btn:hover { opacity: .8; }

/* ── Dashboard sections ──────────────────────────────────────────────────────── */

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.dash-card h3 { font-size: .85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }

/* ── Settings tabs ───────────────────────────────────────────────────────────── */
.settings-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.settings-tab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; padding: 8px 14px; font-size: .82rem; cursor: pointer; border-radius: 6px 6px 0 0; color: var(--muted); transition: color .12s, background .12s; }
.settings-tab:hover { color: var(--text); background: rgba(194,148,233,.08); }
.settings-tab.active { color: var(--deep); font-weight: 700; border-bottom-color: var(--lav); }

/* ── Task widget ─────────────────────────────────────────────────────────────── */

.tasks-header {
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--border);
}
.tasks-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tasks-count { font-size: 12px; color: var(--muted); }

.task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 0.5px solid var(--border);
  transition: background 0.12s ease;
}
.task-item:last-child { border-bottom: none; }
.task-item:hover { background: var(--bg); }
.task-content { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.task-actions { display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity 0.15s; flex-shrink: 0; }
.task-item:hover .task-actions { opacity: 1; }
.btn-tache-valider {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.btn-tache-valider:hover { border-color: var(--success); color: var(--success); background: rgba(56,161,105,.1); }
.btn-tache-ignorer {
  width: 26px; height: 26px; border-radius: 7px;
  border: none; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.btn-tache-ignorer:hover { color: var(--deep); background: var(--bg); }

.task-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.task-dot.now  { background: #FFCE4E; }
.task-dot.soon { background: #C294E9; }

.task-body { flex: 1; min-width: 0; overflow: hidden; }
.task-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-arrow-icon {
  color: var(--muted);
  font-size: 13px;
  flex-shrink: 0;
}

/* Legacy aliases (keep existing refs working) */
.task-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: background .12s; }
.task-card:hover { background: rgba(194,148,233,.08); }
.task-icon { font-size: 1.3rem; flex-shrink: 0; width: 28px; text-align: center; }
.task-content { flex: 1; min-width: 0; }
.task-titre { font-size: .84rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-desc { font-size: .74rem; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-arrow { font-size: .9rem; color: var(--muted); flex-shrink: 0; }

/* ── Upload zone ─────────────────────────────────────────────────────────────── */

.upload-zone {
  border: 2px dashed var(--lav-mid);
  border-radius: var(--r);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  color: var(--muted);
  font-size: .88rem;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--lav); background: var(--lav-dim); }
.upload-zone input { display: none; }
.upload-zone .upload-icon { font-size: 2rem; margin-bottom: 8px; }
.upload-zone strong { color: var(--lav); cursor: pointer; }

/* ── Tabs ────────────────────────────────────────────────────────────────────── */

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab { padding: 8px 16px; font-size: .88rem; font-weight: 600; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s; }
.tab.active { color: var(--lav); border-bottom-color: var(--lav); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Comment ─────────────────────────────────────────────────────────────────── */

.comment-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-author { font-weight: 600; font-size: .82rem; color: var(--deep); }
.comment-date { font-size: .72rem; color: var(--muted); }
.comment-text { font-size: .85rem; color: var(--text); }

/* ── Spinner ─────────────────────────────────────────────────────────────────── */

.spinner {
  width: 20px; height: 20px;
  border: 3px solid var(--lav-mid);
  border-top-color: var(--lav);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay { display: flex; align-items: center; justify-content: center; padding: 40px; }

/* ── Misc ────────────────────────────────────────────────────────────────────── */

.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warn); }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.gap-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.flex-end { justify-content: flex-end; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 16px; max-width: 100vw; }
  .form-row, .form-row-3, .dashboard-grid { grid-template-columns: 1fr; }
  .kanban-board { flex-direction: column; }
  .kanban-col { width: 100%; }
}

/* ── Match separator ─────────────────────────────────────────────────────────── */

.match-separator td {
  padding: 6px 0;
  position: relative;
}
.match-separator td:first-child {
  padding-left: 8px;
}
.match-separator-inner {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}
.match-separator-inner::before,
.match-separator-inner::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── MultiSelect dropdown ────────────────────────────────────────────────────── */

.ms-wrap { position: relative; width: 100%; }
.ms-trigger {
  width: 100%; min-height: 38px; padding: 6px 10px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  background: var(--surface); cursor: pointer;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: .88rem; color: var(--text); text-align: left;
  transition: border-color .15s;
}
.ms-trigger:focus-within,
.ms-trigger.open { border-color: var(--lav); }
.ms-placeholder { color: var(--muted); pointer-events: none; }
.ms-badges { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.ms-badge {
  background: var(--lav-dim); color: var(--deep);
  border-radius: 20px; padding: 2px 8px;
  font-size: .75rem; font-weight: 600; display: flex; align-items: center; gap: 4px;
}
.ms-badge-x { cursor: pointer; opacity: .6; }
.ms-badge-x:hover { opacity: 1; }
.ms-caret { margin-left: auto; color: var(--muted); font-size: .75rem; flex-shrink: 0; }
.ms-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: white; border: 1.5px solid var(--border); border-radius: var(--r);
  box-shadow: 0 4px 16px rgba(0,0,0,.12); max-height: 220px; overflow-y: auto;
  display: none;
}
.ms-dropdown.open { display: block; }
.ms-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer; font-size: .87rem;
  transition: background .1s;
}
.ms-option:hover { background: var(--bg); }
.ms-option.selected { background: var(--lav-dim); }
.ms-option-check { width: 16px; height: 16px; accent-color: var(--lav); flex-shrink: 0; }
.ms-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--lav-dim);
  color: var(--deep); font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── Back button ─────────────────────────────────────────────────────────────── */

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: .83rem; font-weight: 600;
  color: var(--deep); background: var(--lav-dim);
  border: 1.5px solid var(--lav-mid); border-radius: 20px;
  cursor: pointer; transition: all .15s; margin-bottom: 12px;
}
.back-btn:hover { background: rgba(194,148,233,.28); border-color: var(--lav); }

/* ── Clickable stat-cards ─────────────────────────────────────────────────────── */

.stat-card.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.stat-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(35,11,46,0.12);
}


/* ── CGU Page ────────────────────────────────────────────────────────────────── */
#cgu-screen { display:none; position:fixed; top:0; left:0; right:0; bottom:0; width:100%; min-height:100vh; z-index:1000; background:var(--bg); overflow-y:auto; }
#cgu-screen.active { display:block; }

.cgu-header { background:var(--deep); padding:16px 32px; display:flex; align-items:center; justify-content:space-between; }
.cgu-logo { font-size:22px; font-weight:800; color:#fff; letter-spacing:-.03em; }
.cgu-step { font-size:12px; color:rgba(255,255,255,.5); font-weight:500; }

.cgu-container { max-width:780px; margin:40px auto; padding:0 24px; width:100%; }

.cgu-intro { margin-bottom:24px; }
.cgu-intro h1 { font-size:24px; font-weight:700; color:var(--deep); margin-bottom:8px; }
.cgu-intro p { font-size:14px; color:var(--muted); line-height:1.6; }

.cgu-text-wrap {
  background:var(--surface); border:1.5px solid var(--border); border-radius:13px;
  height:420px; overflow-y:auto; padding:28px 32px; margin-bottom:24px; scroll-behavior:smooth;
  position:relative;
}
.cgu-text { font-size:13px; line-height:1.8; color:var(--text); }
.cgu-text h2 { font-size:15px; font-weight:700; color:var(--deep); margin:24px 0 8px; padding-bottom:6px; border-bottom:1.5px solid var(--border); }
.cgu-text h2:first-child { margin-top:0; }
.cgu-text h3 { font-size:13px; font-weight:700; color:var(--deep); margin:16px 0 6px; }
.cgu-text p { margin-bottom:10px; }
.cgu-text ul { padding-left:20px; margin-bottom:10px; }
.cgu-text li { margin-bottom:4px; }

.cgu-scroll-hint {
  text-align:center; font-size:11px; color:var(--muted); font-style:italic;
  padding:6px 0 2px; opacity:1; transition:opacity .4s;
}
.cgu-scroll-hint.hidden { opacity:0; pointer-events:none; }

.cgu-accept-zone { background:var(--surface); border:1.5px solid var(--border); border-radius:13px; padding:24px; margin-bottom:40px; }
.cgu-checkbox-wrap { display:flex; align-items:flex-start; gap:12px; cursor:pointer; margin-bottom:20px; }
.cgu-checkbox-wrap input[type=checkbox] { width:18px; height:18px; margin-top:2px; accent-color:var(--lav); flex-shrink:0; cursor:pointer; }
.cgu-checkbox-label { font-size:13px; color:var(--deep); line-height:1.6; font-weight:500; }

.btn-cgu-accept {
  width:100%; padding:14px; background:var(--deep); color:#fff; border:none;
  border-radius:10px; font-size:15px; font-weight:700; cursor:pointer;
  transition:background .15s, transform .15s; font-family:inherit; letter-spacing:-.01em;
}
.btn-cgu-accept:disabled { opacity:.4; cursor:not-allowed; transform:none !important; }
.btn-cgu-accept:not(:disabled):hover { background:#3D1A5E; transform:translateY(-1px); }

.cgu-refus-note { margin-top:12px; font-size:11px; color:var(--muted); text-align:center; line-height:1.5; }

/* Public /cgu page — read-only */
.cgu-public-wrap { max-width:780px; margin:48px auto; padding:0 24px 60px; }
.cgu-public-wrap h1 { font-size:22px; font-weight:700; color:var(--deep); margin-bottom:6px; }
.cgu-public-wrap .cgu-text { font-size:14px; }

/* -- Autocomplete client -------------------------------------------------- */
.autocomplete-wrap { position:relative; }
.autocomplete-dropdown {
  position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:200;
  background:var(--surface); border:1.5px solid var(--border); border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.10); max-height:200px; overflow-y:auto;
}
.autocomplete-option {
  padding:10px 14px; font-size:13px; cursor:pointer; color:var(--deep);
  transition:background .1s;
}
.autocomplete-option:hover { background:var(--bg); }

/* ── RGPD page ───────────────────────────────────────────────────────────────── */

.rgpd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.rgpd-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}
.rgpd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.rgpd-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rgpd-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.rgpd-card-icon.warning { background: #FEF9C3; color: #854F0B; }
.rgpd-card-icon.danger  { background: #FEE2E2; color: #B91C1C; }
.rgpd-card-title { font-weight: 600; font-size: 15px; color: var(--deep); }
.rgpd-card-sub   { font-size: 13px; color: var(--muted); margin-top: 4px; }
.btn-danger-ghost {
  border: 1.5px solid #E53E3E;
  color: #E53E3E;
  background: transparent;
}
.btn-danger-ghost:hover { background: #FEE2E2; }
.rgpd-all-clear {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: #D1FAE5;
  border-radius: 13px;
  color: #065F46;
  font-size: 14px;
  margin-bottom: 24px;
}
.rgpd-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg);
  border-radius: 11px;
  padding: 16px;
}
.kpi-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.kpi-value { font-size: 26px; font-weight: 700; color: var(--deep); }
.kpi-value-warn { color: #854F0B; }
.rgpd-tech-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  flex: 1;
  gap: 12px;
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.rgpd-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
@media (max-width: 600px) {
  .rgpd-kpis { grid-template-columns: repeat(2, 1fr); }
}
.rgpd-candidat-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 9px;
  transition: background 0.1s;
}
.rgpd-candidat-ligne:hover { background: var(--bg); }
.rgpd-candidat-nom { font-weight: 600; font-size: 13px; color: var(--deep); }

/* ── Color mode tabs ─────────────────────────────────────────────────────────── */

.btn-color-mode {
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 700;
  font-family: monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
  transition: background .12s, color .12s;
}
.btn-color-mode.active {
  background: var(--lav-dim);
  border-color: var(--lav);
  color: var(--deep);
}
.btn-color-mode:hover:not(.active) { background: var(--lav-dim); }

/* ── Font preview cards ──────────────────────────────────────────────────────── */

.font-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.font-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s, background .15s;
  text-align: center;
  user-select: none;
}
.font-card:hover { border-color: var(--lav); background: var(--lav-dim); }
.font-card--active {
  border-color: var(--lav);
  background: var(--lav-dim);
  box-shadow: 0 0 0 2px var(--lav);
}
.font-card-sample {
  display: block;
  font-size: 1.1rem;
  color: var(--deep);
  min-height: 1.6em;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
}
.font-card-name {
  font-size: .72rem;
  font-weight: 700;
  color: var(--deep);
  line-height: 1.3;
  text-transform: none;
  letter-spacing: normal;
}
.font-card-tag {
  font-size: .68rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}
@media (max-width: 768px) {
  .font-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mails de refus ──────────────────────────────────────────────────────────── */

.mails-refus-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mail-refus-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background .12s;
}
.mail-refus-item:hover { background: var(--lav-dim); }
.mail-refus-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.mail-refus-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.mail-refus-nom {
  font-size: .88rem;
  font-weight: 600;
  color: var(--deep);
  cursor: pointer;
  white-space: nowrap;
}
.mail-refus-nom:hover { text-decoration: underline; }
.mail-refus-statut {
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.mail-refus-statut.en_attente { background: rgba(234,179,8,.15); color: #854d0e; }
.mail-refus-statut.envoye     { background: rgba(34,197,94,.15); color: #166534; }
.mail-refus-statut.annule     { background: rgba(148,163,184,.15); color: #64748b; }
.mail-refus-statut.erreur     { background: rgba(239,68,68,.12); color: #dc2626; }
.mail-refus-date {
  font-size: .76rem;
  color: var(--muted);
  white-space: nowrap;
}
