/* QuizDock landing — thème CLAIR, aligné sur l'app (parfait pour vidéoprojection).
   Tokens repris de apps/frontend/src/index.css : fond blanc, texte quasi-noir,
   primaire indigo oklch(0.55 0.22 264). Accents = 4 couleurs de réponse (Kahoot-like). */
:root {
  --bg: oklch(1 0 0);
  --bg-soft: oklch(0.985 0.004 264);
  --surface: oklch(1 0 0);
  --fg: oklch(0.145 0 0);
  --muted: oklch(0.45 0.01 264);
  --border: oklch(0.922 0 0);
  --primary: oklch(0.55 0.22 264);
  --primary-strong: oklch(0.48 0.23 264);
  --primary-soft: oklch(0.95 0.03 264);
  --ring: oklch(0.55 0.22 264 / 0.35);

  /* Couleurs de réponse (quadrant façon Kahoot) — identiques à l'app. */
  --q-red: #dc2626;
  --q-blue: #2563eb;
  --q-amber: #f59e0b;
  --q-green: #16a34a;

  --radius: 0.75rem;
  --maxw: 1080px;
  --font:
    system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: oklch(1 0 0 / 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.brand-mark {
  height: 30px;
  width: auto;
  display: block;
  border-radius: 7px;
}
.brand-name {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.hero-logo {
  display: block;
  width: clamp(150px, 30vw, 230px);
  height: auto;
  margin: 0 auto 1.6rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.95rem;
}
.nav-links a {
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--fg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 24px -10px var(--ring);
}
.btn-primary:hover {
  background: var(--primary-strong);
  box-shadow: 0 14px 30px -10px var(--ring);
}
.btn-ghost {
  color: var(--fg);
  border-color: var(--border);
  background: var(--bg);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5rem 1.25rem 3.5rem;
  text-align: center;
  overflow: hidden;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid color-mix(in oklch, var(--primary) 25%, transparent);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
}
.hero h1 .accent {
  color: var(--primary);
}
.lede {
  max-width: 660px;
  margin: 1.2rem auto 2rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
}
.lede strong {
  color: var(--fg);
}
.cta {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}
.quad {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 2.6rem;
}
.quad span {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 6px 16px -8px rgb(0 0 0 / 0.4);
}
.quad .q1 {
  background: var(--q-red);
}
.quad .q2 {
  background: var(--q-blue);
}
.quad .q3 {
  background: var(--q-amber);
}
.quad .q4 {
  background: var(--q-green);
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1.25rem;
}
.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: 0.4em;
}
.section .sub {
  text-align: center;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 0;
}
.section-soft {
  background: var(--bg-soft);
  max-width: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-soft > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Feature grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
  margin-top: 2.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in oklch, var(--primary) 45%, var(--border));
  box-shadow: 0 18px 40px -24px var(--ring);
}
.card .ic {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}
.card h3 {
  font-size: 1.12rem;
}
.card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}

/* ---------- Code block ---------- */
.code {
  max-width: 720px;
  margin: 2rem auto 1.2rem;
  background: oklch(0.18 0.02 264);
  color: oklch(0.92 0.01 264);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.7;
}
.code code {
  white-space: pre;
}
code {
  font-family: var(--mono);
  background: var(--primary-soft);
  color: var(--primary-strong);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  font-size: 0.88em;
}
.code code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ---------- Languages strip ---------- */
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.8rem;
}
.langs span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.92rem;
  color: var(--fg);
  background: var(--surface);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
  padding: 0;
  margin: 2.5rem 0 0;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.steps .num {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  margin-bottom: 0.8rem;
}
.steps h3 {
  font-size: 1.1rem;
}
.steps p {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}

/* ---------- CTA ---------- */
.section-cta {
  text-align: center;
}
.section-cta .cta {
  margin-top: 1.6rem;
}

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.footer .brand-mark {
  height: 26px;
  margin: 0 auto;
}
.footer-links {
  display: flex;
  gap: 1.4rem;
  justify-content: center;
  margin: 1.2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-links a:hover {
  color: var(--primary);
}
.copyright {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

@media (max-width: 560px) {
  .nav-links a:not(.btn) {
    display: none;
  }
}

/* ---------- Screenshots carousel ---------- */
.carousel {
  position: relative;
  max-width: 880px;
  margin: 2.5rem auto 0;
}
.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.25rem;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin: 0;
}
.slide img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px -26px var(--ring);
}
.slide figcaption {
  margin-top: 0.8rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.carousel-btn {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgb(0 0 0 / 0.25);
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.carousel-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.carousel-btn.prev {
  left: -0.7rem;
}
.carousel-btn.next {
  right: -0.7rem;
}
.carousel-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.4rem;
}
.carousel-dots button {
  width: 0.6rem;
  height: 0.6rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}
.carousel-dots button.active {
  background: var(--primary);
}
@media (max-width: 720px) {
  .carousel-btn {
    display: none;
  }
}
