/**
 * LynxoTV — Tutoriels page only
 * Loaded after style.css when $current_page === 'tutoriels'
 */

/* ——— Compact centered hero (reference rhythm) ——— */
.page-tutoriels .hero.page-hero.tutoriels-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: clamp(var(--space-3), 4.5vw, 2.75rem);
  padding-bottom: clamp(var(--space-2), 3.5vw, 2rem);
}

.page-tutoriels .tutoriels-hero .page-hero-inner {
  width: 100%;
  max-width: 42rem;
}

.page-tutoriels .tutoriels-hero .hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-tutoriels .tutoriels-hero .hero-text h1 {
  max-width: min(100%, 22rem);
}

.page-tutoriels .tutoriels-hero .desc {
  margin-top: 0.75rem;
}

/* Ancre : décalage sous le header sticky lors du scroll */
.page-tutoriels #guide-installation {
  scroll-margin-top: 5.25rem;
}

/* ——— Section rhythm ——— */
.page-tutoriels .tutoriels-apps,
.page-tutoriels .tutoriels-guides,
.page-tutoriels .tutoriels-tips {
  padding-block: var(--section-y-tight);
}

.page-tutoriels .tutoriels-apps {
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(37, 99, 235, 0.07), transparent 52%),
    linear-gradient(180deg, rgba(5, 10, 20, 0.28) 0%, transparent 42%);
}

.page-tutoriels .tutoriels-guides {
  background:
    linear-gradient(180deg, transparent 0%, rgba(5, 10, 20, 0.25) 50%, transparent 100%);
}

.page-tutoriels .section-head.section-head--tutoriels {
  margin-bottom: var(--space-3);
}

.page-tutoriels .section-head.section-head--tutoriels .section-subtitle {
  margin-top: var(--space-2);
  font-size: var(--fs-lead);
  line-height: var(--leading-relaxed);
}

/* ——— Applications grid: 1 / 2 / 4 ——— */
.page-tutoriels .tutoriels-apps .tutoriels-app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  width: 100%;
  align-items: stretch;
}

@media (min-width: 640px) {
  .page-tutoriels .tutoriels-apps .tutoriels-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .page-tutoriels .tutoriels-apps .tutoriels-app-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.page-tutoriels .tutoriels-apps .app-card {
  height: 100%;
  min-height: 100%;
  padding: 0;
  border: 1px solid rgba(59, 130, 246, 0.22);
  box-shadow: var(--shadow-card);
}

.page-tutoriels .tutoriels-apps .app-card-body {
  padding: var(--space-2) var(--space-3) var(--space-3);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-tutoriels .tutoriels-apps .app-card-media {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  min-height: 0;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0;
  border: none;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(20, 40, 80, 0.5), rgba(8, 12, 28, 0.9));
}

.page-tutoriels .tutoriels-apps .app-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

/* Badge TOP (réf. Clef IPTV) */
.page-tutoriels .tutoriels-apps .app-card-badge-top {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #eff6ff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid rgba(147, 197, 253, 0.45);
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.45),
    0 0 0 1px rgba(15, 23, 42, 0.35) inset;
}

.page-tutoriels .tutoriels-apps .app-card-install {
  margin-top: auto;
  padding-top: var(--space-2);
  align-self: flex-start;
  font-size: var(--fs-nav);
  font-weight: 600;
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-tutoriels .tutoriels-apps .app-card-install span[aria-hidden] {
  display: inline-block;
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .page-tutoriels .tutoriels-apps .app-card-install:hover {
    color: #93c5fd;
  }

  .page-tutoriels .tutoriels-apps .app-card-install:hover span[aria-hidden] {
    transform: translateX(3px);
  }
}

@media (hover: hover) {
  .page-tutoriels .tutoriels-apps .app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.42);
    background: var(--color-card-hover);
    box-shadow:
      0 20px 48px rgba(0, 0, 0, 0.34),
      0 0 0 1px rgba(59, 130, 246, 0.12),
      var(--glow-blue-soft);
  }
}

/* ——— Guides: horizontal card + numbered steps ——— */
.page-tutoriels .tutoriels-guide-stack {
  gap: var(--space-3);
}

.page-tutoriels .tutoriels-guides .guide-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow:
    var(--shadow-card-soft),
    0 0 0 1px rgba(15, 23, 42, 0.5);
}

@media (hover: hover) {
  .page-tutoriels .tutoriels-guides .guide-card:hover {
    border-color: rgba(96, 165, 250, 0.32);
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(59, 130, 246, 0.12),
      0 0 40px rgba(37, 99, 235, 0.08);
  }
}

.page-tutoriels .guide-card-inner {
  padding: var(--space-3);
}

@media (min-width: 768px) {
  .page-tutoriels .guide-card-inner {
    padding: var(--card-padding-featured);
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
    gap: var(--space-4);
  }
}

.page-tutoriels .guide-card-main {
  min-width: 0;
}

.page-tutoriels .guide-card-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.page-tutoriels .guide-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

.page-tutoriels .guide-card-icon svg {
  display: block;
}

.page-tutoriels .guide-card-titles {
  min-width: 0;
  flex: 1;
}

.page-tutoriels .guide-card-sub {
  margin: 6px 0 0;
  font-size: var(--fs-small);
  line-height: 1.5;
  font-weight: 500;
  color: rgba(139, 150, 171, 0.95);
}

.page-tutoriels .guide-steps-label {
  margin: 0 0 10px;
  font-size: var(--fs-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(138, 180, 255, 0.92);
}

.page-tutoriels .guide-steps.guide-steps--tutoriels {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tutoriel-step;
  color: rgba(197, 208, 224, 0.96);
  font-size: var(--fs-small);
  line-height: 1.6;
}

.page-tutoriels .guide-steps.guide-steps--tutoriels li {
  position: relative;
  margin: 0 0 0.7rem;
  padding-left: 2.1rem;
  padding-top: 0.05rem;
}

.page-tutoriels .guide-steps.guide-steps--tutoriels li:last-child {
  margin-bottom: 0;
}

.page-tutoriels .guide-steps.guide-steps--tutoriels li::before {
  counter-increment: tutoriel-step;
  content: counter(tutoriel-step);
  position: absolute;
  left: 0;
  top: 0.12em;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.35rem;
  text-align: center;
  color: #f0f9ff;
  background: #2563eb;
  border: 1px solid #3b82f6;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.page-tutoriels .guide-aside {
  padding: var(--space-2) var(--space-3);
}

.page-tutoriels .guide-aside .tag-pill {
  padding: 6px 11px;
  font-size: 0.6875rem;
}

/* ——— Conseils: compact row, small icons, centered ——— */
.page-tutoriels .tutoriels-tips .tutoriels-tips-grid {
  gap: var(--space-2);
}

@media (min-width: 640px) {
  .page-tutoriels .tutoriels-tips .tutoriels-tips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .page-tutoriels .tutoriels-tips .tutoriels-tips-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.page-tutoriels .tutoriels-tip-card.tip-card {
  align-items: center;
  text-align: center;
  padding: var(--space-2) var(--space-2) calc(var(--space-2) + 4px);
  min-height: 100%;
}

.page-tutoriels .tutoriels-tip-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #8ab4ff;
}

.page-tutoriels .tutoriels-tip-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

.page-tutoriels .tutoriels-tip-card .tip-card-title {
  margin: 0;
  font-size: clamp(0.9375rem, 0.35vw + 0.82rem, 1.0625rem);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #f1f5f9;
}

.page-tutoriels .tutoriels-tip-card .tip-card-text {
  margin: 8px 0 0;
  max-width: none;
  font-size: var(--fs-small);
  line-height: 1.52;
  font-weight: 500;
  color: rgba(151, 164, 187, 0.95);
}

/* ——— Support CTA ——— */
.page-tutoriels .tutoriels-cta {
  padding-block: var(--section-y-tight) var(--space-4);
}

.page-tutoriels .tutoriels-cta-card {
  max-width: 32rem;
  margin: 0 auto;
  padding: var(--space-3) var(--space-3);
  text-align: center;
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, rgba(24, 48, 118, 0.5), rgba(10, 22, 48, 0.72));
  border: 1px solid rgba(59, 130, 246, 0.22);
  box-shadow: var(--shadow-card-soft), 0 0 48px rgba(15, 23, 42, 0.5);
}

.page-tutoriels .tutoriels-cta-title {
  margin: 0;
  font-size: clamp(1.125rem, 1.5vw + 0.85rem, 1.375rem);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.028em;
  line-height: 1.28;
  color: #f8fafc;
}

.page-tutoriels .tutoriels-cta-text {
  margin: var(--space-2) auto 0;
  max-width: 32ch;
  font-size: var(--fs-small);
  line-height: 1.55;
  font-weight: 500;
  color: rgba(197, 208, 224, 0.92);
}

.page-tutoriels .tutoriels-cta-btn {
  margin-top: var(--space-3);
}

@media (hover: hover) {
  .page-tutoriels .tutoriels-cta-btn:hover {
    transform: translateY(-1px);
  }
}
