/* =========================================================
   Mac — CRM / Gestion clients
   Design system : cartes arrondies, navigation basse floutee,
   effets au toucher, mobile-first (390px).
   ========================================================= */

:root {
  --brand: #4F46E5;
  --brand-dark: #3730A3;
  --brand-soft: #EEF0FF;
  --brand-soft-2: #E0E3FF;
  --accent: #10B981;
  --accent-soft: #E7F8F2;
  --warn: #F59E0B;
  --warn-soft: #FEF4E4;
  --danger: #EF4444;
  --danger-soft: #FDECEC;
  --sky: #0EA5E9;
  --sky-soft: #E6F5FD;
  --slate: #94A3B8;
  --slate-soft: #F1F3F8;

  --bg: #E8F1FF;
  --card: #FFFFFF;
  --text: #15172B;
  --muted: #6C7192;
  --border: #E7E9F2;

  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 16px rgba(21, 23, 43, .06);
  --shadow-lg: 0 14px 40px rgba(21, 23, 43, .14);

  --header-h: 60px;
  --nav-h: 66px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: 21px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D5D8E6; border-radius: 8px; }

/* ---------- Ecran d'ouverture (PWA installee) ---------- */
#app-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--brand);
}
#app-splash.show { display: flex; animation: splashOut .4s ease 1.2s forwards; }
#app-splash img { width: 96px; height: 96px; border-radius: 24px; }
#app-splash span { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }

/* ---------- Structure application ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding-top: var(--safe-top);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.app-header-inner {
  height: var(--header-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 36px; height: 36px; flex: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), #7C74FF);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .32);
}
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.brand-text small { display: block; font-size: 11.5px; color: var(--muted); margin-top: -2px; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: transform .12s ease, background .2s, color .2s;
}
.icon-btn:hover { color: var(--brand); background: var(--brand-soft); }
.icon-btn:active { transform: scale(.94); }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex: none;
}

.app-main {
  padding: 16px 16px calc(var(--nav-h) + var(--safe-bottom) + 26px);
  max-width: 1240px;
  margin: 0 auto;
  min-height: 60vh;
}
.view { display: none; }
.view.is-active { display: block; animation: viewIn .28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-title { margin-bottom: 14px; }
.page-title h1 { margin-bottom: 3px; }
.page-title p { color: var(--muted); font-size: 13.5px; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 22px 0 12px;
}
.section-head h2 { display: flex; align-items: center; gap: 8px; }
.section-head .link { font-size: 13px; font-weight: 600; }

/* ---------- Barre de navigation basse ---------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: flex;
  align-items: stretch;
  padding: 8px 6px calc(8px + var(--safe-bottom));
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid rgba(231, 233, 242, .9);
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color .2s, background .2s, transform .12s ease;
}
.bottom-nav a svg { width: 21px; height: 21px; }
.bottom-nav a.active { color: var(--brand); background: var(--brand-soft); }
.bottom-nav a:active { transform: scale(.96); }

/* ---------- Cartes ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  border: 1px solid rgba(231, 233, 242, .7);
}
.card + .card { margin-top: 14px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.card-head h2, .card-head h3 { font-size: 15.5px; }
.card-head .hint { font-size: 12px; color: var(--muted); font-weight: 500; }

.grid { display: grid; gap: 14px; }
.kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.kpi {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  border: 1px solid rgba(231, 233, 242, .7);
  min-width: 0;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-ico {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; flex: none;
}
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 12px; }
.kpi-value { font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 2px; }
.kpi-foot { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.chart-box { position: relative; height: 240px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font-weight: 650; font-size: 14px;
  cursor: pointer;
  transition: transform .12s ease, filter .2s, background .2s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn svg { width: 17px; height: 17px; }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--slate-soft); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { background: var(--danger); }
.btn.danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn.success { background: var(--accent); }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 11px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  white-space: nowrap;
}
.badge.prospect { background: var(--warn-soft); color: #B26A02; }
.badge.qualifie { background: var(--sky-soft); color: #0369A1; }
.badge.client { background: var(--accent-soft); color: #067A57; }
.badge.perdu { background: var(--slate-soft); color: #64748B; }
.badge.neutral { background: var(--brand-soft); color: var(--brand-dark); }

.tag {
  display: inline-block;
  padding: 3px 9px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  margin: 0 4px 4px 0;
}

/* ---------- Champs ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px; font-weight: 650;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #FBFBFE;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  font-size: 15px;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}
.field .err { color: var(--danger); font-size: 12px; margin-top: 5px; display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error .err { display: block; }
.form-row { display: grid; gap: 0 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.form-actions .btn { flex: 1; }

.search-bar { position: relative; margin-bottom: 14px; }
.search-bar svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
.search-bar input {
  width: 100%;
  padding: 12px 14px 12px 41px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  outline: none;
  font-size: 15px;
}
.search-bar input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79, 70, 229, .1); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 13px; font-weight: 650;
  cursor: pointer;
  transition: transform .12s ease, background .2s, color .2s;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:active { transform: scale(.96); }

/* ---------- Liste clients ---------- */
.client-list { display: grid; gap: 11px; }
.client-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(231, 233, 242, .7);
  padding: 14px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s;
}
.client-card:active { transform: scale(.985); }
.client-card body { min-width: 0; }
.client-main { min-width: 0; flex: 1; }
.client-main strong { display: block; font-size: 14.5px; font-weight: 700; }
.client-main span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.client-right { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.client-right .amount { font-size: 13px; font-weight: 700; }
.client-right .date { font-size: 11px; color: var(--muted); }

.empty {
  text-align: center;
  padding: 42px 18px;
  color: var(--muted);
}
.empty svg { width: 42px; height: 42px; margin: 0 auto 12px; opacity: .45; }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------- Pipeline (glisser-deposer) ---------- */
.kanban {
  display: grid;
  gap: 14px;
  align-items: start;
}
.pipe-col {
  background: #EFF1F8;
  border-radius: var(--radius);
  padding: 12px;
  border: 1.5px dashed transparent;
  transition: background .18s, border-color .18s;
}
.pipe-col.dragover { border-color: var(--brand); background: var(--brand-soft); }
.pipe-col-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; padding: 0 4px;
}
.pipe-col-head b { font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.prospect { background: var(--warn); }
.dot.qualifie { background: var(--sky); }
.dot.client { background: var(--accent); }
.dot.perdu { background: var(--slate); }
.pipe-count {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: #fff; border-radius: 999px; padding: 2px 9px;
}
.pipe-total { font-size: 11.5px; color: var(--muted); padding: 0 4px 8px; font-weight: 600; }
.pipe-body { display: grid; gap: 10px; min-height: 70px; }

.pipe-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(21, 23, 43, .07);
  padding: 13px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .12s ease, box-shadow .2s;
}
.pipe-card:active { transform: scale(.985); }
.pipe-card strong { display: block; font-size: 14px; }
.pipe-card .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.pipe-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 10px;
}
.pipe-card-foot .amount { font-size: 12.5px; font-weight: 700; color: var(--brand-dark); }
.pipe-card.dragging { opacity: .35; }
.drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transform: rotate(-2deg) scale(1.03);
  box-shadow: var(--shadow-lg);
  opacity: .96;
  width: 220px;
}
.drag-ghost .pipe-card { box-shadow: var(--shadow-lg); }

/* ---------- Agenda ---------- */
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.cal-head .month { font-size: 16px; font-weight: 750; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow {
  text-align: center; font-size: 10.5px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; padding-bottom: 4px;
}
.cal-day {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #FBFBFE;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 650;
  cursor: pointer;
  transition: transform .12s ease, background .2s, border-color .2s;
}
.cal-day.out { opacity: .32; }
.cal-day.today { border-color: var(--brand); color: var(--brand); }
.cal-day.selected { background: var(--brand); color: #fff; border-color: var(--brand); }
.cal-day:active { transform: scale(.94); }
.cal-dots { display: flex; gap: 3px; margin-top: 3px; height: 5px; }
.cal-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--brand); display: block; }
.cal-day.selected .cal-dots i { background: #fff; }
.cal-day.today .cal-dots i { background: var(--brand); }

.rdv-list { display: grid; gap: 11px; }
.rdv-item {
  display: flex; gap: 13px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(231, 233, 242, .7);
  padding: 14px;
  cursor: pointer;
  transition: transform .12s ease;
}
.rdv-item:active { transform: scale(.985); }
.rdv-time {
  flex: none; width: 58px;
  border-right: 2px solid var(--brand-soft);
  padding-right: 8px;
}
.rdv-time b { display: block; font-size: 14px; font-weight: 750; }
.rdv-time span { font-size: 11px; color: var(--muted); }
.rdv-body { flex: 1; min-width: 0; }
.rdv-body strong { display: block; font-size: 14.5px; }
.rdv-body .who { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rdv-body .place { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.rdv-item.termine { opacity: .62; }

/* ---------- Modale / feuille ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 17, 35, .45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.sheet-backdrop.open { display: flex; }
.sheet {
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(20px + var(--safe-bottom));
  animation: sheetUp .28s cubic-bezier(.2, .8, .3, 1);
}
@keyframes sheetUp { from { transform: translateY(28px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-grab {
  width: 42px; height: 4px; border-radius: 4px;
  background: var(--border); margin: 0 auto 14px;
}
.sheet-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.sheet-head h2 { font-size: 18px; }
.sheet-head small { color: var(--muted); font-size: 12.5px; }

.detail-rows { display: grid; gap: 12px; }
.detail-row { display: flex; align-items: flex-start; gap: 12px; }
.detail-row .k { font-size: 12px; color: var(--muted); font-weight: 650; width: 96px; flex: none; }
.detail-row .v { font-size: 13.5px; word-break: break-word; }

.timeline { display: grid; gap: 0; margin-top: 4px; }
.tl-item { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.tl-item:not(:last-child)::before {
  content: ''; position: absolute; left: 13px; top: 28px; bottom: 0;
  width: 2px; background: var(--border);
}
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  z-index: 1;
}
.tl-dot svg { width: 14px; height: 14px; }
.tl-body { min-width: 0; padding-top: 2px; }
.tl-body strong { font-size: 13px; text-transform: capitalize; }
.tl-body p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tl-body time { font-size: 11.5px; color: var(--muted); display: block; margin-top: 3px; }

/* ---------- Onglets internes ---------- */
.tabs {
  display: flex; gap: 6px;
  background: #fff;
  padding: 5px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow-x: auto;
}
.tabs button {
  flex: 1; white-space: nowrap;
  border: 0; background: transparent;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 650;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s, transform .12s ease;
}
.tabs button.active { background: var(--brand); color: #fff; }
.tabs button:active { transform: scale(.97); }

/* ---------- Notifications ---------- */
.toasts {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px);
  z-index: 400;
  display: grid; gap: 9px;
  justify-items: center;
  pointer-events: none;
}
.toast {
  max-width: 460px; width: 100%;
  display: flex; align-items: center; gap: 10px;
  background: #1B1D33;
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px; font-weight: 600;
  animation: toastIn .25s ease both;
}
.toast.ok { background: #0F7A57; }
.toast.err { background: #B3261E; }
.toast svg { width: 17px; height: 17px; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut .25s ease both; }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Ecran de connexion ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding: calc(28px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  background:
    radial-gradient(900px 420px at 12% -12%, rgba(79, 70, 229, .28), transparent 62%),
    radial-gradient(700px 420px at 100% 4%, rgba(14, 165, 233, .22), transparent 58%),
    linear-gradient(170deg, #14162B 0%, #212544 52%, #2E2A5E 100%);
  color: #fff;
}
.auth-inner { width: 100%; max-width: 420px; margin: auto; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand .brand-logo { width: 46px; height: 46px; border-radius: 15px; font-size: 21px; }
.auth-brand b { font-size: 20px; letter-spacing: -.02em; display: block; }
.auth-brand small { color: rgba(255, 255, 255, .66); font-size: 12.5px; }
.auth-card {
  background: #fff;
  color: var(--text);
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: 0 24px 60px rgba(6, 8, 25, .38);
}
.auth-card h1 { font-size: 19px; margin-bottom: 4px; }
.auth-card .lead { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.auth-switch button { border: 0; background: none; color: var(--brand); font-weight: 700; cursor: pointer; }
.auth-note {
  margin-top: 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, .62);
  display: flex; gap: 8px; align-items: flex-start;
  line-height: 1.45;
}
.auth-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.auth-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--border); }
.auth-steps i.on { background: var(--brand); }

/* ---------- Installation PWA ---------- */
.install-block {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #EEF0FF, #E6F5FD);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--brand-soft-2);
  margin-top: 14px;
}
.install-block .txt { flex: 1; min-width: 180px; }
.install-block .txt b { display: block; font-size: 14.5px; }
.install-block .txt span { font-size: 12.5px; color: var(--muted); }
.install-logos { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.install-logos svg { width: 22px; height: 22px; }

/* ---------- Administration ---------- */
.admin-body { background: #E8F1FF; }
.admin-wrap { max-width: 900px; margin: 0 auto; }
.admin-badge {
  background: #14162B; color: #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
  padding: 4px 9px; border-radius: 999px; text-transform: uppercase;
}
.stat-row {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mini-stat {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px;
  border: 1px solid rgba(231, 233, 242, .7);
}
.mini-stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.mini-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; min-width: 520px; }
table.data th {
  text-align: left; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); font-weight: 700;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
table.data td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- Utilitaires ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt-14 { margin-top: 14px; }
.mt-22 { margin-top: 22px; }
.center { text-align: center; }
.hidden { display: none !important; }
.skeleton {
  background: linear-gradient(90deg, #EEF0F6 25%, #F7F8FC 50%, #EEF0F6 75%);
  background-size: 200% 100%;
  animation: sk 1.3s infinite;
  border-radius: 10px;
  height: 14px;
}
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Responsive : tablettes et ordinateurs ---------- */
@media (min-width: 700px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rdv-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-main { padding-left: 24px; padding-right: 24px; }
  .sheet { border-radius: 22px; margin-bottom: 4vh; }
  .sheet-backdrop { align-items: center; }
}
@media (min-width: 1100px) {
  .kanban { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .client-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bottom-nav { max-width: 620px; margin: 0 auto; border-radius: 18px 18px 0 0; }
}

/* --- Mobile : on empile tout sous 768px --- */
@media (max-width: 768px) {
  .kanban { grid-template-columns: 1fr; }
  .client-list { grid-template-columns: 1fr; }
  .rdv-list { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
