/* ============================================================
   TUTO.CSS — styles des pages tutos
   Dépend de style.css (variables, nav, footer)
   ============================================================ */

/* ── breadcrumb ── */
.tuto-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.tuto-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.tuto-breadcrumb a:hover {
  color: var(--accent);
}
.tuto-breadcrumb .material-icons-round {
  font-size: 13px;
  opacity: 0.4;
}
.tuto-breadcrumb span:last-child {
  color: var(--text);
}

/* ── header ── */
.tuto-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.tuto-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tuto-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.tuto-tag .material-icons-round {
  font-size: 11px;
}
.tuto-tag--category {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.tuto-tag--level {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.2);
}
.tuto-tag--time {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tuto-header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.tuto-header-icon {
  font-size: 2rem;
  color: var(--accent);
  flex-shrink: 0;
}
.tuto-header-desc {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 680px;
  line-height: 1.65;
}

/* ── body (contenu du tuto) ── */
.tuto-body {
  max-width: 780px;
  margin: 0 auto;
}

/* sections */
.tuto-section {
  margin-bottom: 3rem;
}
.tuto-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.tuto-section-title .material-icons-round {
  font-size: 1.1rem;
  color: var(--accent);
}
.tuto-section-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: auto;
}

/* prose */
.tuto-body p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
  font-weight: 300;
}
.tuto-body p strong {
  color: var(--text);
  font-weight: 600;
}
.tuto-body p em {
  color: var(--accent2);
  font-style: normal;
}
.tuto-body a {
  color: var(--accent);
}
.tuto-body a:hover {
  color: var(--accent-dark);
}

.tuto-body ul,
.tuto-body ol {
  margin: 0.5rem 0 1rem 0;
  padding-left: 1.4rem;
}
.tuto-body li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.35rem;
  font-weight: 300;
}
.tuto-body li strong {
  color: var(--text);
  font-weight: 600;
}

/* ── blocs code ── */
.tuto-code-block {
  margin: 1.25rem 0 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.tuto-code-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.tuto-code-label .material-icons-round {
  font-size: 12px;
  color: var(--accent);
}
.tuto-code-block pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  font-size: 0.82rem;
  line-height: 1.65;
  overflow-x: auto;
  background: #1a1f2e !important;
}
.tuto-code-block code {
  font-family: var(--font-mono);
}

/* bouton copier */
.tuto-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  display: flex;
  align-items: center;
  transition: all var(--transition);
}
.tuto-copy-btn .material-icons-round {
  font-size: 14px;
}
.tuto-copy-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── callouts ── */
.tuto-callout {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  margin: 1.25rem 0;
  font-size: 0.88rem;
  line-height: 1.65;
  font-weight: 300;
}
.tuto-callout .material-icons-round {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.tuto-callout p {
  margin: 0;
  font-size: 0.88rem;
}
.tuto-callout p strong {
  font-weight: 600;
}

.tuto-callout--info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}
.tuto-callout--info .material-icons-round {
  color: var(--accent);
}

.tuto-callout--tip {
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(6, 182, 212, 0.18);
  color: #67e8f9;
}
.tuto-callout--tip .material-icons-round {
  color: #06b6d4;
}

.tuto-callout--warn {
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.18);
  color: #fde68a;
}
.tuto-callout--warn .material-icons-round {
  color: #fbbf24;
}

.tuto-callout--gpu {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}
.tuto-callout--gpu .material-icons-round {
  color: #a855f7;
}

/* ── tabs OS (Windows / macOS / Linux) ── */
.tuto-os-tabs {
  margin: 1.25rem 0;
}
.tuto-os-tablist {
  display: flex;
  gap: 0.15rem;
  margin-bottom: -1px;
}
.tuto-os-tab {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.tuto-os-tab.is-active {
  background: #1a1f2e;
  color: var(--accent);
  border-color: var(--border);
}
.tuto-os-panel {
  display: none;
}
.tuto-os-panel.is-active {
  display: block;
}
.tuto-os-panel .tuto-code-block {
  margin-top: 0;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
}

/* ── étapes numérotées ── */
.tuto-steps {
  counter-reset: tuto-step;
  margin: 1rem 0 1.5rem;
}
.tuto-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.tuto-step-num {
  counter-increment: tuto-step;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.tuto-step-num::before {
  content: counter(tuto-step);
}
.tuto-step-body {
  flex: 1;
}
.tuto-step-body p {
  margin-bottom: 0.5rem;
}

/* ── nav pager ── */
.tuto-nav-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.tuto-pager-prev,
.tuto-pager-next {
  flex: 1;
}
.tuto-pager-next {
  display: flex;
  justify-content: flex-end;
}
.tuto-pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all var(--transition);
  max-width: 280px;
}
.tuto-pager-btn span > small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent);
  margin-bottom: 0.1rem;
}
.tuto-pager-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(59, 130, 246, 0.06);
}
.tuto-pager-btn .material-icons-round {
  font-size: 18px;
  flex-shrink: 0;
}
.tuto-pager-btn--next {
  flex-direction: row-reverse;
  text-align: right;
}
.tuto-pager-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}
.tuto-pager-home:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.tuto-pager-home .material-icons-round {
  font-size: 18px;
}

/* ── responsive ── */
@media (max-width: 600px) {
  .tuto-header-title {
    font-size: 1.4rem;
    gap: 0.5rem;
  }
  .tuto-header-icon {
    font-size: 1.4rem;
  }
  .tuto-nav-pager {
    flex-wrap: wrap;
  }
  .tuto-pager-btn {
    max-width: 100%;
    font-size: 0.78rem;
  }
  .tuto-pager-home {
    order: -1;
    width: 100%;
    border-radius: var(--radius);
  }
  .tuto-pager-prev,
  .tuto-pager-next {
    flex: 1 1 45%;
  }
}

/* ── highlight.js override ── */
.hljs {
  background: #1a1f2e !important;
}

/* ── cartes liste tutos — remplacement complet de tuto-list.css ── */

.tuto-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.tuto-list-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
}
.tuto-list-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}

/* ── ligne du haut : numéro + tags ── */
.tuto-list-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.tuto-list-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1.6;
}
.tuto-list-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

/* ── corps : icône à gauche, texte à droite ── */
.tuto-list-card-body {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  flex: 1;
}
.tuto-list-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tuto-list-icon .material-icons-round {
  font-size: 18px;
  color: var(--accent);
}
.tuto-list-card-body h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.3;
  color: var(--text);
}
.tuto-list-card-body p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.55;
  margin: 0;
}

/* ── pied : CTA ── */
.tuto-list-card-footer {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: auto;
}
.tuto-list-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  transition: gap var(--transition);
}
.tuto-list-cta .material-icons-round {
  font-size: 14px;
}
.tuto-list-card:hover .tuto-list-cta {
  gap: 0.55rem;
}

/* ── tags ── */
.tuto-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  line-height: 1.5;
  white-space: nowrap;
}
.tuto-tag .material-icons-round {
  font-size: 11px;
}

.tuto-tag--category {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.tuto-tag--level {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.2);
}
.tuto-tag--time {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.tuto-tag--gpu {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

/* ── responsive ── */
@media (max-width: 500px) {
  .tuto-list-grid {
    grid-template-columns: 1fr;
  }
}
