/* ═══════════════════════════════════════════
   Tutoriel Terminal — Apprendre le CMD
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #0d0d1a; color: #f0eeff; font-family: 'Segoe UI', Arial, sans-serif; height: 100vh; overflow: hidden; }

#tt-root { height: 100vh; display: flex; flex-direction: column; }

/* ── Header ── */
#tt-header {
  height: 52px; background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.09);
  display: flex; align-items: center; padding: 0 16px; gap: 14px; flex-shrink: 0;
}
#tt-back {
  padding: 5px 14px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.8);
  border-radius: 4px; cursor: pointer; font-size: 13px;
  font-family: inherit; transition: background .2s; white-space: nowrap;
}
#tt-back:hover { background: rgba(255,255,255,.16); color: #fff; }
#tt-title { font-size: 1rem; font-weight: 700; flex: 1; }
.tt-prog-wrap {
  width: 180px; height: 6px; background: rgba(255,255,255,.1);
  border-radius: 3px; overflow: hidden;
}
.tt-prog-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #4ec9b0, #0078d4);
  border-radius: 3px; transition: width .6s ease;
}
#tt-step-count { font-size: .8rem; color: rgba(255,255,255,.5); white-space: nowrap; min-width: 80px; text-align: right; }

/* ── Body ── */
#tt-body { flex: 1; display: flex; overflow: hidden; }

/* ── CMD area ── */
#tt-cmd-area { flex: 1; display: flex; flex-direction: column; padding: 14px; }
#tt-cmd-win {
  flex: 1; display: flex; flex-direction: column;
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.7);
}
#tt-cmd-tb {
  height: 32px; background: #1f1f1f; padding: 0 12px;
  display: flex; align-items: center; color: #fff; font-size: 13px; flex-shrink: 0;
}
#tt-cmd-body {
  flex: 1; background: #0c0c0c; display: flex; flex-direction: column; overflow: hidden;
  font-family: 'Consolas', 'Courier New', monospace; font-size: 14px;
}
#tt-cmd-out {
  flex: 1; overflow-y: auto; padding: 10px 12px;
  color: #cccccc; white-space: pre-wrap;
}
#tt-cmd-out::-webkit-scrollbar { width: 6px; }
#tt-cmd-out::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
.tt-line { line-height: 1.6; }
.tt-ok      { color: #4ec9b0; }
.tt-err     { color: #f48771; }
.tt-info    { color: #569cd6; }
.tt-success { color: #6fb357; font-weight: bold; }
.tt-cmd-row {
  display: flex; align-items: center; padding: 4px 12px 9px;
  border-top: 1px solid #1c1c1c; background: #0c0c0c; flex-shrink: 0;
}
.tt-cmd-ps  { color: #cccccc; white-space: nowrap; }
.tt-cmd-in  {
  flex: 1; background: transparent; border: none; outline: none;
  color: #cccccc; font-family: inherit; font-size: inherit; caret-color: #fff;
}

/* ── Sidebar ── */
#tt-sidebar {
  width: 320px; border-left: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0;
}

/* Mission panel */
#tt-mission {
  padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02); overflow-y: auto;
}
.tt-s-icon  { font-size: 36px; margin-bottom: 10px; display: block; }
.tt-s-title { font-size: 1rem; font-weight: 700; color: #4ec9b0; margin-bottom: 10px; }
.tt-s-desc  {
  font-size: .875rem; color: rgba(255,255,255,.72); line-height: 1.65; margin-bottom: 14px;
}
.tt-s-desc kbd {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: 4px; padding: 1px 7px;
  font-family: 'Consolas', 'Courier New', monospace; font-size: .82rem; color: #60cdff;
}
#tt-hint-btn {
  background: rgba(255,215,0,.08); border: 1px solid rgba(255,215,0,.28);
  color: #ffd700; padding: 6px 12px; border-radius: 6px; cursor: pointer;
  font-size: .82rem; font-family: inherit; transition: background .2s; margin-bottom: 8px;
  display: block; width: 100%;
}
#tt-hint-btn:hover { background: rgba(255,215,0,.18); }
#tt-hint-text {
  font-size: .82rem; color: #ffd700;
  background: rgba(255,215,0,.05); border: 1px solid rgba(255,215,0,.2);
  border-radius: 6px; padding: 9px 12px; display: none; margin-bottom: 8px;
}
#tt-success-banner {
  font-size: .85rem; color: #4ec9b0; font-weight: 600;
  background: rgba(78,201,176,.08); border: 1px solid rgba(78,201,176,.28);
  border-radius: 6px; padding: 9px 12px; display: none;
  animation: fadeIn .4s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

/* Steps list */
#tt-steps-list { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.tt-si {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 6px; font-size: .82rem;
  transition: background .2s; margin-bottom: 2px; cursor: default;
}
.tt-si.done    { color: rgba(255,255,255,.45); }
.tt-si.done .tt-si-check { color: #4ec9b0; }
.tt-si.current { background: rgba(255,255,255,.08); font-weight: 700; }
.tt-si.locked  { color: rgba(255,255,255,.28); }
.tt-si-check   { font-size: 14px; min-width: 18px; text-align: center; }
.tt-si-n       { font-size: .72rem; color: rgba(255,255,255,.35); min-width: 18px; }

/* Completion overlay */
#tt-complete {
  display: none; position: fixed; inset: 0;
  background: rgba(13,13,26,.96); z-index: 9999;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center; padding: 20px;
}
#tt-complete.show { display: flex; }
#tt-complete .tt-trophy { font-size: 80px; animation: bounce .6s ease forwards; }
@keyframes bounce { 0%{transform:scale(.3);opacity:0} 70%{transform:scale(1.15)} 100%{transform:scale(1);opacity:1} }
#tt-complete h1 { font-size: 2rem; color: #ffd700; }
#tt-complete p  { font-size: 1rem; color: rgba(255,255,255,.7); max-width: 420px; line-height: 1.6; }
.tt-btn-finish {
  padding: 12px 26px; border: none; border-radius: 8px; cursor: pointer;
  font-size: 1rem; font-family: inherit; transition: opacity .2s;
}
.tt-btn-finish:hover { opacity: .85; }
.tt-btn-sb   { background: #0078d4; color: #fff; }
.tt-btn-home { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; }
