/* ============================================
   MMI Previs.io — Design System
   ============================================ */

/* --- Variables --- */
:root {
  --primary: #3C3C78;
  --primary-dark: #2c2c5a;
  --primary-light: #6a6aa0;
  --primary-50: #f0f0f6;
  --primary-100: #dddde8;

  --accent: #ffaa00;
  --accent-dark: #cc8800;
  --accent-light: #ffd166;
  --accent-50: #fff8e6;
  --accent-100: #ffeecc;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-dark: #065f46;

  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-dark: #92400e;

  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-dark: #991b1b;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--primary-100);
  color: var(--primary-dark);
}

a { color: var(--primary); text-decoration: none; transition: color 150ms ease; }
a:hover { color: var(--primary-dark); }

/* --- Navbar --- */
.navbar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-900);
  text-decoration: none;
}

.navbar-brand:hover { color: var(--gray-900); }

.navbar-logo {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.95rem;
}

.navbar-center {
  display: flex;
  align-items: center;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: all 150ms ease;
}

.nav-link:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.nav-link.active {
  background: var(--primary-50);
  color: var(--primary);
}

.nav-link svg {
  flex-shrink: 0;
}

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

.year-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-600, #4b5563);
}

.year-switcher select {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  outline: none;
}

.year-switcher-other {
  background: #fef3c7;
  color: #92400e;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.navbar-logout {
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-400);
  transition: all 150ms ease;
}

.navbar-logout:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.navbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--gray-600);
  border-radius: var(--radius-xs);
  transition: background 150ms ease;
}

.navbar-toggle:hover {
  background: var(--gray-100);
}

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

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

/* --- Year Selector --- */
.page-header-selectors {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.year-selector select {
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font);
  font-weight: 500;
  background: white;
  color: var(--gray-700);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.year-selector select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(60, 60, 120, 0.1);
}

/* --- Cards --- */
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  transition: box-shadow 200ms ease;
}

.card:hover {
  box-shadow: var(--shadow);
}

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

.card-header h2 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: -0.01em;
}

.card-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--gray-100);
  color: var(--gray-500);
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

/* --- Tables --- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

tbody tr {
  transition: background 150ms ease;
}

tbody tr:hover {
  background: var(--gray-50);
}

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

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-pending {
  background: var(--warning-bg);
  color: var(--warning-dark);
}

.badge-approved {
  background: var(--success-bg);
  color: var(--success-dark);
}

.badge-rejected {
  background: var(--danger-bg);
  color: var(--danger-dark);
}

.badge-info {
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.7rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all 150ms ease;
  text-decoration: none;
}

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

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  box-shadow: 0 4px 14px rgba(60, 60, 120, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.btn-outline {
  background: white;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
  padding: 8px 16px;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
}

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

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: white;
  transition: all 150ms ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(60, 60, 120, 0.12);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

/* --- Search Bar --- */
.search-bar {
  position: relative;
  min-width: 280px;
}

.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-bar input {
  padding-left: 38px;
  border-color: var(--gray-200);
  background: var(--gray-50);
}

.search-bar input:focus {
  background: white;
  border-color: var(--primary);
}

/* --- Alerts / Flash Messages --- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideDown 300ms ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-dark);
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger-dark);
  border: 1px solid #fecaca;
}

/* --- Stats Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: box-shadow 200ms ease;
}

.stat-card:hover {
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
}

.stat-pending .stat-value { color: var(--warning); }
.stat-approved .stat-value { color: var(--success); }
.stat-rejected .stat-value { color: var(--danger); }

/* --- MCCC Category Cards --- */
.mccc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.mccc-category {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 200ms ease;
}

.mccc-category:hover {
  box-shadow: var(--shadow);
}

.mccc-category-header {
  padding: 12px 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.dot-blue { background: var(--primary); }
.dot-green { background: var(--success); }
.dot-orange { background: var(--warning); }
.dot-red { background: var(--danger); }

.mccc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.875rem;
  transition: background 150ms ease;
}

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

.mccc-item:hover { background: var(--gray-50); }

.mccc-item-label {
  color: var(--gray-600);
  font-weight: 500;
}

.mccc-item-values {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mccc-pct {
  font-weight: 700;
  color: var(--gray-800);
  min-width: 50px;
  text-align: right;
}

.mccc-nb {
  color: var(--gray-400);
  font-size: 0.8rem;
  font-weight: 500;
}

/* --- Coefficient Chips --- */
.coef-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coef-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  min-width: 110px;
  transition: all 200ms ease;
}

.coef-chip:hover {
  box-shadow: 0 4px 12px rgba(60, 60, 120, 0.15);
  transform: translateY(-2px);
}

.coef-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 4px;
}

.coef-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

/* --- Module Header --- */
.module-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

/* --- Éditeur d'intervenants inline sur la fiche parcours --- */
.career-editor-row > td { background: #f8fafc; padding: 0; }

.career-editor {
  padding: 12px 16px;
  border-left: 3px solid var(--primary, #4f46e5);
}

.career-editor-head {
  font-size: 0.75rem;
  color: var(--gray-500, #6b7280);
  margin-bottom: 8px;
}

.career-ed-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.career-ed-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.career-ed-line label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: var(--gray-500, #6b7280);
  font-weight: 600;
}

.career-ed-line input {
  width: 50px;
  padding: 3px 5px;
  text-align: right;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: var(--radius-sm);
}

.career-ed-user {
  min-width: 160px;
  padding: 4px 6px;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: var(--radius-sm);
  background: #fff;
}

.career-ed-total {
  min-width: 48px;
  text-align: right;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gray-700, #374151);
}

.career-ed-add {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--gray-200, #e5e7eb);
}

.container.container-wide {
  max-width: none;
}

.mod-interv-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mod-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mod-filters .redistrib-input { width: auto; }

.leader-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

.leader-select {
  padding: 3px 6px;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.82rem;
  cursor: pointer;
}

.module-header-row { align-items: center; }
.module-header-main { flex: 1; }
.module-header-action { flex-shrink: 0; white-space: nowrap; }

@media (max-width: 640px) {
  .module-header-row { flex-wrap: wrap; }
  .module-header-action { width: 100%; justify-content: center; }
}

.module-code {
  padding: 8px 14px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.module-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.module-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.module-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.module-meta svg {
  color: var(--gray-400);
}

/* --- Back Link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 16px;
  transition: all 150ms ease;
}

.back-link:hover {
  color: var(--primary);
  gap: 8px;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--gray-300);
}

.empty-state p {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-500);
}

.empty-state .empty-sub {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 4px;
  font-weight: 400;
}

/* --- Login Page --- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3C3C78 0%, #2c2c5a 100%);
  padding: 24px;
}

.login-page::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.login-card {
  position: relative;
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header .login-logo {
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 1.4rem;
  margin: 0 auto 16px;
}

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.login-header p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #3C3C78 0%, #2c2c5a 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  margin-top: 8px;
  transition: all 200ms ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(60, 60, 120, 0.4);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: none;
}

.register-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.register-step2 {
  margin-top: 4px;
}

.register-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.register-footer a {
  font-weight: 600;
}

/* --- Misc --- */
.text-sm { font-size: 0.8rem; }
.text-muted { color: var(--gray-500); }
.nowrap { white-space: nowrap; }
.module-id-link { font-weight: 700; color: var(--primary); }
.module-id-link:hover { color: var(--primary-dark); }

.coef-dots {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.no-results {
  display: none;
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
  font-size: 0.9rem;
  font-weight: 500;
}

.no-results.visible {
  display: block;
}

/* --- Volume Horaire Etudiants --- */
.vol-hours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.vol-hours-item {
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.vol-hours-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 4px;
}

.vol-hours-count {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  letter-spacing: -0.03em;
}

.vol-hours-input {
  width: 72px;
  margin: 2px auto 4px;
  padding: 4px 6px;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  color: var(--gray-900);
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: var(--radius-sm);
  background: #fff;
}

.vol-hours-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.vol-hours-dual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.vol-hours-unit {
  font-size: 0.7rem;
  color: var(--gray-400);
  font-weight: 500;
  min-width: 48px;
  text-align: left;
}

.vol-hours-input-h {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.vol-hours-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.vol-recalc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #fef3c7;
  color: #92400e;
  font-size: 0.85rem;
}

.vol-recalc-banner form {
  margin: 0;
}

.vol-recalc-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.vol-modules-table .vol-col-group {
  border-left: 1px solid var(--gray-200, #e5e7eb);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.vol-modules-table .vol-cell-h {
  color: var(--gray-500, #6b7280);
}

.vol-modules-table tfoot .vol-modules-total td {
  font-weight: 700;
  border-top: 2px solid var(--gray-300, #d1d5db);
  background: var(--gray-50, #f9fafb);
}

.vol-inline-input {
  padding: 4px 6px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.85rem;
}

.vol-inline-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.vol-inline-code { width: 80px; font-weight: 600; }
.vol-inline-name { width: 100%; min-width: 180px; }
.vol-inline-num { width: 64px; text-align: right; }
.vol-inline-h { color: var(--gray-500, #6b7280); }

.vol-modules-table .vol-edit-row td { padding: 5px 8px; }

/* --- Simulation des charges --- */
.sim-card { border: 1px solid #fcd34d; }
.sim-badge { background: #fef3c7; color: #92400e; }

.sim-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.sim-career {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: var(--radius-sm);
  background: var(--gray-50, #f9fafb);
  font-size: 0.82rem;
}

.sim-career-name { font-weight: 600; min-width: 90px; }
.sim-career label { display: inline-flex; align-items: center; gap: 4px; color: var(--gray-500, #6b7280); }

.sim-input {
  width: 52px;
  padding: 3px 5px;
  text-align: right;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: var(--radius-sm);
}

.sim-actions { margin-top: 12px; }

/* --- Filtres & tri des charges --- */
.charges-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.charges-filters .redistrib-input { width: auto; }
.charges-filters #filter-search { min-width: 220px; }
.charges-count { margin-left: auto; }

.charges-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.charges-table th.sortable:hover { color: var(--primary); }
.charges-table .sort-ind { font-size: 0.7rem; }

.badge-vac {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-sur {
  background: #fef3c7;
  color: #92400e;
}

.cell-remaining.badge-sur-text {
  color: #92400e;
  font-weight: 600;
}

.service-exclusion-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.service-exclusion-bar button {
  margin-left: auto;
}

.order-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.order-pill {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}

.order-pill.order-before {
  background: #e0e7ff;
  color: #3730a3;
}

.order-pill.order-after {
  background: #fae8ff;
  color: #86198f;
}

.order-pill.order-same {
  background: #dcfce7;
  color: #166534;
}

.comment-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  text-decoration: none;
}

.comment-pill:hover {
  background: #bfdbfe;
}

.prog-pill {
  display: inline-block;
  margin-top: 4px;
  margin-left: 4px;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--primary-100);
  color: var(--primary-dark);
  text-decoration: none;
}
.prog-pill:hover { background: var(--primary-50); }

.comment-pill.empty {
  background: #f1f5f9;
  color: #94a3b8;
}

.comment-pill.empty:hover {
  background: #e2e8f0;
}

.group-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.group-ref-career {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.group-ref-career-name {
  font-weight: 700;
  margin-bottom: 8px;
  color: #1e293b;
}

.group-ref-sem {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  flex-wrap: wrap;
}

.group-ref-sem-name {
  min-width: 30px;
  font-weight: 600;
  color: #64748b;
}

.service-legend {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a5f;
  font-size: 0.9rem;
  line-height: 1.5;
}

.service-legend svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #2563eb;
}

.volume-total-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
  font-size: 0.88rem;
  color: var(--gray-700);
}

.alert-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a5f;
}

.alert-info svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #2563eb;
}

.tl-vert {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.tl-vstep {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.tl-vmarker {
  position: relative;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
}

/* Ligne verticale de liaison entre les étapes (sauf la dernière). */
.tl-vstep:not(.tl-vlast) .tl-vmarker::after {
  content: '';
  position: absolute;
  top: 30px;
  bottom: -10px;
  width: 2px;
  background: #cbd5e1;
}

.tl-vcards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 18px;
  flex: 1;
  min-width: 0;
}

.tl-card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.tl-rels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.tl-rel {
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}

.tl-rel-after {
  background: #fef3c7;
  color: #92400e;
}

.tl-rel-before {
  background: #e0e7ff;
  color: #3730a3;
}

.tl-rel-same {
  background: #dcfce7;
  color: #166534;
}

.tl-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.tl-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.tl-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.tl-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 1px 4px rgba(37, 99, 235, .15);
}

.tl-card-code {
  font-weight: 700;
  color: #1d4ed8;
}

.tl-card-name {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.3;
}

.tl-same {
  font-size: 0.7rem;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
  padding: 1px 8px;
}

.tl-arrow {
  align-self: center;
  margin-top: 26px;
  color: #94a3b8;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.comment-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 600;
}

.comment-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.comment-actions {
  margin-top: 8px;
}

.cmt-group {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.cmt-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--primary-50);
  border-bottom: 1px solid #e2e8f0;
}

.cmt-group-title {
  color: var(--primary);
  text-decoration: none;
}

.cmt-group-title strong {
  color: var(--primary-dark);
}

.cmt-group .comment-list {
  margin: 0;
  padding: 12px 14px;
}

.cmt-unread-badge {
  color: var(--accent-dark);
  font-weight: 700;
}

.cmt-read {
  opacity: 0.55;
}

.cmt-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--gray-600);
  white-space: nowrap;
}

.comment-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

.block-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-weight: 600;
}

.blocked-zone {
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
  filter: grayscale(0.4);
}

.vol-hours-label {
  font-size: 0.7rem;
  color: var(--gray-400);
  font-weight: 500;
  margin-bottom: 6px;
}

.vol-hours-eqtd {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  padding: 2px 8px;
  background: var(--primary-50);
  border-radius: 9999px;
  display: inline-block;
}

/* --- Hour Request Form --- */
.hour-request-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hour-request-field {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.hour-request-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.hour-request-current {
  font-size: 0.7rem;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.hour-request-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hour-request-input-wrap input[type="number"] {
  width: 70px;
  padding: 6px 8px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-xs);
  background: white;
}

.hour-request-input-wrap input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(60, 60, 120, 0.12);
}

.hour-request-unit {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* --- Redistribution Table --- */
.redistrib-input {
  width: 64px;
  padding: 5px 6px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-xs);
  background: white;
  color: var(--gray-800);
  transition: all 150ms ease;
}

.redistrib-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(60, 60, 120, 0.12);
}

.redistrib-table td {
  vertical-align: middle;
}

/* --- Conformite Maquette --- */
.conformity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.conformity-item {
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  background: var(--gray-50);
}

.conformity-ok {
  border-color: #a7f3d0;
  background: var(--success-bg);
}

.conformity-ko {
  border-color: #fecaca;
  background: var(--danger-bg);
}

.conformity-warn {
  border-color: #fde68a;
  background: var(--warning-bg);
}

.conformity-neutral {
  border-color: var(--primary-100);
  background: var(--primary-50);
}

.conformity-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.conformity-ok .conformity-label { color: var(--success-dark); }
.conformity-ko .conformity-label { color: var(--danger-dark); }
.conformity-warn .conformity-label { color: var(--warning-dark); }
.conformity-neutral .conformity-label { color: var(--primary); }

.conformity-values {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.conformity-sep {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-400);
  margin: 0 2px;
}

.conformity-expected {
  color: var(--gray-500);
}

.conformity-sub {
  font-size: 0.65rem;
  color: var(--gray-400);
  font-weight: 500;
  margin-top: 4px;
}

.conformity-text-ko {
  color: var(--danger) !important;
  font-weight: 700;
}

/* --- Status Dots --- */
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-ok {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.status-warn {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.status-empty {
  background: var(--gray-300);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

/* --- Career Grid --- */
.career-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}

.career-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 200ms ease;
}

.career-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}

.career-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.career-card-content {
  flex: 1;
  min-width: 0;
}

.career-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.career-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
}

.career-card-arrow {
  color: var(--gray-300);
  flex-shrink: 0;
  transition: all 200ms ease;
}

.career-card:hover .career-card-arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* --- Intervenants --- */
.intervenant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.intervenant-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
  white-space: nowrap;
}

.leader-tag {
  background: var(--primary-50);
  color: var(--primary);
}

.badge-leader {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--accent);
  color: var(--primary-dark);
  vertical-align: middle;
  margin-left: 4px;
}

/* --- Share Bar --- */
.share-bar {
  position: relative;
  display: inline-block;
  background: var(--gray-100);
  border-radius: 3px;
  height: 6px;
  min-width: 60px;
  overflow: visible;
}
.share-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
  transition: width 0.2s ease;
}
.share-bar-label {
  position: absolute;
  right: -32px;
  top: -4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
}

.share-pct {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--primary-50);
  color: var(--primary);
  white-space: nowrap;
}

/* --- Module Management (admin) --- */
.manage-select {
  padding: 4px 8px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font);
  background: white;
  color: var(--gray-700);
  max-width: 180px;
}
.manage-select-sm {
  max-width: 110px;
}
.manage-input {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font);
  text-align: right;
  color: var(--gray-700);
}
.manage-input:focus, .manage-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(60, 60, 120, 0.1);
}
.manage-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.manage-add-grid .manage-select,
.manage-add-grid .manage-input {
  width: 100%;
  max-width: none;
}
.manage-add-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.btn-danger {
  background: var(--red);
  color: white;
  border: none;
}
.btn-danger:hover {
  background: #b91c1c;
}

/* --- Ordonnancement modules --- */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--gray-300);
    border-radius: 10px;
    transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.order-item:hover {
    box-shadow: 0 2px 8px rgba(60, 60, 120, .1);
    transform: translateX(2px);
}
.order-item.order-before { border-left-color: var(--primary); }
.order-item.order-same   { border-left-color: var(--success); }
.order-item.order-after  { border-left-color: var(--accent); }

.order-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}
.order-dir {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}
.order-before .order-dir { background: var(--primary-100); color: var(--primary-dark); }
.order-same   .order-dir { background: #dcfce7; color: #166534; }
.order-after  .order-dir { background: var(--accent-100); color: var(--accent-dark); }

.order-target {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.order-code { color: var(--primary); font-weight: 700; }
.order-name { color: var(--gray-500); font-size: .9rem; }

.order-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: #fff;
    color: var(--gray-400);
    cursor: pointer;
    transition: all .15s ease;
}
.order-del:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

.order-add-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Volume Horaire --- */
.text-right { text-align: right; }

.volume-career-card {
  margin-bottom: 8px;
  border-left: 4px solid var(--primary);
}

.volume-career-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.volume-groups {
  display: flex;
  gap: 6px;
}

.volume-group-chip {
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--primary-50);
  color: var(--primary);
}

.vol-cell {
  font-variant-numeric: tabular-nums;
  color: var(--gray-600);
}

.vol-total {
  font-weight: 700;
  color: var(--gray-800);
}

.volume-subtotal td {
  background: var(--gray-50);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gray-600);
  border-top: 2px solid var(--gray-200);
  border-bottom: none;
}

.volume-total-card {
  margin-bottom: 32px;
  border: 1.5px solid var(--primary-100);
  background: var(--primary-50);
}

.volume-total-card:hover {
  box-shadow: 0 4px 12px rgba(60, 60, 120, 0.12);
}

.volume-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.volume-total-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.volume-total-values {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.volume-total-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
}

.volume-total-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.volume-total-sub {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
}

.volume-total-highlight .volume-total-num {
  color: var(--primary);
  font-size: 1.5rem;
}

.volume-total-highlight .volume-total-sub {
  color: var(--primary);
}

/* --- Service Bounds --- */
.service-card-under {
  border-color: #fde68a;
  background: var(--warning-bg);
}

.service-card-under .volume-total-label {
  color: var(--warning-dark);
}

.service-card-under .volume-total-highlight .volume-total-num,
.service-card-under .volume-total-highlight .volume-total-sub {
  color: var(--warning);
}

.service-card-over {
  border-color: #fecaca;
  background: var(--danger-bg);
}

.service-card-over .volume-total-label {
  color: var(--danger-dark);
}

.service-card-over .volume-total-highlight .volume-total-num,
.service-card-over .volume-total-highlight .volume-total-sub {
  color: var(--danger);
}

.service-gauge {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.service-gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.service-gauge-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  font-variant-numeric: tabular-nums;
}

.service-gauge-track {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.service-gauge-min {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: var(--gray-500);
  z-index: 2;
  border-radius: 1px;
}

.service-gauge-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--success), #34d399);
  transition: width 600ms ease;
}

.service-gauge-fill.under {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.service-gauge-fill.over {
  background: linear-gradient(90deg, var(--warning), var(--danger));
}

.service-gauge-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gray-400);
  font-variant-numeric: tabular-nums;
}

.volume-gauge {
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--gray-100);
}

.volume-gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.volume-gauge-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  font-variant-numeric: tabular-nums;
}

.volume-gauge-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

.volume-gauge-pct.over {
  color: var(--danger);
}

.volume-gauge-track {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}

.volume-gauge-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--success), #34d399);
  transition: width 600ms ease;
}

.volume-gauge-fill.over {
  background: linear-gradient(90deg, var(--warning), var(--danger));
}

.volume-gauge-warn {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--danger);
}

/* --- Settings Page --- */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-year-current {
  border-left: 3px solid var(--primary, #4f46e5);
}

.badge-current {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: #dcfce7;
  color: #166534;
  vertical-align: middle;
}

.settings-add-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200, #e5e7eb);
}

.settings-duplicate-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 12px 16px;
  padding-left: 12px;
  border-left: 2px dashed var(--gray-200, #e5e7eb);
}

.settings-group-block {
  margin-bottom: 20px;
}

.settings-group-block:last-child {
  margin-bottom: 0;
}

.settings-group-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-strong, #1f2937);
}

.settings-recalc-perm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #eef2ff;
}

/* --- Barre d'actions fixe (sticky) sur Paramètres --- */
.settings-actionbar {
  position: sticky;
  top: 64px; /* hauteur de la navbar */
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 20px;
  padding: 10px 16px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.settings-actionbar-title { font-size: 0.9rem; color: var(--gray-600, #4b5563); }

.settings-actionbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-actionbar-nav a {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600, #4b5563);
  background: var(--gray-100, #f3f4f6);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.settings-actionbar-nav a:hover { background: var(--gray-200, #e5e7eb); }

.settings-actionbar-nav a.settings-actionbar-primary {
  color: #fff;
  background: var(--primary, #4f46e5);
}

.settings-actionbar-nav a.settings-actionbar-primary:hover { background: #4338ca; }

/* Décale l'ancrage pour ne pas masquer la section sous la navbar + barre */
#sec-annees, #sec-parcours, #sec-groupes, #sec-semestres { scroll-margin-top: 124px; }

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  transition: all 200ms ease;
}

.settings-item:hover {
  border-color: var(--primary-light);
}

.settings-inactive {
  opacity: 0.5;
}

.settings-inactive:hover {
  opacity: 0.8;
}

.settings-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.settings-item-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray-900);
}

.settings-item-fields {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-field label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
}

/* --- Toggle Switch --- */
.toggle-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toggle-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--gray-300);
  border-radius: 10px;
  position: relative;
  transition: background 200ms ease;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 200ms ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-label input:checked + .toggle-switch {
  background: var(--success);
}

.toggle-label input:checked + .toggle-switch::after {
  transform: translateX(16px);
}

/* --- Expandable Detail Rows --- */
.expandable-row {
  cursor: pointer;
  transition: background 150ms ease;
}

.expandable-row:hover {
  background: var(--primary-50) !important;
}

.expandable-row.row-expanded {
  background: var(--primary-50);
  border-bottom-color: var(--primary-100);
}

.expandable-row td:first-child .module-id-link::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid var(--gray-400);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-right: 8px;
  transition: transform 200ms ease;
  vertical-align: middle;
}

.expandable-row.row-expanded td:first-child .module-id-link::before {
  transform: rotate(90deg);
  border-left-color: var(--primary);
}

.detail-row {
  display: none;
}

.detail-row.detail-open {
  display: table-row;
}

.detail-row td {
  padding: 0 !important;
  border-bottom: 2px solid var(--primary-100);
}

.detail-panel {
  padding: 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--primary-100);
  animation: detailSlideDown 200ms ease;
}

@keyframes detailSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-columns {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.detail-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.detail-chips {
  display: flex;
  gap: 8px;
}

.detail-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  background: white;
  border: 1px solid var(--gray-200);
  min-width: 60px;
}

.detail-chip-ok {
  border-color: #a7f3d0;
  background: var(--success-bg);
}

.detail-chip-ko {
  border-color: #fecaca;
  background: var(--danger-bg);
}

.detail-chip-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

.detail-chip-ok .detail-chip-label { color: var(--success-dark); }
.detail-chip-ko .detail-chip-label { color: var(--danger-dark); }

.detail-chip-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  font-variant-numeric: tabular-nums;
}

.detail-intervenants {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-intervenant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: white;
  border: 1px solid var(--gray-200);
  font-size: 0.8rem;
}

.detail-intervenant-me {
  border-color: var(--primary-light);
  background: var(--primary-50);
}

.detail-intervenant-name {
  font-weight: 600;
  color: var(--gray-700);
}

.detail-intervenant-me .detail-intervenant-name {
  color: var(--primary);
}

.detail-intervenant-hours {
  color: var(--gray-500);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.detail-adjust-form {
  cursor: default;
}

.detail-adjust-fields {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-adjust-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-adjust-field label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

.detail-adjust-desc {
  flex: 1;
  min-width: 150px;
}

.detail-adjust-desc input {
  width: 100%;
  padding: 5px 8px;
  font-size: 0.85rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-xs);
  font-family: var(--font);
}

.detail-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
  }

  .navbar-center,
  .navbar-right {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar.mobile-open {
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 12px;
  }

  .navbar.mobile-open .navbar-center {
    display: flex;
    width: 100%;
    order: 3;
    padding-top: 8px;
  }

  .navbar.mobile-open .navbar-nav {
    flex-direction: column;
    width: 100%;
  }

  .navbar.mobile-open .nav-link {
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .navbar.mobile-open .navbar-right {
    display: flex;
    width: 100%;
    order: 4;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--gray-200);
    margin-top: 8px;
  }

  .container {
    padding: 20px 16px 40px;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  .page-header-row {
    flex-direction: column;
  }

  .search-bar {
    min-width: 100%;
  }

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

  .module-header {
    flex-direction: column;
    gap: 10px;
  }

  .module-code {
    align-self: flex-start;
  }

  .coef-grid {
    justify-content: center;
  }

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

  .vol-hours-grid,
  .hour-request-grid {
    grid-template-columns: 1fr;
  }

  .conformity-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  td, th {
    padding: 10px 12px;
  }

  .volume-career-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .volume-total-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .settings-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-item-fields {
    width: 100%;
    justify-content: flex-start;
  }

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

  .detail-adjust-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-adjust-fields .btn {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .stat-value {
    font-size: 1.5rem;
    margin-bottom: 0;
    order: 2;
  }

  .stat-label {
    order: 1;
  }

  .login-card {
    padding: 28px 24px;
  }

  .coef-chip {
    min-width: 90px;
    padding: 10px 16px;
  }

  .coef-value {
    font-size: 1.25rem;
  }
}

/* ===== Déclaration PTUT ===== */
.ptut-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}

.ptut-form-card {
  position: sticky;
  top: 24px;
}

.ptut-form .form-group {
  margin-bottom: 16px;
}

.ptut-form select,
.ptut-form input[type="text"] {
  width: 100%;
}

/* Champ « Nombre de séances » : type=number non couvert par le style global,
   on lui redonne l'apparence des autres inputs + un pas chiffré lisible. */
.ptut-form input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font);
  color: var(--primary);
  background: white;
  text-align: center;
  transition: all 150ms ease;
  /* Stepper toujours visible (Firefox affiche les flèches par défaut). */
  -moz-appearance: number-input;
}

.ptut-form input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(60, 60, 120, 0.12);
}

/* Aide live : capacité / déclaré / restant du module sélectionné. */
.ptut-module-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.ptut-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-sm);
  text-align: center;
}

.ptut-stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.ptut-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gray-500);
}

.ptut-stat-remaining {
  background: var(--accent-100);
  border-color: var(--accent);
}

.ptut-stat-remaining .ptut-stat-value {
  color: var(--accent-dark);
}

/* Dépassement de la capacité : on alerte sur la valeur « restantes » négative. */
.ptut-module-stats.ptut-over .ptut-stat-remaining {
  background: #fee2e2;
  border-color: var(--danger);
}

.ptut-module-stats.ptut-over .ptut-stat-remaining .ptut-stat-value {
  color: #b91c1c;
}

.ptut-form .btn-primary {
  width: 100%;
  justify-content: center;
}

.ptut-form .btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ptut-full-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #fee2e2;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 600;
}

.ptut-deadline-note {
  margin: 0 0 16px;
  padding: 8px 12px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 0.82rem;
}

.ptut-deadline-closed {
  padding: 16px;
  background: #fef3c7;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: #92400e;
}

.ptut-deadline-closed strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.ptut-deadline-closed p {
  margin: 0;
  font-size: 0.86rem;
}

.ptut-results {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ptut-grandtotal {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(60, 60, 120, 0.25);
}

.ptut-grandtotal-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.ptut-grandtotal-label {
  font-size: 0.95rem;
  opacity: 0.95;
}

.ptut-bucket-total {
  margin-left: auto;
  padding: 4px 12px;
  background: var(--accent-100);
  color: var(--accent-dark);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.ptut-module-name {
  display: block;
  color: var(--text-muted, #6b7280);
  font-size: 0.85rem;
}

.ptut-declaredby {
  display: block;
  color: var(--gray-500);
  font-size: 0.78rem;
  font-style: italic;
}

.ptut-badge-bonus {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 8px;
  background: var(--accent-100);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Section « Ce qui me concerne » */
.ptut-mine {
  border: 1.5px solid var(--primary-100);
  box-shadow: 0 2px 10px rgba(60, 60, 120, 0.08);
}

.ptut-mine .card-header {
  background: var(--primary-50);
}

.ptut-mine-hint {
  margin: 0;
  padding: 10px 16px 0;
  color: var(--gray-500);
  font-size: 0.82rem;
}

.ptut-mine-total-row td {
  border-top: 2px solid var(--primary-100);
  background: var(--primary-50);
  font-weight: 700;
  color: var(--primary);
}

.ptut-total-note {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--gray-500);
}

.inline-form {
  display: inline;
  margin: 0;
}

.btn-icon-danger {
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.btn-icon-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

@media (max-width: 860px) {
  .ptut-layout {
    grid-template-columns: 1fr;
  }
  .ptut-form-card {
    position: static;
  }
}

/* ===== Progression des séances (drag & drop) ===== */
.prog-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; font-weight: 600; color: var(--gray-800);
  margin-bottom: 14px;
}
.prog-toggle input { width: 16px; height: 16px; cursor: pointer; }
.prog-editor[hidden] { display: none; }
.prog-hint { margin: 0 0 12px; }
.prog-eval-hintchip {
  display: inline-block; padding: 0 6px; border-radius: 4px;
  background: var(--accent-100); color: var(--accent-dark);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
}

.prog-track {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px; border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-sm); background: var(--gray-50, #f9fafb);
  min-height: 60px;
}
.prog-track-readonly { border-style: solid; }

.prog-block {
  position: relative; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; width: 64px; height: 60px; padding: 6px;
  border-radius: 8px; border: 1px solid transparent;
  font-weight: 700; cursor: grab; user-select: none;
}
.prog-track-readonly .prog-block { cursor: default; }
.prog-block:active { cursor: grabbing; }

/* Pendant un glisser : la piste se met en évidence et le bloc déplacé devient
   un emplacement « fantôme » en pointillés, marquant clairement où il atterrira. */
.prog-track.is-dragover {
  border-color: var(--primary);
  border-style: solid;
  background: var(--primary-50);
}
.prog-block.is-dragging {
  background: #fff !important;
  border: 2px dashed var(--primary) !important;
  box-shadow: none !important;
}
.prog-block.is-dragging > * { visibility: hidden; }

.prog-block-type { font-size: 0.95rem; letter-spacing: 0.02em; }

.prog-cm { background: var(--primary-100); color: var(--primary-dark); border-color: var(--primary); }
.prog-td { background: #d1fae5; color: #065f46; border-color: #10b981; }
.prog-tp { background: #ffe9c7; color: #92400e; border-color: var(--accent); }

.prog-block.is-eval { box-shadow: 0 0 0 2px var(--danger); }

.prog-block-eval {
  border: none; cursor: pointer; padding: 1px 7px; border-radius: 999px;
  background: rgba(0,0,0,0.08); color: inherit;
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
  opacity: 0.6; transition: opacity 0.15s, background 0.15s;
}
.prog-block-eval:hover { opacity: 1; }
.prog-block.is-eval .prog-block-eval { background: var(--danger); color: #fff; opacity: 1; }

.prog-block-evaltag {
  padding: 1px 6px; border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
}

.prog-actions { display: flex; gap: 10px; margin-top: 14px; }

/* Étoile « je suis responsable » dans les listes de modules */
.lead-star {
  color: var(--accent);
  font-size: 0.85rem;
  margin-left: 4px;
  vertical-align: middle;
}

/* Cellule code : code à gauche, étoile « responsable » alignée à droite */
.code-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.code-cell .lead-star { margin-left: 0; }
