/* ── CRM ADDITIONS — Vegetal Deco brand ── */

.app-nav {
  position: fixed;
  top: 56px; left: 0; right: 0;
  height: 44px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 4px;
  z-index: 90;
  box-shadow: 0 1px 0 var(--border);
}

.app-nav a {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
  border-radius: var(--radius) var(--radius) 0 0;
}

.app-nav a:hover { color: var(--primary); }
.app-nav a.active { color: var(--primary); border-bottom-color: var(--accent); font-weight: 500; }

.crm-layout {
  margin-top: 100px;
  padding: 32px 48px;
  max-width: 1100px;
}

/* ── PAGE HEADER ───────────────────────── */
.page-title-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}

.page-title-bar h1 { font-weight: 500; font-size: 30px; color: var(--primary); }
.page-title-bar p { font-size: 13px; color: var(--text-light); margin-top: 3px; font-family: 'DM Sans', sans-serif; }

/* ── STAT CARDS ────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 32px; }

.stat-card {
  background: white;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.stat-card .stat-num { font-family: 'Playfair Display', serif; font-size: 34px; color: var(--primary); line-height: 1; margin-bottom: 6px; }
.stat-card .stat-label { font-size: 11px; letter-spacing: 0.5px; color: var(--text-light); font-family: 'DM Sans', sans-serif; }

/* ── TABLE ─────────────────────────────── */
.data-table { width: 100%; background: white; border-collapse: collapse; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }

.data-table thead tr { background: var(--primary); }
.data-table thead th { padding: 11px 16px; font-size: 11px; letter-spacing: 0.5px; color: rgba(255,255,255,0.7); text-align: left; font-weight: 400; font-family: 'DM Sans', sans-serif; }
.data-table thead th:first-child { color: var(--accent); }

.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; cursor: pointer; }
.data-table tbody tr:hover { background: rgba(26,61,43,0.03); }
.data-table tbody td { padding: 12px 16px; font-size: 12px; color: var(--text-mid); vertical-align: middle; }

.data-table .td-main { font-family: 'Playfair Display', serif; font-size: 15px; color: var(--primary); font-weight: 500; }
.data-table .td-sub { font-size: 11px; color: var(--text-light); margin-top: 1px; font-family: 'DM Sans', sans-serif; }

/* ── STATUS BADGES ─────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px;
  font-size: 10px; letter-spacing: 0.5px; font-family: 'DM Sans', sans-serif; font-weight: 400;
  border-radius: 100px;
}

.badge-brouillon { background: hsl(40,10%,93%); color: hsl(0,0%,45%); }
.badge-envoyee   { background: hsl(210,80%,95%); color: hsl(210,80%,35%); }
.badge-acceptee  { background: hsl(140,40%,92%); color: hsl(140,50%,28%); }
.badge-refusee   { background: hsl(0,70%,95%); color: hsl(0,70%,40%); }

/* ── ACTION BUTTONS ────────────────────── */
.actions-cell { display: flex; gap: 6px; align-items: center; }

.btn-icon {
  padding: 5px 10px; background: white;
  border: 1px solid var(--border); font-size: 11px; letter-spacing: 0.3px;
  color: var(--text-mid); cursor: pointer; transition: all 0.15s; white-space: nowrap;
  border-radius: var(--radius); font-family: 'DM Sans', sans-serif; font-weight: 400;
}

.btn-icon:hover { background: var(--primary); color: white; border-color: var(--primary); }
.btn-icon.danger:hover { background: #c0392b; border-color: #c0392b; color: white; }
.btn-icon.primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-icon.gold { background: var(--accent); color: white; border-color: var(--accent); font-weight: 500; }
.btn-icon.gold:hover { background: #c4871e; border-color: #c4871e; }

/* ── MODAL ─────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,61,43,0.6);
  display: flex; align-items: center; justify-content: center; z-index: 999;
  backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none; }

.modal { background: white; width: 540px; max-height: 85vh; overflow-y: auto; border-top: 3px solid var(--accent); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.2); }

.modal-header { padding: 22px 28px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--primary); font-weight: 500; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-light); transition: color 0.2s; }
.modal-close:hover { color: #c0392b; }
.modal-body { padding: 22px 28px; }
.modal-footer { padding: 14px 28px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── SEARCH BAR ────────────────────────── */
.search-bar { display: flex; gap: 12px; margin-bottom: 20px; align-items: center; }
.search-bar input { flex: 1; }

/* ── EMPTY STATE ───────────────────────── */
.empty-state { text-align: center; padding: 60px 40px; color: var(--text-light); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--text-mid); margin-bottom: 8px; font-weight: 500; }
.empty-state p { font-size: 13px; font-family: 'DM Sans', sans-serif; }

/* ── VERSION HISTORY ───────────────────── */
.versions-list { display: flex; flex-direction: column; gap: 8px; }
.version-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--bg); border-left: 2px solid var(--border); border-radius: 0 var(--radius) var(--radius) 0; }
.version-item.latest { border-left-color: var(--accent); }
.version-item .v-num { font-family: 'Playfair Display', serif; font-size: 15px; color: var(--primary); min-width: 60px; }
.version-item .v-date { font-size: 11px; color: var(--text-light); flex: 1; font-family: 'DM Sans', sans-serif; }

/* ── NOTES BOX ─────────────────────────── */
.notes-box { background: var(--accent-light); border-left: 3px solid var(--accent); padding: 14px 18px; font-size: 12px; color: var(--text-mid); line-height: 1.6; white-space: pre-line; border-radius: 0 var(--radius) var(--radius) 0; }
