/* AxiApp — Charte graphique Axilome */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&family=Barlow:wght@400;500;600&display=swap');

:root {
  /* === COULEURS AXILOME (extraites du logo) === */
  --axilome-magenta:       #c8487e;
  --axilome-magenta-dark:  #8b2f5e;
  --axilome-magenta-light: #e87aaa;
  --axilome-silver-light:  #c8bebe;
  --axilome-silver:        #b4aaaa;
  --axilome-silver-dark:   #827878;
  --axilome-dark:          #2b2525;

  /* === FOND & SURFACES === */
  --bg:        #1a1516;
  --surface:   #231c1d;
  --surface2:  #2e2425;
  --surface3:  #3a2d2e;
  --border:    #4a3738;

  /* === TEXTE === */
  --text:      #ede8e8;
  --text-dim:  #b4aaaa;
  --text-muted:#827878;

  /* === ACCENT PRINCIPAL === */
  --accent:       #c8487e;
  --accent-hover: #8b2f5e;

  /* === CODE COULEUR GRILLE === */
  --qty-1: #22c55e;
  --qty-2: #eab308;
  --qty-3: #f97316;
  --qty-4: #ef4444;
}

/* === THÈME CLAIR === */
body[data-theme="light"] {
  --bg:        #f5f0f0;
  --surface:   #ffffff;
  --surface2:  #f0eaea;
  --surface3:  #e8e0e0;
  --border:    #d4c8c8;
  --text:      #1a1516;
  --text-dim:  #5a4f4f;
  --text-muted:#8a7f7f;
}

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

body {
  font-family: 'Barlow', 'IBM Plex Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* === NAVBAR === */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand img {
  height: 32px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* === TOGGLE THÈME === */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.theme-toggle-track {
  display: block;
  width: 44px;
  height: 22px;
  background: var(--surface3);
  border-radius: 11px;
  position: relative;
  border: 1px solid var(--border);
  transition: background 0.3s;
}

.theme-toggle-thumb {
  display: block;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

body[data-theme="light"] .theme-toggle-track {
  background: var(--accent);
  border-color: var(--accent-hover);
}

body[data-theme="light"] .theme-toggle-thumb {
  background: #fff;
}

.theme-toggle-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  min-width: 45px;
}

.navbar-user {
  color: var(--text-dim);
  font-size: 0.875rem;
}

.badge-admin {
  background: var(--axilome-magenta-dark);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* === BOUTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, opacity 0.2s;
}

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

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

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

.btn-secondary:hover {
  background: var(--surface3);
}

.btn-danger {
  background: #7f1d1d;
  color: #fca5a5;
}

.btn-danger:hover {
  background: #991b1b;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

.btn-icon {
  padding: 0.4rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
}

.btn-icon:hover {
  color: var(--text);
  background: var(--surface3);
}

/* === FORMULAIRES === */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
  color: var(--text-dim);
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

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

select.form-input {
  cursor: pointer;
}

/* === LAYOUT === */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.75rem;
  color: var(--text);
}

/* === CARTES === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card-meta {
  color: var(--text-dim);
  font-size: 0.8rem;
  display: flex;
  gap: 1rem;
}

.card-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

/* Menu ⋮ sur les cartes */
.card-menu {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.card {
  position: relative;
}

.card-menu-btn {
  font-size: 1.2rem;
  padding: 2px 6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover .card-menu-btn {
  opacity: 1;
}

.card-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 130px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  padding: 4px 0;
  z-index: 50;
}

.card-menu-dropdown.show {
  display: block;
}

/* === MODAL === */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* === ONGLETS === */
/* === SÉLECTEUR DE SCÈNE === */
.scene-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.scene-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface2);
  border: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.scene-btn:hover {
  color: var(--text);
  background: var(--surface3);
}

.scene-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
  gap: 0;
}

.tab {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Barlow', sans-serif;
}

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

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* === GRILLE / TABLEAU === */
.grid-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 600px;
}

.grid-table th {
  background: var(--surface3);
  color: var(--axilome-silver-light);
  padding: 6px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.grid-table th.day-header {
  background: var(--surface3);
  color: var(--accent);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

.grid-table td {
  padding: 2px 4px;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.grid-table td.ref-cell {
  text-align: left;
  padding-left: 8px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  min-width: 100px;
  background: var(--surface);
}

.grid-table td.total-cell {
  font-weight: 700;
}

.grid-table td.remarque-cell {
  text-align: left;
  min-width: 120px;
}

/* Ligne séparateur */
.grid-table tr.row-separator td {
  height: 4px;
  padding: 0;
  background: var(--border);
  border: none;
}

/* Ligne catégorie */
.grid-table tr.row-category td {
  background: var(--surface3);
  color: var(--axilome-magenta-light);
  font-weight: 700;
  text-align: left;
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* Inputs dans la grille */
.grid-input {
  width: 100%;
  max-width: 50px;
  padding: 4px 2px;
  text-align: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: transparent;
  font-size: 0.85rem;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  margin: 1px auto;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

/* Au survol : montrer que c'est cliquable */
.grid-input:hover {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text);
}

/* Au focus : toujours visible */
.grid-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--text);
}

/* Quand il y a une valeur > 0 : visible avec couleur */
.grid-input.has-value {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text);
}

.grid-input-remarque {
  width: 100%;
  padding: 4px 6px;
  text-align: left;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  border: none;
  color: var(--text);
  font-size: 0.78rem;
  font-family: 'Barlow', sans-serif;
}

.grid-input-remarque:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--surface2);
  border-radius: 3px;
}

/* Code couleur quantités — 1 qté = 1 couleur (vert → jaune → orange → rouge) */
.qty-level-1 { background: rgba(34, 197, 94, 0.25); }
.qty-level-2 { background: rgba(74, 222, 128, 0.25); }
.qty-level-3 { background: rgba(163, 230, 53, 0.25); }
.qty-level-4 { background: rgba(234, 179, 8, 0.30); }
.qty-level-5 { background: rgba(251, 146, 60, 0.30); }
.qty-level-6 { background: rgba(249, 115, 22, 0.35); }
.qty-level-7 { background: rgba(239, 68, 68, 0.30); }
.qty-level-8 { background: rgba(220, 38, 38, 0.40); }

/* === FIXE SCÈNE === */
.fixe-header {
  background: var(--surface3);
  color: var(--axilome-magenta-light);
  font-size: 0.75rem;
  min-width: 55px;
}

.fixe-cell {
  min-width: 55px;
}

.cell-disabled {
  background: var(--surface) !important;
  opacity: 0.3;
}

.badge-fixe {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
}

/* === SOUS-LIGNES (parent/enfant) === */
.row-child td.ref-cell {
  padding-left: 24px;
}

.row-child td.ref-cell::before {
  content: '└ ';
  color: var(--text-muted);
}

.row-child {
  background: var(--surface);
  opacity: 0.92;
}

.row-parent td.ref-cell {
  font-weight: 700;
}

.toggle-children {
  cursor: pointer;
  color: var(--text-muted);
  display: inline-block;
  width: 16px;
  text-align: center;
  font-size: 0.65rem;
  vertical-align: middle;
}

.toggle-children:hover {
  color: var(--accent);
}

/* Drag handle */
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  padding: 0 4px;
  font-size: 1rem;
  user-select: none;
}

.drag-handle:hover {
  color: var(--text);
}

/* Ligne en cours de drag */
.sortable-ghost {
  opacity: 0.4;
  background: var(--surface3);
}

/* === INDICATEUR SAUVEGARDE === */
.save-indicator {
  position: fixed;
  top: 64px;
  right: 20px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 150;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.save-indicator.saving {
  background: var(--surface3);
  color: var(--text-dim);
  opacity: 1;
}

.save-indicator.saved {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  opacity: 1;
}

.save-indicator.error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  opacity: 1;
}

/* === RECHERCHE MATÉRIEL === */
.search-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.search-results {
  max-height: 250px;
  overflow-y: auto;
  margin-top: 0.75rem;
}

.search-result-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.search-result-item:hover {
  background: var(--surface3);
}

.search-result-ref {
  font-weight: 600;
  color: var(--text);
}

.search-result-family {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* === ADMIN TABLES === */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th {
  background: var(--surface3);
  color: var(--axilome-silver-light);
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.admin-table tr:hover {
  background: var(--surface2);
}

.admin-table .inline-edit {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.875rem;
}

.admin-table .inline-edit:focus {
  border-color: var(--accent);
  outline: none;
}

/* === SECTION ADMIN === */
.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.admin-section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

/* === LOGIN PAGE === */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-logo {
  margin-bottom: 1.5rem;
}

.login-logo img {
  height: 48px;
}

.login-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.login-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 0.6rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

/* === ALERTES === */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .navbar {
    padding: 0 1rem;
  }
}

/* === PRINT === */
@media print {
  .navbar, .tabs, .btn, .search-panel, .save-indicator,
  .drag-handle, .modal-overlay, .card-actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 10pt;
  }

  .grid-table {
    border: 1px solid #333;
  }

  .grid-table th {
    background: #eee;
    color: #000;
  }

  .grid-table td {
    border: 1px solid #999;
  }

  .grid-input, .grid-input-remarque {
    border: none;
    background: transparent;
    color: #000;
  }

  .qty-level-1 { background: #d4edda; }
  .qty-level-2 { background: #dcf5d0; }
  .qty-level-3 { background: #eef7c3; }
  .qty-level-4 { background: #fff3cd; }
  .qty-level-5 { background: #ffe5b4; }
  .qty-level-6 { background: #ffd6a0; }
  .qty-level-7 { background: #f8d7da; }
  .qty-level-8 { background: #f5c2c7; }
}

/* === ARTISTE LIST DANS MODAL === */
.artiste-list {
  list-style: none;
  margin-top: 0.5rem;
}

.artiste-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

.artiste-item .drag-handle {
  font-size: 0.9rem;
}

.artiste-item-name {
  flex: 1;
  font-weight: 500;
}

.artiste-item select {
  padding: 3px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  font-size: 0.8rem;
}

/* === TOOLBAR GRILLE === */
.grid-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.grid-toolbar-left {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* === DROPDOWN INSERT === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 180px;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  padding: 4px 0;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: 'Barlow', sans-serif;
}

.dropdown-item:hover {
  background: var(--surface3);
}

/* === PROJET HEADER === */
.projet-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.projet-header .page-title {
  flex: 1;
}

.projet-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* === SIDEBAR ARTISTE === */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 199;
}

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

.artiste-sidebar {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  max-width: 90vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 200;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.artiste-sidebar.open {
  right: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--accent);
  background: var(--surface2);
}

.sidebar-header h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  margin: 0;
}

.sidebar-header .btn-icon {
  font-size: 1.4rem;
}

.sidebar-meta {
  padding: 0.75rem 1.25rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-section {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-section h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.sidebar-blocs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-bloc-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
  border-radius: 6px;
  font-size: 0.85rem;
}

.sidebar-bloc-type {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  min-width: 50px;
  text-align: center;
}

.sidebar-bloc-type.type-show { background: var(--accent); }
.sidebar-bloc-type.type-balance { background: #8b5cf6; }
.sidebar-bloc-type.type-setup { background: #3b82f6; }
.sidebar-bloc-type.type-changeover { background: #f59e0b; color: #1a1516; }
.sidebar-bloc-type.type-autre { background: #6b7280; }

.sidebar-bloc-time {
  color: var(--text-dim);
  font-size: 0.8rem;
  white-space: nowrap;
}

.sidebar-bloc-label {
  flex: 1;
  color: var(--text);
}

.sidebar-bloc-scene {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.sidebar-materiel {
  display: flex;
  gap: 0.75rem;
}

.sidebar-materiel-item {
  flex: 1;
  text-align: center;
  padding: 0.6rem;
  background: var(--surface2);
  border-radius: 6px;
}

.sidebar-materiel-count {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.sidebar-materiel-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  margin-top: auto;
}

.sidebar-empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
}

/* Nom artiste cliquable dans header grille */
.artiste-name-link {
  cursor: pointer;
  transition: color 0.2s;
}

.artiste-name-link:hover {
  color: var(--accent);
}

/* Heure balance sous le nom */
.balance-heure {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Confirmation dialog */
.confirm-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  align-items: center;
  justify-content: center;
}

.confirm-overlay.active {
  display: flex;
}

.confirm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 400px;
  text-align: center;
}

.confirm-box p {
  margin-bottom: 1rem;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
