/* ============================
   Students Page
   ============================ */

.stu {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ============================
   Header
   ============================ */

.stu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.stu__title {
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 28px;
  line-height: 30px;
  color: #7b3a10;
  margin: 0;
}

.stu__subtitle {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: #999999;
  margin: 0;
}

.stu__cta {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  background: linear-gradient(166deg, #e07b20 0%, #d4922a 100%);
  box-shadow: 0 4px 12px rgba(200, 106, 0, 0.2);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.stu__cta:hover { opacity: 0.92; }
.stu__cta svg { flex-shrink: 0; }

/* ============================
   Toolbar
   ============================ */

.stu__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stu__search {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.stu__search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  pointer-events: none;
}

.stu__search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  border: 1px solid #f0e6d8;
  border-radius: 12px;
  background: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: #7b3a10;
  outline: none;
  transition: border-color 0.15s ease;
}

.stu__search-input::placeholder { color: #c5b8a8; }
.stu__search-input:focus { border-color: #d4922a; }

.stu__toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stu__view-toggle {
  display: flex;
  border: 1px solid #f0e6d8;
  border-radius: 10px;
  overflow: hidden;
}

.stu__view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  background: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #a78d7c;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.stu__view-btn + .stu__view-btn {
  border-left: 1px solid #f0e6d8;
}

.stu__view-btn--active {
  background: #FFFCF8;
  color: #E07B20;
}

.stu__print-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #f0e6d8;
  border-radius: 10px;
  background: transparent;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #A78D7C;
  cursor: pointer;
  transition: background 0.15s ease;
}

.stu__print-btn:hover { background: #faf6f1; }

/* ============================
   Pills
   ============================ */

.stu__pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stu__pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid #f0e6d8;
  border-radius: 20px;
  background: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #7b3a10;
}

/* ============================
   Table
   ============================ */

.stu__table-wrap {
  background: #fff;
  border: 1px solid #f0e6d8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(123, 58, 16, 0.04);
}

.stu__table {
  width: 100%;
  border-collapse: collapse;
}

.stu__th {
  padding: 14px 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #a78d7c;
  text-align: left;
  border-bottom: 1px solid #f0e6d8;
  background: #fdfaf7;
}

.stu__th--num { width: 50px; text-align: center; }
.stu__th--actions { text-align: right; width: 100px; }

.stu__row {
  transition: background 0.12s ease;
}

.stu__row:hover {
  background: #fdfaf7;
}

.stu__row:not(:last-child) .stu__cell {
  border-bottom: 1px solid #f7f3ef;
}

.stu__cell {
  padding: 12px 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: #7b3a10;
  vertical-align: middle;
}

.stu__cell--num {
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #a78d7c;
}

.stu__cell--name {
  font-weight: 600;
  white-space: nowrap;
}

.stu__cell--name .stu__avatar {
  margin-right: 10px;
  vertical-align: middle;
}

.stu__cell--code .stu__code-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stu__cell--actions {
  text-align: right;
}

/* --- Avatar --- */
.stu__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}

/* --- Code --- */
.stu__code {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #e07b20;
  background: rgba(224, 123, 32, 0.06);
  padding: 3px 10px;
  border-radius: 6px;
}

.stu__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.stu__copy:hover { background: #f7f3ef; }

/* --- Level Badge --- */
.stu__badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 6px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 12px;
}

.stu__badge--champion {
  background: rgba(224, 123, 32, 0.1);
  color: #e07b20;
}

.stu__badge--lutteur {
  background: rgba(120, 83, 34, 0.1);
  color: #785322;
}

.stu__badge--apprenti {
  background: rgba(140, 163, 84, 0.1);
  color: #8ca354;
}

.stu__badge--debutant {
  background: rgba(153, 153, 153, 0.1);
  color: #999;
}

/* --- Status --- */
.stu__status {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 13px;
}

.stu__status--actif { color: #28a745; }
.stu__status--inactif { color: #999; }

/* --- Actions --- */
.stu__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.stu__action:hover {
  background: #f7f3ef;
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 1100px) {
  .stu__toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .stu__search { max-width: 100%; }
  .stu__toolbar-right { justify-content: flex-end; }
}

@media (max-width: 768px) {
  .stu__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .stu__table-wrap { overflow-x: auto; }
  .stu__table { min-width: 700px; }
  .stu__pills { gap: 8px; }
}
