/* app.css — Design system CDB HUB Bien-Être (proto : forest/mint/sand, Inter, radius 18) */
:root {
  --ink: #17201d;
  --muted: #6d7771;
  --line: #e6e9e5;
  --canvas: #f6f7f4;
  --surface: #ffffff;
  --forest: #245b4b;
  --forest-dark: #164338;
  --mint: #dff3e8;
  --sage: #b8d5c4;
  --sand: #f6eddf;
  --amber: #c98131;
  --rose: #fff0ee;
  --danger: #c95148;
  --shadow: 0 10px 34px rgba(23, 32, 29, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--canvas); color: var(--ink); font-size: 14px;
}
a { color: var(--forest); }
h1, h2, h3 { margin: 0; }
button, .btn {
  font: inherit; background: var(--forest); color: #fff; border: 0; padding: 9px 16px;
  border-radius: 10px; cursor: pointer; font-weight: 600;
}
button:hover, .btn:hover { background: var(--forest-dark); }
button.ghost, .btn.ghost { background: transparent; color: var(--forest); border: 1px solid var(--sage); }
button.ghost:hover { background: var(--mint); }
button.danger { background: var(--danger); }
button.small { padding: 5px 10px; font-size: 12.5px; font-weight: 500; }
input, select, textarea {
  font: inherit; width: 100%; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage); border-color: var(--forest); }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h2 { font-size: 15px; margin-bottom: 12px; color: var(--ink); }
.muted { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

/* ---------- layout app ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; background: var(--surface); border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--forest), var(--forest-dark));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.logo b { font-size: 15px; } .logo span { display: block; font-size: 11px; color: var(--muted); }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  margin: 12px 8px 4px; }
.nav-item {
  display: flex; gap: 9px; align-items: center; width: 100%; text-align: left; padding: 9px 11px;
  background: transparent; color: var(--ink); border-radius: 11px; font-weight: 500; font-size: 13.5px;
}
.nav-item:hover { background: var(--mint); color: var(--forest-dark); }
.nav-item.active { background: var(--forest); color: #fff; }
.nav-item .cnt { margin-left: auto; background: rgba(0,0,0,.08); font-size: 11px; padding: 1px 7px;
  border-radius: 99px; }
.nav-item.active .cnt { background: rgba(255,255,255,.2); }
.user-card { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; font-size: 12.5px; }

main { flex: 1; padding: 22px 26px 48px; max-width: 1160px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.topbar h1 { font-size: 21px; }
.sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* ---------- widgets dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .v { font-size: 24px; font-weight: 700; color: var(--forest-dark); margin-top: 4px; }
.kpi .t { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .sub { font-size: 11.5px; }
.progress { height: 7px; background: var(--mint); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--forest); border-radius: 99px; }
.cols { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; align-items: start; }
.action { display: flex; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.action:last-child { border-bottom: 0; }
.action .ic { font-size: 17px; width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--mint); border-radius: 10px; flex: none; }
.action .txt { flex: 1; font-size: 13.5px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.chip.mint { background: var(--mint); color: var(--forest-dark); }
.chip.sand { background: var(--sand); color: #8a6117; }
.chip.rose { background: var(--rose); color: var(--danger); }
.chip.sage { background: var(--sage); color: var(--forest-dark); }

/* ---------- kanban pipeline ---------- */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kcol { min-width: 218px; width: 218px; flex: none; background: #eef1ec; border-radius: 14px; padding: 10px; }
.kcol h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  margin: 2px 4px 9px; display: flex; justify-content: space-between; }
.kcard { background: var(--surface); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(23,32,29,.06); cursor: grab; }
.kcard b { font-size: 13.5px; display: block; }
.kcard .m { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.kcard .tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 10.5px; background: var(--mint); color: var(--forest-dark); padding: 2px 8px; border-radius: 99px; }
.kcol.over { outline: 2px dashed var(--forest); }

/* ---------- tables / listes ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.list-item { display: flex; justify-content: space-between; gap: 10px; padding: 11px 2px;
  border-bottom: 1px solid var(--line); align-items: center; }
.list-item:last-child { border-bottom: 0; }

/* ---------- modales ---------- */
.overlay { position: fixed; inset: 0; background: rgba(23,32,29,.35); display: grid;
  place-items: center; z-index: 50; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 22px; width: min(560px, 92vw);
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal h2 { margin-bottom: 8px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------- conformité ---------- */
.warn-box { background: var(--sand); border: 1px solid #ecd9b8; border-radius: 12px; padding: 10px 14px;
  font-size: 12.5px; margin-top: 8px; }
.warn-box b { color: var(--amber); }
.ok-box { background: var(--mint); border-radius: 12px; padding: 8px 14px; font-size: 12.5px; }

/* ---------- badges statut RDV ---------- */
.st-confirme { color: var(--forest); font-weight: 600; }
.st-en_attente { color: var(--amber); font-weight: 600; }
.st-annule, .st-no_show { color: var(--danger); font-weight: 600; }
.st-realise { color: var(--muted); }

/* ---------- login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(430px, 94vw); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; background: transparent; color: var(--muted); border: 1px solid var(--line); }
.auth-tabs button.on { background: var(--forest); color: #fff; border-color: var(--forest); }
.err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }
.checks label { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--ink);
  margin: 7px 0; font-size: 13px; }
.checks input { width: auto; }

/* ---------- vue proto : en-tête de page ---------- */
.kicker { font-size: 11px; letter-spacing: .14em; color: var(--muted); font-weight: 700;
  text-transform: uppercase; margin-bottom: 6px; }
.page-title { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.page-date { color: var(--muted); font-size: 13px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap; }
.page-head .left { flex: 1; min-width: 240px; }

/* ---------- KPI cards proto ---------- */
.kpi .badge {
  width: 30px; height: 30px; border-radius: 9px; background: var(--canvas); display: grid;
  place-items: center; font-size: 14px; flex: none;
}
.kpi .head { display: flex; justify-content: space-between; align-items: center; }
.kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; }
.kpi .v small { font-size: 16px; font-weight: 700; }
.kpi .meta { font-size: 12px; margin-top: 6px; color: var(--muted); }
.kpi .meta b { font-weight: 700; }
.kpi .up { color: var(--forest); font-weight: 700; }
.kpi .warn { color: var(--amber); font-weight: 600; }

/* ---------- actions prioritaires proto ---------- */
.action { display: flex; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.action:last-child { border-bottom: 0; padding-bottom: 4px; }
.action .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.high { background: var(--danger); } .dot.med { background: var(--amber); } .dot.low { background: var(--forest); }
.action .body { flex: 1; min-width: 0; }
.action .body b { font-size: 14px; display: block; }
.action .body span { font-size: 12px; color: var(--muted); }
.pill { background: var(--mint); color: var(--forest-dark); border-radius: 999px; padding: 7px 14px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; border: 0; white-space: nowrap; }
.pill:hover { background: var(--forest); color: #fff; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin-bottom: 2px; flex-wrap: wrap; }
.card-head .sub { font-size: 12.5px; }
.link { background: none; border: 0; color: var(--forest); font-weight: 700; font-size: 13px;
  cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------- agenda du jour proto ---------- */
.rdv-line { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rdv-line:last-child { border-bottom: 0; }
.rdv-line .h { font-weight: 800; font-size: 14px; width: 52px; flex: none; color: var(--forest-dark); }
.rdv-line .who { flex: 1; min-width: 0; }
.rdv-line .who b { display: block; font-size: 14px; }
.rdv-line .who span { font-size: 12px; color: var(--muted); }
.badge { border-radius: 999px; padding: 4px 12px; font-size: 11.5px; font-weight: 700; }
.badge.green { background: var(--mint); color: var(--forest-dark); }
.badge.amber { background: var(--sand); color: #8a6117; }
.badge.violet { background: #f3e8ff; color: #6d28d9; }
.badge.rose { background: var(--rose); color: var(--danger); }

/* ---------- créneaux à remplir proto ---------- */
.slot-card { border: 1.5px dashed var(--sage); border-radius: 13px; padding: 12px 14px; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.slot-card:last-child { margin-bottom: 0; }
.slot-card b { display: block; font-size: 13.5px; }
.slot-card span { font-size: 12px; color: var(--muted); }

/* ---------- pipeline bars proto ---------- */
.pbar { display: grid; grid-template-columns: 1fr 90px 26px; gap: 10px; align-items: center;
  padding: 7px 0; font-size: 13px; }
.pbar .track { height: 8px; background: var(--canvas); border-radius: 99px; overflow: hidden; }
.pbar .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--sage), var(--forest));
  border-radius: 99px; }
.pbar .n { text-align: right; font-weight: 700; }

/* ---------- contenu du jour proto ---------- */
.sugg { background: var(--canvas); border-radius: 13px; padding: 16px; }
.sugg .q { font-size: 15.5px; font-weight: 700; color: var(--forest-dark); margin: 8px 0 6px; }
.sugg .d { font-size: 12.5px; color: var(--muted); }

/* ---------- toggle de vues ---------- */
.view-toggle { display: inline-flex; background: var(--canvas); border-radius: 11px; padding: 3px; gap: 2px; }
.view-toggle button { background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; }
.view-toggle button.on { background: var(--surface); color: var(--forest-dark); box-shadow: 0 1px 4px rgba(23,32,29,.1); }

/* ---------- tableau contacts proto ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff; flex: none; }
.chip.s-green { background: var(--mint); color: var(--forest-dark); }
.chip.s-violet { background: #f3e8ff; color: #6d28d9; }
.chip.s-amber { background: var(--sand); color: #8a6117; }
.chip.s-rose { background: var(--rose); color: var(--danger); }
.chip.s-grey { background: #eef1ec; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 150px; }
.thead { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* ---------- grille agenda semaine proto ---------- */
.wk-grid { display: grid; grid-template-columns: 56px repeat(5, 1fr); gap: 0; min-width: 640px; }
.wk-dayhead { text-align: center; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.wk-dayhead b { display: block; font-size: 15px; }
.wk-dayhead.today { color: var(--forest-dark); }
.wk-timelabel { font-size: 11.5px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid #f0f2ee; }
.wk-cell { border-left: 1px solid #f0f2e8; border-bottom: 1px solid #f0f2e8; min-height: 44px; padding: 3px; }
.wk-appt { border-radius: 9px; padding: 6px 8px; font-size: 11.5px; font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.wk-appt.seance { background: var(--mint); color: var(--forest-dark); }
.wk-appt.decouverte { background: #f3e8ff; color: #6d28d9; }
.wk-appt.atelier { background: var(--sage); color: var(--forest-dark); }
.wk-appt.suivi { background: #e0f2fe; color: #0369a1; }
.wk-appt.free { background: var(--sand); color: #8a6117; font-style: italic; }
.wk-scroll { overflow-x: auto; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.wk-side .stat { border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; margin-bottom: 10px; }
.wk-side .stat b { display: block; font-size: 15px; }
.wk-side .stat span { font-size: 12px; color: var(--muted); }

/* ---------- calendrier éditorial proto ---------- */
.cal-week { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.cal-day { flex: 1; min-width: 128px; border: 1px solid var(--line); border-radius: 13px; padding: 10px;
  min-height: 130px; background: var(--canvas); }
.cal-day.today { border-color: var(--forest); background: var(--mint); }
.cal-day b { font-size: 12px; color: var(--muted); display: block; margin-bottom: 8px; }
.cal-item { border-left: 3px solid var(--forest); background: var(--surface); border-radius: 8px;
  padding: 7px 9px; font-size: 11.5px; margin-bottom: 7px; box-shadow: 0 1px 3px rgba(23,32,29,.06); }
.cal-item.t-post { border-color: #7c3aed; } .cal-item.t-post { background: #f6f1ff; }
.cal-item.t-reel { border-color: var(--forest); } .cal-item.t-reel { background: #eff7f2; }
.cal-item.t-story { border-color: #d97706; } .cal-item.t-story { background: #fdf5e9; }
.cal-item.t-email { border-color: #a21caf; } .cal-item.t-email { background: #fbf1fe; }
.cal-item.t-google_business { border-color: #0e7490; } .cal-item.t-google_business { background: #edf7f9; }
.cal-item.t-whatsapp { border-color: #15803d; } .cal-item.t-whatsapp { background: #eef8ee; }
.cal-item.t-post_instagram { border-color: #7c3aed; } .cal-item.t-post_instagram { background: #f6f1ff; }

/* ---------- copilote / panneau latéral déco ---------- */
.copilot-box { background: var(--forest-dark); color: #fff; border-radius: var(--radius); padding: 18px;
  font-size: 12.5px; }
.copilot-box .btn { background: #fff; color: var(--forest-dark); width: 100%; margin-top: 10px; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; } .cols { grid-template-columns: 1fr; }
  .sidebar { width: 64px; padding: 14px 8px; } .sidebar .label, .logo b, .logo span, .user-card .who { display: none; }
  main { padding: 16px 12px 40px; }
}
@media (max-width: 1080px) {
  .page-title { font-size: 26px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .cols, .layout-c2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 13.5px; }
  .layout { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 40; width: 100%; height: auto; flex-direction: row;
    align-items: center; overflow-x: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line);
    gap: 4px; }
  .nav-group { display: none; }
  .logo { padding: 0 8px 0 2px; } .logo .mark { width: 28px; height: 28px; font-size: 13px; }
  .nav-item { width: auto; white-space: nowrap; padding: 8px 10px; }
  .nav-item .cnt { display: none; }
  .user-card { margin: 0 0 0 auto; border-top: 0; padding-top: 0; display: flex; gap: 6px; align-items: center; }
  .user-card .who { display: none; }
  main { padding: 14px 12px 60px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi .v { font-size: 22px; }
  .topbar { flex-wrap: wrap; }
  .topbar h1 { font-size: 19px; }
  .card { padding: 15px; border-radius: 15px; }
  .action .body b { font-size: 13px; }
  .pill { padding: 6px 11px; font-size: 11.5px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .filters select, .filters input { flex: 1; min-width: 110px; }
  .modal { width: 94vw; padding: 16px; }
  .cal-day { min-width: 118px; }
  .kanban { margin: 0 -12px; padding: 0 12px; }
}