/* ============================================================
   Lynk CRM — design system « pro »
   Identité Lynk Studio : bleu électrique #0019ff, corail #ff6d4d.
   Sidebar encre marine, contenu clair, chiffres tabulaires.
   ============================================================ */

/* Inter servie en LOCAL (police variable 400-800, lot A perf du 04/11/2026).
   Avant : @import Google Fonts = cascade bloquante sur 2 domaines externes
   (style.css → CSS Google → woff2) mesurée à +0,8-2 s en 4G. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/inter-variable-latin-ext.woff2?v=1') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/inter-variable-latin.woff2?v=1') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Surfaces */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --sidebar-bg: #0b0e21;
  --sidebar-border: rgba(255, 255, 255, .08);

  /* Marque */
  --primary: #0019ff;
  --primary-strong: #0014cc;
  --primary-soft: #eef0ff;
  --accent: #ff6d4d;
  --accent-soft: #fff1ed;

  /* Encres */
  --text: #10142c;
  --text-2: #454b63;
  --muted: #6d7490;
  --sidebar-text: #9aa1b8;

  /* Lignes */
  --border: #e6e8ef;
  --border-strong: #cfd3e0;

  /* États */
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --success: #16a34a;
  --success-soft: #e9f7ef;

  /* Géométrie */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 20, 44, .04), 0 8px 24px -16px rgba(16, 20, 44, .10);
  --shadow-md: 0 4px 12px rgba(16, 20, 44, .06), 0 16px 40px -20px rgba(16, 20, 44, .18);
  --ring: 0 0 0 3px rgba(0, 25, 255, .14);
}

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

html { font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--primary-soft); color: var(--primary-strong); }

/* ─── Layout ─── */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  padding: 26px 14px 22px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 10;
}

.sidebar-logo {
  padding: 2px 12px 22px;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 14px;
}

.sidebar-logo .brand {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.sidebar-logo .brand::before {
  content: '';
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--primary) 0%, #4d5eff 100%);
  margin-right: 9px;
  box-shadow: 0 0 12px rgba(77, 94, 255, .55);
}

.sidebar-logo .sub {
  font-size: .74rem;
  color: var(--sidebar-text);
  font-weight: 500;
  letter-spacing: .02em;
  margin-top: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  margin-bottom: 2px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}

.nav-item:hover { background: rgba(255, 255, 255, .05); color: #e7e9f2; }

.nav-item.active {
  color: #ffffff;
  background: rgba(77, 94, 255, .18);
  font-weight: 600;
  box-shadow: inset 2px 0 0 0 #4d5eff;
}

.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .9; }

.main {
  margin-left: 232px;
  flex: 1;
  min-width: 0;
  padding: 34px 44px 60px;
}

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

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

.page-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: .875rem;
  line-height: 1.25;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 25, 255, .25), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-primary:hover { background: var(--primary-strong); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(255, 109, 77, .3), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn-accent:hover { filter: brightness(.94); }

.btn-ghost {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }

.btn-danger {
  background: var(--danger-soft);
  color: #b91c1c;
  border-color: transparent;
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: .8rem; border-radius: 7px; }

/* ─── Stats cards (KPI) ─── */

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

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

.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
}

.stat-label::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.stat-card.danger  .stat-label::before { background: var(--danger); }
.stat-card.success .stat-label::before { background: var(--success); }
.stat-card.accent  .stat-label::before { background: var(--accent); }

/* Le chiffre reste en encre — la sémantique est portée par la pastille + le libellé */
.stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ─── Cards ─── */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.card-title {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: var(--text);
}

/* ─── Pipeline bars ─── */

.pipeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}

.pipeline-label {
  width: 158px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-2);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-bar-wrap {
  flex: 1;
  height: 8px;
  background: #eef0f5;
  border-radius: 4px;
  overflow: hidden;
}

.pipeline-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .4s ease;
}

.pipeline-count {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── Interactions ─── */

.interaction-list { display: flex; flex-direction: column; gap: 8px; }

.interaction-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.interaction-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 7px;
}

.interaction-body { flex: 1; min-width: 0; }

.interaction-prospect {
  font-weight: 600;
  font-size: .84rem;
  color: var(--primary-strong);
  margin-bottom: 1px;
}

.interaction-prospect a:hover { text-decoration: underline; }

.interaction-note {
  font-size: .86rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.interaction-date {
  font-size: .74rem;
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ─── Champs de saisie (base commune) ─── */

.filters input,
.filters select,
.statut-form select,
.followup-form input[type="date"],
.interaction-form textarea,
.interaction-form select,
.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: .875rem;
  font-weight: 450;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.filters input:focus,
.filters select:focus,
.statut-form select:focus,
.followup-form input[type="date"]:focus,
.interaction-form textarea:focus,
.interaction-form select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
}

::placeholder { color: #a3a9c0; }

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

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  background: var(--surface);
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ─── Table ─── */

.table-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;   /* le tableau défile, il n'est jamais tronqué */
  box-shadow: var(--shadow);
}

table { width: 100%; border-collapse: collapse; }

thead th {
  padding: 11px 14px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--surface);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8f9fd; }

tbody td {
  padding: 10px 14px;
  font-size: .865rem;
  vertical-align: middle;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* Colonnes du tableau prospects : compactes et sur une ligne
   (1 Commerce · 2 Secteur · 3 Prestation · 4 Ville · 7-8 dates) */
#tbody-prospects td:nth-child(1) { min-width: 150px; max-width: 220px; }
#tbody-prospects td:nth-child(1) a { font-weight: 600; }
#tbody-prospects td:nth-child(2),
#tbody-prospects td:nth-child(3) {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#tbody-prospects td:nth-child(4) { white-space: nowrap; }
#tbody-prospects td:nth-child(7),
#tbody-prospects td:nth-child(8) { white-space: nowrap; }

tbody td a { color: var(--text); }
tbody td a:hover { color: var(--primary-strong); }

.actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Les boutons d'action de ligne restent discrets jusqu'au survol */
tbody .actions .btn-ghost { border-color: var(--border); color: var(--muted); }
tbody .actions .btn-ghost:hover { border-color: var(--border-strong); color: var(--text); }
tbody .actions .btn-danger { background: transparent; color: var(--muted); }
tbody .actions .btn-danger:hover { background: var(--danger-soft); color: #b91c1c; }

/* ─── Badge ─── */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: #171b30;
  box-shadow: inset 0 0 0 1px rgba(16, 20, 44, .08);
  white-space: nowrap;
}

/* ─── Pagination ─── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 0 4px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px; height: 32px;
  padding: 0 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-weight: 600;
  font-size: .84rem;
  color: var(--text-2);
  background: var(--surface);
  transition: border-color .15s, color .15s, background .15s;
  font-variant-numeric: tabular-nums;
}

.page-btn:hover { border-color: var(--primary); color: var(--primary-strong); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.disabled { opacity: .35; pointer-events: none; }

/* ─── Prospect detail ─── */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 27%, 400px);
  gap: 20px;
  align-items: start;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
}

.info-field {}
.info-field.full { grid-column: 1 / -1; }

.info-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 2px;
}

.info-value {
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
  overflow-wrap: anywhere;
}

.info-value a { color: var(--primary-strong); }
.info-value a:hover { text-decoration: underline; }

/* ─── Status / follow-up (sidebar fiche) ─── */

.statut-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.statut-form select { flex: 1; min-width: 140px; }

.followup-form { display: flex; gap: 8px; align-items: center; }
.followup-form input[type="date"] { flex: 1; }

.followup-value { font-variant-numeric: tabular-nums; }

/* ─── Interaction form ─── */

.interaction-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 76px;
}

/* ─── Formulaire prospect ─── */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }

.form-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
}

.form-field textarea { resize: vertical; min-height: 88px; }

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.form-checkbox input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-checkbox label {
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
}

.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ─── Pitch (argumentaire imprimable) ─── */

.pitch-header {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 16px;
  margin-bottom: 26px;
}

.pitch-section { margin-bottom: 26px; }

.pitch-section-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--primary-strong);
  margin-bottom: 12px;
}

.pitch-arg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.pitch-arg-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .74rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.pitch-arg-text { font-size: .92rem; font-weight: 500; color: var(--text-2); }

.objection-item {
  margin-bottom: 10px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.objection-q {
  font-weight: 700;
  font-size: .88rem;
  color: #cc4527;
  margin-bottom: 3px;
}

.objection-a { font-size: .88rem; color: var(--text-2); }

.prochaine-etape {
  background: var(--primary-soft);
  border: 1px solid rgba(0, 25, 255, .25);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--primary-strong);
}

/* ─── Delete confirm ─── */

.confirm-delete { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.confirm-delete span {
  font-size: .84rem;
  font-weight: 600;
  color: var(--danger);
}

/* ─── Divider ─── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

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

.empty-state {
  text-align: center;
  padding: 44px 24px;
  color: var(--muted);
}

.empty-state p { font-size: .95rem; font-weight: 500; }

/* ─── Groupes de mise en page (ex-styles inline, rendu desktop identique) ─── */

.page-actions { display: flex; gap: 10px; align-items: center; }

.dashboard-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.interaction-form-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }

.pitch-head-row { display: flex; align-items: center; justify-content: space-between; }
.pitch-proposal { display: flex; gap: 20px; align-items: baseline; }

.pitch-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.error-actions { display: flex; gap: 10px; justify-content: center; }

/* ─── Scrollbar (discret) ─── */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d4d7e2; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b9bdcd; }
::-webkit-scrollbar-track { background: transparent; }

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

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar { width: 64px; padding: 20px 8px; }
  .sidebar-logo { padding: 0 6px 16px; }
  .sidebar-logo .brand { font-size: 0; }
  .sidebar-logo .brand::before { margin: 0; width: 12px; height: 12px; }
  .sidebar-logo .sub { display: none; }
  .nav-item { justify-content: center; font-size: 0; gap: 0; padding: 12px; }
  .nav-item svg { width: 19px; height: 19px; }
  .main { margin-left: 64px; padding: 24px 20px 48px; }
  .form-grid, .info-grid { grid-template-columns: 1fr; }
}

/* ─── Mobile (< 768px) : barre de navigation en bas, une colonne,
       cibles tactiles 44px, champs 16px (pas de zoom iOS) ─── */

@media (max-width: 767.98px) {
  html, body { overflow-x: hidden; }

  .layout { display: block; }

  /* Sidebar → barre fixe en bas */
  .sidebar {
    position: fixed;
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: stretch;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--sidebar-border);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .25);
    z-index: 50;
  }

  .sidebar-logo { display: none; }

  .nav-item {
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    margin: 0;
    min-height: 48px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .01em;
  }

  .nav-item svg { width: 22px; height: 22px; }
  .nav-item.active { box-shadow: none; }

  /* Contenu : plus de marge latérale, padding bas pour la barre */
  .main {
    margin-left: 0;
    padding: 20px 16px calc(84px + env(safe-area-inset-bottom));
  }

  /* En-tête de page : titre + boutons à la ligne */
  .page-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .page-header > div { min-width: 0; }
  .page-title { font-size: 1.3rem; overflow-wrap: anywhere; }

  .page-actions { flex-wrap: wrap; width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }

  /* Boutons : 44px minimum */
  .btn { min-height: 44px; padding: 10px 16px; }
  .btn-sm { min-height: 44px; font-size: .85rem; padding: 8px 14px; }
  .page-btn { min-width: 44px; height: 44px; }

  /* Champs : 16px minimum (sinon zoom iOS), 44px de haut */
  .filters input,
  .filters select,
  .statut-form select,
  .followup-form input[type="date"],
  .interaction-form textarea,
  .interaction-form select,
  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 16px;
    min-height: 44px;
    padding: 10px 12px;
  }

  .form-checkbox input[type="checkbox"] { width: 22px; height: 22px; }

  /* Stats : 2 colonnes */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
  .stat-card { padding: 14px 16px 12px; }
  .stat-value { font-size: 1.6rem; }

  /* Pipeline et Répartition empilés */
  .dashboard-split { grid-template-columns: 1fr; gap: 16px; }
  .pipeline-label { width: 112px; }

  .card { padding: 16px; }

  /* Filtres : champs sur 2 colonnes, recherche et bouton en pleine largeur */
  .filters { padding: 10px; }
  .filters input,
  .filters select { flex: 1 1 calc(50% - 4px); min-width: 0; width: auto; }
  .filters input[name="search"],
  .filters .btn { flex: 1 1 100%; }

  /* Tableau : défile dans son conteneur, jamais la page */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .table-wrap table { min-width: 780px; }
  tbody td { padding: 10px 12px; }
  .actions { flex-wrap: nowrap; }

  .pagination { flex-wrap: wrap; }

  /* Fiche prospect */
  .detail-grid, .info-grid, .form-grid { grid-template-columns: 1fr; }

  .statut-form select { width: 100%; flex: 1 1 100%; }
  .statut-form .btn { flex: 1 1 100%; }

  .followup-form { flex-wrap: wrap; }
  .followup-form input[type="date"] { flex: 1 1 100%; }
  .followup-form .btn { flex: 1 1 100%; }

  .interaction-form-row { flex-wrap: wrap; }
  .interaction-form-row select { max-width: none !important; flex: 1 1 100%; }
  .interaction-form-row .btn { flex: 1 1 100%; }

  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1 1 auto; }

  .confirm-delete .btn { flex: 1 1 auto; }

  .interaction-item { flex-wrap: wrap; }
  .interaction-note { white-space: normal; }
  .interaction-date { width: 100%; margin: 4px 0 0 19px; }

  /* Pitch */
  .pitch-head-row, .pitch-proposal, .pitch-footer { flex-wrap: wrap; gap: 10px; }
  .pitch-section, .pitch-section a { overflow-wrap: anywhere; word-break: break-word; }

  .error-actions { flex-wrap: wrap; }
  .error-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 399.98px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filters input,
  .filters select { flex: 1 1 100%; }
}

/* ─── Print (argumentaire) ─── */

@media print {
  .sidebar, .btn, .no-print { display: none !important; }
  body { background: #fff; }
  .main { margin-left: 0; padding: 16px; max-width: 100%; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .badge { box-shadow: none; border: 1px solid #ccc; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .pitch-arg-num, .objection-item, .prochaine-etape { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ════════════════════════════════════════════════════════════
   Évolutions oct. 2026 : liste colonnes, import, affaires, verrou
   ════════════════════════════════════════════════════════════ */

/* ─── Sections de formulaire ─── */
.form-section-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary-strong);
  margin: 22px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.form-section-title:first-of-type { margin-top: 0; }
.form-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .78rem; }

/* ─── Verrou « ne pas contacter » ─── */
.bandeau-verrou {
  background: var(--danger-soft);
  border: 1px solid #fca5a5;
  color: #991b1b;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .9rem;
  margin-bottom: 18px;
}
.verrou-actif label { color: var(--danger); font-weight: 600; }
tr.ligne-verrou td, .carte-prospect.ligne-verrou { opacity: .6; }

/* ─── Tableau liste : colonne figée, tri, colonnes masquables ─── */
.table-prospects table { min-width: max-content; }
.table-prospects th.col-fixe,
.table-prospects td.col-fixe {
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 2;
  box-shadow: inset -1px 0 0 var(--border);
  min-width: 180px;
  max-width: 260px;
}
.table-prospects tbody tr:hover td.col-fixe { background: #f8f9fd; }
.col-cachee { display: none !important; }

.th-tri { color: inherit; white-space: nowrap; }
.th-tri:hover { color: var(--primary-strong); }
.tri-indic { font-size: .65rem; color: var(--primary-strong); }

.table-prospects td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.select-inline {
  font-family: inherit;
  font-size: .8rem;
  font-weight: 500;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  max-width: 170px;
}
.select-inline:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.statut-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.score-etoiles { color: #f59e0b; letter-spacing: 1px; font-size: .85rem; }
.lien-tel { font-variant-numeric: tabular-nums; color: var(--primary-strong); font-weight: 500; }

.cell-liens a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 4px;
  border-radius: 6px; margin-right: 4px;
  font-size: .78rem; font-weight: 700;
  background: var(--bg); border: 1px solid var(--border);
}
.cell-liens a:hover { border-color: var(--primary); color: var(--primary-strong); }
.lien-in { color: #0a66c2; }
.lien-pap { color: #7c3aed; }

/* ─── Menu « Colonnes » ─── */
.colonnes-menu-wrap { position: relative; }
.colonnes-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  min-width: 220px;
  max-height: 380px;
  overflow-y: auto;
}
.colonnes-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 14px;
  font-size: .85rem; font-weight: 500;
  cursor: pointer;
}
.colonnes-item:hover { background: var(--bg); }
.colonnes-item input { accent-color: var(--primary); }

/* ─── Pagination ─── */
.page-points { color: var(--muted); padding: 0 2px; }

/* ─── Cartes mobile (sessions d'appels) ─── */
.cartes-prospects { display: none; }

/* ─── Affaires ─── */
.table-affaires { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.table-affaires th {
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
  text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border);
}
.table-affaires td { padding: 8px; font-size: .86rem; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.table-affaires tr:last-child td { border-bottom: none; }
.form-affaire { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form-affaire input {
  font-family: inherit; font-size: .85rem; padding: 7px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); flex: 1; min-width: 120px;
}
.form-affaire input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

/* ─── Camembert CA signé ─── */
.ca-chart-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.ca-canvas-wrap { position: relative; height: 240px; }
.ca-legende { display: flex; flex-direction: column; gap: 7px; }
.ca-legende-item {
  display: flex; align-items: center; gap: 9px;
  font-size: .86rem;
}
.ca-pastille { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.ca-nom { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-val { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ─── Interaction form row ─── */
.interaction-form-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }

/* ─── Mobile ─── */
@media (max-width: 820px) {
  .table-prospects { display: none; }
  .cartes-prospects { display: flex; flex-direction: column; gap: 12px; }
  .carte-prospect {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
  }
  .carte-haut { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .carte-nom { font-weight: 700; font-size: 1rem; color: var(--primary-strong); }
  .carte-sous { color: var(--muted); font-size: .85rem; margin: 3px 0 10px; }
  .carte-tel {
    display: flex; justify-content: center;
    font-size: 1rem; padding: 12px;
    margin-bottom: 10px;
  }
  .carte-sans-tel {
    text-align: center; color: var(--muted); font-size: .85rem;
    padding: 10px; background: var(--bg); border-radius: var(--radius-sm);
    margin-bottom: 10px;
  }
  .carte-selects { display: flex; gap: 8px; }
  .carte-selects .select-inline { flex: 1; max-width: none; font-size: .9rem; padding: 9px 8px; }
  .ca-chart-grid { grid-template-columns: 1fr; }
  .ca-canvas-wrap { height: 200px; }
  .form-affaire input { min-width: 100%; }
  .filters { position: relative; }
}

/* ── Encaissements (06/10/2026) ───────────────────────────── */
.bloc-affaire {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bg);
}
.affaire-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.affaire-titre { font-size: .92rem; }
.affaire-meta { color: var(--muted); font-weight: 400; font-size: .84rem; }
.affaire-chiffres {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  margin: 8px 0 6px; font-size: .88rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.affaire-chiffres strong { color: var(--text); }
.a-completer { color: var(--danger); font-weight: 600; }
.badge-depasse {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  border-radius: 999px; background: #fff7ed; color: #c2410c;
  font-size: .72rem; font-weight: 600; vertical-align: 1px;
}
.barre-progression {
  height: 7px; border-radius: 999px; background: var(--border);
  overflow: hidden; margin: 2px 0 10px;
}
.barre-progression-fill {
  height: 100%; border-radius: 999px; background: #34d399;
  transition: width .25s ease;
}
.barre-progression-fill.depasse { background: #fb923c; }
.table-encaissements { width: 100%; border-collapse: collapse; margin: 4px 0 10px; }
.table-encaissements th {
  text-align: left; padding: 6px 8px; font-size: .72rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}
.table-encaissements td { padding: 7px 8px; font-size: .84rem; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.table-encaissements tr:last-child td { border-bottom: none; }
.enc-note { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-encaissement-wrap { margin-top: 2px; }
.form-encaissement-wrap summary { list-style: none; display: inline-block; user-select: none; }
.form-encaissement-wrap summary::-webkit-details-marker { display: none; }
.form-encaissement { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.form-encaissement input, .form-encaissement select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: .86rem; background: var(--surface); color: var(--text);
}
.form-encaissement input:focus, .form-encaissement select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.table-recap-depassement { width: 100%; border-collapse: collapse; }
.table-recap-depassement td { padding: 7px 8px; font-size: .88rem; border-bottom: 1px solid var(--border); }
.table-recap-depassement td:first-child { color: var(--muted); width: 160px; }
.table-recap-depassement tr:last-child td { border-bottom: none; }

/* Double camembert + indicateurs */
.ca-double { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ca-bloc { min-width: 0; }
/* En demi-colonne, l'anneau passe AU-DESSUS de sa légende (la grille
   300px + légende côte à côte ne tient que sur une carte pleine largeur) */
.ca-double .ca-chart-grid { grid-template-columns: 1fr; gap: 14px; justify-items: stretch; }
.ca-double .ca-canvas-wrap { height: 200px; }
.ca-bloc-titre { font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.ca-indicateurs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
}
.ca-indic { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.ca-indic-label { font-size: .74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ca-indic-val { font-size: 1.15rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; margin-top: 2px; }
.ca-indic.danger .ca-indic-val { color: var(--danger); }

@media (max-width: 820px) {
  .ca-double { grid-template-columns: 1fr; }
  .ca-indicateurs { grid-template-columns: 1fr; }
  .form-encaissement input, .form-encaissement select { min-width: 100%; }
  .enc-note { max-width: 120px; }
}

/* ── Page de connexion (lot B, 04/11/2026) ───────────────── */
.page-login {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background: var(--sidebar-bg); margin: 0; padding: 16px;
}
.login-carte {
  background: var(--surface); border-radius: 16px;
  padding: 36px 32px; width: 100%; max-width: 360px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo .brand { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.login-logo .sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.login-erreur {
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
  border-radius: 8px; padding: 9px 12px; font-size: .86rem;
  font-weight: 600; margin-bottom: 14px; text-align: center;
}
.login-identifiant { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.login-champ {
  width: 100%; box-sizing: border-box; padding: 13px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 1rem; background: var(--bg); color: var(--text);
  margin-bottom: 12px;
}
.login-champ:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.login-bouton { width: 100%; justify-content: center; padding: 13px; font-size: .95rem; }
.login-note { text-align: center; font-size: .76rem; color: var(--muted); margin-top: 14px; }
.nav-deconnexion { margin-top: auto; padding-top: 10px; }
.nav-item-bouton { width: 100%; background: none; border: none; cursor: pointer; font: inherit; text-align: left; }

/* ── Relances (lot C, 04/11/2026) ────────────────────────── */
.badge-relances {
  margin-left: auto; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 1px 8px; font-size: .72rem; font-weight: 700;
}
.relance-ligne {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.relance-ligne:last-child { border-bottom: none; }
.relance-ligne.retard .relance-meta { color: var(--danger); font-weight: 600; }
.relance-infos { min-width: 0; }
.relance-nom { font-weight: 700; color: var(--text); text-decoration: none; }
.relance-nom:hover { color: var(--primary); }
.relance-meta { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.relance-meta .statut-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.relance-note { font-size: .84rem; color: var(--text-2); background: var(--bg); border-radius: 7px; padding: 6px 10px; margin-top: 6px; }
.relance-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.relance-reporter { display: inline-flex; gap: 4px; }
.btn-fait { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.btn-fait:hover { background: #d1fae5; }
.relance-vide { color: var(--muted); font-size: .88rem; }
.relance-rapide { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.relance-rapide-libelle { font-size: .82rem; color: var(--muted); font-weight: 600; margin-right: 4px; }
.relance-rapide-boutons { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.relance-rapide-precis { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.relance-rapide-precis input {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: .86rem; background: var(--surface); color: var(--text);
}
.relance-rapide-precis input[name=note] { flex: 1; min-width: 160px; }
.stat-lien { text-decoration: none; display: block; }
.stat-lien:hover { border-color: var(--primary); }
@media (max-width: 820px) {
  .relance-actions { width: 100%; justify-content: flex-start; }
}

/* ════════════════════════════════════════════════════════════
   Polissage mobile (04/11/2026) — bloc FINAL : il doit rester en
   fin de fichier pour l'emporter sur les définitions précédentes.
   ════════════════════════════════════════════════════════════ */

/* Les champs de formulaire n'avaient AUCUNE largeur : ils gardaient leur
   largeur intrinsèque (~374 px) et débordaient de leur colonne (page
   Import notamment). Toutes tailles d'écran. */
.form-field { min-width: 0; }
.form-field input,
.form-field select,
.form-field textarea { width: 100%; box-sizing: border-box; }

@media (max-width: 767.98px) {
  /* Barre basse : 7 entrées ne tiennent pas — Importer et Déconnexion
     sortent du mobile (Import = bouton du dashboard ; Déconnexion = page
     Réglages). 5 entrées restantes, bien réparties. */
  .nav-masque-mobile, .nav-deconnexion { display: none; }

  /* Badge « Relances » : pastille accrochée à l'icône (style iOS),
     plus d'étirement de la rangée */
  .nav-item { position: relative; }
  .nav-item .badge-relances {
    position: absolute;
    top: 2px;
    left: 50%;
    margin: 0 0 0 8px;
    padding: 0 6px;
    line-height: 16px;
    font-size: .66rem;
  }

  /* Stats du dashboard : 2 × 2 partout (le sous-breakpoint < 400 px
     les empilait en une colonne interminable) */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* En-tête : les boutons d'action côte à côte sur une seule ligne */
  .page-actions { flex-wrap: nowrap; }
  .page-actions .btn { flex: 1 1 0; min-width: 0; padding: 10px 8px; font-size: .85rem; white-space: nowrap; }

  /* Fiche — bloc « Relancer dans » : boutons en grille régulière,
     date + heure côte à côte, note et Planifier pleine largeur */
  .relance-rapide-boutons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .relance-rapide-libelle { grid-column: 1 / -1; margin: 0 0 2px; }
  .relance-rapide-boutons .btn { padding: 8px 4px; font-size: .82rem; }
  .relance-rapide-precis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .relance-rapide-precis input { width: 100%; box-sizing: border-box; min-width: 0; font-size: 16px; min-height: 44px; }
  .relance-rapide-precis input[name="note"],
  .relance-rapide-precis .btn { grid-column: 1 / -1; }

  /* Vue Relances : Appeler et Fait sur la même ligne, les 4 boutons de
     report en rangée régulière dessous */
  .relance-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .relance-actions > a[href^="tel:"] { grid-row: 1; grid-column: 1; justify-content: center; }
  .relance-fait { grid-row: 1; grid-column: 2; }
  .relance-fait .btn { width: 100%; justify-content: center; }
  .relance-actions > a[href^="tel:"]:only-of-type ~ .relance-fait { grid-column: 2; }
  .relance-reporter { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .relance-reporter .btn { padding: 8px 4px; font-size: .82rem; }

  /* Tableaux denses (encaissements, restes dus) : défilement interne,
     jamais la page */
  .table-encaissements { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

  /* Formulaires encaissement / affaire : pleine largeur propre */
  .form-encaissement input, .form-encaissement select,
  .form-affaire input { width: 100%; box-sizing: border-box; min-width: 0; font-size: 16px; min-height: 44px; }

  /* Confirmation de dépassement : boutons pleine largeur */
  .table-recap-depassement td:first-child { width: 110px; }
}

/* ── Correctif isolé (16/11/2026) : formulaire d'ajout d'affaire sur iPhone ──
   Il était écrasé sur une seule ligne depuis le polissage mobile du 04/11.
   Ne cible QUE .form-affaire (classe portée par ce seul formulaire, dans la
   fiche prospect) ; commit séparé, annulable seul. */
@media (max-width: 767.98px) {
  .form-affaire input { flex: 1 1 100%; max-width: none !important; }
  .form-affaire .btn { flex: 1 1 100%; }
}

/* ── Bandeau CA réel vs prévisionnel (04/11/2026) ────────── */
.bandeau-ca {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px; margin-bottom: 18px;
  font-size: .82rem; color: var(--text-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bca-item { flex: 0 0 auto; }
.bca-libelle {
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  font-size: .66rem; color: var(--muted); margin-right: 7px;
}
.bca-pct { font-weight: 700; }
.bca-pct.ca-ok { color: #059669; }
.bca-pct.ca-moyen { color: #d97706; }
.bca-pct.ca-bas { color: var(--danger); }
.bca-sans { font-style: italic; color: var(--muted); }

.objectifs-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.objectif-ligne { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.objectif-ligne > span { width: 64px; color: var(--muted); font-weight: 600; }
.objectif-ligne input {
  flex: 1; min-width: 0; width: 100%; box-sizing: border-box;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: .86rem; background: var(--bg); color: var(--text);
}
.objectif-ligne input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.objectif-nouveau { grid-column: 1 / -1; border-top: 1px dashed var(--border); padding-top: 10px; }

@media (max-width: 767.98px) {
  .bandeau-ca {
    justify-content: space-between; gap: 2px 8px;
    padding: 6px 8px; margin-bottom: 14px; font-size: .64rem;
  }
  .bca-libelle { font-size: .52rem; margin-right: 2px; }
  .objectifs-grille { grid-template-columns: 1fr; }
  .objectif-ligne input { font-size: 16px; min-height: 44px; }
}

/* ── Détail CA réel vs prévisionnel (04/11/2026, 2e itération) ── */
a.bandeau-ca { text-decoration: none; cursor: pointer; transition: border-color .15s; }
a.bandeau-ca:hover { border-color: var(--primary); }

.table-objectifs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table-objectifs th {
  text-align: left; padding: 7px 10px; font-size: .72rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}
.table-objectifs td { padding: 7px 10px; font-size: .86rem; border-bottom: 1px solid var(--border); }
.table-objectifs th:not(:first-child), .table-objectifs td:not(:first-child) { text-align: right; }
.ligne-annee td {
  background: var(--bg); font-weight: 800; font-size: .78rem;
  letter-spacing: .06em; color: var(--text-2); text-align: left !important;
}
.ligne-courante td { background: var(--primary-soft); font-weight: 600; }
.pastille-courant {
  background: var(--primary); color: #fff; border-radius: 999px;
  font-size: .62rem; font-weight: 700; padding: 1px 7px; margin-left: 6px;
  vertical-align: 1px;
}
.ligne-future td { color: var(--muted); }
.ligne-soustotal td { font-weight: 700; background: var(--bg); }
.soustotal-note { font-size: .66rem; color: var(--muted); font-weight: 400; margin-left: 4px; }
.ligne-total td { font-weight: 800; border-top: 2px solid var(--border-strong); border-bottom: none; }
.ligne-total-plan td { color: var(--muted); font-size: .8rem; border-bottom: none; }

@media (max-width: 767.98px) {
  .table-objectifs td, .table-objectifs th { padding: 7px 6px; font-size: .78rem; }
  .pastille-courant { display: none; }
}

/* ── Rappels d'encaissement (16/11/2026) ─────────────────── */
.rappels-titre {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin: 12px 0 6px; padding-top: 10px; border-top: 1px dashed var(--border);
}
.rappels-total { font-weight: 500; text-transform: none; letter-spacing: 0; }
.rappel-alerte {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  border-radius: 8px; padding: 7px 10px; font-size: .82rem; font-weight: 600; margin-bottom: 8px;
}
.rappel-ligne {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 14px;
  flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--border);
}
.rappel-ligne:last-of-type { border-bottom: none; }
.rappel-infos { min-width: 0; font-size: .86rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rappel-libelle { font-weight: 600; color: var(--text); }
.rappel-montant { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.rappel-date { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.rappel-note { flex-basis: 100%; color: var(--text-2); font-size: .8rem; }
.rappel-etat {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.rappel-etat.etat-retard { background: #fef2f2; color: #b91c1c; }
.rappel-etat.etat-aujourdhui { background: #fff7ed; color: #c2410c; }
.rappel-etat.etat-a_venir { background: var(--primary-soft); color: var(--primary-strong); }
.rappel-etat.etat-sans_date { background: var(--bg); color: var(--muted); border: 1px dashed var(--border-strong); }
.rappel-etat.etat-encaisse { background: #ecfdf5; color: #047857; }
.rappel-etat.etat-annule { background: var(--bg); color: var(--muted); }
.rappel-ligne.etat-encaisse .rappel-libelle,
.rappel-ligne.etat-encaisse .rappel-montant,
.rappel-ligne.etat-annule .rappel-libelle,
.rappel-ligne.etat-annule .rappel-montant { color: var(--muted); font-weight: 500; }
.rappel-ligne.etat-annule .rappel-montant { text-decoration: line-through; }
.rappel-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; flex-basis: 100%; }
.rappel-details summary { list-style: none; user-select: none; }
.rappel-details summary::-webkit-details-marker { display: none; }
.rappel-details[open] { flex-basis: 100%; }
.form-rappel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.form-rappel input {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: .86rem; background: var(--surface); color: var(--text);
  min-width: 0; max-width: 100%; box-sizing: border-box;
}
.form-rappel input[name="note"], .form-rappel input[name="libelle"] { flex: 1 1 160px; }
.form-rappel input[name="montant"] { max-width: 150px; }
.form-rappel input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.affaire-ajouts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 8px; margin-top: 10px; }
.affaire-ajouts > details[open] { flex-basis: 100%; }
.affaire-ajouts .form-encaissement-wrap { margin-top: 0; }

@media (max-width: 767.98px) {
  .rappel-actions { width: 100%; }
  .form-rappel input {
    flex: 1 1 100%; width: 100%; max-width: none !important;
    font-size: 16px; min-height: 44px;
  }
  .form-rappel .btn { flex: 1 1 100%; }
}

/* ── Page « Délais d'encaissement » (16/11/2026) ─────────── */
.delais-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; }
.delais-total-label {
  font-size: .72rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.delais-total-val { font-size: 1.6rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.delais-total-retard { color: var(--danger); font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.delais-info { margin-bottom: 16px; }
.delais-ajout { margin-top: 16px; }
.delais-ajout summary { list-style: none; display: inline-block; user-select: none; }
.delais-ajout summary::-webkit-details-marker { display: none; }
.form-rappel select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: .86rem; background: var(--surface); color: var(--text);
  min-width: 0; max-width: 100%; box-sizing: border-box;
}
.form-rappel select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.delai-entete, .delai-infos {
  display: grid; grid-template-columns: 1.5fr 1.4fr 1.2fr .9fr .9fr auto;
  gap: 4px 14px; align-items: center;
}
.delai-entete {
  font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; padding: 0 0 6px; border-bottom: 1px solid var(--border);
}
.delai-entete span:nth-child(4), .delai-infos .rappel-montant { text-align: right; }
.delai-entete span:last-child { min-width: 96px; }
.delai-infos > span:last-of-type { min-width: 96px; }
.delai-ligne { padding: 10px 0; border-bottom: 1px solid var(--border); }
.delai-ligne:last-child { border-bottom: none; }
.delai-infos { font-size: .86rem; min-width: 0; }
.delai-infos .rappel-note { grid-column: 1 / -1; }
.delai-client { font-weight: 700; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.delai-client:hover { color: var(--primary); }
.delai-affaire { color: var(--text-2); overflow-wrap: anywhere; }
.delai-ligne .rappel-actions { margin-top: 8px; }
.delai-ligne.etat-retard .rappel-date { color: var(--danger); font-weight: 600; }
.confirm-encaissement { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

@media (max-width: 767.98px) {
  .delai-entete { display: none; }
  /* Carte : client et montant sur la 1re ligne, le reste dessous */
  .delai-infos { grid-template-columns: 1fr auto; gap: 3px 10px; }
  .delai-infos .delai-client { grid-column: 1; grid-row: 1; }
  .delai-infos .rappel-montant { grid-column: 2; grid-row: 1; }
  .delai-infos .delai-affaire { grid-column: 1 / -1; font-size: .8rem; }
  .delai-infos .rappel-libelle { grid-column: 1 / -1; }
  .delai-infos .rappel-date { grid-column: 1; }
  .delai-infos > span:last-of-type { grid-column: 2; min-width: 0; text-align: right; }
  .form-rappel select { flex: 1 1 100%; width: 100%; font-size: 16px; min-height: 44px; }
  .confirm-encaissement .btn {
    flex: 1 1 100%; justify-content: center; min-width: 0;
    white-space: normal; text-align: center;
  }
}
