/* ── Variables ── */
:root {
  --bg:           #F7F6F2;
  --surface:      #FFFFFF;
  --surface2:     #F0EEE9;
  --border:       #E5E2DA;
  --text:         #1A1916;
  --text2:        #6B6860;
  --text3:        #A8A59E;
  --accent:       #FF5C35;
  --accent-light: #FFF0EC;
  --blue:         #2563EB;
  --blue-light:   #EFF3FF;
  --green:        #16A34A;
  --green-light:  #F0FDF4;
  --amber:        #D97706;
  --amber-light:  #FFFBEB;
  --nav-w:        220px;
  --radius:       10px;
}

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

/* ── Base ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.5;
}

/* Forcer DM Sans sur les éléments de formulaire (n'héritent pas automatiquement) */
button, input, select, textarea {
  font-family: 'DM Sans', sans-serif;
}

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

/* ── Typographie ── */
.mono {
  font-family: 'DM Mono', monospace;
}

/* ── Layout back office ── */
.layout-bo {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--nav-w);
  background: var(--text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 10;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo-icon {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: white;
  flex-shrink: 0;
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.3px;
}

.logo-text span { color: var(--accent); }

.nav-section {
  padding: 16px 12px 8px;
  flex: 1;
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 6px;
  margin-top: 16px;
}

.nav-label:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  color: rgba(255,255,255,0.55);
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 1px;
  transition: all 0.15s;
}

.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
  font-weight: 500;
}

.nav-item svg { opacity: 0.8; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.nav-item.active .nav-badge {
  background: rgba(255,255,255,0.25);
}

.nav-user {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: white;
  flex-shrink: 0;
}

.user-info .user-name  { font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,0.85); }
.user-info .user-role  { font-size: 11px; color: rgba(255,255,255,0.35); }

.bo-main {
  margin-left: var(--nav-w);
  flex: 1;
  padding: 32px 36px;
  max-width: calc(100% - var(--nav-w));
}

/* ── Layout front office ── */
.layout-fo {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.client-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.client-header .logo-text { color: var(--text); }

.header-nav {
  display: flex;
  gap: 4px;
}

.hn-item {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--text2);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}

.hn-item:hover { background: var(--bg); color: var(--text); }
.hn-item.active { color: var(--accent); background: var(--accent-light); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-tag {
  font-size: 12px; font-weight: 500;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  color: var(--text2);
}

.client-tag strong { color: var(--text); }

.fo-content {
  flex: 1;
}

/* ── Boutons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover { background: #E84D28; }

.btn-ghost {
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text3);
  color: var(--text);
}

.btn-full { width: 100%; justify-content: center; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
}

.badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
}

.badge.red   { background: var(--accent-light); color: var(--accent); }
.badge.red   .badge-dot { background: var(--accent); }
.badge.green { background: var(--green-light);  color: var(--green); }
.badge.green .badge-dot { background: var(--green); }
.badge.blue  { background: var(--blue-light);   color: var(--blue); }
.badge.blue  .badge-dot { background: var(--blue); }
.badge.amber { background: var(--amber-light);  color: var(--amber); }
.badge.amber .badge-dot { background: var(--amber); }
.badge.gray  { background: var(--surface2);     color: var(--text2); }
.badge.gray  .badge-dot { background: var(--text3); }

/* ── Formulaires ── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }

.form-error {
  font-size: 12px;
  color: var(--accent);
  margin-top: 10px;
  text-align: center;
}

/* ── Overlay / Modals ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,8,0.55);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  animation: popIn 0.2s ease;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ── Toast ── */
.toast {
  position: fixed;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  max-width: 340px;
  z-index: 2000;
  animation: slideIn 0.2s ease;
}

.toast.error   { background: var(--accent); }
.toast.warning { background: var(--amber); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title { font-size: 13.5px; font-weight: 600; }

/* ── Dashboard ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.page-sub {
  font-size: 13px;
  color: var(--text2);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text2);
  width: 220px;
}

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-color, var(--border));
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.c-red   { --accent-color: var(--accent); }
.stat-card.c-blue  { --accent-color: var(--blue); }
.stat-card.c-green { --accent-color: var(--green); }
.stat-card.c-amber { --accent-color: var(--amber); }

.stat-label { font-size: 12px; color: var(--text2); font-weight: 500; margin-bottom: 10px; }
.stat-value { font-size: 30px; font-weight: 600; letter-spacing: -1px; line-height: 1; }
.stat-card.c-red   .stat-value { color: var(--accent); }
.stat-card.c-blue  .stat-value { color: var(--blue); }
.stat-card.c-green .stat-value { color: var(--green); }
.stat-card.c-amber .stat-value { color: var(--amber); }
.stat-delta { font-size: 11.5px; color: var(--text3); margin-top: 6px; }

.grid-2    { display: grid; grid-template-columns: 1fr 360px; gap: 18px; margin-bottom: 18px; }
.grid-2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.card-action { font-size: 12px; color: var(--accent); cursor: pointer; font-weight: 500; }

.client-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.client-item:last-child { border-bottom: none; }
.client-item:hover { background: var(--bg); }

.client-avatar {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}

.client-name { font-size: 13px; font-weight: 500; }
.client-sub  { font-size: 11.5px; color: var(--text2); margin-top: 1px; }
.client-meta { margin-left: auto; }

.relance-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.relance-item:last-child { border-bottom: none; }

.relance-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.relance-title { font-size: 13px; font-weight: 500; }
.relance-sub   { font-size: 11.5px; color: var(--text2); margin-top: 1px; }

.relance-days {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  color: var(--amber);
  background: var(--amber-light);
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: 'DM Mono', monospace;
}

/* ── Demandes — barre de filtres ── */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  flex-wrap: wrap;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text2);
  background: transparent;
  border: none;
  transition: all 0.15s;
}

.filter-tab:hover { color: var(--text); background: var(--surface2); }
.filter-tab.active { background: var(--text); color: white; }

.filter-tab .count {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text2);
}

.filter-tab.active .count {
  background: rgba(255,255,255,0.2);
  color: white;
}

.filter-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

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

.select-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--text2);
  outline: none;
  cursor: pointer;
}

/* ── Kanban ── */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: start;
}

.kanban-col { border-radius: var(--radius); }

.col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

.col-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.col-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
}

.col-body {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

/* ── Cartes demande ── */
.dem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 14px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.dem-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-color: var(--text3);
}

.dem-card.urgent { border-left: 3px solid var(--accent); }

.dem-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.35;
}

.dem-client {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text2);
  margin-bottom: 8px;
}

.client-chip {
  width: 18px; height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  flex-shrink: 0;
}

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

.dem-date {
  font-size: 11px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
}

.dem-collab {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text2);
}

.mini-avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 600;
  color: white;
}

/* ── Panneau de détail ── */
.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
}

.detail-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 550px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 20;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.08);
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  font-size: 18px;
  line-height: 1;
  padding: 2px;
  flex-shrink: 0;
  margin-left: 12px;
}

.panel-close:hover { color: var(--text); }

.panel-body {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
}

.panel-section { margin-bottom: 20px; }

.panel-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.panel-value { font-size: 13.5px; color: var(--text); }
.panel-value.muted { color: var(--text2); font-size: 13px; line-height: 1.6; }

.panel-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-validate {
  flex: 1;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-validate:hover { background: #15803D; }

.btn-refuse {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-refuse:hover { border-color: var(--text3); color: var(--text); }

/* ── Aperçu document dans le panneau ── */
.doc-preview {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-icon {
  width: 36px; height: 44px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.doc-name { font-size: 13px; font-weight: 500; }
.doc-meta { font-size: 11px; color: var(--text2); margin-top: 2px; }

.doc-dl {
  margin-left: auto;
  color: var(--blue);
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
}

/* ── Timeline historique ── */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 14px;
  margin-left: 6px;
}

.timeline-item {
  position: relative;
  margin-bottom: 12px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.timeline-item.done::before    { background: var(--green); }
.timeline-item.current::before { background: var(--accent); }

.tl-label { font-size: 12.5px; font-weight: 500; color: var(--text); }
.tl-label.muted { color: var(--text3); }
.tl-date  { font-size: 11px; color: var(--text3); margin-top: 1px; font-family: 'DM Mono', monospace; }

/* ── Espace client (front office) ── */
.welcome-banner {
  background: var(--text);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wb-left h1   { font-size: 20px; font-weight: 600; color: white; margin-bottom: 4px; }
.wb-left p    { font-size: 13px; color: rgba(255,255,255,0.5); }

.wb-right {
  display: flex;
  gap: 32px;
  align-items: center;
}

.wb-stat { text-align: center; }
.wb-stat .val { font-size: 26px; font-weight: 600; color: white; letter-spacing: -1px; }
.wb-stat .lbl { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }

.wb-sep { width: 1px; height: 40px; background: rgba(255,255,255,0.1); }

.fo-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 36px 40px;
}

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

.section-title { font-size: 15px; font-weight: 600; }
.section-sub   { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.section-link  { font-size: 12.5px; color: var(--accent); font-weight: 500; cursor: pointer; }

.mb-32 { margin-bottom: 32px; }

/* Demandes urgentes */
.urgent-grid { display: flex; flex-direction: column; gap: 10px; }

.urgent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.urgent-card.highlight { border-left: 3px solid var(--accent); }

.uc-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.uc-body   { flex: 1; }
.uc-title  { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.uc-desc   { font-size: 12.5px; color: var(--text2); line-height: 1.5; }
.uc-period { font-size: 11px; color: var(--text3); margin-top: 4px; font-family: 'DM Mono', monospace; }

.uc-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-outline {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
}
.btn-outline:hover { border-color: var(--text3); color: var(--text); }

/* GED front office */
.ged-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
}

.folder-tree {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  height: fit-content;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.1s;
}

.folder-item:hover { background: var(--bg); color: var(--text); }
.folder-item.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.folder-item.sep { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; }

.folder-icon  { font-size: 15px; flex-shrink: 0; }
.folder-count { margin-left: auto; font-size: 11px; color: var(--text3); font-family: 'DM Mono', monospace; }
.folder-item.active .folder-count { color: var(--accent); opacity: 0.7; }

.doc-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.doc-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.dl-title { font-size: 13px; font-weight: 500; }
.dl-path  { font-size: 11px; color: var(--text3); margin-top: 1px; font-family: 'DM Mono', monospace; }

.doc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.doc-row:last-child { border-bottom: none; }
.doc-row:hover { background: var(--bg); }

.doc-file-icon {
  width: 34px; height: 40px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.doc-file-icon.pdf  { background: var(--accent-light); color: var(--accent); }
.doc-file-icon.xlsx { background: var(--green-light);  color: var(--green); }
.doc-file-icon.default { background: var(--blue-light); color: var(--blue); }

.doc-name { font-size: 13px; font-weight: 500; }
.doc-meta { font-size: 11.5px; color: var(--text2); margin-top: 2px; }

.doc-row-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-size { font-size: 11px; color: var(--text3); font-family: 'DM Mono', monospace; }

.doc-dl-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  padding: 4px;
  border-radius: 5px;
  transition: all 0.15s;
}

.doc-dl-btn:hover { color: var(--blue); background: var(--blue-light); }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface);
}

.upload-zone:hover { border-color: var(--accent); background: var(--accent-light); }

.upload-icon  { font-size: 26px; margin-bottom: 8px; }
.upload-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.upload-sub   { font-size: 12px; color: var(--text2); }
.upload-sub span { color: var(--accent); font-weight: 500; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ── Highlight row (demande ciblée via lien direct) ──────── */
.highlight-row td {
  background: var(--accent-light) !important;
  transition: background 2.5s ease;
}

/* ── Notifications ─────────────────────────────────────────── */

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }

.notif-unread {
  border-left: 3px solid var(--accent);
  padding-left: 17px;
}

.notif-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

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

.notif-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.notif-contenu {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
}

.notif-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.notif-date {
  font-size: 11px;
  color: var(--text3);
}

.notif-read-btn {
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.notif-read-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}
