/* ================================================================
   EduFlow LMS — Styles Pages LMS
   Catalogue · Single Cours · Lecteur Leçon · Quiz · Dashboard
   ================================================================ */

/* ── CATALOGUE ──────────────────────────────────────────────── */
.ef-catalog-hero {
  background: var(--ef-grad-hero);
  padding: 3rem 0; text-align: center;
}
.ef-catalog-hero__title { font-size: clamp(1.75rem,4vw,2.75rem); font-weight: 900; color: #fff; margin-bottom: .75rem; }
.ef-catalog-hero__sub { color: rgba(255,255,255,.8); font-size: 1.125rem; margin-bottom: 2rem; }
.ef-catalog-hero__search {
  display: flex; max-width: 560px; margin: 0 auto;
  background: #fff; border-radius: var(--ef-radius-full);
  box-shadow: var(--ef-shadow-lg); overflow: hidden;
}
.ef-catalog-hero__search input {
  flex: 1; padding: .875rem 1.25rem; border: none; outline: none;
  font-size: 1rem; font-family: var(--ef-font); color: var(--ef-fg);
}
.ef-catalog-hero__search button {
  padding: .875rem 1.5rem; background: var(--ef-grad-primary);
  border: none; color: #fff; font-weight: 700; cursor: pointer;
  font-family: var(--ef-font); font-size: .875rem; transition: var(--ef-transition);
}
.ef-catalog-hero__search button:hover { opacity: .9; }

.ef-catalog-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; padding: 3rem 0; }
@media (max-width: 1024px) { .ef-catalog-layout { grid-template-columns: 1fr; } }

/* Filtres sidebar */
.ef-filters { background: var(--ef-surface); border: 1px solid var(--ef-border); border-radius: var(--ef-radius-lg); padding: 1.5rem; height: fit-content; position: sticky; top: 88px; }
.ef-filters__title { font-size: 1rem; font-weight: 700; color: var(--ef-fg); margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.ef-filters__clear { font-size: .75rem; color: var(--ef-primary); cursor: pointer; font-weight: 600; }
.ef-filter-group { margin-bottom: 1.5rem; border-bottom: 1px solid var(--ef-border); padding-bottom: 1.5rem; }
.ef-filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ef-filter-group__label { font-size: .75rem; font-weight: 700; color: var(--ef-fg-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; }
.ef-filter-option { display: flex; align-items: center; gap: .625rem; padding: .375rem 0; cursor: pointer; }
.ef-filter-option input[type="checkbox"] { accent-color: var(--ef-primary); width: 16px; height: 16px; cursor: pointer; }
.ef-filter-option label { font-size: .875rem; color: var(--ef-fg); cursor: pointer; flex: 1; }
.ef-filter-option__count { font-size: .75rem; color: var(--ef-fg-muted); }
.ef-price-range { display: flex; flex-direction: column; gap: .75rem; }
.ef-price-range input[type="range"] { accent-color: var(--ef-primary); width: 100%; }
.ef-price-range__vals { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ef-fg-muted); }

/* Toolbar catalogue */
.ef-catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.ef-catalog-count { font-size: .875rem; color: var(--ef-fg-muted); }
.ef-catalog-count strong { color: var(--ef-fg); }
.ef-catalog-sort {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; color: var(--ef-fg-muted);
}
.ef-catalog-sort select {
  padding: .375rem .75rem; border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius); font-family: var(--ef-font);
  font-size: .875rem; color: var(--ef-fg); background: var(--ef-surface);
  cursor: pointer;
}
.ef-view-toggle { display: flex; gap: .25rem; }
.ef-view-btn {
  width: 36px; height: 36px; border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius); background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--ef-fg-muted); cursor: pointer; transition: var(--ef-transition);
}
.ef-view-btn.active, .ef-view-btn:hover { background: var(--ef-accent); color: var(--ef-primary); border-color: var(--ef-primary); }
.ef-view-btn svg { width: 16px; height: 16px; }

/* Vue liste */
.ef-course-card--list {
  flex-direction: row; align-items: stretch;
}
.ef-course-card--list .ef-course-card__thumb { width: 240px; aspect-ratio: unset; flex-shrink: 0; }
@media (max-width: 640px) { .ef-course-card--list { flex-direction: column; } .ef-course-card--list .ef-course-card__thumb { width: 100%; aspect-ratio: 16/9; } }

/* ── SINGLE COURS ───────────────────────────────────────────── */
.ef-course-hero {
  background: linear-gradient(135deg, hsl(20,35%,10%), hsl(20,30%,18%));
  padding: 3rem 0; color: #fff;
}
.ef-course-hero__inner { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start; }
@media (max-width: 1024px) { .ef-course-hero__inner { grid-template-columns: 1fr; } }

.ef-course-hero__breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: rgba(255,255,255,.6); margin-bottom: 1.25rem; }
.ef-course-hero__breadcrumb a { color: rgba(255,255,255,.6); text-decoration: none; }
.ef-course-hero__breadcrumb a:hover { color: var(--ef-amber); }
.ef-course-hero__breadcrumb svg { width: 14px; height: 14px; }

.ef-course-hero__title { font-size: clamp(1.75rem,4vw,2.5rem); font-weight: 900; color: #fff; line-height: 1.2; margin-bottom: 1rem; }
.ef-course-hero__excerpt { font-size: 1.125rem; color: rgba(255,255,255,.8); line-height: 1.7; margin-bottom: 1.5rem; }
.ef-course-hero__meta { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.ef-course-hero__meta-item { display: flex; align-items: center; gap: .375rem; font-size: .875rem; color: rgba(255,255,255,.7); }
.ef-course-hero__meta-item svg { width: 16px; height: 16px; }
.ef-course-hero__instructor { display: flex; align-items: center; gap: .75rem; }
.ef-course-hero__instructor img { width: 36px; height: 36px; border-radius: var(--ef-radius-full); border: 2px solid rgba(255,255,255,.3); object-fit: cover; }
.ef-course-hero__instructor-info small { display: block; font-size: .7rem; color: rgba(255,255,255,.5); }
.ef-course-hero__instructor-info strong { font-size: .875rem; color: rgba(255,255,255,.9); }

/* Sticky card achat */
.ef-course-card-buy {
  background: var(--ef-surface); border-radius: var(--ef-radius-xl);
  box-shadow: var(--ef-shadow-lg); overflow: hidden;
  position: sticky; top: 88px;
}
.ef-course-card-buy__preview { position: relative; aspect-ratio: 16/9; cursor: pointer; }
.ef-course-card-buy__preview img { width: 100%; height: 100%; object-fit: cover; }
.ef-course-card-buy__preview-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
}
.ef-course-card-buy__play-btn {
  width: 64px; height: 64px; border-radius: var(--ef-radius-full);
  background: #fff; display: flex; align-items: center; justify-content: center;
  color: var(--ef-primary); box-shadow: var(--ef-shadow-lg);
  transition: var(--ef-transition);
}
.ef-course-card-buy__play-btn:hover { transform: scale(1.1); }
.ef-course-card-buy__play-btn svg { width: 28px; height: 28px; }
.ef-course-card-buy__preview-label { position: absolute; bottom: .75rem; left: 50%; transform: translateX(-50%); font-size: .75rem; color: #fff; font-weight: 600; white-space: nowrap; }

.ef-course-card-buy__body { padding: 1.5rem; }
.ef-course-card-buy__price { margin-bottom: 1.25rem; }
.ef-course-card-buy__price .ef-price__current { font-size: 2rem; }
.ef-course-card-buy__guarantee { text-align: center; font-size: .75rem; color: var(--ef-fg-muted); margin-top: .75rem; display: flex; align-items: center; justify-content: center; gap: .25rem; }
.ef-course-card-buy__guarantee svg { width: 14px; height: 14px; color: var(--ef-success); }
.ef-course-card-buy__includes { margin-top: 1.25rem; }
.ef-course-card-buy__includes-title { font-size: .75rem; font-weight: 700; color: var(--ef-fg-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; }
.ef-course-card-buy__include { display: flex; align-items: center; gap: .625rem; font-size: .875rem; color: var(--ef-fg); padding: .375rem 0; }
.ef-course-card-buy__include svg { width: 16px; height: 16px; color: var(--ef-primary); flex-shrink: 0; }

/* Contenu cours */
.ef-course-content { padding: 3rem 0; }
.ef-course-content__layout { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; }
@media (max-width: 1024px) { .ef-course-content__layout { grid-template-columns: 1fr; } }
.ef-course-content__main { min-width: 0; }

/* Onglets cours */
.ef-course-tabs { border-bottom: 2px solid var(--ef-border); margin-bottom: 2rem; display: flex; gap: 0; }
.ef-course-tab {
  padding: 1rem 1.5rem; font-size: .875rem; font-weight: 600;
  color: var(--ef-fg-muted); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: var(--ef-transition); background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--ef-font);
}
.ef-course-tab:hover { color: var(--ef-fg); }
.ef-course-tab.active { color: var(--ef-primary); border-bottom-color: var(--ef-primary); }

/* Curriculum */
.ef-curriculum { border: 1px solid var(--ef-border); border-radius: var(--ef-radius-lg); overflow: hidden; }
.ef-curriculum__section { border-bottom: 1px solid var(--ef-border); }
.ef-curriculum__section:last-child { border-bottom: none; }
.ef-curriculum__section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; background: var(--ef-bg-subtle);
  cursor: pointer; transition: var(--ef-transition); user-select: none;
}
.ef-curriculum__section-header:hover { background: var(--ef-accent); }
.ef-curriculum__section-title { font-weight: 700; font-size: .9375rem; color: var(--ef-fg); display: flex; align-items: center; gap: .75rem; }
.ef-curriculum__section-title svg { width: 16px; height: 16px; color: var(--ef-primary); transition: transform .2s; }
.ef-curriculum__section-header.open .ef-curriculum__section-title svg { transform: rotate(90deg); }
.ef-curriculum__section-meta { font-size: .75rem; color: var(--ef-fg-muted); }
.ef-curriculum__lessons { display: none; }
.ef-curriculum__lessons.open { display: block; }
.ef-curriculum__lesson {
  display: flex; align-items: center; gap: .875rem;
  padding: .875rem 1.25rem; border-top: 1px solid var(--ef-border);
  transition: var(--ef-transition); text-decoration: none; color: var(--ef-fg);
}
.ef-curriculum__lesson:hover { background: var(--ef-bg-subtle); }
.ef-curriculum__lesson.completed { color: var(--ef-fg-muted); }
.ef-curriculum__lesson.locked { color: var(--ef-fg-subtle); cursor: not-allowed; }
.ef-curriculum__lesson-icon { width: 32px; height: 32px; border-radius: var(--ef-radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ef-curriculum__lesson-icon--video { background: var(--ef-accent); color: var(--ef-primary); }
.ef-curriculum__lesson-icon--text  { background: var(--ef-success-bg); color: var(--ef-success); }
.ef-curriculum__lesson-icon--quiz  { background: var(--ef-warning-bg); color: hsl(30,80%,35%); }
.ef-curriculum__lesson-icon--lock  { background: var(--ef-bg-muted); color: var(--ef-fg-subtle); }
.ef-curriculum__lesson-icon--done  { background: var(--ef-success-bg); color: var(--ef-success); }
.ef-curriculum__lesson-icon svg { width: 15px; height: 15px; }
.ef-curriculum__lesson-info { flex: 1; min-width: 0; }
.ef-curriculum__lesson-title { font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-curriculum__lesson-meta { font-size: .75rem; color: var(--ef-fg-muted); display: flex; align-items: center; gap: .5rem; margin-top: .125rem; }
.ef-curriculum__lesson-free { font-size: .7rem; font-weight: 700; color: var(--ef-success); background: var(--ef-success-bg); padding: .125rem .5rem; border-radius: var(--ef-radius-full); }

/* Instructeur */
.ef-instructor-card { display: flex; gap: 1.5rem; padding: 1.5rem; background: var(--ef-bg-subtle); border-radius: var(--ef-radius-lg); border: 1px solid var(--ef-border); }
@media (max-width: 640px) { .ef-instructor-card { flex-direction: column; } }
.ef-instructor-card__avatar { width: 80px; height: 80px; border-radius: var(--ef-radius-full); object-fit: cover; flex-shrink: 0; }
.ef-instructor-card__name { font-size: 1.125rem; font-weight: 700; color: var(--ef-fg); margin-bottom: .25rem; }
.ef-instructor-card__title { font-size: .875rem; color: var(--ef-primary); margin-bottom: .75rem; }
.ef-instructor-card__stats { display: flex; gap: 1.5rem; margin-bottom: .75rem; }
.ef-instructor-card__stat { font-size: .8125rem; color: var(--ef-fg-muted); display: flex; align-items: center; gap: .25rem; }
.ef-instructor-card__bio { font-size: .875rem; color: var(--ef-fg-muted); line-height: 1.7; }

/* Reviews */
.ef-reviews-summary { display: grid; grid-template-columns: auto 1fr; gap: 2rem; padding: 1.5rem; background: var(--ef-bg-subtle); border-radius: var(--ef-radius-lg); margin-bottom: 2rem; }
.ef-reviews-summary__score { text-align: center; }
.ef-reviews-summary__score-val { font-size: 3.5rem; font-weight: 900; color: var(--ef-fg); line-height: 1; }
.ef-reviews-summary__score-stars { margin: .5rem 0; }
.ef-reviews-summary__score-count { font-size: .875rem; color: var(--ef-fg-muted); }
.ef-reviews-bars { display: flex; flex-direction: column; gap: .5rem; justify-content: center; }
.ef-reviews-bar { display: flex; align-items: center; gap .75rem; gap: .75rem; }
.ef-reviews-bar__stars { font-size: .75rem; color: var(--ef-fg-muted); width: 30px; text-align: right; }
.ef-reviews-bar__track { flex: 1; height: 8px; background: var(--ef-border); border-radius: var(--ef-radius-full); overflow: hidden; }
.ef-reviews-bar__fill { height: 100%; background: var(--ef-warning); border-radius: var(--ef-radius-full); }
.ef-reviews-bar__pct { font-size: .75rem; color: var(--ef-fg-muted); width: 36px; }

.ef-review { padding: 1.25rem 0; border-bottom: 1px solid var(--ef-border); }
.ef-review:last-child { border-bottom: none; }
.ef-review__header { display: flex; align-items: center; gap: .875rem; margin-bottom: .75rem; }
.ef-review__avatar { width: 40px; height: 40px; border-radius: var(--ef-radius-full); object-fit: cover; background: var(--ef-grad-primary); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .875rem; flex-shrink: 0; }
.ef-review__name { font-weight: 600; font-size: .9375rem; color: var(--ef-fg); }
.ef-review__date { font-size: .75rem; color: var(--ef-fg-muted); }
.ef-review__text { font-size: .875rem; color: var(--ef-fg-muted); line-height: 1.7; }

/* ── LECTEUR LEÇON ──────────────────────────────────────────── */
.ef-lesson-layout {
  display: grid; grid-template-columns: 1fr 340px;
  height: calc(100vh - 72px); overflow: hidden;
}
@media (max-width: 1024px) { .ef-lesson-layout { grid-template-columns: 1fr; height: auto; overflow: visible; } }

.ef-lesson-main { display: flex; flex-direction: column; overflow-y: auto; }
.ef-lesson-video { background: #000; position: relative; }
.ef-lesson-video iframe, .ef-lesson-video video { width: 100%; aspect-ratio: 16/9; display: block; }
.ef-lesson-video__placeholder { aspect-ratio: 16/9; background: linear-gradient(135deg,#1a1a2e,#16213e); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1rem; color: rgba(255,255,255,.5); }
.ef-lesson-video__placeholder svg { width: 64px; height: 64px; }

.ef-lesson-header { padding: 1.5rem 2rem; border-bottom: 1px solid var(--ef-border); }
.ef-lesson-header__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; gap: 1rem; flex-wrap: wrap; }
.ef-lesson-title { font-size: 1.375rem; font-weight: 800; color: var(--ef-fg); }
.ef-lesson-nav { display: flex; gap: .5rem; }

.ef-lesson-body { padding: 2rem; flex: 1; }
.ef-lesson-body .ef-content { font-size: 1rem; line-height: 1.8; color: var(--ef-fg); }
.ef-lesson-body .ef-content h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; }
.ef-lesson-body .ef-content h3 { font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 .75rem; }
.ef-lesson-body .ef-content p { margin-bottom: 1.25rem; }
.ef-lesson-body .ef-content ul, .ef-lesson-body .ef-content ol { margin: 0 0 1.25rem 1.5rem; }
.ef-lesson-body .ef-content li { margin-bottom: .5rem; }
.ef-lesson-body .ef-content code { background: var(--ef-bg-muted); padding: .125rem .375rem; border-radius: 4px; font-size: .875em; }
.ef-lesson-body .ef-content pre { background: hsl(20,35%,10%); color: #e2e8f0; padding: 1.25rem; border-radius: var(--ef-radius); overflow-x: auto; margin-bottom: 1.25rem; }

.ef-lesson-resources { padding: 1.5rem 2rem; border-top: 1px solid var(--ef-border); background: var(--ef-bg-subtle); }
.ef-lesson-resources__title { font-size: .875rem; font-weight: 700; color: var(--ef-fg); margin-bottom: .75rem; }
.ef-lesson-resource { display: flex; align-items: center; gap: .625rem; padding: .5rem .75rem; background: var(--ef-surface); border: 1px solid var(--ef-border); border-radius: var(--ef-radius); text-decoration: none; color: var(--ef-fg); font-size: .875rem; transition: var(--ef-transition); margin-bottom: .5rem; }
.ef-lesson-resource:hover { border-color: var(--ef-primary); color: var(--ef-primary); }
.ef-lesson-resource svg { width: 16px; height: 16px; flex-shrink: 0; }

.ef-lesson-complete-bar { padding: 1.25rem 2rem; border-top: 1px solid var(--ef-border); background: var(--ef-surface); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ef-lesson-complete-bar .ef-progress-bar { flex: 1; min-width: 200px; margin-bottom: 0; }

/* Sidebar curriculum leçon */
.ef-lesson-sidebar { border-left: 1px solid var(--ef-border); display: flex; flex-direction: column; overflow: hidden; }
@media (max-width: 1024px) { .ef-lesson-sidebar { border-left: none; border-top: 1px solid var(--ef-border); max-height: 400px; } }
.ef-lesson-sidebar__header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--ef-border); background: var(--ef-bg-subtle); }
.ef-lesson-sidebar__title { font-size: .9375rem; font-weight: 700; color: var(--ef-fg); }
.ef-lesson-sidebar__progress { margin-top: .5rem; }
.ef-lesson-sidebar__body { flex: 1; overflow-y: auto; }
.ef-lesson-sidebar__body .ef-curriculum { border: none; border-radius: 0; }
.ef-lesson-sidebar__body .ef-curriculum__section-header { background: var(--ef-bg-muted); }
.ef-lesson-sidebar__body .ef-curriculum__lesson.current { background: var(--ef-accent); color: var(--ef-primary); }
.ef-lesson-sidebar__body .ef-curriculum__lesson.current .ef-curriculum__lesson-title { font-weight: 700; color: var(--ef-primary); }

/* ── QUIZ ───────────────────────────────────────────────────── */
.ef-quiz-wrap { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem; }
.ef-quiz-header { margin-bottom: 2rem; }
.ef-quiz-header__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.ef-quiz-title { font-size: 1.75rem; font-weight: 800; color: var(--ef-fg); }
.ef-quiz-timer { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; background: var(--ef-warning-bg); border: 1px solid var(--ef-warning); border-radius: var(--ef-radius); font-weight: 700; color: hsl(30,80%,35%); }
.ef-quiz-timer svg { width: 18px; height: 18px; }
.ef-quiz-timer.urgent { background: var(--ef-danger-bg); border-color: var(--ef-danger); color: var(--ef-danger); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
.ef-quiz-progress { margin-bottom: 1.5rem; }
.ef-quiz-progress-info { display: flex; justify-content: space-between; font-size: .875rem; color: var(--ef-fg-muted); margin-bottom: .5rem; }

.ef-question { background: var(--ef-surface); border: 1px solid var(--ef-border); border-radius: var(--ef-radius-lg); padding: 1.75rem; margin-bottom: 1.5rem; }
.ef-question__num { font-size: .75rem; font-weight: 700; color: var(--ef-primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; }
.ef-question__text { font-size: 1.125rem; font-weight: 600; color: var(--ef-fg); line-height: 1.6; margin-bottom: 1.5rem; }
.ef-question__options { display: flex; flex-direction: column; gap: .75rem; }
.ef-option {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; border: 2px solid var(--ef-border);
  border-radius: var(--ef-radius-lg); cursor: pointer; transition: var(--ef-transition);
  background: var(--ef-surface);
}
.ef-option:hover { border-color: var(--ef-primary); background: var(--ef-accent); }
.ef-option.selected { border-color: var(--ef-primary); background: var(--ef-accent); }
.ef-option.correct { border-color: var(--ef-success); background: var(--ef-success-bg); }
.ef-option.wrong   { border-color: var(--ef-danger);  background: var(--ef-danger-bg); }
.ef-option__marker {
  width: 28px; height: 28px; border-radius: var(--ef-radius-full);
  border: 2px solid var(--ef-border); display: flex; align-items: center;
  justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0;
  transition: var(--ef-transition); color: var(--ef-fg-muted);
}
.ef-option.selected .ef-option__marker { background: var(--ef-primary); border-color: var(--ef-primary); color: #fff; }
.ef-option.correct .ef-option__marker  { background: var(--ef-success); border-color: var(--ef-success); color: #fff; }
.ef-option.wrong .ef-option__marker    { background: var(--ef-danger);  border-color: var(--ef-danger);  color: #fff; }
.ef-option__text { font-size: .9375rem; color: var(--ef-fg); }
.ef-question__explanation { margin-top: 1rem; padding: 1rem; background: var(--ef-bg-subtle); border-radius: var(--ef-radius); border-left: 4px solid var(--ef-primary); font-size: .875rem; color: var(--ef-fg-muted); display: none; }
.ef-question__explanation.show { display: block; }

.ef-quiz-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 2rem; }
.ef-quiz-dots { display: flex; gap: .375rem; flex-wrap: wrap; }
.ef-quiz-dot { width: 10px; height: 10px; border-radius: var(--ef-radius-full); background: var(--ef-border); transition: var(--ef-transition); cursor: pointer; }
.ef-quiz-dot.answered { background: var(--ef-primary); }
.ef-quiz-dot.current  { background: var(--ef-amber); transform: scale(1.3); }

/* Résultat quiz */
.ef-quiz-result { text-align: center; padding: 3rem; background: var(--ef-surface); border: 1px solid var(--ef-border); border-radius: var(--ef-radius-xl); }
.ef-quiz-result__icon { width: 80px; height: 80px; border-radius: var(--ef-radius-full); margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: center; }
.ef-quiz-result__icon--pass { background: var(--ef-success-bg); color: var(--ef-success); }
.ef-quiz-result__icon--fail { background: var(--ef-danger-bg);  color: var(--ef-danger); }
.ef-quiz-result__icon svg { width: 40px; height: 40px; }
.ef-quiz-result__score { font-size: 4rem; font-weight: 900; color: var(--ef-fg); line-height: 1; margin-bottom: .5rem; }
.ef-quiz-result__label { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.ef-quiz-result__label--pass { color: var(--ef-success); }
.ef-quiz-result__label--fail { color: var(--ef-danger); }
.ef-quiz-result__stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 2rem; }
.ef-quiz-result__stat { padding: 1rem; background: var(--ef-bg-subtle); border-radius: var(--ef-radius); }
.ef-quiz-result__stat-val { font-size: 1.5rem; font-weight: 800; color: var(--ef-fg); }
.ef-quiz-result__stat-lbl { font-size: .75rem; color: var(--ef-fg-muted); }

/* ── CERTIFICAT ─────────────────────────────────────────────── */
.ef-certificate {
  max-width: 860px; margin: 3rem auto; padding: 0 1.5rem;
}
.ef-certificate__card {
  background: var(--ef-surface); border: 2px solid var(--ef-border);
  border-radius: var(--ef-radius-xl); overflow: hidden;
  box-shadow: var(--ef-shadow-lg);
}
.ef-certificate__header {
  background: var(--ef-grad-hero); padding: 2.5rem;
  text-align: center; position: relative;
}
.ef-certificate__header::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.ef-certificate__logo { position: relative; z-index: 1; margin-bottom: 1rem; }
.ef-certificate__logo .ef-logo__name { color: #fff; font-size: 1.5rem; justify-content: center; }
.ef-certificate__subtitle { color: rgba(255,255,255,.8); font-size: .875rem; position: relative; z-index: 1; }

.ef-certificate__body { padding: 3rem; text-align: center; }
.ef-certificate__presents { font-size: 1rem; color: var(--ef-fg-muted); margin-bottom: .5rem; }
.ef-certificate__student { font-size: 2.5rem; font-weight: 900; color: var(--ef-fg); margin-bottom: .5rem; font-style: italic; }
.ef-certificate__completed { font-size: 1rem; color: var(--ef-fg-muted); margin-bottom: 1rem; }
.ef-certificate__course { font-size: 1.5rem; font-weight: 800; color: var(--ef-primary); margin-bottom: 2rem; }
.ef-certificate__divider { width: 80px; height: 3px; background: var(--ef-grad-primary); margin: 0 auto 2rem; border-radius: var(--ef-radius-full); }
.ef-certificate__meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-bottom: 2rem; }
.ef-certificate__meta-item { text-align: center; }
.ef-certificate__meta-val { font-size: 1rem; font-weight: 700; color: var(--ef-fg); }
.ef-certificate__meta-lbl { font-size: .75rem; color: var(--ef-fg-muted); margin-top: .25rem; }
.ef-certificate__number { font-size: .75rem; color: var(--ef-fg-subtle); font-family: monospace; }
.ef-certificate__actions { display: flex; gap: .75rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }

/* ── DASHBOARD ──────────────────────────────────────────────── */
.ef-dashboard { padding: 2rem 0; }
.ef-dashboard__layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; }
@media (max-width: 1024px) { .ef-dashboard__layout { grid-template-columns: 1fr; } }

.ef-dash-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.ef-dash-profile {
  background: var(--ef-surface); border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius-lg); padding: 1.5rem; text-align: center;
}
.ef-dash-profile__avatar { width: 80px; height: 80px; border-radius: var(--ef-radius-full); margin: 0 auto .875rem; border: 3px solid var(--ef-primary); overflow: hidden; background: var(--ef-grad-primary); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5rem; font-weight: 700; }
.ef-dash-profile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ef-dash-profile__name { font-size: 1rem; font-weight: 700; color: var(--ef-fg); margin-bottom: .25rem; }
.ef-dash-profile__email { font-size: .8125rem; color: var(--ef-fg-muted); margin-bottom: 1rem; }
.ef-dash-profile__stats { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; padding-top: 1rem; border-top: 1px solid var(--ef-border); }
.ef-dash-profile__stat-val { font-size: 1.25rem; font-weight: 800; color: var(--ef-primary); }
.ef-dash-profile__stat-lbl { font-size: .65rem; color: var(--ef-fg-muted); }

.ef-dash-nav { background: var(--ef-surface); border: 1px solid var(--ef-border); border-radius: var(--ef-radius-lg); overflow: hidden; }
.ef-dash-nav__item {
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem 1.25rem; font-size: .875rem; font-weight: 500;
  color: var(--ef-fg-muted); text-decoration: none; transition: var(--ef-transition);
  border-bottom: 1px solid var(--ef-border);
}
.ef-dash-nav__item:last-child { border-bottom: none; }
.ef-dash-nav__item:hover { background: var(--ef-accent); color: var(--ef-primary); }
.ef-dash-nav__item.active { background: var(--ef-accent); color: var(--ef-primary); font-weight: 700; border-right: 3px solid var(--ef-primary); }
.ef-dash-nav__item svg { width: 18px; height: 18px; flex-shrink: 0; }
.ef-dash-nav__badge { margin-left: auto; background: var(--ef-primary); color: #fff; font-size: .65rem; font-weight: 700; padding: .125rem .5rem; border-radius: var(--ef-radius-full); }

.ef-dash-main { min-width: 0; }
.ef-dash-section { margin-bottom: 2rem; }
.ef-dash-section__title { font-size: 1.25rem; font-weight: 800; color: var(--ef-fg); margin-bottom: 1.25rem; display: flex; align-items: center; gap: .75rem; }
.ef-dash-section__title svg { width: 22px; height: 22px; color: var(--ef-primary); }

.ef-stat-card { background: var(--ef-surface); border: 1px solid var(--ef-border); border-radius: var(--ef-radius-lg); padding: 1.5rem; display: flex; align-items: center; gap: 1rem; }
.ef-stat-card__icon { width: 52px; height: 52px; border-radius: var(--ef-radius-lg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ef-stat-card__icon svg { width: 24px; height: 24px; }
.ef-stat-card__val { font-size: 1.75rem; font-weight: 900; color: var(--ef-fg); line-height: 1; }
.ef-stat-card__lbl { font-size: .8125rem; color: var(--ef-fg-muted); margin-top: .25rem; }
.ef-stat-card--primary .ef-stat-card__icon { background: var(--ef-accent); color: var(--ef-primary); }
.ef-stat-card--success .ef-stat-card__icon { background: var(--ef-success-bg); color: var(--ef-success); }
.ef-stat-card--warning .ef-stat-card__icon { background: var(--ef-warning-bg); color: hsl(30,80%,35%); }
.ef-stat-card--danger  .ef-stat-card__icon { background: var(--ef-danger-bg);  color: var(--ef-danger); }

.ef-activity-item { display: flex; gap: 1rem; padding: .875rem 0; border-bottom: 1px solid var(--ef-border); }
.ef-activity-item:last-child { border-bottom: none; }
.ef-activity-item__icon { width: 36px; height: 36px; border-radius: var(--ef-radius-full); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ef-activity-item__icon svg { width: 16px; height: 16px; }
.ef-activity-item__text { font-size: .875rem; color: var(--ef-fg); flex: 1; }
.ef-activity-item__text strong { color: var(--ef-fg); }
.ef-activity-item__time { font-size: .75rem; color: var(--ef-fg-muted); white-space: nowrap; }

.ef-achievement { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--ef-bg-subtle); border: 1px solid var(--ef-border); border-radius: var(--ef-radius-lg); transition: var(--ef-transition); }
.ef-achievement:hover { border-color: var(--ef-primary); }
.ef-achievement.locked { opacity: .5; }
.ef-achievement__icon { width: 52px; height: 52px; border-radius: var(--ef-radius-full); background: var(--ef-grad-primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.ef-achievement.locked .ef-achievement__icon { background: var(--ef-bg-muted); filter: grayscale(1); }
.ef-achievement__name { font-weight: 700; font-size: .9375rem; color: var(--ef-fg); }
.ef-achievement__desc { font-size: .8125rem; color: var(--ef-fg-muted); }
