/* ===================================================================
   HUB · CRÉATION SINGULIÈRE — Design System
   DA officielle : gradient violet→rose→orange, navy #01003B, Poppins
   =================================================================== */

:root {
  /* Couleurs de marque */
  --violet:  #3F00C3;
  --pink:    #F51E9F;
  --orange:  #FD8030;
  --blue:    #00006B;
  --navy:    #01003B;
  --black:   #000000;

  /* Gradient signature */
  --grad: linear-gradient(120deg, #3F00C3 0%, #F51E9F 52%, #FD8030 100%);
  --grad-soft: linear-gradient(120deg, rgba(63,0,195,.12), rgba(245,30,159,.12), rgba(253,128,48,.12));

  /* Neutres / surfaces (thème clair, lisible pour des tableaux) */
  --bg:        #F4F5FA;
  --surface:   #FFFFFF;
  --surface-2: #FAFAFE;
  --line:      #E7E8F2;
  --line-strong:#D6D8E8;

  /* Texte */
  --ink:       #14123A;
  --ink-soft:  #514E73;
  --ink-faint: #8A88A6;

  /* États sémantiques (ancrés sur la palette) */
  --hot:    #FD8030;   /* chaud  */
  --warm:   #F5A623;   /* tiède  */
  --cold:   #4F6CF5;   /* froid  */
  --success:#16B979;
  --danger: #E5484D;

  /* Effets */
  --shadow-sm: 0 1px 2px rgba(20,18,58,.06), 0 1px 3px rgba(20,18,58,.04);
  --shadow:    0 4px 14px rgba(20,18,58,.08);
  --shadow-lg: 0 18px 50px rgba(20,18,58,.18);
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --sidebar-w: 256px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
a { color: inherit; }
::selection { background: rgba(245,30,159,.18); }
/* Taille par défaut des icônes SVG inline (les sélecteurs plus précis l'emportent) */
svg { width: 16px; height: 16px; flex-shrink: 0; }
.kc-foot svg { width: 13px; height: 13px; }
.pstep .pdot svg { width: 13px; height: 13px; }
.card-head h2 svg { width: 17px; height: 17px; }
.section-title svg { width: 18px; height: 18px; }
.reminder .drawer-section svg { width: 14px; height: 14px; }

/* Scrollbars discrètes */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* ============================== LAYOUT ============================== */
.layout { display: flex; min-height: 100vh; }

/* ---- Sidebar (navy + gradient, application sombre signature) ---- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: radial-gradient(140% 60% at 0% 0%, #1a0a5e 0%, var(--navy) 46%, #00002a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 16px;
  z-index: 30;
  overflow-y: auto;
  overflow-x: hidden;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand img { width: 38px; height: 38px; }
.brand .brand-name { font-weight: 700; font-size: 15px; line-height: 1.15; letter-spacing: .2px; }
.brand .brand-sub { font-size: 10.5px; color: rgba(255,255,255,.55); font-weight: 500; letter-spacing: .4px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.4); padding: 14px 12px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 11px;
  color: rgba(255,255,255,.74); font-weight: 500; font-size: 13.5px;
  transition: background .15s, color .15s; text-align: left; width: 100%;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(245,30,159,.35); }
.nav-item .nav-ico { width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center; }
.nav-item .nav-ico svg { width: 18px; height: 18px; }
.nav-item .badge {
  margin-left: auto; background: rgba(255,255,255,.16); color: #fff;
  font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 20px; min-width: 22px; text-align: center;
}
.nav-item.active .badge { background: rgba(255,255,255,.25); }

.sidebar-foot { margin-top: auto; padding-top: 16px; }
.role-switch {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 10px 12px;
}
.role-switch .rs-label { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.45); margin-bottom: 6px; font-weight:600; }
.role-switch select {
  width: 100%; background: transparent; border: none; color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; outline: none;
}
.role-switch select option { color: #14123A; }

/* ---- Main ---- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244,245,250,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 16px 28px; display: flex; align-items: center; gap: 16px;
}
.topbar .hamburger { display: none; }
.topbar h1 { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.topbar .sub { color: var(--ink-faint); font-size: 12.5px; font-weight: 500; }
.topbar .spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 8px 12px; width: 260px; box-shadow: var(--shadow-sm);
}
.search:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,30,159,.12); }
.search input { border: none; outline: none; background: none; flex: 1; width: 100%; }
.search svg { width: 16px; height: 16px; color: var(--ink-faint); flex-shrink: 0; }

.content { padding: 26px 28px 60px; max-width: 1500px; width: 100%; }

/* ============================== BOUTONS ============================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 16px; border-radius: 11px; font-weight: 600; font-size: 13.5px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  transition: transform .08s, box-shadow .15s, background .15s; box-shadow: var(--shadow-sm);
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: #fff; border: none; box-shadow: 0 8px 20px rgba(245,30,159,.28); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(245,30,159,.4); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-icon { padding: 8px; border-radius: 10px; }

/* ============================== CARTES / KPI ============================== */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi::after { content:''; position:absolute; right:-30px; top:-30px; width:90px; height:90px; border-radius:50%; background:var(--grad-soft); }
.kpi .kpi-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px; }
.kpi .kpi-ico svg { width: 19px; height: 19px; color: #fff; }
.kpi .kpi-val { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1; }
.kpi .kpi-label { color: var(--ink-faint); font-size: 12.5px; font-weight: 500; margin-top: 5px; }
.kpi .kpi-sub { font-size: 11.5px; font-weight: 600; margin-top: 7px; }
.grad-bg { background: var(--grad); }
.ico-violet { background: linear-gradient(135deg,#3F00C3,#6a3df0); }
.ico-pink   { background: linear-gradient(135deg,#F51E9F,#ff5cc0); }
.ico-orange { background: linear-gradient(135deg,#FD8030,#ffa760); }
.ico-blue   { background: linear-gradient(135deg,#00006B,#3a3ad6); }
.ico-green  { background: linear-gradient(135deg,#0f9d63,#19c787); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px 18px; }
.section-title { font-size: 16px; font-weight: 700; margin: 4px 0 14px; display:flex; align-items:center; gap:10px; }
.section-title .count { color: var(--ink-faint); font-weight: 600; font-size: 13px; }

/* ============================== BADGES / PILLS ============================== */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.pill-hot   { background: rgba(253,128,48,.14);  color: #c85a12; }
.pill-warm  { background: rgba(245,166,35,.16);  color: #b07000; }
.pill-cold  { background: rgba(79,108,245,.13);  color: #3a55d6; }
.pill-lead     { background: rgba(63,0,195,.10);   color: #3F00C3; }
.pill-prospect { background: rgba(245,30,159,.12); color: #c4117a; }
.pill-client   { background: rgba(22,185,121,.14); color: #0e8d5a; }
.pill-perdu    { background: rgba(138,136,166,.16);color: #6c6a85; }
.pill-neutral  { background: #EFEFF6; color: var(--ink-soft); }
.pill-success  { background: rgba(22,185,121,.14); color: #0e8d5a; }
.pill-danger   { background: rgba(229,72,77,.13);  color: #cc3338; }
.pill-grad     { background: var(--grad); color:#fff; }

/* ============================== KANBAN ============================== */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.kcol-head { padding: 13px 14px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; z-index: 2; }
.kcol-head .kdot { width: 9px; height: 9px; border-radius: 50%; }
.kcol-head .ktitle { font-weight: 700; font-size: 13.5px; }
.kcol-head .kcount { margin-left: auto; background: var(--surface); border:1px solid var(--line); color: var(--ink-soft); font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 20px; }
.kcol-head .ksum { font-size: 11px; color: var(--ink-faint); font-weight:600; }
.kcol-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.kcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: box-shadow .15s, transform .08s, border-color .15s;
}
.kcard:hover { box-shadow: var(--shadow); border-color: var(--line-strong); transform: translateY(-1px); }
.kcard .kc-top { display: flex; align-items: flex-start; gap: 8px; }
.kcard .kc-name { font-weight: 700; font-size: 14px; flex: 1; line-height: 1.25; }
.kcard .kc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.kcard .kc-amount { font-weight: 700; font-size: 13px; }
.kcard .kc-foot { display:flex; align-items:center; gap:8px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--ink-faint); }
.kcard .kc-foot .avatar { margin-left:auto; }
.kc-channel { font-size: 11px; color: var(--ink-faint); font-weight:500; }

.avatar { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink:0; }

/* ============================== TABLE ============================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-weight: 600; color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); z-index:1; }
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr { transition: background .12s; cursor: pointer; }
table.tbl tbody tr:hover { background: var(--surface-2); }
.cell-strong { font-weight: 600; }
.cell-muted { color: var(--ink-faint); }
th.sortable { cursor: pointer; user-select: none; transition: color .12s; }
th.sortable:hover { color: var(--violet); }
th.sortable.sorted { color: var(--pink); }
th.sortable .sort-ar { font-size: 9px; margin-left: 3px; opacity: .55; }
th.sortable.sorted .sort-ar { opacity: 1; }
th.sortable .sort-rank { display:inline-flex; align-items:center; justify-content:center; min-width:14px; height:14px; padding:0 3px; margin-left:4px; font-size:9px; font-weight:800; color:#fff; background:linear-gradient(135deg,#7c3aed,#db2777); border-radius:7px; vertical-align:middle; }
.chip-check { display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border:1.5px solid var(--border,#e6e3f0); border-radius:10px; font-size:13px; font-weight:600; cursor:pointer; user-select:none; transition:border-color .15s, background .15s; }
.chip-check:has(input:checked) { border-color:var(--pink,#db2777); background:rgba(219,39,119,.06); }
.chip-check input { accent-color:var(--pink,#db2777); }

/* ============================== PIPELINE PRODUCTION (steps) ============================== */
.prod-steps { display: flex; align-items: center; gap: 0; }
.pstep { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; position: relative; }
.pstep .pdot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink-faint); font-size: 11px; font-weight: 700; z-index:1; border: 2px solid var(--surface); }
.pstep.done .pdot { background: var(--success); color: #fff; }
.pstep.current .pdot { background: var(--grad); color: #fff; box-shadow: 0 0 0 4px rgba(245,30,159,.18); }
.pstep .plabel { font-size: 10px; color: var(--ink-faint); font-weight: 600; }
.pstep.done .plabel, .pstep.current .plabel { color: var(--ink); }
.pstep .pdate { font-size: 9.5px; color: var(--ink-faint); }
.pstep::before { content:''; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index:0; }
.pstep:first-child::before { display: none; }
.pstep.done::before, .pstep.current::before { background: var(--success); }

/* ============================== REMINDERS / DASHBOARD ============================== */
.reminder {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); transition: box-shadow .15s, border-color .15s; cursor: pointer;
}
.reminder:hover { box-shadow: var(--shadow); }
.reminder .r-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.reminder .r-ico svg { width: 18px; height: 18px; color: #fff; }
.reminder .r-main { flex: 1; min-width: 0; }
.reminder .r-title { font-weight: 600; font-size: 13.5px; }
.reminder .r-sub { font-size: 12px; color: var(--ink-faint); margin-top: 1px; }
.reminder .r-when { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.reminder.urgent { border-color: rgba(229,72,77,.4); background: rgba(229,72,77,.035); }
.reminder.soon { border-color: rgba(245,166,35,.4); background: rgba(245,166,35,.04); }

.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
@media (max-width: 1100px){ .split { grid-template-columns: 1fr; } }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-faint); }
.empty svg { width: 40px; height: 40px; margin-bottom: 10px; opacity: .5; }

/* progress bar */
.bar { height: 7px; border-radius: 20px; background: var(--line); overflow: hidden; }
.bar > span { display:block; height:100%; background: var(--grad); border-radius: 20px; }

/* ============================== DRAWER (detail / edit) ============================== */
.scrim { position: fixed; inset: 0; background: rgba(20,18,58,.42); backdrop-filter: blur(2px); z-index: 60; opacity: 0; animation: fade .2s forwards; }
@keyframes fade { to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 540px; max-width: 94vw;
  background: var(--surface); z-index: 70; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(100%); animation: slidein .26s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes slidein { to { transform: translateX(0); } }
.drawer-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.drawer-head .dh-title { font-size: 19px; font-weight: 700; line-height: 1.2; }
.drawer-head .dh-sub { color: var(--ink-faint); font-size: 12.5px; margin-top: 3px; }
.drawer-body { padding: 18px 22px 30px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; background: var(--surface-2); }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .3px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,30,159,.12); }
.field textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 6px; }
.info-item .il { font-size: 11px; text-transform: uppercase; letter-spacing:.4px; color: var(--ink-faint); font-weight: 600; margin-bottom: 3px; }
.info-item .iv { font-size: 13.5px; font-weight: 500; word-break: break-word; }
.info-item .iv a { color: var(--violet); text-decoration: none; font-weight:600; }
.info-item .iv a:hover { text-decoration: underline; }
.note-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; font-size: 13px; color: var(--ink-soft); line-height: 1.6; white-space: pre-wrap; margin-top: 6px; }
.drawer-section { margin: 20px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-faint); }

/* ============================== TOOLBAR / FILTERS ============================== */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 3px; box-shadow: var(--shadow-sm); }
.seg button { padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--ink-soft); }
.seg button.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(245,30,159,.28); }
.chip-filter { padding: 7px 13px; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 12.5px; color: var(--ink-soft); box-shadow: var(--shadow-sm); }
.chip-filter.active { background: var(--navy); color: #fff; border-color: var(--navy); }
select.mini { padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); font-weight: 600; font-size: 12.5px; box-shadow: var(--shadow-sm); cursor: pointer; }

/* ============================== TOAST ============================== */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 13px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px; animation: pop .25s; }
.toast svg { width: 17px; height: 17px; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

/* ============================== MISC ============================== */
.muted { color: var(--ink-faint); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 8px; }
.gap6 { gap: 6px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.hidden { display: none !important; }
.urgency-dot { width: 9px; height: 9px; border-radius: 50%; display:inline-block; }
.link-ext { color: var(--violet); font-weight: 600; text-decoration: none; display:inline-flex; align-items:center; gap:4px; }
.link-ext:hover { text-decoration: underline; }
.link-ext svg { width: 13px; height: 13px; }

/* ============================== LOGIN ============================== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% -10%, #1a0a5e 0%, var(--navy) 50%, #00002a 100%); }
.login-card { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 38px 34px; width: 100%; max-width: 380px; text-align: center; }
.login-logo { width: 64px; height: 64px; margin-bottom: 14px; }
.login-card h1 { font-size: 21px; font-weight: 700; }
.login-sub { color: var(--ink-faint); font-size: 13px; margin: 4px 0 22px; }
.login-card form { text-align: left; }
.login-card .field input { padding: 12px 14px; }
.login-err { display: flex; align-items: center; gap: 7px; color: var(--danger); font-size: 12.5px; font-weight: 600; background: rgba(229,72,77,.08); padding: 9px 12px; border-radius: 10px; margin-bottom: 8px; }
.remember-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-faint); cursor: pointer; margin: 12px 0 4px; user-select: none; }
.remember-label input { accent-color: #db2777; width: 15px; height: 15px; cursor: pointer; }
.kcard-readonly { cursor: pointer; opacity: .92; }

/* ---- Phase timeline (Mon CA créateur) ---- */
.phase-timeline { display:flex; align-items:flex-start; gap:0; flex-wrap:wrap; }
.phase-step { display:flex; flex-direction:column; align-items:center; flex:1; min-width:120px; padding:12px 8px; border-radius:10px; transition:background .2s; }
.phase-step.active { background:rgba(124,58,237,.25); border:1px solid rgba(124,58,237,.5); }
.phase-dot { width:14px; height:14px; border-radius:50%; background:rgba(255,255,255,.2); border:2px solid rgba(255,255,255,.3); margin-bottom:8px; flex-shrink:0; }
.phase-dot.active { background:linear-gradient(135deg,#7c3aed,#db2777); border-color:#db2777; box-shadow:0 0 10px rgba(219,39,119,.5); }
.phase-info { text-align:center; }
.phase-label { font-size:13px; font-weight:700; color:#fff; display:flex; align-items:center; justify-content:center; gap:6px; flex-wrap:wrap; }
.phase-arrow { display:flex; align-items:center; padding:0 4px; color:rgba(255,255,255,.3); font-size:18px; padding-top:10px; }

/* user card (sidebar foot) */
.user-card { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 9px 11px; }
.user-card .uc-name { font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .uc-role { font-size: 10.5px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.user-card .uc-out { color: rgba(255,255,255,.7); }
.user-card .uc-out:hover { background: rgba(255,255,255,.12); color:#fff; }
.sb-btn { flex: 1; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.14); }
.sb-btn:hover { background: rgba(255,255,255,.14); }

/* ============================== MONTH SWITCH ============================== */
.month-switch { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 3px; box-shadow: var(--shadow-sm); }
.month-switch select { border: none; background: none; font-weight: 700; font-size: 13px; padding: 4px 6px; cursor: pointer; outline: none; color: var(--ink); min-width: 116px; text-align: center; }
.month-switch .btn-icon { padding: 5px; }

/* ============================== PAY TOGGLE ============================== */
.pay-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); transition: all .15s; }
.pay-toggle:hover { border-color: var(--ink-faint); }
.pay-toggle.paid { background: rgba(22,185,121,.14); color: #0e8d5a; border-color: transparent; }
.pay-toggle svg { width: 13px; height: 13px; }

/* ============================== REVENUS ============================== */
.rev-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.rev-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.rev-stats .rv-num { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.rev-stats .rv-lbl { font-size: 11px; color: var(--ink-faint); font-weight: 500; margin-top: 1px; }

/* ============================== CALENDRIER ============================== */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cal-head h2 { font-size: 17px; font-weight: 700; min-width: 150px; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-faint); padding: 10px 0; border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.empty-cell { background: var(--surface-2); }
.cal-cell.today { background: rgba(245,30,159,.04); }
.cal-cell.today .cal-day { background: var(--grad); color: #fff; }
.cal-day { font-size: 12px; font-weight: 600; color: var(--ink-soft); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; }
.cal-ev { display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 3px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.collab { background: var(--grad); color: #fff; }
.cal-ev.prod { background: rgba(253,128,48,.16); color: #c85a12; }
.cal-ev .cal-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cal-more { font-size: 10px; color: var(--ink-faint); font-weight: 600; padding-left: 6px; }

/* ============================== RÉPARTITION (DnD) ============================== */
.hint-bar { display: flex; align-items: center; gap: 9px; background: var(--grad-soft); border: 1px solid var(--line); border-radius: 12px; padding: 11px 15px; margin-bottom: 16px; font-size: 13px; color: var(--ink-soft); }
.hint-bar svg { color: var(--violet); }
.kanban.repartition .kcol { max-height: none; }
.dropzone.drop-hi { outline: 2px dashed var(--pink); outline-offset: -3px; background: rgba(245,30,159,.05); }
.kcard.dragging { opacity: .4; }
.prodcard { cursor: grab; }
.prodcard:active { cursor: grabbing; }
.drop-empty { text-align: center; padding: 22px 10px; font-size: 12px; border: 2px dashed var(--line-strong); border-radius: 12px; }
.rendu-row { margin-top: 9px; }
.rendu-row label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-faint); font-weight: 600; margin-bottom: 3px; }
.rendu-row input { width: 100%; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 9px; outline: none; font-size: 12.5px; }
.rendu-row input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,30,159,.12); }
.cal-cell.drop-hi { background: rgba(245,30,159,.08); outline: 2px dashed var(--pink); outline-offset: -2px; }
.cal-ev[draggable] { cursor: grab; }

/* ============================== CHIFFRE D'AFFAIRES ============================== */
.balance-bar { position: relative; display: flex; height: 38px; border-radius: 11px; overflow: hidden; box-shadow: var(--shadow-sm); }
.balance-bar .bb-nolan { background: linear-gradient(135deg,#3F00C3,#6a3df0); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.balance-bar .bb-marine { background: linear-gradient(135deg,#F51E9F,#ff5cc0); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.balance-bar .bb-target { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--navy); box-shadow: 0 0 0 2px #fff; }
.repart-out { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; font-size: 13px; min-height: 54px; }
.lost-banner { display: flex; align-items: flex-start; gap: 9px; background: rgba(229,72,77,.07); border: 1px solid rgba(229,72,77,.3); color: #b3373b; border-radius: 12px; padding: 11px 14px; margin-bottom: 16px; font-size: 12.5px; line-height: 1.5; }
.lost-banner svg { color: var(--danger); margin-top: 1px; }
/* board CA : carte vente */
.vente-card { cursor: grab; }
.vente-card:active { cursor: grabbing; }
.vente-card .vc-amount { font-weight: 700; font-size: 14px; }
.ca-chips { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
/* liaison inter-modules */
.linked-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.linked-chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); font-weight: 600; font-size: 12.5px; color: var(--ink-soft); text-align: left; transition: box-shadow .15s, border-color .15s; }
.linked-chip:hover { box-shadow: var(--shadow); border-color: var(--pink); color: var(--ink); }
.linked-chip svg { width: 15px; height: 15px; color: var(--violet); }
.prop-box { display: flex; align-items: flex-start; gap: 9px; background: var(--grad-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); line-height: 1.45; cursor: pointer; margin-top: 6px; }
.prop-box input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--pink); flex-shrink: 0; cursor: pointer; }
.link-flag { display: inline-flex; color: var(--violet); opacity: .7; }
.link-flag svg { width: 13px; height: 13px; }

/* ============================== STUDIO · SCRIPT ============================== */
.studio-input { display: flex; gap: 10px; align-items: stretch; }
.studio-input .search { padding: 10px 14px; }
.studio-input .btn { white-space: nowrap; }
.transcript-box { font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); white-space: pre-wrap; max-height: 280px; overflow-y: auto; user-select: text; }
.studio-title { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; font-weight: 600; margin-bottom: 10px; }
.studio-title:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,30,159,.12); }
.script-edit { width: 100%; min-height: 240px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; outline: none; font-family: inherit; font-size: 14px; line-height: 1.7; resize: vertical; background: var(--surface-2); }
.script-edit:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,30,159,.12); background: var(--surface); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
.spin.big { width: 34px; height: 34px; border-width: 3px; border-color: var(--line-strong); border-top-color: var(--pink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================== VALIDATION VIDÉOS ============================== */
.val-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
.val-card { cursor: pointer; transition: box-shadow .15s, transform .08s; }
.val-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.val-video { width: 100%; max-height: 60vh; border-radius: 12px; background: #000; display: block; }
.val-controls { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.val-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; background: var(--navy); color: #fff; padding: 5px 11px; border-radius: 9px; min-width: 84px; text-align: center; }
.val-note-input { flex: 1; min-width: 160px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; }
.val-note-input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,30,159,.12); }
.notes-list { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow-y: auto; flex: 1; }
.note-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.note-item.done { opacity: .55; background: var(--surface-2); }
.note-item.done .note-txt { text-decoration: line-through; }
.note-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 11.5px; color: #fff; background: var(--grad); padding: 3px 8px; border-radius: 7px; flex-shrink: 0; }
.note-txt { flex: 1; font-size: 13px; line-height: 1.45; }
.note-by { width: 20px; height: 20px; border-radius: 50%; background: var(--ink-faint); color: #fff; font-size: 9px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
/* lecteur vidéo intégré (Inspiration / Stats) */
.video-embed { width: 100%; margin: 0 auto; border-radius: 14px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-embed.ig, .video-embed.tk { max-width: 340px; }
.video-embed.ig iframe { width: 100%; height: 560px; border: none; display: block; }
.video-embed.tk iframe { width: 100%; height: 600px; border: none; display: block; }
.video-embed.yt { aspect-ratio: 16/9; }
.video-embed.yt iframe { width: 100%; height: 100%; border: none; display: block; }
table.tbl tbody tr[data-open="posts"], .tbl tbody tr[data-open^="posts"] { cursor: pointer; }

/* documents / ressources */
.pdf-frame { width: 100%; height: 80vh; border: none; border-radius: 0 0 var(--radius) var(--radius); background: #eef0f6; display: block; }
.res-links { display: flex; flex-direction: column; gap: 8px; }
.res-link { display: inline-flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); font-weight: 600; font-size: 13px; color: var(--ink-soft); text-decoration: none; transition: box-shadow .15s, border-color .15s, color .15s; }
.res-link:hover { box-shadow: var(--shadow); border-color: var(--pink); color: var(--ink); }
.res-link svg { color: var(--violet); }
.res-p { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 8px; }
.res-ul, .res-ol { margin: 4px 0 4px 18px; padding: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.res-ul li, .res-ol li { margin-bottom: 4px; }
.res-da { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px){ .res-da { grid-template-columns: 1fr; } }
.res-da-t { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.res-table td { padding: 7px 12px; font-size: 12.5px; }
.res-table td:first-child { color: var(--ink-faint); width: 38%; }
.note-check { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line-strong); display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.note-check.on { background: var(--success); border-color: var(--success); color: #fff; }
.note-check svg { width: 13px; height: 13px; }
.note-del { color: var(--ink-faint); padding: 4px; border-radius: 6px; }
.note-del:hover { color: var(--danger); background: rgba(229,72,77,.08); }
.note-del svg { width: 13px; height: 13px; }

/* ============================== STATS ============================== */
.stat-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr auto; gap: 10px; align-items: center; }
.stat-form select, .stat-form input { padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; }
.stat-form select:focus, .stat-form input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,30,159,.12); }
@media (max-width: 900px){ .stat-form { grid-template-columns: 1fr 1fr; } }

/* ============================== MINIATURES ============================== */
.mini-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--line-strong); border-radius: 14px; padding: 22px; cursor: pointer; color: var(--ink-faint); font-size: 13px; font-weight: 600; text-align: center; transition: border-color .15s, background .15s; }
.mini-drop:hover { border-color: var(--pink); background: var(--grad-soft); }
.mini-drop svg { width: 26px; height: 26px; color: var(--violet); }
.mini-thumb { max-height: 130px; max-width: 100%; border-radius: 10px; }
.mini-hooks { display: flex; flex-direction: column; gap: 7px; }
.mini-hooks .chip-filter { text-align: left; font-size: 12px; }
.mini-pals { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-pal { display: flex; width: 52px; height: 38px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); box-shadow: var(--shadow-sm); }
.mini-pal span { flex: 1; }
.mini-pal.on { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(245,30,159,.2); }
.mini-preview-card { position: sticky; top: 86px; }
.mini-canvas { width: 100%; max-width: 300px; aspect-ratio: 9/16; border-radius: 12px; box-shadow: var(--shadow-lg); background: #1a0a3a; }

/* responsive */
@media (max-width: 900px){
  .sidebar { position: fixed; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .topbar .hamburger { display: inline-flex; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .content { padding: 18px 16px 60px; }
  .topbar { padding: 14px 16px; }
  .search { width: 160px; }
}
@media (max-width: 560px){
  .kpi-row { grid-template-columns: 1fr; }
  .search { display: none; }
}
