/* ==========================================================================
   Support WESTcom - Style sobre / corporate aligne sur westcom.fr
   ========================================================================== */

:root {
  --brand: #1a3a6c;
  --brand-dark: #122a52;
  --brand-light: #e6efff;
  --accent: #c8102e;
  --bg: #f5f6f8;
  --bg-card: #ffffff;
  --bg-tertiary: #f8f9fa;
  --border: #d8dde3;
  --border-light: #ebeef2;
  --text: #1a1f2e;
  --text-muted: #5a6373;
  --text-light: #8a93a4;
  --success: #2d7a3d;
  --success-bg: #e6f3e9;
  --danger: #b3261e;
  --danger-bg: #fbeae9;
  --warning: #856404;
  --shadow-sm: 0 1px 2px rgba(20, 30, 60, 0.06);
  --shadow-md: 0 2px 8px rgba(20, 30, 60, 0.08);
  --radius: 4px;
  --radius-lg: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; font-size: inherit; cursor: pointer; }

/* ==========================================================================
   LOGIN
   ========================================================================== */

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4fa 0%, #e6efff 100%);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 280px;
  height: auto;
}

.login-tagline {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.login-card form { display: flex; flex-direction: column; }

.login-card label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 12px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 58, 108, 0.12);
}

.login-card .btn-block {
  width: 100%;
  margin-top: 20px;
}

.login-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.login-footer p { margin: 4px 0; }
.login-footer .muted { color: var(--text-light); }

.copyright {
  margin-top: 24px;
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
}

/* ==========================================================================
   HEADER (fond blanc, identite WESTcom)
   ========================================================================== */

.header {
  background: var(--bg-card);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  color: var(--brand);
}

.brand-logo {
  display: block;
  flex-shrink: 0;
}

.brand-version {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  padding: 2px 7px;
  border-radius: 10px;
}

.copyright .version {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.3px;
}

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav a {
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: var(--brand-light);
  color: var(--brand);
  text-decoration: none;
}

.nav a.active {
  background: var(--brand-light);
  color: var(--brand);
}

.user-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.user-name { color: var(--text); font-weight: 500; }

/* ==========================================================================
   BOUTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  transition: all 0.15s;
  white-space: nowrap;
}

.btn:hover { background: var(--bg-tertiary); border-color: #b8c0cc; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: white;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text);
  border-color: var(--border-light);
}

.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }

.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }

.btn-link {
  background: transparent;
  border: none;
  color: var(--brand);
  padding: 0;
  height: auto;
  font-size: 12px;
  cursor: pointer;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }

/* ==========================================================================
   ICONES (SVG inline via background-image)
   ========================================================================== */

.icon-up, .icon-folder-plus, .icon-refresh, .icon-folder, .icon-file {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: -2px;
}

.icon-up { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M8 1L3 6h3v6h4V6h3z'/></svg>"); }
.icon-folder-plus { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231a3a6c'><path d='M1 3h5l2 2h7v9H1zm7 5v2H6v1h2v2h1v-2h2v-1H9V8z'/></svg>"); }
.icon-refresh { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231a3a6c'><path d='M13.65 3.35A8 8 0 0 0 0 8h2a6 6 0 0 1 10.24-4.24L10 6h6V0z'/><path d='M2.35 12.65A8 8 0 0 0 16 8h-2a6 6 0 0 1-10.24 4.24L6 10H0v6z'/></svg>"); }

/* ==========================================================================
   MAIN / TOOLBAR
   ========================================================================== */

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}

/* ==========================================================================
   ACTIONS (barre boutons au-dessus du bloc principal)
   ========================================================================== */

/* ANNULE les anciens styles .actions ci-dessous (redéfinis ici) */

/* ==========================================================================
   BLOC PRINCIPAL explorateur : arbre + liste dans une seule boîte
   ========================================================================== */

/* Le drop-zone devient le conteneur principal avec la bordure */
.drop-zone {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.browse-layout {
  display: flex;
  min-height: 300px;
}

/* ---------- Panneau arborescence ---------- */

.tree-panel {
  width: 230px;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
}

.tree-root {
  padding: 4px 0;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}

.tree-node-row {
  display: flex;
  align-items: center;
  height: 22px;
  padding-right: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}
.tree-node-row:hover { background: #e8f0fb; }
.tree-node-row.active { background: #cce4f7; }

/* Chevron style Windows : SVG propre 10×10 */
.tree-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.12s ease;
}
.tree-toggle svg {
  width: 10px; height: 10px;
  fill: none; stroke: #555; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.tree-toggle.open { transform: rotate(90deg); }
.tree-toggle.leaf { visibility: hidden; }

.tree-icon {
  display: inline-block;
  width: 16px; height: 16px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%23d4a017' d='M1 3h5l2 2h7v9H1z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px;
  margin-right: 3px;
}

.tree-label {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  font-size: 13px;
}

.tree-children { display: none; }
.tree-children.open { display: block; }

/* Item "Racine" */
.tree-root-item {
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 6px;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}
.tree-root-item:hover { background: #e8f0fb; }
.tree-root-item.active { background: #cce4f7; }

.tree-root-icon {
  display: inline-block;
  width: 16px; height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%231a3a6c' d='M1 2h4l1 2h9v10H1z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

.tree-loading {
  padding: 2px 12px;
  font-size: 11px;
  color: var(--text-light);
  font-style: italic;
}

/* Séparateur vertical arbre / liste */
.tree-separator {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
  align-self: stretch;
}

/* Zone liste (droite) */
.browse-content { flex: 1; min-width: 0; overflow: hidden; }

.page-title {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--text);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar-right { display: flex; align-items: center; gap: 8px; }

#search {
  width: 240px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: white;
}
#search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,58,108,0.12); }

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}

.breadcrumbs .crumb {
  color: var(--brand);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
}
.breadcrumbs .crumb:hover { background: var(--brand-light); text-decoration: none; }
.breadcrumbs .crumb.current { color: var(--text); cursor: default; font-weight: 500; }
.breadcrumbs .crumb.current:hover { background: transparent; }
.breadcrumbs .sep { color: var(--text-light); user-select: none; }

/* ==========================================================================
   ACTIONS
   ========================================================================== */

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-wrap: wrap;
}

/* Groupe de boutons dans la barre d'actions */
.actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drag-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}

.bulk-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  white-space: nowrap;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: #8f1c16; }

/* Spinner constitution ZIP */
.zip-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--brand);
  border-top-color: transparent;
  border-radius: 50%;
  animation: zip-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes zip-spin {
  to { transform: rotate(360deg); }
}

.upload-status {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}
.upload-status.success { color: var(--success); }
.upload-status.error { color: var(--danger); }

/* Barre de progression upload */
.upload-progress-wrap {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 260px;
  max-width: 380px;
}
.upload-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.upload-progress-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.upload-progress-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
  flex-shrink: 0;
}
.upload-progress-track {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--brand);
  border-radius: 99px;
  transition: width 0.15s ease-out;
}
.upload-progress-bar--done {
  background: var(--success);
  transition: background 0.2s;
}
.upload-progress-bar--error {
  background: var(--danger);
  transition: background 0.2s;
}
.upload-progress-sub {
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.1px;
}
.upload-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-light);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.upload-cancel:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

/* ==========================================================================
   DROPZONE
   ========================================================================== */

.drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(26, 58, 108, 0.08);
  border: 2px dashed var(--brand);
  border-radius: var(--radius-lg);
  z-index: 5;
  pointer-events: none;
  align-items: center;
  justify-content: center;
}
.drop-zone.drag-active .drop-overlay { display: flex; }

.drop-overlay-inner {
  background: var(--brand);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}
.drop-overlay-inner small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
}

.file-list-wrap {
  background: var(--bg-card);
  overflow: hidden;
}

.file-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.file-list thead th {
  text-align: left;
  padding: 7px 16px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.file-list tbody td {
  padding: 5px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.file-list tbody tr:last-child td { border-bottom: none; }
.file-list tbody tr:hover { background: var(--bg-tertiary); }

.col-check { width: 36px; text-align: center; padding-left: 12px !important; }
.col-name { width: auto; }
.col-mod { width: 160px; }
.col-size { width: 110px; text-align: right; }
.col-act { width: 220px; text-align: right; }

.file-list .col-size { text-align: right; }
.file-list .col-act { text-align: right; }

/* Colonnes triables */
.file-list thead th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.file-list thead th.sortable:hover {
  color: var(--text-primary);
  background: var(--border);
}
.file-list thead th.sortable::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpolyline points='2,6 5,2 8,6' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline points='2,8 5,12 8,8' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.file-list thead th.sortable:hover::after { opacity: 0.5; }
.file-list thead th.sort-active { color: var(--primary); }
.file-list thead th.sort-asc::after {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 7'%3E%3Cpolyline points='1,6 5,1 9,6' fill='none' stroke='%231a3a6c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.file-list thead th.sort-desc::after {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 7'%3E%3Cpolyline points='1,1 5,6 9,1' fill='none' stroke='%231a3a6c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.file-list .name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-list .name-cell .icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-folder-svg {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23d4a017'><path d='M1 3h5l2 2h7v9H1z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.icon-file-svg {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23788596'><path d='M3 1h7l3 3v11H3zm7 0v3h3'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.icon-up-svg {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231a3a6c'><path d='M8 4l-5 5h3v4h4V9h3z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}

.file-list .name-link {
  color: var(--brand);
  cursor: pointer;
}
.file-list .name-link:hover { text-decoration: underline; }

.file-list .actions-cell { white-space: nowrap; }
.file-list .actions-cell .btn-link + .btn-link { margin-left: 12px; }

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ==========================================================================
   STATUS BAR
   ========================================================================== */

.statusbar {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   ALERTS
   ========================================================================== */

.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.alert-error { background: var(--danger-bg); color: var(--danger); border-color: #f0c6c1; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #c2deca; }

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

/* ==========================================================================
   MODAL
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 60, 0.4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(20, 30, 60, 0.2);
  overflow: hidden;
}

.modal-title {
  padding: 14px 20px;
  background: var(--brand);
  color: white;
  font-weight: 500;
  font-size: 14px;
}

.modal-body {
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.5;
}

.modal-body input[type="text"],
.modal-body input[type="number"] {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  margin-top: 6px;
}
.modal-body input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,58,108,0.12); }

.modal-body .share-link {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
  margin-top: 8px;
}

.modal-actions {
  padding: 12px 20px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ==========================================================================
   ADMIN UTILISATEURS
   ========================================================================== */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-header h1 { margin: 0 0 4px; }

/* Badges de role */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.role-admin   { background: #dce8f7; color: #1a3a6c; }
.role-rws     { background: #fef3e2; color: #856404; }
.role-rw      { background: #e6f3e9; color: #2d7a3d; }
.role-read    { background: #f0f0f2; color: #5a6373; }

/* Badge "vous" sur son propre compte */
.badge-self {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  background: var(--brand-light);
  color: var(--brand);
  vertical-align: middle;
  margin-left: 4px;
}

/* Champs du formulaire utilisateur */
.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.form-row label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.form-row .hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-light);
  text-transform: none;
  letter-spacing: 0;
}

.form-row input[type="text"],
.form-row input[type="password"],
.form-row select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  background: white;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26, 58, 108, 0.12);
}

/* code inline pour afficher le rootPath */
.file-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-muted);
}
