/* ===== CodeCampus — thème industriel ===== */

:root {
  --bg: #14171b;
  --bg-alt: #1b1f24;
  --steel-800: #232830;
  --steel-700: #2c333d;
  --steel-600: #3a4250;
  --steel-500: #5a6472;
  --steel-300: #8a97a8;
  --steel-100: #c7cdd6;
  --ink: #eef1f5;
  --accent: #5897fb;
  --accent-dim: #5897fb26;
  --accent-2: #2f9c78;
  --success: #35c471;
  --radius: 10px;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;
  --shadow-lg: 0 20px 50px -20px rgba(0,0,0,0.6);
  --shadow-sm: 0 4px 14px -6px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

/* subtle diagonal hatch texture overlay, like brushed metal */
.rivets {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 14px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 23, 27, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--steel-700);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
}

.brand-mark { color: var(--steel-300); flex-shrink: 0; }

.brand-name {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.accent-text { color: var(--accent); }

.main-nav {
  display: flex;
  gap: 28px;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--steel-300);
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--ink); }

.header-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--steel-600);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--steel-100);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--steel-700);
}

.mobile-nav a {
  padding: 10px 4px;
  font-weight: 500;
  color: var(--steel-100);
  border-bottom: 1px solid var(--steel-800);
}

.mobile-nav .btn { margin-top: 10px; justify-content: center; }

.site-header.nav-open .mobile-nav { display: flex; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #f5f8ff;
}
.btn-primary:hover { background: #74a9fc; }

.btn-ghost {
  background: transparent;
  border-color: var(--steel-600);
  color: var(--steel-100);
}
.btn-ghost:hover { border-color: var(--steel-300); background: var(--steel-800); }

.btn-lg { padding: 14px 26px; font-size: 1.02rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 100px;
  border-bottom: 1px solid var(--steel-700);
}

.hero-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(var(--steel-800) 1px, transparent 1px),
    linear-gradient(90deg, var(--steel-800) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 10%, transparent 75%);
}

.hero-inner { position: relative; z-index: 1; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--steel-300);
  background: var(--steel-800);
  border: 1px solid var(--steel-700);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 28px;
}

.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(53,196,113,0.2);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 40px;
  color: var(--steel-300);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--steel-700); border-bottom: 1px solid var(--steel-700); }

.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head-left { margin: 0; text-align: left; max-width: 520px; }

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.section-head p { color: var(--steel-300); margin: 0; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  background: var(--steel-800);
  border: 1px solid var(--steel-700);
  border-radius: var(--radius);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card-live { cursor: pointer; }
.card-live:hover {
  transform: translateY(-4px);
  border-color: var(--steel-500);
  box-shadow: var(--shadow-lg);
}

.card-soon {
  opacity: 0.65;
  background: repeating-linear-gradient(135deg, var(--steel-800) 0 10px, var(--bg-alt) 10px 20px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--icon-color) 14%, transparent);
  color: var(--icon-color);
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.badge-live { color: var(--success); background: rgba(53,196,113,0.12); border-color: rgba(53,196,113,0.3); }
.badge-soon { color: var(--steel-300); background: var(--steel-700); border-color: var(--steel-600); }

.card h3 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--steel-300); font-size: 0.95rem; flex: 1; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 4px;
}

/* clin d'œil au thème de chaque documentation (mkdocs) */
.card-sql .card-link { color: #2196a8; }
.card-sql:hover { border-color: #2196a8; }

.card-python .card-link { color: #4b83b3; }
.card-python:hover { border-color: #4b83b3; }

/* ---------- À propos ---------- */
.apropos-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

.stat-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 20px 24px;
  background: var(--steel-800);
  border: 1px solid var(--steel-700);
  border-radius: var(--radius);
}

.stat-list strong {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--accent);
}

.stat-list span { color: var(--steel-300); font-size: 0.92rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--steel-700);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.brand-small .brand-name { font-size: 1rem; }

.footer-copy {
  margin: 0 auto 0 0;
  color: var(--steel-500);
  font-size: 0.85rem;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--steel-300); font-size: 0.9rem; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .apropos-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 90px 0 70px; }
  .section { padding: 64px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-copy { margin: 0; }
}
