/* ============================================
   PyLearn — design tokens
   ============================================ */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --text: #14161c;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --accent: #3461eb;
  --accent-dark: #2749c2;
  --accent-light: #6b8bf5;
  --accent-tint: #eef2ff;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius: 6px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0d0f14;
  --bg-soft: #161922;
  --text: #eef0f5;
  --text-muted: #8a8f9c;
  --border: #262b36;
  --accent: #4f78f0;
  --accent-dark: #6b8bf5;
  --accent-light: #3461eb;
  --accent-tint: rgba(79, 120, 240, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
}

.brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.nav-links a:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: none;
  font-size: 15px;
  transition: border-color 0.2s var(--ease), transform 0.35s var(--ease);
}

.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle.spin { transform: rotate(180deg); }

.btn {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease);
  display: inline-block;
}

.btn-ghost {
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); }

.btn-outline {
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }

.burger {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 120px 0 100px;
  border-bottom: 1px solid var(--border);
}

.repl-line {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 24px;
  display: inline-block;
}

.repl-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero h1 {
  font-size: 52px;
  line-height: 1.08;
  max-width: 640px;
  margin-bottom: 20px;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; }

.btn-lg { padding: 12px 22px; font-size: 15px; }

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 48px;
  max-width: 520px;
}

.section-head h2 {
  font-size: 30px;
  margin-top: 10px;
}

/* Parcours */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.step {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s var(--ease);
}

.step:hover { background: var(--bg-soft); }

.step-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 14px;
  display: block;
}

.step h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.projects-line {
  margin: 28px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Tarifs */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pricing-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 760px;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.2s var(--ease);
}

.price-card:hover { border-color: var(--accent-light); }

.price-card.featured {
  border-color: var(--accent);
  background: var(--accent-tint);
  position: relative;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: 16px;
}

.price-card h3 { font-size: 17px; margin-bottom: 8px; }

.price-value {
  font-family: var(--font-display);
  font-size: 34px;
  margin-bottom: 20px;
}

.price-value span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--text-muted);
}

.price-card li {
  padding: 7px 0;
  border-top: 1px solid var(--border);
}
.price-card li:first-child { border-top: none; }

.price-card .btn { width: 100%; text-align: center; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s var(--ease);
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea { resize: vertical; min-height: 110px; }

.contact-info p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.contact-info a {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
  transition: color 0.2s var(--ease);
}
.contact-info a:hover { color: var(--accent); }

/* Footer */
footer {
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

footer .foot-links { display: flex; gap: 20px; }
footer a:hover { color: var(--text); }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Placeholder page */
.placeholder-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}
.placeholder-page h1 { font-size: 30px; margin-bottom: 10px; }
.placeholder-page p { color: var(--text-muted); margin-bottom: 24px; }

/* Pages d'authentification (construction / login / signup / mot de passe) */
.construction-wrap {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.construction-card {
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: left;
}

.construction-card .repl-line { display: block; margin-bottom: 18px; }
.construction-card .eyebrow { display: block; margin-bottom: 8px; }
.construction-card h1 { font-size: 24px; margin-bottom: 10px; }
.construction-card > p { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.construction-card form { margin: 0; }

.form-error {
  color: #dc2626;
  font-size: 13px;
  margin: -6px 0 16px;
}

.form-success {
  color: #16a34a;
  font-size: 13px;
  margin: -6px 0 16px;
}

.auth-switch {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.auth-switch a {
  color: var(--accent);
  transition: color 0.2s var(--ease);
}
.auth-switch a:hover { color: var(--accent-dark); }

.auth-forgot {
  display: block;
  text-align: right;
  font-size: 13px;
  color: var(--text-muted);
  margin: -10px 0 18px;
}
.auth-forgot:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 860px) {
  .nav-links, .nav-actions .btn-ghost, .nav-actions .btn-outline, .nav-actions .btn-primary:not(.mobile-cta) {
    display: none;
  }
  .burger { display: flex; }
  .hero h1 { font-size: 36px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a, .mobile-menu button {
  padding: 12px 0;
  font-size: 15px;
  border: none;
  background: none;
  text-align: left;
  color: var(--text);
}
