/* ============================================================
   Variables & Reset
   ============================================================ */
:root {
  --brand:        #5b6af0;
  --brand-hover:  #4757e8;
  --brand-light:  #eef0fd;

  --bg:           #f5f6fa;
  --surface:      #ffffff;
  --surface-2:    #f0f1f7;

  --sidebar-bg:   #ffffff;
  --sidebar-border: #e8e9f0;

  --text-primary:   #1c1e2e;
  --text-secondary: #6b7280;
  --text-muted:     #9ca3af;

  --border:       #e5e7eb;
  --border-focus: #5b6af0;

  --danger:       #ef4444;
  --danger-light: #fef2f2;
  --success:      #10b981;
  --success-light:#ecfdf5;
  --warning:      #f59e0b;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);

  --sidebar-w: 220px;
  --transition: 0.18s ease;
}

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

html { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  height: 100%;
}

/* ============================================================
   Alert Banner
   ============================================================ */
.alerte-clignotante {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--danger);
  color: #fff;
  padding: 0.6rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: clignoter 1.2s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(239,68,68,.35);
}

.alerte-icon { font-size: 1rem; }

@keyframes clignoter {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

.hidden { display: none !important; }

/* ============================================================
   App Shell — sidebar + main
   ============================================================ */
.app-shell {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-brand-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.sidebar-brand-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.sidebar-brand-name strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.875rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition);
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

.nav-icon { font-size: 1rem; line-height: 1; }
.nav-label { flex: 1; }

/* ── Main content ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2.5rem;
  min-width: 0;
}

/* ── Tab sections ── */
.tab-section {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Page header
   ============================================================ */
.page-header {
  margin-bottom: 1.75rem;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.2rem;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ============================================================
   Forms
   ============================================================ */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 140px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="number"],
select {
  height: 38px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(91,106,240,.15);
}

input.invalid,
select.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

.error-msg {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.15rem;
  display: block;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 3px rgba(91,106,240,.3);
}
.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 3px 8px rgba(91,106,240,.35);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid #fca5a5;
  height: 32px;
  padding: 0 0.75rem;
  font-size: 0.8rem;
}
.btn-danger:hover {
  background: var(--danger-light);
  border-color: var(--danger);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  height: 32px;
  padding: 0 0.75rem;
  font-size: 0.8rem;
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-amber  { background: #fef3c7; color: #92400e; }
.badge-gray   { background: var(--surface-2); color: var(--text-secondary); }

/* ============================================================
   Tables
   ============================================================ */
.table-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.875rem;
}

thead {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color var(--transition);
}

thead th:hover { color: var(--text-primary); }

thead th.sort-asc::after  { content: " ↑"; color: var(--brand); }
thead th.sort-desc::after { content: " ↓"; color: var(--brand); }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: #fafbff; cursor: pointer; }

tbody tr.selected-row { background: var(--brand-light); }

tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  color: var(--text-primary);
}

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.empty-state-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 35, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 460px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.modal h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.modal-list {
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.modal-list li::before {
  content: "📋";
  font-size: 0.85rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ============================================================
   Assignation Panel
   ============================================================ */
.assignation-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.assignation-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.assignation-panel-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.assignation-list {
  list-style: none;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.assignation-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.875rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.assignation-list-name {
  font-weight: 500;
  color: var(--text-primary);
}

.assignation-list-role {
  margin-left: 0.5rem;
}

.assignation-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}

/* ============================================================
   Planning Grid
   ============================================================ */
.planning-grid {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.planning-colonne {
  flex: 1 1 0;
  min-width: 155px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.planning-colonne-titre {
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 0.55rem 0.5rem;
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: var(--radius-md);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(91,106,240,.25);
}

.planning-simultane {
  display: flex;
  gap: 0.5rem;
}

.planning-carte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 0.8rem;
  flex: 1 1 0;
  min-width: 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.planning-carte:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.planning-carte-nom {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
}

.planning-carte-horaire {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  background: var(--brand-light);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.planning-carte-participants {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.planning-carte-participants li {
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.15rem 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.planning-carte-participants li::before {
  content: "·";
  color: var(--text-muted);
  font-weight: 700;
}

/* ============================================================
   Conflicts tab
   ============================================================ */
.conflict-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.conflict-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.conflict-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 0.25rem;
}

.conflict-empty-sub {
  font-size: 0.875rem;
}

/* ============================================================
   Utility
   ============================================================ */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* ============================================================
   Alert button
   ============================================================ */
.alerte-btn {
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: background var(--transition);
}
.alerte-btn:hover { background: rgba(255,255,255,0.4); }

/* ============================================================
   Nav badge
   ============================================================ */
.nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

/* ============================================================
   Main grid — 2 colonnes
   ============================================================ */
.main-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.col-participants,
.col-right {
  min-width: 0;
}

.col-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Hauteur fixe identique pour aligner les deux cards */
.col-participants .card,
.col-right .card {
  height: 750px;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.col-participants #liste-participants,
.col-right #liste-interventions {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.col-participants .scroll-container,
.col-right .scroll-container {
  height: 100%;
}

.col-participants .liste-scrollable,
.col-right .liste-scrollable {
  max-height: 100%;
  height: 100%;
}

/* Section headers dans la page principale */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.section-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-header-icon {
  font-size: 1.1rem;
}

/* ============================================================
   Participant list (compact, colonne gauche)
   ============================================================ */
.participant-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: background var(--transition);
}

.participant-row:hover { background: var(--brand-light); }

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

.participant-nom {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Assignation list — rôles groupés par participant */
.assignation-list li {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

/* ============================================================
   Intervention row — hint cliquable
   ============================================================ */
.intervention-row td:first-child {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.row-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--brand);
  opacity: 0.75;
  letter-spacing: 0.01em;
}

.intervention-row:hover .row-hint {
  opacity: 1;
}

.intervention-row.selected-row .row-hint {
  color: var(--brand);
  opacity: 1;
}

/* ============================================================
   Roles checkboxes
   ============================================================ */
.roles-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.4rem 0;
}

.role-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.role-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
  /* reset des styles génériques des inputs */
  border: none;
  padding: 0;
  appearance: auto;
  -webkit-appearance: auto;
  background: none;
  box-shadow: none;
}

.role-check:hover { color: var(--brand); }

/* ============================================================
   Planning Grid — refonte pleine largeur
   ============================================================ */
.planning-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.875rem;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.planning-colonne {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.planning-colonne-titre {
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 0.6rem 0.5rem;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: var(--radius-md);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(91,106,240,.3);
}

.planning-vide {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 1rem 0;
}

.planning-simultane {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  padding-bottom: 2rem; /* espace pour les cartes décalées */
}

.planning-carte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), z-index 0s;
}

.planning-carte:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Cartes superposées */
.planning-simultane {
  position: relative;
  padding-bottom: 2rem; /* espace pour les cartes décalées */
}

.planning-carte-overlap {
  position: absolute;
  width: calc(100% - 20px);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.planning-carte-overlap:hover,
.planning-carte-overlap.au-premier-plan {
  z-index: 50 !important;
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.planning-simultane .planning-carte-overlap:not(:first-child) {
  margin-top: -40px;
  margin-left: 12px;
}

.planning-simultane .planning-carte-overlap:nth-child(3) {
  margin-top: -40px;
  margin-left: 24px;
}

.planning-simultane .planning-carte-overlap:nth-child(4) {
  margin-top: -40px;
  margin-left: 36px;
}

.planning-carte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.planning-carte:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.planning-carte-header {
  margin-bottom: 0.6rem;
}

.planning-carte-nom {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  word-break: break-word;
  line-height: 1.3;
}

.planning-carte-horaire {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--brand-light);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}

.planning-carte-participants {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-top: 1px solid var(--border);
  padding-top: 0.4rem;
  margin-top: 0.1rem;
}

.planning-participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  line-height: 1.2;
}

.planning-participant-nom {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.planning-participant-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  flex-shrink: 0;
}

.planning-carte-vide {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  margin-top: 0.1rem;
}

/* ============================================================
   Listes scrollables (participants + interventions)
   ============================================================ */
.liste-scrollable {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.liste-scrollable::-webkit-scrollbar {
  width: 5px;
}

.liste-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.liste-scrollable::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

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

.liste-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

/* ============================================================
   Scroll arrow indicator
   ============================================================ */
.scroll-container {
  position: relative;
}

.scroll-container .liste-scrollable {
  flex: 1;
}
.scroll-arrow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.95) 60%);
  cursor: pointer;
  z-index: 10;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transition: opacity var(--transition);
  user-select: none;
}

.scroll-arrow-up {
  bottom: auto;
  top: 0;
  background: linear-gradient(to top, transparent, rgba(255,255,255,0.95) 60%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.scroll-arrow:hover .scroll-arrow-icon {
  transform: translateY(2px);
}

.scroll-arrow-up:hover .scroll-arrow-icon {
  transform: translateY(-2px);
}

.scroll-arrow-icon {
  font-size: 1rem;
  color: var(--brand);
  transition: transform var(--transition);
  animation: bounce-arrow 1.5s ease-in-out infinite;
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

@keyframes bounce-arrow-up {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

.scroll-arrow-up .scroll-arrow-icon {
  animation: bounce-arrow-up 1.5s ease-in-out infinite;
}

.scroll-arrow.hidden {
  display: none !important;
}

/* ============================================================
   Import CSV
   ============================================================ */
.import-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.import-drop-zone:hover,
.import-drop-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}

.import-resultat-ok {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--success-light);
  border: 1px solid #6ee7b7;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
}

.modal-large {
  max-width: 620px;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  flex: 1;
  margin: 0;
}

.modal-body {
  margin-bottom: 1.5rem;
}

.assignation-list-modal {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.assignation-list-modal li {
  padding: 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
