/* ═══════════════════════════════════════════════════════════
   ASSEKLA — Espace Apprenant (Student Space)
   Thème Clair : #F5F4F0 / Blanc / Encre Sombre #0A0A0A
   ═══════════════════════════════════════════════════════════ */

:root {
  --st-bg:        #F5F4F0;
  --st-card:      #FFFFFF;
  --st-text:      #0A0A0A;
  --st-muted:     #666666;
  --st-faint:     #999999;
  --st-border:    rgba(0,0,0,0.08);
  --st-border-md: rgba(0,0,0,0.15);
  --st-hover:     rgba(0,0,0,0.03);
  --st-accent:    #0A0A0A;
  --st-sidebar-w: 260px;
}

body.page-student {
  background: var(--st-bg);
  color: var(--st-text);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
}

/* ── App Shell Layout ──────────────────────────────────── */
.student-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────── */
.student-sidebar {
  width: var(--st-sidebar-w);
  background: #FFFFFF;
  border-right: 0.5px solid var(--st-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
}

.student-sidebar__brand {
  padding: 2rem 1.8rem;
  border-bottom: 0.5px solid var(--st-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--st-text);
}

.student-sidebar__brand svg {
  width: 28px;
  height: 28px;
}

.student-sidebar__brand span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.student-sidebar__nav {
  flex: 1;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.student-nav-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--st-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.student-nav-item:hover {
  background: var(--st-hover);
  color: var(--st-text);
}

.student-nav-item.is-active {
  background: #0A0A0A;
  color: #FFFFFF;
}

.student-nav-item__icon {
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
}

.student-sidebar__profile {
  padding: 1.5rem 1.8rem;
  border-top: 0.5px solid var(--st-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.student-user-info {
  display: flex;
  flex-direction: column;
}

.student-user-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--st-text);
}

.student-user-role {
  font-size: 0.65rem;
  color: var(--st-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Main Content Container ────────────────────────────── */
.student-content {
  flex: 1;
  margin-left: var(--st-sidebar-w);
  padding: 3rem 4rem;
  max-width: 1200px;
}

/* ── Common Typography & Headers ───────────────────────── */
.student-page-header {
  margin-bottom: 3rem;
}

.student-page-eyebrow {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--st-faint);
  display: block;
  margin-bottom: 0.5rem;
}

.student-page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--st-text);
  margin: 0;
}

.student-page-desc {
  font-size: 0.9rem;
  color: var(--st-muted);
  margin-top: 0.8rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD : STATS & PROGRESSION
   ═══════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}

.dashboard-card {
  background: #FFFFFF;
  border: 0.5px solid var(--st-border);
  padding: 2.2rem;
  border-radius: 2px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--st-text);
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Progress bar */
.progress-container {
  margin: 1.5rem 0 2rem 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--st-muted);
  margin-bottom: 0.6rem;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--st-bg);
  border-radius: 3px;
  overflow: hidden;
}

/* ── Notification preferences ─────────────────────────── */
.student-panel {
  background: #FFFFFF;
  border: 0.5px solid var(--st-border);
  padding: 2.4rem;
  border-radius: 2px;
}

.student-section-header {
  margin-bottom: 2rem;
}

.student-section-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 300;
  margin: 0 0 0.8rem;
}

.student-section-header p {
  color: var(--st-muted);
  line-height: 1.6;
  margin: 0;
}

.student-kicker {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--st-faint);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.student-alert {
  border: 0.5px solid var(--st-border-md);
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
}

.notification-preferences__form {
  display: grid;
  gap: 1rem;
}

.notification-channel-card {
  align-items: flex-start;
  border: 0.5px solid var(--st-border);
  cursor: pointer;
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  transition: border-color 0.2s, background 0.2s;
}

.notification-channel-card:hover {
  background: var(--st-hover);
  border-color: var(--st-border-md);
}

.notification-channel-card input {
  margin-top: 0.25rem;
}

.notification-channel-card__body {
  display: grid;
  gap: 0.45rem;
}

.notification-channel-card__body strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}

.notification-channel-card__body span,
.notification-channel-card__body small,
.notification-channel-card__body em {
  color: var(--st-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.notification-channel-card__code {
  border-left: 2px solid var(--st-text);
  margin-top: 0.35rem;
  padding-left: 0.8rem;
}

.notification-channel-card code {
  display: inline-block;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
  color: var(--st-text);
  font-size: 0.78rem;
}

.student-btn {
  justify-self: start;
  background: var(--st-text);
  border: 1px solid var(--st-text);
  color: #FFFFFF;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-top: 0.5rem;
  padding: 0.9rem 1.2rem;
  text-transform: uppercase;
}

.student-btn:hover {
  background: transparent;
  color: var(--st-text);
}

.progress-bar-fill {
  height: 100%;
  background: #0A0A0A;
  transition: width 0.8s var(--ease-out);
}

/* Course list in dashboard */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.course-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  background: var(--st-bg);
  border-radius: 2px;
  text-decoration: none;
  color: var(--st-text);
  transition: all 0.2s;
  border: 0.5px solid transparent;
}

.course-item:hover {
  background: #FFFFFF;
  border-color: var(--st-border);
  transform: translateX(4px);
}

.course-item__info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.course-item__num {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--st-faint);
  width: 24px;
}

.course-item__title {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--st-text);
}

.course-item__status {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-valid {
  color: #189B81;
}
.status-pending {
  color: var(--st-faint);
}

/* Salon widget in dashboard */
.salon-widget-messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.widget-msg {
  padding-bottom: 0.8rem;
  border-bottom: 0.5px solid var(--st-border);
}

.widget-msg__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--st-faint);
  margin-bottom: 0.3rem;
}

.widget-msg__author {
  font-weight: 500;
  color: var(--st-text);
}

.widget-msg__text {
  font-size: 0.8rem;
  color: var(--st-muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   LECTEUR DE COURS
   ═══════════════════════════════════════════════════════════ */
.course-reader-layout {
  display: grid;
  grid-template-columns: 3fr 1.2fr;
  gap: 3rem;
}

.course-main-content {
  background: #FFFFFF;
  border: 0.5px solid var(--st-border);
  padding: 3rem;
  border-radius: 2px;
}

.course-header {
  border-bottom: 0.5px solid var(--st-border);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.course-badge {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--st-faint);
  display: block;
  margin-bottom: 0.5rem;
}

.course-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1.2;
  color: var(--st-text);
  margin: 0;
}

.course-modules-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.module-block {
  padding: 2rem;
  background: var(--st-bg);
  border-radius: 2px;
  border: 0.5px solid var(--st-border);
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.module-type-badge {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  background: #0A0A0A;
  color: #FFFFFF;
  border-radius: 2px;
}

.module-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--st-text);
  margin: 0;
}

.module-body {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--st-muted);
}

.course-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quizz-cta-card {
  background: #FFFFFF;
  border: 0.5px solid var(--st-border);
  padding: 2rem;
  text-align: center;
  border-radius: 2px;
}

.quizz-cta-icon {
  font-size: 2rem;
  color: #0A0A0A;
  margin-bottom: 1rem;
}

.quizz-cta-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--st-text);
  margin: 0 0 0.5rem 0;
}

.quizz-cta-desc {
  font-size: 0.75rem;
  color: var(--st-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════
   QUIZZ & EXAMENS INTERACTIFS
   ═══════════════════════════════════════════════════════════ */
.quizz-card {
  background: #FFFFFF;
  border: 0.5px solid var(--st-border);
  padding: 3.5rem;
  border-radius: 2px;
  max-width: 780px;
  margin: 0 auto;
}

.quizz-header {
  border-bottom: 0.5px solid var(--st-border);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.quizz-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--st-text);
  margin: 0.5rem 0;
}

.quizz-seuil-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--st-faint);
  margin-top: 0.5rem;
}

.quizz-form {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.question-block {
  padding: 1.8rem;
  background: var(--st-bg);
  border-radius: 2px;
  border: 0.5px solid var(--st-border);
}

.question-enonce {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--st-text);
  margin-bottom: 1.2rem;
}

.reponses-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.reponse-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  background: #FFFFFF;
  border: 0.5px solid var(--st-border);
  border-radius: 2px;
  font-size: 0.85rem;
  color: var(--st-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.reponse-label:hover {
  border-color: var(--st-border-md);
  color: var(--st-text);
}

.reponse-label input[type="radio"] {
  accent-color: #0A0A0A;
}

.quizz-result-modal {
  display: none;
  text-align: center;
  padding: 2.5rem 0;
}

.score-display {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 300;
  color: var(--st-text);
  line-height: 1;
  margin: 1rem 0;
}

/* ═══════════════════════════════════════════════════════════
   SALON DE CONVERSATION (COMMUNITY CHAT)
   ═══════════════════════════════════════════════════════════ */
.salon-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: #FFFFFF;
  border: 0.5px solid var(--st-border);
  height: 75vh;
  border-radius: 2px;
  overflow: hidden;
}

.salon-channels {
  border-right: 0.5px solid var(--st-border);
  background: var(--st-bg);
  display: flex;
  flex-direction: column;
}

.salon-channels__header {
  padding: 1.5rem;
  border-bottom: 0.5px solid var(--st-border);
}

.salon-channels__title {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--st-faint);
  margin: 0;
}

.salon-channels__list {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow-y: auto;
}

.channel-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 2px;
  text-decoration: none;
  color: var(--st-muted);
  font-size: 0.8rem;
  font-weight: 400;
  transition: all 0.2s;
  text-align: left;
}

.channel-btn:hover {
  background: rgba(0,0,0,0.04);
  color: var(--st-text);
}

.channel-btn.is-active {
  background: #FFFFFF;
  color: #0A0A0A;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.salon-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.salon-chat__header {
  padding: 1.2rem 2rem;
  border-bottom: 0.5px solid var(--st-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.salon-active-channel-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--st-text);
  margin: 0;
}

.salon-chat__messages {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 80%;
}

.chat-msg.is-me {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.65rem;
  color: var(--st-faint);
}

.chat-msg__author {
  font-weight: 500;
  color: var(--st-text);
}

.chat-msg__role-tag {
  font-size: 0.55rem;
  padding: 0.1rem 0.4rem;
  background: #0A0A0A;
  color: #FFFFFF;
  border-radius: 2px;
  text-transform: uppercase;
}

.chat-msg__bubble {
  padding: 0.9rem 1.2rem;
  background: var(--st-bg);
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--st-text);
}

.chat-msg.is-me .chat-msg__bubble {
  background: #0A0A0A;
  color: #FFFFFF;
}

.salon-chat__input-bar {
  padding: 1.2rem 2rem;
  border-top: 0.5px solid var(--st-border);
  display: flex;
  gap: 1rem;
}

.salon-chat__input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border: 0.5px solid var(--st-border);
  border-radius: 2px;
  background: var(--st-bg);
  color: var(--st-text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
}

.salon-chat__input:focus {
  border-color: #0A0A0A;
  background: #FFFFFF;
}

.btn-send {
  padding: 0.8rem 1.8rem;
  background: #0A0A0A;
  color: #FFFFFF;
  border: none;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .student-sidebar { width: 70px; }
  .student-sidebar__brand span, .student-nav-item span:last-child, .student-user-info { display: none; }
  .student-content { margin-left: 70px; padding: 2rem 1.5rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .course-reader-layout { grid-template-columns: 1fr; }
  .salon-container { grid-template-columns: 1fr; }
  .salon-channels { display: none; }
}
