:root {
  color-scheme: light;
  font-family: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  font-size: 16px;
  background-color: #f4f6fb;
  color: #202536;
}

/* Encadrant (teacher) interface */
.teacher-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.teacher-sae-column {
  flex: 0 0 320px;
}
.teacher-sae-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #d2d6dc;
  border-radius: 8px;
  background: #fff;
}
.teacher-sae-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #d2d6dc;
  cursor: pointer;
}
.teacher-sae-item:last-child {
  border-bottom: none;
}
.teacher-sae-item.active {
  background: #eef2ff;
  border-left: 4px solid #4c51bf;
}
.teacher-sae-title {
  font-weight: 600;
}
.teacher-sae-meta {
  font-size: 0.85rem;
  color: #4b5563;
  margin-top: 0.25rem;
}
.teacher-content {
  flex: 1;
  min-width: 0;
}
.teacher-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.teacher-requests-container {
  border: 1px dashed #cbd5f5;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: #f8f9ff;
}
.teacher-requests-container .helper-text {
  margin: 0;
}
.teacher-requests-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.teacher-request-item {
  border: 1px solid #dbe2ff;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  display: grid;
  gap: 0.25rem;
}
.teacher-request-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.teacher-request-status {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #e0e7ff;
  color: #312e81;
}
.teacher-request-status.pending {
  background: #fef3c7;
  color: #92400e;
}
.teacher-request-status.approved {
  background: #dcfce7;
  color: #166534;
}
.teacher-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}
.teacher-dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1.5rem;
}
.teacher-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.teacher-card-value {
  font-size: 2rem;
  font-weight: 700;
}
.teacher-metric-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.teacher-metric-list li {
  padding: 0.25rem 0;
}
.teacher-table {
  width: 100%;
  border-collapse: collapse;
}
.teacher-table th,
.teacher-table td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.teacher-table th {
  background: #f1f5f9;
  font-weight: 600;
}
.teacher-participant-row {
  cursor: pointer;
}
.teacher-note-positive {
  color: #047857;
  font-weight: 600;
}
.teacher-note-negative {
  color: #b91c1c;
  font-weight: 600;
}
.teacher-note-pending {
  color: #111827;
  opacity: 0.7;
  font-style: italic;
}
.teacher-badge {
  display: inline-block;
  min-width: 2rem;
  text-align: center;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #e5e7eb;
}
.teacher-badge-alert {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 600;
}
.teacher-cell-empty {
  color: #9ca3af;
  font-style: italic;
}
.teacher-feedback-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.teacher-feedback-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.teacher-feedback-list li:last-child {
  border-bottom: none;
}
.teacher-rendu {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: #fff;
}
.teacher-rendu-pending {
  background: #fff7ed;
  border-color: #f97316;
}
.teacher-rendu-evalue {
  background: #f0fdf4;
  border-color: #22c55e;
}
.teacher-rendu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.teacher-rendu-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.teacher-rendu-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem;
  background: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.teacher-rendu-card header {
  margin-bottom: 0.75rem;
}
.teacher-rendu-card header h3 {
  margin: 0;
}
.teacher-rendu-card header p {
  margin: 0.25rem 0 0;
}
.teacher-rendu-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.teacher-rendu-meta strong {
  display: block;
  margin-bottom: 0.25rem;
}
.teacher-rendu-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.teacher-rendu-comment {
  margin-top: 0.75rem;
  color: #374151;
  background: #f9fafb;
  padding: 0.75rem;
  border-radius: 8px;
  font-style: italic;
}
.teacher-observables-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.teacher-observables-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid #eef2f7;
}
.teacher-observables-list li:last-child {
  border-bottom: none;
}
.teacher-observables-list .helper-text {
  display: block;
  margin-top: 0.25rem;
}
.teacher-eval-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.teacher-eval-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.teacher-eval-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: right;
  font-size: 0.85rem;
  color: #4b5563;
}
.teacher-eval-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem;
  background: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.teacher-eval-card header {
  margin-bottom: 0.75rem;
}
.teacher-eval-card header h3 {
  margin: 0;
}
.teacher-eval-card textarea {
  width: 100%;
  min-height: 6rem;
  resize: vertical;
}
.teacher-eval-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}
.teacher-observable-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.teacher-observable-chip {
  border: 1px dashed #d1d5db;
  background: #f9fafb;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  min-width: 200px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.2s ease;
  text-align: left;
}
.teacher-observable-chip:hover {
  border-color: #4f46e5;
  background: #eef2ff;
  cursor: pointer;
}
.teacher-observable-chip.is-validated {
  font-style: italic;
}
.teacher-observable-chip.is-outside-scope {
  background: #f3f4f6;
  border-style: solid;
  opacity: 0.85;
}
.teacher-observable-chip.is-selected {
  border-color: #22c55e;
  background: #f0fdf4;
}
.teacher-observable-chip-title {
  font-weight: 600;
}
.teacher-observable-chip-meta {
  font-size: 0.75rem;
  color: #4b5563;
}
.teacher-observable-chip-status {
  font-size: 0.75rem;
  color: #15803d;
  font-weight: 600;
}
.teacher-eval-critere + .teacher-eval-critere {
  margin-top: 1rem;
}
.teacher-observable-entry {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.75rem;
  background: #f9fafb;
  margin-bottom: 0.75rem;
}
.teacher-observable-entry header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.teacher-observable-entry-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.teacher-observable-entry-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}
.teacher-observable-entry-form input,
.teacher-observable-entry-form textarea {
  width: 100%;
}
.teacher-eval-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}
.teacher-postures {
  list-style: none;
  padding: 0;
  margin: 0;
}
.teacher-postures li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.teacher-postures li:last-child {
  border-bottom: none;
}
.teacher-dashboard-mini {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.teacher-dashboard-mini > div {
  flex: 1 0 160px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
  background: #f9fafb;
  text-align: center;
}
.teacher-dashboard-mini strong {
  display: block;
  margin-bottom: 0.25rem;
}
.teacher-participation-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.table-wrapper {
  overflow-x: auto;
}

body {
  margin: 0;
}

.app-header {
  background: white;
  padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
  border-bottom: 1px solid #d6dcea;
  box-shadow: 0 2px 8px rgba(25, 38, 84, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.app-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: 0.02em;
}

.app-header .subtitle {
  margin: 0.35rem 0 0;
  color: #606b85;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #2b3556;
}

.header-user span {
  font-weight: 600;
}

main {
  padding: clamp(1rem, 4vw, 3rem);
}

.auth-view {
  display: flex;
  justify-content: center;
  padding: clamp(2rem, 4vw, 4rem) 0;
}

.auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(27, 43, 87, 0.12);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.25rem;
  max-width: 420px;
  width: min(100%, 420px);
}

.auth-card h2 {
  margin: 0;
  color: #1a2242;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-field label {
  font-weight: 600;
  color: #2b3458;
}

.auth-field input {
  font: inherit;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid #c5ccdc;
  background: #f7f8fc;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: #2c5be4;
  box-shadow: 0 0 0 3px rgba(44, 91, 228, 0.2);
}

.auth-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auth-error,
.auth-message {
  margin: 0;
  font-size: 0.9rem;
}

.auth-error {
  color: #d93025;
}

.auth-message {
  color: #2b3458;
}

.auth-message.error {
  color: #d93025;
}

.app-view.hidden,
.auth-view.hidden {
  display: none !important;
}

.actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.list-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.list-filters label {
  font-weight: 600;
}

#list-competence-filter {
  min-height: 140px;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid #c5ccdc;
  background: #fbfcff;
  font: inherit;
}

#list-competence-filter:focus {
  outline: none;
  border-color: #2c5be4;
  box-shadow: 0 0 0 3px rgba(44, 91, 228, 0.2);
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.5rem 1.2rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

button.primary {
  background: #2c5be4;
  color: white;
  box-shadow: 0 8px 18px rgba(44, 91, 228, 0.25);
}

button.secondary {
  background: white;
  color: #2c5be4;
  border-color: rgba(44, 91, 228, 0.3);
}

button.danger {
  background: #f93c53;
  color: white;
}

button.icon {
  padding: 0.35rem 0.65rem;
  min-width: 2.4rem;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(27, 43, 87, 0.18);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 64, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 3rem);
  z-index: 1000;
}

.modal {
  width: min(640px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(12, 23, 64, 0.25);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1rem, 4vw, 2rem);
  max-height: 90vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.modal-header h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: #657092;
}

.modal-body {
  display: grid;
  gap: 1rem;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.modal-field label {
  font-weight: 600;
}

.modal-field input,
.modal-field textarea,
.modal-field select {
  font: inherit;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #c5ccdc;
  background: #f7f8fc;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.modal-field select[multiple] {
  min-height: 140px;
}

.modal-field textarea {
  min-height: 120px;
  resize: vertical;
}

.modal-field input:focus,
.modal-field textarea:focus,
.modal-field select:focus {
  outline: none;
  border-color: #2c5be4;
  box-shadow: 0 0 0 3px rgba(44, 91, 228, 0.2);
}

.modal-observable-picker {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #cbd4ed;
  background: #f9faff;
}

.modal-observable-picker.is-disabled {
  border-style: dashed;
  opacity: 0.7;
}

.modal-observable-picker-summary {
  margin: 0;
  font-weight: 600;
  color: #1c2750;
}

.modal-observable-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.modal-observable-chip {
  background: #e0e6ff;
  color: #1f2d4f;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.modal-observable-chip:hover,
.modal-observable-chip:focus-visible {
  filter: brightness(0.95);
  outline: none;
}

.modal-observable-picker.is-disabled .modal-observable-chip,
.modal-observable-chip.is-static,
.modal-observable-picker.is-disabled .modal-observable-chip:hover {
  cursor: default;
  filter: none;
}

.modal-observable-picker-groups {
  display: grid;
  gap: 0.55rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.modal-observable-picker-group summary {
  font-weight: 600;
  cursor: pointer;
  color: #1f2d4f;
}

.modal-observable-picker-group[open] summary {
  color: #2c5be4;
}

.modal-observable-picker.is-disabled summary {
  cursor: default;
  color: #6f7592;
}

.modal-observable-picker-group ul {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.modal-observable-picker-group li {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

.modal-observable-picker-group input[type='checkbox'] {
  margin-top: 0.25rem;
}

.modal-observable-picker-group label {
  cursor: pointer;
  color: #1c2750;
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
}

.modal-observable-picker-actions {
  display: flex;
  justify-content: flex-end;
}

.modal-observable-picker.is-disabled .modal-observable-picker-actions,
.modal-observable-picker.is-empty .modal-observable-picker-actions {
  display: none;
}

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

.modal-error {
  color: #d93025;
  margin: 0;
  font-weight: 600;
}

.modal-subsection {
  border-top: 1px solid #dde2f5;
  padding-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.modal-subsection h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.criteria-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.criteria-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 140px) minmax(90px, 110px) minmax(160px, 1fr) auto;
  align-items: end;
}

.criteria-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.criteria-field input,
.criteria-field textarea {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #c5ccdc;
  background: #fbfcff;
}

.criteria-field textarea {
  resize: vertical;
  min-height: 60px;
}

.criteria-row button.small {
  justify-self: center;
}

@media (max-width: 760px) {
  .criteria-row {
    grid-template-columns: 1fr;
  }
}

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

.posture-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.posture-card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 12px 28px rgba(27, 43, 87, 0.12);
  display: grid;
  gap: 0.75rem;
}

.posture-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.posture-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.posture-meta {
  color: #4c5778;
  font-size: 0.9rem;
}

.posture-criteres {
  border-top: 1px solid #e6e9f5;
  padding-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 0;
}

.posture-criteres li {
  list-style: none;
  display: grid;
  gap: 0.25rem;
  background: #f7f8ff;
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
}

.posture-criteres li strong {
  font-weight: 600;
  color: #2c3572;
}

.posture-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.critere-keyword {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.1rem 0.6rem;
  background: #eef1ff;
  color: #2c5be4;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}

.sae-critere-keyword {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.85rem;
  color: #38416d;
  background: #eef1ff;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.competence-grid {
  display: grid;
  gap: 1.75rem;
}

.view-toggle {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 1.25rem;
}

.tab-button {
  background: transparent;
  border: 1px solid rgba(44, 91, 228, 0.2);
  color: #2c5be4;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tab-button.active {
  background: #2c5be4;
  color: #fff;
  box-shadow: 0 10px 24px rgba(44, 91, 228, 0.25);
}

.view-panel.hidden,
.hidden {
  display: none !important;
}

.loading {
  text-align: center;
  color: #657092;
}

.competence-card {
  background: white;
  border-radius: 16px;
  border-left: 6px solid #2c5be4;
  box-shadow: 0 18px 40px rgba(27, 43, 87, 0.12);
  padding: clamp(1.2rem, 3vw, 2rem);
  display: grid;
  gap: 1.25rem;
}

.competence-header {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(120px, 140px) 1fr auto;
  align-items: start;
}

@media (max-width: 900px) {
  .competence-header {
    grid-template-columns: 1fr;
  }
  .competence-actions {
    justify-self: flex-start;
  }
}

.code-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(44, 91, 228, 0.12);
  color: #2c5be4;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.year-tag {
  font-size: 0.85rem;
  color: #818cab;
}

.competence-title h2 {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: #1a2242;
}

.competence-description {
  margin-top: 0.35rem;
  color: #4e5979;
}

.competence-actions {
  display: flex;
  gap: 0.5rem;
}

.competence-body {
  display: grid;
  gap: 1.5rem;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #818cab;
  margin-bottom: 0.5rem;
}

.tag-list,
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag-list li {
  background: rgba(44, 91, 228, 0.08);
  color: #1a2342;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.label {
  flex: 1 1 auto;
}

.item-actions {
  display: inline-flex;
  gap: 0.35rem;
}

.item-actions button {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sae-livrable-item .item-actions button {
  opacity: 0;
}

.sae-livrable-item:hover .item-actions button,
.sae-livrable-item:focus-within .item-actions button {
  opacity: 1;
}

.sae-performance-item .item-actions button {
  opacity: 1;
}

.sae-observable-item .item-actions button {
  opacity: 1;
}

.tag-list li:hover .item-actions button,
.bullet-list li:hover .item-actions button {
  opacity: 1;
}

.bullet-list {
  flex-direction: column;
  gap: 0.4rem;
}

.bullet-list li {
  background: rgba(244, 246, 251, 0.9);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(129, 140, 171, 0.2);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.sae-livrable-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sae-livrable-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(129, 140, 171, 0.2);
  background: rgba(247, 248, 252, 0.9);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sae-livrable-item:hover,
.sae-livrable-item:focus-within {
  border-color: rgba(44, 91, 228, 0.35);
  background: rgba(44, 91, 228, 0.06);
}

.sae-livrable-summary {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.sae-livrable-summary:focus-visible {
  outline: 2px solid rgba(44, 91, 228, 0.6);
  border-radius: 6px;
  padding: 0 2px;
}

.sae-overview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sae-overview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.overview-chip {
  flex: 1 1 180px;
  min-height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(44, 91, 228, 0.12), rgba(44, 91, 228, 0.05));
  border: 1px solid rgba(44, 91, 228, 0.25);
  color: #233162;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  gap: 0.25rem;
}

.overview-chip strong {
  font-size: 1.5rem;
  font-weight: 700;
}

.overview-chip span {
  font-size: 0.95rem;
  font-weight: 500;
}

.overview-chip:disabled {
  cursor: default;
  opacity: 0.65;
  filter: grayscale(0.1);
}

.sae-overview-criteres {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sae-overview-critere {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(129, 140, 171, 0.25);
  background: rgba(249, 250, 255, 0.9);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sae-overview-critere:hover,
.sae-overview-critere:focus-visible {
  border-color: rgba(44, 91, 228, 0.35);
  background: rgba(44, 91, 228, 0.08);
  outline: none;
}

.critere-title {
  font-weight: 600;
  color: #1f2b4d;
}

.critere-meta {
  font-size: 0.9rem;
  color: #5d6685;
}

.niveaux-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.niveau-card {
  border: 1px solid rgba(129, 140, 171, 0.25);
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(44, 91, 228, 0.06) 0%, rgba(255, 255, 255, 0.9) 35%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.niveau-header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.niveau-badge {
  background: #2c5be4;
  color: white;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.niveau-actions {
  display: flex;
  gap: 0.4rem;
}

.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.helper-text {
  font-size: 0.85rem;
  color: #6f7a99;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.users-header h2 {
  margin: 0;
  color: #1a2242;
}

.users-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.users-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.user-card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 18px 40px rgba(27, 43, 87, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.user-card header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #1a2242;
}

.user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.user-item {
  border: 1px solid rgba(129, 140, 171, 0.25);
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  background: rgba(244, 246, 251, 0.9);
}

.user-item strong {
  display: block;
  color: #1d2544;
}

.user-meta {
  font-size: 0.78rem;
  color: #4e5979;
  margin-top: 0.2rem;
}

.user-actions {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
}

.user-actions button {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
}

.loading-inline {
  color: #4e5979;
  font-size: 0.9rem;
}

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

.sae-header h2 {
  margin: 0;
  color: #1a2242;
}

.sae-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(240px, 280px) 1fr;
  align-items: start;
}

.sae-list-container {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(27, 43, 87, 0.12);
}

.sae-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sae-item {
  border: 1px solid rgba(129, 140, 171, 0.3);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  background: rgba(244, 246, 251, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sae-item.active {
  border-color: #2c5be4;
  box-shadow: 0 12px 24px rgba(44, 91, 228, 0.25);
  background: #fff;
}

.sae-item-title {
  font-weight: 600;
  color: #1a2242;
}

.sae-item-meta {
  font-size: 0.78rem;
  color: #4e5979;
}

.sae-detail {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(27, 43, 87, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.sae-detail-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-start;
}

.sae-detail-header h3 {
  margin: 0;
  color: #1a2242;
}

.sae-detail-meta {
  color: #4d5877;
  font-size: 0.9rem;
}

.sae-detail-actions {
  display: flex;
  gap: 0.4rem;
}

.sae-description {
  margin: 0;
  color: #4d5877;
}

.sae-info-card {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid rgba(32, 44, 74, 0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: rgba(44, 91, 228, 0.06);
  font-size: 0.88rem;
}

.sae-info-card strong {
  display: block;
  color: #1a2242;
  margin-bottom: 0.2rem;
}

.sae-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.section-header h4 {
  margin: 0;
  color: #1a2242;
}

.section-actions {
  display: flex;
  gap: 0.5rem;
}

.sae-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.timeline-item {
  border-left: 3px solid rgba(44, 91, 228, 0.35);
  padding: 0.4rem 0.9rem;
  background: rgba(44, 91, 228, 0.04);
  border-radius: 12px;
}

.timeline-item.marker {
  border-left-color: rgba(27, 41, 83, 0.6);
  background: rgba(27, 41, 83, 0.07);
}

.timeline-marker {
  font-weight: 600;
  color: #1a2242;
}

.timeline-marker.start {
  color: #2c5be4;
}

.timeline-marker.end {
  color: #f57c27;
}

.timeline-item-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.timeline-item-title {
  font-weight: 600;
  color: #1a2242;
}

.timeline-item-meta {
  font-size: 0.78rem;
  color: #4e5979;
}

.timeline-item-body {
  margin: 0.5rem 0;
  color: #2e3551;
  display: grid;
  gap: 0.35rem;
}

.timeline-item-body p {
  margin: 0;
}

.timeline-participants,
.timeline-livrables {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  color: #4e5979;
  display: grid;
  gap: 0.25rem;
}

.timeline-actions {
  display: flex;
  justify-content: flex-end;
}

.sae-criteres {
  display: grid;
  gap: 1rem;
}

.sae-critere-card {
  border: 1px solid rgba(32, 41, 68, 0.15);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(244, 246, 251, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.sae-critere-comment {
  font-size: 0.82rem;
  color: #4e5979;
}

.sae-critere-header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.sae-critere-header h5 {
  margin: 0;
  color: #1a2242;
}

.sae-critere-actions {
  display: flex;
  gap: 0.4rem;
}

.subsection-header {
  font-weight: 600;
  color: #1a2242;
}

.sae-performance-list,
.sae-observable-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sae-performance-item,
.sae-observable-item {
  border: 1px solid rgba(129, 140, 171, 0.3);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  background: white;
  display: grid;
  gap: 0.3rem;
}

.sae-observable-meta {
  font-size: 0.78rem;
  color: #4e5979;
}

.sae-observable-comment,
.sae-performance-desc {
  font-size: 0.8rem;
  color: #343c56;
}

.sae-observable-livrables,
.sae-livrable-observables {
  font-size: 0.78rem;
  color: #4e5979;
  margin-top: 0.2rem;
}

.sae-performance-add,
.sae-observable-add {
  display: flex;
  justify-content: flex-end;
}

.sae-posture-list {
  display: grid;
  gap: 0.8rem;
}

.sae-posture-card {
  border: 1px solid rgba(129, 140, 171, 0.3);
  border-radius: 12px;
  padding: 0.9rem;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sae-posture-header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.sae-posture-header h5 {
  margin: 0;
  color: #1a2242;
}

.sae-posture-criteres {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  color: #4e5979;
  display: grid;
  gap: 0.25rem;
}

@media (max-width: 900px) {
  .sae-layout {
    grid-template-columns: 1fr;
  }
  .sae-list-container {
    position: sticky;
    top: 0;
    z-index: 1;
  }
}

.mindmap-panel {
  background: white;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(27, 43, 87, 0.12);
  padding: clamp(1.2rem, 3vw, 2rem);
  display: grid;
  gap: 1.5rem;
  min-height: 640px;
}

.mindmap-explain h2 {
  margin: 0;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: #1a2242;
}

.mindmap-explain p {
  margin: 0.5rem 0 0;
  color: #4d5877;
  max-width: 70ch;
}

.mindmap-legend {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: #4d5877;
}

.mindmap-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.type-competence {
  background: #2c5be4;
}

.legend-dot.type-sae {
  background: #f57c27;
}

.legend-dot.type-livrable {
  background: #13a37b;
}

.mindmap-canvas {
  position: relative;
  width: 100%;
  min-height: 620px;
}

.mindmap-controls {
  display: grid;
  gap: 1rem;
  background: rgba(44, 91, 228, 0.05);
  border: 1px solid rgba(44, 91, 228, 0.15);
  padding: 1rem;
  border-radius: 14px;
}

.mindmap-domains {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
}

.mindmap-domains legend {
  font-weight: 600;
  color: #1a2242;
  margin-right: 1rem;
}

.mindmap-domains label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #2b3452;
  font-size: 0.92rem;
}

.mindmap-domains input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 4px;
  border: 1px solid rgba(32, 37, 54, 0.25);
}

.mindmap-select-group {
  display: grid;
  gap: 0.5rem;
}

.mindmap-select-group label {
  font-weight: 600;
  color: #1a2242;
}

.mindmap-select-group select {
  width: 100%;
  min-height: 7.5rem;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(44, 91, 228, 0.35);
  background: white;
  font: inherit;
  color: #1f2947;
}

.mindmap-select-group .helper-text {
  margin: 0;
}

button.small {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
}

.mindmap-canvas .loading {
  position: absolute;
  inset: 40% 0 auto 0;
}

.mindmap-svg {
  width: 100%;
  height: 100%;
  font-family: inherit;
}

.mindmap-link {
  fill: none;
  stroke: rgba(32, 37, 54, 0.18);
  stroke-width: 1.3px;
}

.mindmap-node {
  stroke: #fff;
  stroke-width: 1.5px;
  r: 6;
}

.mindmap-node.type-root {
  fill: #1a2242;
}

.mindmap-node.type-competence,
.mindmap-node.type-niveau,
.mindmap-node.type-apprentissage,
.mindmap-node.type-critere,
.mindmap-node.type-situation {
  fill: #2c5be4;
}

.mindmap-node.type-group {
  fill: #9aa6c5;
}

.mindmap-node.type-sae,
.mindmap-node.type-sae_critere,
.mindmap-node.type-performance,
.mindmap-node.type-observable,
.mindmap-node.type-posture,
.mindmap-node.type-posture_critere {
  fill: #f57c27;
}

.mindmap-node.type-livrable,
.mindmap-node.type-livrable_format,
.mindmap-node.type-livrable_prerequis,
.mindmap-node.type-evenement,
.mindmap-node.type-evenement_livrable {
  fill: #13a37b;
}

.mindmap-node.type-encadrant,
.mindmap-node.type-participant_encadrant,
.mindmap-node.type-participant_etudiant {
  fill: #b656e0;
}

.mindmap-node-fo {
  pointer-events: none;
}

.mindmap-node-box {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(40, 48, 68, 0.25);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 25px rgba(20, 32, 63, 0.18);
  gap: 0.2rem;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-align: left;
  box-sizing: border-box;
}

.mindmap-node-box strong {
  font-size: 0.8rem;
  color: #1a2242;
  display: block;
  word-break: break-word;
}

.mindmap-node-box span {
  font-size: 0.68rem;
  color: #4e5979;
  display: block;
  word-break: break-word;
}

.mindmap-node-fo.hidden-node .mindmap-node-box {
  opacity: 0.25;
}

/* Student view */
#student-panel {
  display: block;
}

.student-overview {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 1.75rem;
}

.student-column {
  background: white;
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 18px 36px rgba(27, 43, 87, 0.08);
  display: grid;
  gap: 1rem;
}

.student-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #1b2445;
}

.student-card-list {
  display: grid;
  gap: 1rem;
}

.student-card,
.student-evenement-card {
  background: #f8f9fe;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 24px rgba(30, 45, 94, 0.06);
  display: grid;
  gap: 0.6rem;
}

.student-livrable-card {
  background: #f8f9fe;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(30, 45, 94, 0.06);
  display: grid;
  overflow: hidden;
}

.student-collapse-summary {
  width: 100%;
  border: none;
  background: #eef1f7;
  color: #1f2d4f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

.student-collapse-summary:hover {
  filter: brightness(0.97);
}

.student-collapse-summary:focus-visible {
  filter: brightness(0.95);
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 91, 228, 0.25);
}

.student-collapse-summary-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-collapse-toggle-icon {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.student-livrable-card:not(.collapsed) .student-collapse-summary {
  box-shadow: inset 0 -1px 0 rgba(30, 45, 94, 0.12);
}

.student-livrable-card:not(.collapsed) .student-collapse-toggle-icon {
  transform: rotate(-135deg);
}

.student-livrable-card.status-upcoming .student-collapse-summary {
  background: #eef1f7;
  color: #1f2d4f;
}

.student-livrable-card.status-submitted .student-collapse-summary {
  background: rgba(46, 179, 106, 0.2);
  color: #1a5d3a;
}

.student-livrable-card.status-overdue .student-collapse-summary {
  background: rgba(239, 87, 87, 0.25);
  color: #8b1e1e;
}

.student-evaluation-item:not(.collapsed) .student-collapse-summary {
  box-shadow: inset 0 -1px 0 rgba(30, 45, 94, 0.12);
}

.student-evaluation-item:not(.collapsed) .student-collapse-toggle-icon {
  transform: rotate(-135deg);
}

.student-livrable-details {
  background: #ffffff;
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem 1.25rem;
}

.student-livrable-card.collapsed .student-livrable-details {
  display: none;
}

.student-card-header h3,
.student-livrable-header h4,
.student-evenement-card h4 {
  margin: 0;
  color: #1b2445;
}

.student-card-description {
  margin: 0;
  color: #414b6f;
}

.student-card-actions,
.student-rendu-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.student-participations-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.student-participation-card {
  background: #f8f9fe;
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 10px 22px rgba(30, 45, 94, 0.07);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.student-participation-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(30, 45, 94, 0.1);
}

.student-participation-card.selected {
  border: 1px solid #2c5be4;
  box-shadow: 0 14px 30px rgba(44, 91, 228, 0.18);
}

.student-participation-card h3 {
  margin: 0 0 0.35rem;
  color: #1c2750;
}

.student-note {
  margin: 0;
  font-weight: 600;
  color: #24305f;
}

.student-detail {
  background: white;
  border-radius: 18px;
  padding: 1.5rem 1.8rem;
  box-shadow: 0 20px 36px rgba(25, 38, 84, 0.09);
  display: grid;
  gap: 1.5rem;
}

.student-dashboard-header h3 {
  margin: 0;
  color: #1b2445;
}

.student-section-card {
  background: #f8faff;
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
  border: 1px solid rgba(44, 63, 110, 0.15);
  box-shadow: 0 16px 28px rgba(22, 34, 76, 0.08);
  display: grid;
  gap: 1rem;
}

.student-section-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.student-section-card__title {
  margin: 0;
  color: #1c2750;
}

.student-section-card__subtitle {
  margin: 0;
}

.student-section-card__body {
  display: grid;
  gap: 0.9rem;
}

.student-metrics {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.student-metric {
  display: grid;
  gap: 0.25rem;
  justify-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #edf1ff;
  color: #1d2a5d;
  border: 1px solid rgba(44, 91, 228, 0.18);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.student-metric:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(44, 91, 228, 0.18);
}

.student-metric-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.student-metric-label {
  font-size: 0.9rem;
  color: #334070;
}

.student-evaluation-list,
.student-rendu-list,
.student-feedback-list,
.student-evenement-participants,
.student-evenement-livrables {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.6rem;
}

.student-evaluation-item {
  display: grid;
  background: #f8f9fe;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(24, 36, 80, 0.08);
}

.student-evaluation-label {
  font-weight: 600;
  color: #1c2750;
}

.student-evaluation-level {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #dfe4f8;
  color: #1d2a5d;
}

.student-collapse-summary .student-evaluation-level {
  margin-left: auto;
}

.student-evaluation-level.pending {
  background: #f3f4f8;
  color: #6a738f;
}

.student-evaluation-level[data-level="3"] {
  background: rgba(46, 179, 106, 0.15);
  color: #1b6d3c;
}

.student-evaluation-level[data-level="2"] {
  background: rgba(98, 173, 255, 0.18);
  color: #1f58b5;
}

.student-evaluation-level[data-level="1"] {
  background: rgba(255, 198, 92, 0.3);
  color: #a66300;
}

.student-evaluation-level[data-level="0"] {
  background: rgba(251, 99, 99, 0.25);
  color: #a52222;
}

.student-evaluation-observables {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.45rem;
}

.student-evaluation-item.collapsed .student-evaluation-observables {
  display: none;
}

.student-evaluation-observable {
  display: grid;
  gap: 0.3rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: rgba(244, 247, 255, 0.72);
}

.student-evaluation-observable-label {
  font-weight: 600;
  color: #24325b;
}

.student-evaluation-observable-meta {
  font-size: 0.85rem;
  color: #3f4f7d;
}

.helper-text.subtle {
  color: #717da6;
}

.student-evaluation-summary {
  background: #eef1f7;
  color: #1f2d4f;
}

.student-evaluation-item.collapsed .student-collapse-summary-text {
  max-width: 50%;
}

.student-evaluation-item:not(.collapsed) .student-collapse-summary-text {
  max-width: none;
}

.student-evaluation-details {
  background: #ffffff;
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem 1.1rem 1.1rem;
}

.student-evaluation-item.collapsed .student-evaluation-details {
  display: none;
}

.student-rendu-observables {
  background: #f8f9fe;
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(34, 45, 90, 0.08);
  display: grid;
  gap: 0.65rem;
}

.student-observable-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.student-observable-headline {
  margin: 0;
  color: #1c2750;
}

.student-livrable-header h4 {
  margin-bottom: 0.25rem;
  color: #1c2750;
}

.student-rendu-group {
  background: white;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(34, 45, 90, 0.08);
  display: grid;
  gap: 0.55rem;
}

.student-rendu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f3f6ff;
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
}

.student-rendu-date {
  font-weight: 600;
  color: #24305f;
}

.student-rendu-version {
  font-size: 0.85rem;
  color: #556189;
}

.student-rendu-form,
.student-rendu-edit-form {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: #edf1ff;
  border-radius: 14px;
  margin-top: 0.75rem;
}

.student-rendu-form .form-field,
.student-rendu-edit-form .form-field {
  display: grid;
  gap: 0.35rem;
}

.student-rendu-form label,
.student-rendu-edit-form label {
  font-weight: 600;
  color: #1f2854;
}

.student-rendu-form input,
.student-rendu-form textarea,
.student-rendu-form select,
.student-rendu-edit-form input,
.student-rendu-edit-form textarea,
.student-rendu-edit-form select {
  font: inherit;
  border-radius: 10px;
  border: 1px solid rgba(43, 59, 126, 0.25);
  padding: 0.5rem 0.65rem;
  background: white;
}

.student-rendu-form input:focus,
.student-rendu-form textarea:focus,
.student-rendu-edit-form input:focus,
.student-rendu-edit-form textarea:focus,
.student-rendu-form select:focus,
.student-rendu-edit-form select:focus {
  outline: none;
  border-color: #2c5be4;
  box-shadow: 0 0 0 3px rgba(44, 91, 228, 0.18);
}

.student-rendu-form.hidden,
.student-rendu-edit-form.hidden {
  display: none;
}

.student-rendu-edit-form .form-actions,
.student-rendu-form .form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.student-rendu-info {
  display: grid;
  gap: 0.25rem;
  grid-template-columns: max-content 1fr;
}

.student-feedback-list {
  list-style: none;
  padding-left: 0;
}

.student-feedback-list li {
  background: #f6f7fe;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(35, 48, 92, 0.06);
}

.student-feedback-header {
  margin: 0;
  font-weight: 600;
  color: #1f2854;
}

.student-rendu-detail.hidden {
  display: none;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1f2f58;
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(18, 29, 64, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.success {
  background: #2c5be4;
}

.toast.error {
  background: #f93c53;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .competence-card {
    padding: 1rem;
  }
  .competence-actions,
  .niveau-actions {
    flex-wrap: wrap;
  }
  button {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .mindmap-domains {
    flex-direction: column;
    align-items: flex-start;
  }
  .mindmap-domains legend {
    margin-bottom: 0.5rem;
  }
}
