/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #12121e;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --bg-input: #16162a;
  --border-color: #2a2a45;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #5a5a78;
  --accent: #7c5cfc;
  --accent-hover: #9478ff;
  --accent-light: rgba(124, 92, 252, 0.15);
  --danger: #f04060;
  --success: #34d399;
  --warning: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg-primary: #f5f5f8;
  --bg-secondary: #eaeaef;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f5;
  --bg-input: #f0f0f5;
  --border-color: #d0d0dd;
  --text-primary: #1a1a2e;
  --text-secondary: #555570;
  --text-muted: #8888aa;
  --accent: #6c4ce6;
  --accent-hover: #7c5cfc;
  --accent-light: rgba(108, 76, 230, 0.1);
  --danger: #e0304f;
  --success: #22b07a;
  --warning: #e0a820;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ===== LOGIN PAGE ===== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

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

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 92, 252, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.btn-danger {
  background: rgba(240, 64, 96, 0.15);
  color: var(--danger);
  border: 1px solid rgba(240, 64, 96, 0.3);
}

.btn-danger:hover {
  background: rgba(240, 64, 96, 0.25);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.error-message {
  background: rgba(240, 64, 96, 0.1);
  border: 1px solid rgba(240, 64, 96, 0.3);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
}

/* ===== LAYOUT (DASHBOARD + UPLOAD) ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.header-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

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

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

.app-layout {
  display: flex;
  margin-top: 60px;
  min-height: calc(100vh - 60px);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 20px 0;
  overflow-y: auto;
  height: calc(100vh - 60px);
  position: fixed;
  top: 60px;
  left: 0;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 20px;
  margin-bottom: 12px;
}

.folder-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.folder-btn:hover {
  background: var(--accent-light);
  color: var(--text-primary);
}

.folder-btn.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  border-right: 3px solid var(--accent);
}

.folder-btn .folder-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.folder-children {
  display: none;
  padding-left: 16px;
}

.folder-children.open {
  display: block;
}

.folder-children .folder-btn {
  font-size: 13px;
  padding: 8px 20px 8px 32px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 24px;
  overflow-x: auto;
}

.search-bar-container {
  margin-bottom: 20px;
}

.search-bar {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-bar-wrapper {
  position: relative;
}

.search-bar-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

/* ===== TABLE ===== */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-scroll {
  overflow: auto;
  max-height: calc(100vh - 220px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

.data-table .col-id { min-width: 60px; }
.data-table .col-titre { min-width: 200px; }
.data-table .col-categorie { min-width: 140px; }
.data-table .col-nature { min-width: 160px; }
.data-table .col-type { min-width: 100px; }
.data-table .col-statut { min-width: 120px; }
.data-table .col-paiement { min-width: 140px; }
.data-table .col-ref { min-width: 180px; }
.data-table .col-dossiers { min-width: 100px; }
.data-table .col-secteur { min-width: 140px; }
.data-table .col-date { min-width: 120px; }
.data-table .col-actions { white-space: nowrap; }
.data-table .col-admin { white-space: nowrap; }

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table thead tr:first-child th {
  background: var(--bg-secondary);
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table thead tr:nth-child(2) th {
  background: var(--bg-secondary);
  padding: 6px 8px;
  border-bottom: 2px solid var(--border-color);
}

.filter-input {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}

.filter-input:focus {
  border-color: var(--accent);
}

.filter-select {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.data-table tbody td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(42, 42, 69, 0.5);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-family: var(--font);
  font-weight: 500;
  transition: all 0.15s;
  color: var(--text-primary);
  white-space: nowrap;
}

.action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.action-btn-preview {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(22, 163, 74, 0.08);
}

.action-btn-preview:hover {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

.action-btn-download {
  color: var(--accent);
  border-color: rgba(124, 92, 252, 0.3);
  background: rgba(124, 92, 252, 0.08);
}

.action-btn-download:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.action-btn-permissions {
  color: #3498db;
  border-color: rgba(52, 152, 219, 0.3);
  background: rgba(52, 152, 219, 0.08);
}

.action-btn-permissions:hover {
  background: #3498db;
  color: #fff;
  border-color: #3498db;
}

.action-btn-delete {
  color: var(--danger);
  border-color: rgba(240, 64, 96, 0.3);
  background: rgba(240, 64, 96, 0.08);
}

.action-btn-delete:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.action-btn-classer {
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.3);
  background: rgba(217, 119, 6, 0.08);
}

.action-btn-classer:hover {
  background: #d97706;
  color: #fff;
  border-color: #d97706;
}

.actions-cell {
  display: flex;
  flex-direction: row;
  gap: 4px;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-brouillon {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.badge-valide {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.badge-archive {
  background: rgba(136, 136, 170, 0.15);
  color: var(--text-secondary);
}

.badge-paye {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.badge-non-paye {
  background: rgba(240, 64, 96, 0.15);
  color: var(--danger);
}

.badge-partiel {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.badge-en-attente {
  background: rgba(124, 92, 252, 0.15);
  color: var(--accent);
}

.badge-refuse {
  background: rgba(240, 64, 96, 0.15);
  color: var(--danger);
}

/* F3: Pending section */
.pending-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(124, 92, 252, 0.08);
  border: 1px solid rgba(124, 92, 252, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.pending-icon {
  font-size: 18px;
  color: var(--accent);
}

.pending-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.pending-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

/* F3: Validation select */
.validation-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 4px 24px 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%238888aa'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.validation-en-attente {
  background-color: rgba(124, 92, 252, 0.15);
  color: var(--accent);
}

.validation-valide {
  background-color: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.validation-refuse {
  background-color: rgba(240, 64, 96, 0.15);
  color: var(--danger);
}

/* F1: Version badges */
.badge-version-creation {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.badge-version-modification {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.badge-version-restauration {
  background: rgba(230, 126, 0, 0.15);
  color: #e67e00;
}

.badge-version-upload {
  background: rgba(124, 92, 252, 0.15);
  color: var(--accent);
}

.badge-version-statut {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
}

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

.empty-state p {
  font-size: 15px;
  margin-top: 12px;
}

/* ===== UPLOAD PAGE ===== */
.upload-layout {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}

.upload-dossier-panel {
  width: 300px;
  min-width: 300px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
}

.upload-dossier-panel-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.upload-selected-dossier {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
}

.upload-selected-label {
  color: var(--text-secondary);
  white-space: nowrap;
}

.upload-selected-name {
  color: var(--accent);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.upload-selected-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}

.upload-selected-clear:hover {
  color: var(--danger);
}

.upload-dossier-search-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.upload-dossier-search {
  padding: 10px 14px !important;
  font-size: 13px !important;
}

.upload-dossier-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: none;
  max-height: 220px;
  overflow-y: auto;
}

.upload-suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border-color);
}

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

.upload-suggestion-item:hover {
  background: var(--accent-light);
}

.upload-suggestion-path {
  font-size: 13px;
  color: var(--text-primary);
}

.upload-suggestion-empty {
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Tree explorer */
.upload-dossier-tree {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  min-height: 120px;
}

.upload-tree-node {
  /* wrapper */
}

.upload-tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(42, 42, 69, 0.3);
}

.upload-tree-item:hover {
  background: var(--bg-card-hover);
}

.upload-tree-item.selected {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.upload-tree-arrow {
  width: 16px;
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
  text-align: center;
  flex-shrink: 0;
  cursor: pointer;
}

.upload-tree-arrow.expanded {
  transform: rotate(90deg);
}

.upload-tree-arrow.empty {
  visibility: hidden;
}

.upload-tree-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.upload-tree-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-tree-delete {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--danger);
  padding: 2px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.upload-tree-item:hover .upload-tree-delete {
  opacity: 0.7;
}

.upload-tree-delete:hover {
  opacity: 1 !important;
  background: var(--danger);
  color: white;
}

.upload-tree-children {
  padding-left: 20px;
}

.upload-add-dossier-btn {
  width: 100%;
  font-size: 13px;
  flex-shrink: 0;
}

.upload-main {
  flex: 1;
  padding: 32px 24px;
  max-width: 800px;
}

/* Upload notifications */
.upload-notif {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  animation: slideIn 0.3s ease;
}

.upload-notif-success {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--success);
}

.upload-notif-error {
  background: rgba(240, 64, 96, 0.15);
  border: 1px solid rgba(240, 64, 96, 0.3);
  color: var(--danger);
}

.upload-notif-warning {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--warning);
}

.upload-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
}

.upload-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 28px;
}

.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-card);
  margin-bottom: 24px;
}

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

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
  animation: dropzonePulse 1s ease infinite;
}

@keyframes dropzonePulse {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: var(--accent-hover); box-shadow: 0 0 20px var(--accent-light); }
}

.dropzone-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.dropzone-text {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.dropzone-subtext {
  font-size: 13px;
  color: var(--text-muted);
}

.upload-folder-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  font-size: 14px;
}

.upload-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.upload-form .form-group:last-child {
  margin-bottom: 0;
}

.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

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

/* Recap */
.recap-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  display: none;
}

.recap-section.visible {
  display: block;
}

.recap-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.recap-files {
  list-style: none;
}

.recap-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 6px;
  background: var(--bg-input);
}

.recap-file-name {
  font-size: 14px;
  color: var(--text-primary);
}

.recap-file-info {
  font-size: 12px;
  color: var(--text-muted);
}

.recap-file-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
}

.destination-search {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  margin-top: 12px;
}

.destination-search:focus {
  border-color: var(--accent);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== LOGO EASTER EGG ===== */
.header-logo {
  user-select: none;
  -webkit-user-select: none;
}

/* ===== CONFIRM MODAL ===== */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.confirm-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.confirm-card p {
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

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

/* ===== UPLOAD PROGRESS ===== */
.upload-progress {
  margin-top: 12px;
  display: none;
}

.upload-progress.visible {
  display: block;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.2s;
  width: 0%;
}

.progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  text-align: center;
}

/* ===== BULK BAR ===== */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.col-check {
  width: 40px;
  text-align: center;
}

/* ===== PREVIEW MODAL ===== */
.preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.preview-title {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-unsupported {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.preview-unsupported p {
  margin-bottom: 16px;
}

/* Preview close button - big and visible */
.preview-close-btn {
  background: rgba(240, 64, 96, 0.12);
  border: 1px solid rgba(240, 64, 96, 0.3);
  color: var(--danger);
  font-size: 24px;
  font-weight: 700;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.preview-close-btn:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* Preview actions bar */
.preview-actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  flex-wrap: wrap;
}

.preview-actions .btn {
  flex: 0 0 auto;
}

/* Status change popup */
.status-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.status-popup-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 360px;
  width: 90%;
}

.status-popup-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.status-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-input);
}

.status-option:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.status-option.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.status-option-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-option-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Clickable status badge */
.badge-clickable {
  cursor: pointer;
  transition: all 0.15s;
}

.badge-clickable:hover {
  opacity: 0.8;
  box-shadow: 0 0 0 2px var(--accent-light);
}

/* Autocomplete suggestions */
.criteria-value-wrapper {
  position: relative;
  flex: 1;
  min-width: 150px;
}

.criteria-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  max-height: 180px;
  overflow-y: auto;
}

.criteria-suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: background 0.15s;
  border-bottom: 1px solid rgba(42, 42, 69, 0.3);
}

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

.criteria-suggestion-item:hover {
  background: var(--accent-light);
}

.criteria-suggestion-item mark {
  background: rgba(124, 92, 252, 0.3);
  color: var(--text-primary);
  padding: 0 2px;
  border-radius: 2px;
}

/* Dossier files list */
.dossier-files-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dossier-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
}

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

.dossier-file-item:hover {
  background: var(--accent-light);
}

.dossier-file-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.dossier-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-weight: 500;
}

.dossier-file-type {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Metadata edit form */
.metadata-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.metadata-form .form-group {
  margin-bottom: 0;
}

.metadata-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metadata-form input,
.metadata-form textarea,
.metadata-form select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}

.metadata-form input:focus,
.metadata-form textarea:focus,
.metadata-form select:focus {
  border-color: var(--accent);
}

.metadata-form textarea {
  resize: vertical;
  min-height: 60px;
}

.metadata-form .field-readonly {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ===== PAGINATION ===== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.pagination-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination-buttons {
  display: flex;
  gap: 4px;
}

/* ===== HAMBURGER BUTTON ===== */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}

.hamburger-btn:hover {
  background: var(--bg-card-hover);
}

/* ===== DOSSIERS ===== */
.dossiers-tooltip {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  z-index: 5000;
  box-shadow: var(--shadow);
  font-size: 13px;
  max-width: 400px;
  display: none;
}

.dossier-path-line {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  flex-wrap: wrap;
}

.dossier-path-segment {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}

.dossier-path-segment:hover {
  background: var(--accent);
  color: #fff;
}

.dossier-path-segment-static {
  color: var(--text-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
}

.dossier-path-sep {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.dossiers-voir-btn {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid transparent;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}

.dossiers-voir-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ===== F6: ADVANCED SEARCH ===== */
.adv-search-toggle {
  font-size: 13px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.adv-search-run-btn {
  width: auto;
  padding: 7px 18px;
  font-size: 13px;
}

.search-bar-wrapper {
  position: relative;
}

.adv-search-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.adv-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.adv-search-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.adv-search-criteria {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.search-criteria-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.criteria-field,
.criteria-operator {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  min-width: 140px;
}

.criteria-field:focus,
.criteria-operator:focus {
  border-color: var(--accent);
}

.criteria-value {
  flex: 1;
  min-width: 150px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}

.criteria-value:focus {
  border-color: var(--accent);
}

.criteria-value-group {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 150px;
}

.criteria-value-group input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}

.criteria-remove {
  padding: 6px 10px;
  font-size: 14px;
  flex-shrink: 0;
}

.adv-search-actions {
  display: flex;
  gap: 8px;
}

/* ===== F5: ANALYTICS ===== */
.analytics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

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

.analytics-date-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

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

.analytics-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.analytics-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.analytics-card-accent {
  color: var(--warning);
}

.analytics-card-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.analytics-period-filters {
  display: flex;
  gap: 6px;
}

.analytics-period-btn {
  width: auto !important;
  min-width: unset !important;
  padding: 6px 14px !important;
}

.analytics-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.analytics-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
}

.analytics-chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* ===== F7: NOTIFICATIONS ===== */
.notif-bell-wrapper {
  position: relative;
}

.notif-bell-btn {
  position: relative;
  font-size: 16px;
  line-height: 1;
}

.notif-bell-jingle {
  animation: notifBellJingle 0.9s ease;
}

@keyframes notifBellJingle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(-16deg) scale(1.12); }
  30% { transform: rotate(14deg) scale(1.12); }
  45% { transform: rotate(-12deg) scale(1.08); }
  60% { transform: rotate(10deg) scale(1.08); }
  75% { transform: rotate(-6deg) scale(1.04); }
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 4000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.notif-mark-all {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}

.notif-mark-all:hover {
  text-decoration: underline;
}

.notif-dropdown-list {
  flex: 1;
  overflow-y: auto;
  max-height: 360px;
}

.notif-dropdown-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s;
}

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

.notif-item:hover {
  background: var(--bg-card-hover);
}

.notif-unread {
  background: rgba(124, 92, 252, 0.06);
}

.notif-item-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.notif-item-message {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.notif-pref-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
}

.notif-pref-row:last-child {
  border-bottom: none;
}

.notif-pref-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.mobile-cards-container {
  display: none;
}

/* ===== SECRET APPEARANCE CUSTOMIZER ===== */
#themeToggle {
  position: relative;
  overflow: hidden;
}

.theme-secret-progress {
  position: absolute;
  inset: 0;
  background: var(--accent-light);
  transform-origin: left center;
  animation: secretHoldProgress 20s linear forwards;
  pointer-events: none;
}

@keyframes secretHoldProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.appearance-secret-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.appearance-secret-card {
  width: min(760px, 100%);
  max-height: min(720px, 92vh);
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.appearance-secret-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.appearance-secret-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.appearance-secret-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.appearance-secret-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.appearance-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.appearance-control-wide {
  grid-column: span 2;
}

.appearance-control span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.appearance-control input[type="color"] {
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  cursor: pointer;
}

.appearance-control input[type="range"],
.appearance-control select {
  width: 100%;
}

.appearance-control select {
  padding: 9px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
}

.appearance-secret-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

/* ===== BUTTON EASTER EGGS ===== */
.logout-egg-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.logout-egg-card {
  width: min(360px, 100%);
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.logout-egg-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.logout-egg-count {
  font-size: 64px;
  line-height: 1;
  font-weight: 800;
  color: var(--danger);
  margin: 8px 0;
}

.logout-egg-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.site-break-active .app-header,
.site-break-active .app-layout,
.site-break-active .admin-container,
.site-break-active .upload-container {
  animation: siteBreakFall 1.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  transform-origin: top center;
}

.site-break-flash {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background:
    linear-gradient(115deg, transparent 0 46%, rgba(255,255,255,0.9) 47%, transparent 49%),
    linear-gradient(65deg, transparent 0 54%, rgba(255,255,255,0.75) 55%, transparent 57%);
  animation: siteBreakFlash 0.55s ease forwards;
  pointer-events: none;
}

.site-break-shards {
  position: fixed;
  inset: 0;
  z-index: 10002;
  pointer-events: none;
  overflow: hidden;
}

.site-break-shards span {
  position: absolute;
  top: -40px;
  width: 34px;
  height: 24px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transform: rotate(var(--r));
  animation: siteShardFall 1.7s ease-in forwards;
}

@keyframes siteBreakFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; filter: none; }
  18% { transform: translateY(0) rotate(-0.5deg); }
  100% { transform: translateY(120vh) rotate(7deg); opacity: 0.35; filter: blur(1px); }
}

@keyframes siteBreakFlash {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes siteShardFall {
  0% { transform: translateY(0) rotate(var(--r)); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(calc(var(--r) + 180deg)); opacity: 0; }
}

.ultra-search-egg {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--text-primary);
  font-size: 13px;
}

.ultra-search-egg.pulse {
  animation: ultraSearchPulse 0.5s ease;
}

.ultra-search-egg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
  flex-shrink: 0;
}

.ultra-search-egg-remove {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

@keyframes ultraSearchPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

.preview-card {
  position: relative;
}

.download-egg-stamp {
  position: absolute;
  top: 72px;
  right: 28px;
  z-index: 5;
  transform: rotate(-12deg) scale(0.8);
  opacity: 0;
  padding: 9px 14px;
  border: 3px solid var(--danger);
  border-radius: var(--radius-xs);
  color: var(--danger);
  background: rgba(240, 64, 96, 0.08);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.download-egg-stamp.visible {
  opacity: 1;
  transform: rotate(-12deg) scale(1);
}

.home-entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(124, 92, 252, 0.18), transparent 28%),
    linear-gradient(#111827 0 58%, #18251f 58% 100%);
  animation: homeEntryOverlayIn 0.25s ease forwards;
}

.home-entry-vignette {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: radial-gradient(circle at 50% 73%, transparent 0 10%, rgba(0, 0, 0, 0.08) 16%, rgba(0, 0, 0, 0.88) 78%);
  opacity: 0;
  transform: scale(1);
  animation: homeEntrySuction 2.4s ease-in forwards;
  pointer-events: none;
}

.home-entry-house {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(560px, 88vw);
  height: min(500px, 76vh);
  transform: translate(-50%, -50%) scale(0.92);
  transform-origin: 50% 86%;
  animation: homeHouseAdvance 2.4s ease-in forwards;
  will-change: transform, filter;
}

.home-entry-roof {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: min(300px, 46vw) solid transparent;
  border-right: min(300px, 46vw) solid transparent;
  border-bottom: min(155px, 24vh) solid #b83e3e;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.32));
}

.home-entry-body {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(430px, 70vw);
  height: min(330px, 52vh);
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f0d69e, #dab06e);
  border: 8px solid #c8914f;
  border-radius: 10px 10px 4px 4px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.home-entry-dashboard {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 132px;
  height: 184px;
  transform: translateX(-50%);
  background: var(--bg-primary);
  border-radius: 36px 36px 0 0;
  overflow: hidden;
  opacity: 0;
  animation: homeDashboardReveal 2.4s ease forwards;
  will-change: opacity, transform;
}

.home-entry-mini-header {
  height: 22px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.home-entry-mini-sidebar {
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 0;
  width: 28px;
  background: var(--bg-card);
}

.home-entry-mini-search {
  position: absolute;
  left: 40px;
  top: 42px;
  width: 62px;
  height: 10px;
  border-radius: 8px;
  background: var(--bg-input);
}

.home-entry-mini-table {
  position: absolute;
  left: 40px;
  top: 66px;
  width: 62px;
  height: 72px;
  border-radius: 4px;
  background: repeating-linear-gradient(to bottom, var(--bg-card) 0 10px, var(--border-color) 10px 11px);
}

.home-entry-window {
  position: absolute;
  left: 58px;
  top: 84px;
  width: 76px;
  height: 58px;
  border-radius: 8px;
  background: #7ec8ff;
  border: 6px solid #fff7d7;
  box-shadow: 240px 0 0 #7ec8ff, 240px 0 0 6px #fff7d7;
}

.home-entry-door {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 118px;
  height: 168px;
  margin-left: -59px;
  border-radius: 40px 40px 0 0;
  background: linear-gradient(90deg, #6d3e22, #4a2413);
  border: 5px solid #3b1d0e;
  transform-origin: left center;
  animation: homeDoorOpen 2.4s ease forwards;
  will-change: transform;
  z-index: 2;
}

.home-entry-door-frame {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 136px;
  height: 184px;
  margin-left: -68px;
  border: 8px solid #3b1d0e;
  border-bottom: 0;
  border-radius: 46px 46px 0 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.55), 0 0 24px rgba(0, 0, 0, 0.22);
}

.home-entry-door::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 86px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f5d26a;
}

.admin-target-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  cursor: none;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.02);
}

.admin-target-hint {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.admin-crosshair {
  position: fixed;
  left: 0;
  top: 0;
  width: 54px;
  height: 54px;
  border: 2px solid var(--danger);
  border-radius: 50%;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(240, 64, 96, 0.7));
}

.admin-crosshair::before,
.admin-crosshair::after {
  content: "";
  position: absolute;
  background: var(--danger);
}

.admin-crosshair::before {
  left: 50%;
  top: -12px;
  width: 2px;
  height: 76px;
  transform: translateX(-50%);
}

.admin-crosshair::after {
  top: 50%;
  left: -12px;
  width: 76px;
  height: 2px;
  transform: translateY(-50%);
}

.admin-crosshair.charging {
  animation: adminCrosshairCharge 0.65s ease-in-out infinite alternate;
}

.admin-crosshair.charged {
  border-color: #fff8b8;
  filter: drop-shadow(0 0 14px rgba(255, 248, 184, 0.95));
}

.admin-blast {
  position: fixed;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff8b8 0 12%, #ffb347 22%, #f04060 42%, transparent 70%);
  animation: adminBlastPop 0.65s ease-out forwards;
  pointer-events: none;
}

.admin-blast.big {
  animation-duration: 0.9s;
}

.admin-blast-hole {
  position: fixed;
  width: 170px;
  height: 143px;
  transform: translate(-50%, -50%);
  background: url('/img/wall-hole.svg') center / contain no-repeat;
  pointer-events: none;
}

.admin-blast-hole.big {
  width: 280px;
  height: 235px;
}

.admin-blast-shard {
  position: fixed;
  width: 12px;
  height: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transform: translate(-50%, -50%) rotate(var(--r));
  animation: adminShardFly 0.9s ease-out forwards;
  pointer-events: none;
}

@keyframes adminBlastPop {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.2); }
  45% { opacity: 1; transform: translate(-50%, -50%) scale(5.5); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(7); }
}

@keyframes adminCrosshairCharge {
  from { box-shadow: 0 0 0 rgba(240, 64, 96, 0); }
  to { box-shadow: 0 0 0 10px rgba(240, 64, 96, 0.18); }
}

@keyframes adminShardFly {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(calc(var(--r) + 240deg)) scale(0.55); }
}

@keyframes homeHouseAdvance {
  0% {
    transform: translate(-50%, -50%) scale(0.82);
    filter: blur(0);
  }
  100% {
    transform: translate(-50%, -50%) scale(8.2);
    filter: blur(0);
  }
}

@keyframes homeDoorOpen {
  0%, 24% { transform: perspective(420px) rotateY(0deg); }
  58%, 100% { transform: perspective(420px) rotateY(-78deg); }
}

@keyframes homeDashboardReveal {
  0%, 28% { opacity: 0; transform: translateX(-50%) scale(0.96); }
  42%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes homeEntryOverlayIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes homeEntrySuction {
  0%, 45% {
    opacity: 0;
    transform: scale(1);
    clip-path: circle(120% at 50% 73%);
  }
  100% {
    opacity: 0.68;
    transform: scale(1.2);
    clip-path: circle(24% at 50% 73%);
  }
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== SEARCH ACTIONS ROW (Dicter + Recherche avancée) ===== */
.search-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ===== VOICE SEARCH ===== */
.voice-search-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  transition: all 0.2s;
  white-space: nowrap;
}

.voice-btn-label {
  line-height: 1;
}

.voice-search-btn:hover {
  color: var(--accent);
  background: var(--accent-light);
  border-color: var(--accent);
}

.voice-search-btn.voice-listening {
  color: var(--danger);
  background: rgba(240, 64, 96, 0.12);
  border-color: rgba(240, 64, 96, 0.4);
  animation: voicePulse 1.5s ease infinite;
}

.voice-search-btn.voice-unsupported {
  opacity: 0.4;
  cursor: not-allowed;
}

.voice-status-dot {
  display: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}

.voice-status-dot.active {
  display: block;
  animation: voiceDotPulse 1s ease infinite;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 64, 96, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(240, 64, 96, 0); }
}

@keyframes voiceDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.voice-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 8px;
  animation: slideIn 0.2s ease;
}

.voice-feedback-listening {
  background: rgba(240, 64, 96, 0.1);
  border: 1px solid rgba(240, 64, 96, 0.3);
  color: var(--danger);
}

.voice-feedback-success {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--success);
}

.voice-feedback-error {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--warning);
}

.voice-feedback-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.voice-feedback-text {
  font-weight: 500;
}

/* Search bar no longer needs extra right padding (buttons moved below) */

/* ===== SEARCH SUGGESTIONS ===== */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  max-height: 320px;
  overflow-y: auto;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(42, 42, 69, 0.3);
}

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

.search-suggestion-item:hover,
.search-suggestion-item.active {
  background: var(--accent-light);
}

.search-suggestion-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.search-suggestion-info {
  flex: 1;
  min-width: 0;
}

.search-suggestion-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestion-title mark {
  background: rgba(124, 92, 252, 0.3);
  color: var(--text-primary);
  padding: 0 2px;
  border-radius: 2px;
}

.search-suggestion-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.search-suggestion-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.search-suggestion-footer {
  padding: 8px 16px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}

.search-suggestion-footer:hover {
  background: var(--accent-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .data-table {
    table-layout: auto;
  }

  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 900px;
  }
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 60px;
    left: -280px;
    z-index: 90;
    transition: left 0.3s ease;
    box-shadow: none;
  }

  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

  .sidebar-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 89;
    display: none;
  }

  .sidebar-overlay.visible {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
  }

  /* Header mobile */
  .app-header {
    padding: 0 12px;
    height: 56px;
  }

  .header-logo {
    font-size: 17px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Hide text-only buttons on mobile, keep icon buttons */
  .header-actions a[href="/admin"],
  .header-actions a[href="/logout"] {
    font-size: 0;
    padding: 8px;
    min-width: 36px;
    min-height: 36px;
  }

  .header-actions a[href="/admin"]::before {
    content: '\2699';
    font-size: 16px;
  }

  .header-actions a[href="/logout"]::before {
    content: '\23FB';
    font-size: 14px;
  }

  /* Search bar mobile */
  .search-bar {
    font-size: 14px;
    padding: 12px 16px 12px 40px;
  }

  .search-bar::placeholder {
    font-size: 13px;
  }

  .search-actions-row {
    flex-wrap: wrap;
  }

  .voice-search-btn {
    padding: 6px 12px;
  }

  /* Upload page */
  .upload-layout {
    flex-direction: column;
  }

  .upload-dossier-panel {
    width: 100%;
    min-width: 100%;
    max-height: none;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
  }

  .upload-dossier-tree {
    max-height: 200px;
  }

  .upload-main {
    padding: 20px 12px;
    max-width: 100%;
  }

  .upload-container {
    padding: 20px 12px;
  }

  .upload-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .upload-form {
    padding: 20px;
  }

  .upload-actions {
    flex-direction: column;
    gap: 10px;
  }

  .upload-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .dropzone {
    padding: 40px 16px;
  }

  .dropzone-icon {
    font-size: 36px;
  }

  .dropzone-text {
    font-size: 14px;
  }

  /* Login mobile */
  .login-card {
    margin: 0 16px;
    padding: 32px 24px;
  }

  /* Bulk bar mobile */
  .bulk-bar {
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px;
  }

  .bulk-bar .btn {
    min-height: 40px;
  }

  /* Preview modal mobile */
  .preview-card {
    width: 98%;
    max-height: 90vh;
    border-radius: var(--radius-sm);
  }

  .preview-header {
    padding: 12px 16px;
  }

  .preview-body {
    padding: 12px;
  }

  /* Confirm modal mobile */
  .confirm-card {
    width: 92%;
    padding: 24px 20px;
  }

  .confirm-actions {
    flex-direction: column;
    gap: 8px;
  }

  .confirm-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  /* Pagination mobile */
  .pagination-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 12px;
  }

  .pagination-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .pagination-buttons .btn {
    min-width: 40px;
    min-height: 40px;
  }

  /* Notifications dropdown mobile */
  .notif-dropdown {
    position: fixed;
    top: 56px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100vh - 72px);
    border-radius: var(--radius-sm);
  }

  /* Analytics mobile */
  .analytics-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .analytics-card {
    padding: 14px;
  }

  .analytics-card-value {
    font-size: 22px;
  }

  .analytics-charts-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .analytics-period-filters {
    flex-wrap: wrap;
  }

  /* Advanced search mobile */
  .search-criteria-row {
    flex-direction: column;
    gap: 6px;
  }

  .criteria-field,
  .criteria-operator {
    min-width: 100%;
  }

  .adv-search-actions {
    flex-direction: column;
  }

  .adv-search-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  /* Touch-friendly sizing for interactive elements */
  .filter-input,
  .filter-select {
    padding: 10px;
    font-size: 14px;
    min-height: 40px;
  }

  .action-btn {
    padding: 8px;
    font-size: 18px;
    min-width: 36px;
    min-height: 36px;
  }

  .folder-btn {
    padding: 12px 20px;
    min-height: 44px;
  }

  /* Dossiers tooltip mobile */
  .dossiers-tooltip {
    left: 8px !important;
    right: 8px;
    max-width: none;
  }
}

/* ===== SMALL MOBILE (< 480px) ===== */
@media (max-width: 480px) {
  .app-header {
    height: 52px;
    padding: 0 10px;
  }

  .app-layout {
    margin-top: 52px;
  }

  .sidebar {
    top: 52px;
    height: calc(100vh - 52px);
    width: 260px;
    left: -260px;
  }

  .sidebar-overlay {
    top: 52px;
    height: calc(100vh - 52px);
  }

  .header-logo {
    font-size: 15px;
  }

  .header-actions {
    gap: 4px;
  }

  .header-actions .btn-sm {
    padding: 5px 8px;
    font-size: 11px;
  }

  /* + Ajouter button: icon only on very small screens */
  .header-actions a[href="/upload"] {
    font-size: 0;
    padding: 6px 8px;
    min-width: 34px;
    min-height: 34px;
  }

  .header-actions a[href="/upload"]::before {
    content: '+';
    font-size: 18px;
    font-weight: 700;
  }

  .main-content {
    padding: 12px 10px;
  }

  /* Search bar small mobile */
  .search-bar {
    font-size: 13px;
    padding: 10px 16px 10px 36px;
    border-radius: var(--radius-sm);
  }

  .search-bar-icon {
    left: 12px;
    font-size: 14px;
  }

  .voice-search-btn {
    font-size: 11px;
    padding: 5px 8px;
  }

  .adv-search-toggle {
    font-size: 11px;
    padding: 5px 8px;
  }

  /* Mobile card view - hide table, show cards */
  .table-container {
    border-radius: var(--radius-sm);
    border: none;
    background: none;
  }

  .table-scroll {
    max-height: none;
    overflow: visible;
  }

  .data-table {
    display: none;
  }

  .mobile-cards-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    transition: border-color 0.15s;
  }

  .mobile-doc-card:active {
    border-color: var(--accent);
  }

  .mobile-doc-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .mobile-doc-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
  }

  .mobile-doc-card-id {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
  }

  .mobile-doc-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }

  .mobile-doc-card-meta .badge {
    font-size: 10px;
    padding: 2px 8px;
  }

  .mobile-doc-card-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.6;
  }

  .mobile-doc-card-info span {
    display: block;
  }

  .mobile-doc-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }

  .mobile-doc-card-actions .action-btn {
    font-size: 12px;
    padding: 6px 10px;
    min-height: 32px;
  }

  /* Upload mobile small */
  .upload-title {
    font-size: 18px;
  }

  .dropzone {
    padding: 28px 12px;
  }

  .dropzone-icon {
    font-size: 28px;
    margin-bottom: 8px;
  }

  .dropzone-text {
    font-size: 13px;
  }

  .dropzone-subtext {
    font-size: 11px;
  }

  .upload-form {
    padding: 16px;
  }

  .form-input,
  .form-textarea {
    padding: 12px 14px;
    font-size: 14px;
  }

  /* Recap mobile */
  .recap-section {
    padding: 16px;
  }

  .recap-file {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .recap-file-name {
    font-size: 13px;
    word-break: break-all;
  }

  /* Login small mobile */
  .login-card {
    margin: 0 12px;
    padding: 28px 20px;
    border-radius: var(--radius-sm);
  }

  .login-logo h1 {
    font-size: 24px;
  }

  /* Analytics small mobile */
  .analytics-cards {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .analytics-card {
    padding: 12px 10px;
  }

  .analytics-card-value {
    font-size: 20px;
  }

  .analytics-card-label {
    font-size: 11px;
  }

  /* Voice feedback small mobile */
  .voice-feedback {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Notifications small mobile */
  .notif-dropdown {
    top: 52px;
    left: 4px;
    right: 4px;
  }

  .notif-item {
    padding: 10px 12px;
  }

  .notif-item-title {
    font-size: 12px;
  }

  .notif-item-message {
    font-size: 11px;
  }

  /* Buttons touch target */
  .btn {
    min-height: 44px;
  }

  .btn-sm {
    min-height: 36px;
  }

  /* Pagination small */
  .pagination-bar {
    padding: 10px;
    gap: 8px;
  }

  .pagination-info {
    font-size: 12px;
  }

  .pagination-buttons .btn {
    min-width: 36px;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* ===== Doublons ===== */
.badge-doublon {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  vertical-align: middle;
  margin-left: 4px;
  white-space: nowrap;
}

.doublon-section {
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  padding: 12px;
  background: rgba(245, 158, 11, 0.05);
}

.doublon-paths {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doublon-path-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  padding: 6px 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
}

.doublon-path-file {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 4px;
}

.doublon-path-sep {
  color: var(--text-secondary);
  font-size: 11px;
}

.doublon-folder-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.doublon-folder-btn:hover {
  background: rgba(245, 158, 11, 0.25);
}

/* === Transfert applicatif sections === */
.transfer-section {
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  padding: 16px 16px 4px;
}

.transfer-section--active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.04);
}

.transfer-section--inactive {
  border-color: #6b7280;
  background: rgba(107, 114, 128, 0.04);
}

.transfer-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.transfer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.transfer-badge--active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.transfer-badge--inactive {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}

.transfer-section-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.transfer-scenario {
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
  padding: 7px 10px;
  margin-bottom: 10px;
  line-height: 1.5;
}
