/* Génésis — interface de travail IA, monochrome et centrée sur le contenu */
:root {
  --bg: #101010;
  --panel: #171717;
  --soft: #202020;
  --line: #2a2a2a;
  --muted: #9b9b9b;
  --text: #f2f2f2;
  --accent: #d6d6d6;
  --accent2: #a8a8a8;
  --surface: #181818;
  --shadow: 0 14px 38px rgba(0, 0, 0, .22);
}

body {
  background: var(--bg);
  color: var(--text);
  letter-spacing: -.005em;
}

.shell { grid-template-columns: 248px minmax(0, 1fr); }

.sidebar {
  padding: 18px 12px;
  border-right: 1px solid #242424;
  background: #151515;
  backdrop-filter: none;
}

.logo { padding: 7px 10px 24px; gap: 10px; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: #ededed; color: #111; box-shadow: none; }
.logo small { color: #777; font-size: 9px; }
.nav { gap: 2px; }
.nav button { padding: 10px 11px; border-radius: 8px; color: #aaa; font-size: 13px; }
.nav button:hover { background: #1e1e1e; color: #eee; }
.nav button.active { background: #262626; color: #fff; }
.nav svg { width: 16px; opacity: .8; }
.reset-link { padding-left: 11px; color: #696969; }
.student { padding: 10px; border: 0; border-radius: 9px; background: transparent; }
.student:hover { background: #1e1e1e; }
.avatar { width: 30px; height: 30px; background: #e7e7e7; color: #151515; font-size: 12px; }

.topbar {
  height: 56px;
  padding: 0 28px;
  border-bottom: 1px solid #1f1f1f;
  background: rgba(16, 16, 16, .92);
  backdrop-filter: blur(12px);
}

.status-pill { border: 0; padding: 5px 0; color: #777; }
.dot { width: 6px; height: 6px; background: #a9b7a0; }
.content { max-width: 960px; padding: 44px 38px 88px; }

.hero { gap: 30px; margin-bottom: 32px; }
.hero h1,
.page-head h1 { margin: 9px 0 14px; font-size: clamp(31px, 4vw, 46px); line-height: 1.08; letter-spacing: -.04em; }
.hero p,
.page-head p { color: var(--muted); line-height: 1.65; }
.eyebrow,
.section-kicker,
.transition span,
.state-label { color: #a7a7a7; }

.card,
.lesson,
.side-note,
.eval-banner,
.course-card,
.callout,
.takeaways {
  border-color: #292929;
  background: #171717;
  box-shadow: none;
}

.card { border-radius: 12px; padding: 18px; }
.metric { padding: 18px 8px; border: 0; border-top: 1px solid #2b2b2b; border-radius: 0; background: transparent; }
.metric strong { font-size: 24px; }
.continue { min-height: 180px; border: 0; background: #181818; }
.continue::after { display: none; }
.continue h2 { font-size: 24px; }

.btn { padding: 10px 14px; border-radius: 9px; background: #ededed; color: #111; font-size: 13px; font-weight: 700; }
.btn:hover { background: #fff; filter: none; }
.btn.secondary { border: 0; background: #242424; color: #d6d6d6; }
.btn.secondary:hover { background: #2d2d2d; }

.progress-ring { width: 144px; height: 144px; background: conic-gradient(#dadada var(--p), #262626 0); box-shadow: none; }
.ring-inner { width: 128px; height: 128px; background: #141414; }
.ring-inner strong { font-size: 29px; }

.chapter-list,
.journey-list,
.course-path,
.event-list { gap: 0; margin-top: 24px; border-top: 1px solid #292929; }

.chapter-row,
.journey-chapter,
.path-step,
.practice-event,
.evaluation-gate {
  gap: 16px;
  padding: 18px 8px;
  border: 0;
  border-bottom: 1px solid #292929;
  border-radius: 0;
  background: transparent;
  transition: background .16s;
}

.chapter-row:hover,
.journey-chapter:not(.locked):hover,
.path-step:not(.locked):hover { border-color: #292929; background: #151515; transform: none; }
.journey-chapter.locked,
.path-step.locked,
.evaluation-gate.locked { background: transparent; }
.chapter-index,
.path-node { width: 34px; height: 34px; border-radius: 50%; background: #222; color: #c9c9c9; font-size: 12px; }
.slim-progress { height: 3px; background: #272727; }
.slim-progress i { background: #cfcfcf; }

.course-grid { gap: 1px; margin-top: 24px; border: 1px solid #292929; border-radius: 12px; overflow: hidden; background: #292929; }
.course-card { border: 0; border-radius: 0; background: #171717; }
.course-card:hover { background: #1d1d1d; }
.course-card small { color: #8e8e8e; }

.detail-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 42px; }
.lesson { padding: 0; border: 0; background: transparent; }
.lesson h2 { font-size: 26px; }
.lesson p,
.lesson li { color: #b8b8b8; }
.side-note { padding: 16px; border-radius: 11px; }
.course-intro { padding-top: 10px; }
.course-intro .lead { font-size: 19px; }
.course-section { padding: 34px 0; }
.course-section h3 { font-size: 22px; }
.opening-case { border-left: 2px solid #777; border-radius: 0; background: #161616; }
.callout { border: 0; border-left: 2px solid #4c4c4c; border-radius: 0; background: #161616 !important; }
.takeaways { border: 0; border-radius: 10px; background: #1a1a1a; }
.ask-tutor { color: #bcbcbc; }

.exercise-intro { max-width: 760px; padding: 32px 0 18px; }
.exercise-intro h1 { max-width: 680px; font-size: clamp(30px, 4vw, 43px); line-height: 1.08; }
.exercise-lead { max-width: 720px; font-size: 16px; line-height: 1.7; }
.exercise-kicker,
.scenario-label,
.exercise-start > span { color: #949494; }
.exercise-explainer { gap: 0; margin-top: 25px; border-top: 1px solid #2a2a2a; border-bottom: 1px solid #2a2a2a; }
.exercise-explainer > div { padding: 16px 18px 16px 0; border: 0; border-radius: 0; background: transparent; }
.exercise-explainer > div + div { padding-left: 18px; border-left: 1px solid #2a2a2a; }

.scenario-card {
  margin: 24px 0 18px;
  padding: 26px 28px;
  border: 0;
  border-left: 3px solid #bdbdbd;
  border-radius: 4px 12px 12px 4px;
  background: #191919;
  box-shadow: none;
}
.scenario-card h2 { margin: 8px 0; font-size: 20px; }
.scenario-card > p { max-width: 760px; font-size: 18px; line-height: 1.55; }
.scenario-objective { margin-top: 20px; padding-top: 17px; border-top-color: #303030; }
.attempt-history { margin: 12px 0; padding: 10px 0; border: 0; border-radius: 0; background: transparent; }
.attempt-history > summary { color: #777; }
.attempt-review { margin: 10px 0; padding: 18px; border: 1px solid #292929; border-radius: 10px; background: #151515; }
.exercise-start { padding: 35px 0 10px; }
.exercise-start h2 { font-size: 21px; }
.exercise-sheet { gap: 0; }
.exercise-step { padding: 28px 0; border: 0; border-bottom: 1px solid #292929; border-radius: 0; background: transparent; }
.exercise-step > span { color: #777; font-size: 10px; }
.exercise-step h3 { margin: 10px 0 14px; font-size: 18px; }
.exercise-step textarea { min-height: 125px; border-color: #303030; border-radius: 12px; background: #191919; }
.exercise-step textarea:focus,
.classification-item select:focus { outline: 1px solid #777; border-color: #777; }
.classification-grid { gap: 1px; overflow: hidden; border: 1px solid #2c2c2c; border-radius: 10px; background: #2c2c2c; }
.classification-item { border-radius: 0; background: #181818; }
.classification-item select { border-color: #333; background: #222; }
.hint-box { margin-top: 20px; border-color: #353535; }
.exercise-submit { margin-top: 24px; }

.chat-shell { grid-template-columns: 208px minmax(0, 1fr); }
.chat-history { padding: 14px 10px; background: #141414; }
.new-chat { border: 0; background: #202020; }
.history-item.active { background: #242424; }
.messages { padding-top: 38px; }
.ai-avatar { border-radius: 50%; background: #e8e8e8; color: #111; }
.message.user .bubble { border: 0; background: #252525; }
.quick-actions button { border-color: #303030; background: transparent; }
.composer-wrap { left: 456px; background: linear-gradient(transparent, #101010 42%); }
.composer { border-color: #353535; background: #1d1d1d; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.28); }
.send { background: #ededed; }

.unlock-toast { border-color: #383838; background: #202020; color: #eee; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .content { padding: 34px 22px 70px; }
  .composer-wrap { left: 0; }
}

@media (max-width: 720px) {
  .exercise-explainer { border: 0; }
  .exercise-explainer > div { padding: 11px 0; border-bottom: 1px solid #292929; }
  .exercise-explainer > div + div { padding-left: 0; border-left: 0; }
  .scenario-card { padding: 22px; }
}

/* Dashboard orienté reprise */
.dashboard-welcome { max-width: 720px; animation: dashboard-in .35s ease both; }
.dashboard-welcome h1 { margin: 10px 0 8px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.04em; }
.dashboard-welcome p { margin: 0; color: var(--muted); font-size: 16px; }

.resume-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  margin: 32px 0 58px;
  padding: 30px 32px;
  border-radius: 15px;
  background: #191919;
  animation: dashboard-in .42s .04s ease both;
}
.resume-copy > span { color: #8e8e8e; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.resume-copy h2 { margin: 8px 0 3px; color: #aaa; font-size: 14px; font-weight: 600; }
.resume-copy h3 { margin: 0 0 22px; font-size: clamp(23px, 3vw, 31px); letter-spacing: -.025em; }
.resume-meta { display: flex; justify-content: space-between; gap: 16px; max-width: 580px; color: #8d8d8d; font-size: 12px; }
.resume-meta b { color: #d6d6d6; }
.resume-progress { max-width: 580px; height: 4px; margin: 9px 0 19px; overflow: hidden; border-radius: 99px; background: #303030; }
.resume-progress i { display: block; height: 100%; border-radius: inherit; background: #dedede; transition: width .55s ease; }
.resume-copy p { display: grid; gap: 5px; margin: 0; color: #d2d2d2; }
.resume-copy p small { color: #777; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.primary-action { min-height: 44px; padding-inline: 19px; white-space: nowrap; }

.dashboard-section { margin: 0 0 54px; animation: dashboard-in .42s .09s ease both; }
.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 22px; }
.section-heading span,
.review-zone > span { color: #858585; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.section-heading h2 { margin: 7px 0 0; font-size: 20px; letter-spacing: -.02em; }
.section-heading > p { margin: 0; color: #777; font-size: 12px; }

.chapter-track { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); position: relative; }
.chapter-track::before { content: ''; position: absolute; top: 17px; left: 4%; right: 4%; height: 1px; background: #303030; }
.track-node { position: relative; z-index: 1; display: grid; justify-items: center; gap: 9px; min-width: 0; padding: 0 4px; border: 0; background: transparent; color: #767676; cursor: pointer; }
.track-node i { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #3a3a3a; border-radius: 50%; background: #101010; font-size: 10px; font-style: normal; transition: .2s ease; }
.track-node span { max-width: 84px; overflow: hidden; color: #6f6f6f; font-size: 9px; line-height: 1.25; text-align: center; text-overflow: ellipsis; }
.track-node:hover i { border-color: #898989; transform: translateY(-2px); }
.track-node.active i { border-color: #ededed; background: #ededed; color: #111; box-shadow: 0 0 0 5px rgba(255,255,255,.05); }
.track-node.active span { color: #e2e2e2; }
.track-node.done i { border-color: #889285; background: #889285; color: #111; }
.track-node.locked { cursor: default; }
.track-node.locked i { color: #555; }
.track-node:disabled { opacity: 1; }

.learning-signals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid #2a2a2a; border-bottom: 1px solid #2a2a2a; }
.learning-signals > div { min-width: 0; padding: 20px 26px 20px 0; }
.learning-signals > div + div { padding-left: 26px; border-left: 1px solid #2a2a2a; }
.learning-signals span { display: block; color: #777; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.learning-signals strong { display: block; margin: 8px 0 10px; font-size: 20px; }
.learning-signals small { color: #777; line-height: 1.45; }
.signal-bar { height: 3px; margin: 0 0 10px; overflow: hidden; border-radius: 99px; background: #292929; }
.signal-bar i { display: block; height: 100%; background: #cfcfcf; transition: width .55s ease; }
.review-zone { padding: 19px 0; border-top: 1px solid #292929; }
.review-zone p { color: var(--muted); }

.course-completed-actions { display: grid; gap: 18px; margin-top: 30px; padding: 24px 0; border-top: 1px solid #303030; }
.course-completed-actions span { color: #aeb7aa; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.course-completed-actions h3 { margin: 8px 0 0; font-size: 18px; }
.course-completed-actions > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.course-progress-head > div:first-child { flex-wrap: wrap; gap: 8px; }
.course-replay-banner { display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: 100%; padding: 14px 16px; border-left: 3px solid var(--accent); background: #151b18; color: var(--muted); font-size: 12px; line-height: 1.5; }
.course-replay-banner strong { color: #e5f2e0; }
.course-replay-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; }
.course-replay-actions .btn { max-width: 100%; }

@keyframes dashboard-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .dashboard-welcome, .resume-panel, .dashboard-section { animation: none; }
  .resume-progress i, .signal-bar i, .track-node i { transition: none; }
}

@media (max-width: 820px) {
  .resume-panel { grid-template-columns: 1fr; gap: 24px; }
  .resume-action { justify-self: start; }
  .chapter-track { grid-template-columns: repeat(5, 1fr); gap: 18px 0; }
  .chapter-track::before { display: none; }
}

@media (max-width: 620px) {
  .resume-panel { padding: 24px 20px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 8px; }
  .learning-signals { grid-template-columns: 1fr; }
  .learning-signals > div { padding: 18px 0; }
  .learning-signals > div + div { padding-left: 0; border-top: 1px solid #292929; border-left: 0; }
  .chapter-track { grid-template-columns: repeat(5, 1fr); }
  .track-node span { font-size: 8px; }
}

/* Tuteur Génésis — espace conversationnel préparé, sans fausse IA */
.tutor-workspace { min-height: calc(100vh - 188px); display: flex; flex-direction: column; }
.tutor-context { display: flex; justify-content: space-between; gap: 20px; padding: 0 0 15px; border-bottom: 1px solid #282828; color: #777; font-size: 11px; }
.tutor-context > div:first-child { display: grid; gap: 4px; }
.tutor-context span { font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.tutor-context strong { color: #c9c9c9; font-size: 13px; }
.tutor-conversation { flex: 1; display: grid; align-content: center; justify-items: center; padding: 54px 20px 130px; }
.tutor-welcome { max-width: 660px; text-align: center; }
.tutor-mark { width: 38px; height: 38px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 11px; background: #ededed; color: #111; font-weight: 850; }
.tutor-welcome h1 { margin: 0 auto 12px; max-width: 620px; font-size: clamp(26px, 4vw, 38px); line-height: 1.14; letter-spacing: -.035em; }
.tutor-welcome > p { color: var(--muted); line-height: 1.6; }
.tutor-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.tutor-suggestions button { padding: 9px 12px; border: 1px solid #303030; border-radius: 999px; background: transparent; color: #aaa; cursor: pointer; }
.tutor-suggestions button:hover { border-color: #555; color: #eee; }
.tutor-offline { margin-top: 24px; color: #676767; font-size: 11px; }
.tutor-composer-wrap { position: sticky; bottom: 0; padding: 38px 0 8px; background: linear-gradient(transparent, #101010 35%); }
.tutor-composer-wrap .composer { max-width: 760px; margin: auto; }

@media (max-width: 620px) {
  .tutor-context { display: grid; }
  .tutor-conversation { padding-inline: 0; }
  .tutor-suggestions { display: grid; }
}
