/* ================================================================
   KiloDelta — site web
   Palette + typographie alignées sur le brand pack et l'app mobile.
   Navy #0A1628 · Surface #11203A · Cyan #4FC3F7 · Fire #FF6B35
   ================================================================ */

:root {
  --navy: #0A1628;
  --surface: #11203A;
  --surface-elev: #1B2A44;
  --border: #1F2D45;
  --border-strong: #2E4366;
  --text: #E6EDF6;
  --text-muted: #9AA8BC;
  --text-dim: #5E6E85;
  --accent: #4FC3F7;
  --accent-dim: #2E7CA8;
  --fire: #FF6B35;
  --warn: #FFA726;
  --success: #34C759;
  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1180px;
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--text);
}

.mono {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  letter-spacing: 0.04em;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ──────────────────────────────────────────────────────────────────
   Header
   ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.05em;
}
/* Wordmark transparent du brand pack — viewBox 600×120 (ratio 5:1).
   À 44 px de haut → ~220 px de large, lisible sur tous écrans. */
.brand img {
  height: 44px;
  width: auto;
  display: block;
}
@media (max-width: 540px) {
  .brand img {
    height: 36px;
  }
  .site-header .row {
    height: 64px;
  }
}
.nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
}

/* ──────────────────────────────────────────────────────────────────
   Hero
   ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(79, 195, 247, 0.18), transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(255, 107, 53, 0.12), transparent 60%);
  pointer-events: none;
}
.hero .grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.05;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero h1 .accent {
  color: var(--accent);
}
.hero .lead {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 560px;
}
.hero .ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--navy);
}
.btn-primary:hover {
  background: #82d1ff;
  color: var(--navy);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ──────────────────────────────────────────────────────────────────
   Formulaire (page support)
   ────────────────────────────────────────────────────────────────── */
.kd-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.kd-form label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.kd-form input,
.kd-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kd-form textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.55;
}
.kd-form input:focus,
.kd-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(122, 200, 255, 0.18);
}
.kd-form .form-err {
  color: var(--fire);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

/* ──────────────────────────────────────────────────────────────────
   Mockup mobile (placeholder de l'app sur smartphone)
   ────────────────────────────────────────────────────────────────── */

/* Bloc qui héberge le device — fond carroyé tactique avec fade radial. */
.device-stage {
  position: relative;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.device-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 195, 247, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 195, 247, 0.10) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center;
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 35%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse at center,
    black 35%,
    transparent 78%
  );
  pointer-events: none;
  z-index: -1;
}
/* Halo cyan diffus derrière le téléphone pour souligner la profondeur. */
.device-stage::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(79, 195, 247, 0.20) 0%,
    rgba(255, 107, 53, 0.08) 40%,
    transparent 70%
  );
  filter: blur(24px);
  pointer-events: none;
  z-index: -1;
}

.device-frame {
  position: relative;
  width: 280px;
  height: 580px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 36px;
  border: 6px solid #050d18;
  box-shadow: var(--shadow-soft), 0 0 0 2px rgba(79, 195, 247, 0.2);
  overflow: hidden;
}
.device-frame::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 22px;
  background: #050d18;
  border-radius: 12px;
  z-index: 2;
}
/* Vraie capture d'app dans le device frame — couvre tout l'intérieur. */
.device-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.device-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.device-header {
  height: 56px;
  background: var(--navy);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.device-header .pill {
  background: var(--surface-elev);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}
.device-map {
  flex: 1;
  position: relative;
  background:
    linear-gradient(135deg, #1a3548 0%, #0d2438 100%);
  overflow: hidden;
}
.device-map .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(79, 195, 247, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79, 195, 247, 0.18) 1px, transparent 1px);
  background-size: 56px 56px;
}
.device-map .iso {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
  filter: blur(0.5px);
}
.device-map .iso.t1 {
  width: 62px;
  height: 62px;
  top: 48%;
  left: 48%;
  transform: translate(-50%, -50%);
  border-color: var(--warn);
  background: rgba(255, 167, 38, 0.18);
}
.device-map .iso.t3 {
  width: 110px;
  height: 110px;
  top: 48%;
  left: 48%;
  transform: translate(-50%, -50%);
  border-color: var(--fire);
  background: rgba(255, 107, 53, 0.10);
}
.device-map .iso.t6 {
  width: 180px;
  height: 180px;
  top: 48%;
  left: 48%;
  transform: translate(-50%, -50%);
  border-color: #b30016;
  background: rgba(179, 0, 22, 0.06);
}
.device-map .ifm-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--fire);
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.device-bar {
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 9px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}
.device-bar .item.active {
  color: var(--accent);
}

/* ──────────────────────────────────────────────────────────────────
   Sections génériques
   ────────────────────────────────────────────────────────────────── */
section {
  padding: 80px 0;
}
section.alt {
  background: linear-gradient(180deg, var(--navy) 0%, #0c1d36 100%);
}
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
}
.section-title {
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-subtitle {
  color: var(--text-muted);
  margin: 0 0 48px;
  font-size: 16px;
  max-width: 720px;
}

/* ──────────────────────────────────────────────────────────────────
   Modules grid
   ────────────────────────────────────────────────────────────────── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.module-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.module-card .num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.module-card h3 {
  margin: 6px 0 8px;
  font-size: 19px;
  font-weight: 700;
}
.module-card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
.module-card .tags {
  margin-top: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.module-card .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(79, 195, 247, 0.10);
  color: var(--accent);
  border: 1px solid rgba(79, 195, 247, 0.3);
}

/* ──────────────────────────────────────────────────────────────────
   Workflow 3-steps
   ────────────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.step {
  position: relative;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step .num {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--navy);
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
}
.step h4 {
  margin: 0 0 6px;
  font-size: 16px;
}
.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* ──────────────────────────────────────────────────────────────────
   Specs (côte-à-côte)
   ────────────────────────────────────────────────────────────────── */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.spec-row {
  background: var(--surface);
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.spec-row .label {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.spec-row .value {
  margin-top: 4px;
  font-weight: 700;
  font-size: 15px;
}

/* ──────────────────────────────────────────────────────────────────
   FAQ
   ────────────────────────────────────────────────────────────────── */
.faq-list {
  max-width: 820px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 18px;
  color: var(--accent);
  font-weight: 800;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item .answer {
  padding: 0 18px 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ──────────────────────────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 24px;
  font-size: 12px;
  color: var(--text-dim);
  background: #07101e;
}
.site-footer .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.site-footer .links {
  display: flex;
  gap: 18px;
}
.site-footer a {
  color: var(--text-muted);
  font-weight: 500;
}
.site-footer a:hover {
  color: var(--text);
}

/* ──────────────────────────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .hero {
    padding: 64px 0 48px;
  }
  .hero .grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero h1 {
    font-size: 40px;
  }
  .section-title {
    font-size: 28px;
  }
  section {
    padding: 56px 0;
  }
}
@media (max-width: 540px) {
  .nav {
    display: none;
  }
  .hero h1 {
    font-size: 32px;
  }
  .device-frame {
    width: 240px;
    height: 500px;
  }
}
