/* ================================
   Knotry.dev — Terminal chaleureux
   ================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  /* Base sombre */
  --bg:       #0b0d0c;
  --bg-2:     #111412;
  --bg-3:     #161a18;
  --line:     #1f2522;
  --line-2:   #2a312d;

  /* Textes */
  --ink:      #e8ebe9;
  --muted:    #8a938d;
  --dim:      #4a524c;

  /* Accent orange chaud */
  --accent:      #f97316;
  --accent-soft: #fb923c;
  --accent-dim:  #5a2e12;
  --accent-ink:  #1a0c04;

  /* Typo */
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Geist', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--mono);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.sans { font-family: var(--sans); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

a { color: inherit; }

/* Grille de fond subtile */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(249, 115, 22, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(249, 115, 22, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 30%, transparent 75%);
}

/* ================================
   HEADER
   ================================ */
.head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.head .brand { display: flex; align-items: center; gap: 10px; }
.head .brand .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
.head .brand strong { color: var(--ink); font-weight: 500; letter-spacing: 0.01em; }
.head .brand span { color: var(--muted); }
.head .right { display: flex; align-items: center; gap: 20px; }
.head .status { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.head .status .d {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
.head .lang {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  transition: color 0.15s, border-color 0.15s;
}
.head .lang:hover { color: var(--accent); border-color: var(--accent-dim); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes blink { 50% { opacity: 0; } }

/* ================================
   HERO
   ================================ */
.hero {
  position: relative;
  padding: 90px 0 100px;
  overflow: hidden;
}
.hero .kicker {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
  display: flex; align-items: center; gap: 10px;
}
.hero .kicker::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.hero h1 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
  max-width: 18ch;
}
.hero h1 .glow { color: var(--accent); }
.hero h1 .cursor {
  display: inline-block;
  width: 0.5em; height: 0.85em;
  background: var(--accent);
  vertical-align: -0.08em;
  margin-left: 6px;
  animation: blink 1.1s steps(2) infinite;
}
.hero .sub {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: end;
}
.hero .sub p {
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
  margin: 0;
  text-wrap: pretty;
}
.hero .sub p strong { color: var(--ink); font-weight: 500; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hero .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  background: var(--bg-2);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  font-family: var(--mono);
}
.hero .btn:hover {
  background: var(--bg-3);
  border-color: var(--accent-dim);
  transform: translateY(-1px);
}
.hero .btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 500;
}
.hero .btn.primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

/* Fenêtre terminal */
.term {
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(249, 115, 22, 0.12),
              0 0 0 1px rgba(255, 255, 255, 0.01) inset;
}
.term-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
  font-size: 12px;
  color: var(--muted);
}
.term-head .dots { display: flex; gap: 6px; }
.term-head .dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line-2);
}
.term-head .title { flex: 1; text-align: center; }
.term-body {
  padding: 20px 22px;
  font-size: 13px;
  line-height: 1.75;
  min-height: 220px;
}
.term-body .prompt { color: var(--accent); }
.term-body .cmd { color: var(--ink); }
.term-body .out { color: var(--muted); }
.term-body .k { color: var(--ink); }
.term-body .v { color: var(--accent-soft); }
.term-body .ok { color: var(--accent); }
.term-body .inline-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--ink);
  vertical-align: -2px;
  animation: blink 1.1s steps(2) infinite;
}

/* ================================
   SECTION HEADINGS
   ================================ */
.sh {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 80px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.sh .left { display: flex; align-items: baseline; gap: 16px; }
.sh .num { color: var(--dim); font-size: 13px; }
.sh h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 34px;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.sh h2 .tag { color: var(--accent); }
.sh .right { font-size: 12px; color: var(--muted); }

/* ================================
   SERVICES
   ================================ */
.services .list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.svc {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.svc:hover {
  border-color: var(--accent-dim);
  background: var(--bg-3);
  transform: translateY(-2px);
}
.svc .hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.svc .hdr .id { color: var(--accent); }
.svc h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.svc p {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.svc .ascii {
  font-size: 10px;
  color: var(--dim);
  white-space: pre;
  line-height: 1.2;
  margin-top: auto;
}

/* Notice scope */
.scope {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.scope strong { color: var(--ink); font-weight: 500; }
.scope .tag { color: var(--accent); font-family: var(--mono); font-size: 12px; }

/* ================================
   PROCESS
   ================================ */
.process .steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.step {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  position: relative;
}
.step .n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  margin-bottom: 14px;
}
.step h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 10px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.step p {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* ================================
   PRICING
   ================================ */
.price .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.plan {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}
.plan.feat {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-dim),
              0 40px 60px -40px rgba(249, 115, 22, 0.18);
}
.plan .badge {
  position: absolute;
  top: -11px;
  right: 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
  font-family: var(--mono);
}
.plan .name {
  font-size: 12px;
  color: var(--muted);
}
.plan .name::before { content: '# '; color: var(--dim); }
.plan .title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}
.plan .subtitle {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
}
.plan .priceline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px dashed var(--line-2);
  border-bottom: 1px dashed var(--line-2);
}
.plan .price {
  font-family: var(--sans);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.plan .price .c {
  color: var(--muted);
  font-size: 24px;
}
.plan .unit {
  font-size: 12px;
  color: var(--muted);
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--sans);
  font-size: 14px;
}
.plan li {
  padding-left: 22px;
  position: relative;
  color: var(--ink);
  line-height: 1.45;
}
.plan li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  top: 2px;
}
.plan .cta {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 13px;
  background: var(--bg-3);
  text-decoration: none;
  transition: all 0.15s;
  margin-top: auto;
  font-family: var(--mono);
}
.plan .cta:hover {
  background: var(--bg);
  border-color: var(--accent-dim);
}
.plan.feat .cta {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 500;
}
.plan.feat .cta:hover { background: var(--accent-soft); border-color: var(--accent-soft); }

.price-note {
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.price-note .dot { color: var(--accent); margin: 0 10px; }

/* ================================
   ABOUT
   ================================ */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 760px;
}
.about p {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 20px;
  text-wrap: pretty;
}
.about p.muted { color: var(--muted); }
.about p strong { color: var(--accent); font-weight: 500; }

/* ================================
   FAQ
   ================================ */
.faq {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 4px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::before {
  content: '→';
  color: var(--accent);
  margin-right: 14px;
  font-family: var(--mono);
  font-size: 14px;
  transition: transform 0.2s;
  display: inline-block;
}
.faq details[open] summary::before { transform: rotate(90deg); }
.faq summary .badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.faq .answer {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 12px 0 0 28px;
  text-wrap: pretty;
}
.faq .answer strong { color: var(--ink); font-weight: 500; }

/* ================================
   CONTACT
   ================================ */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 40px;
}
.contact .left h3 {
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--ink);
}
.contact .left h3 .g { color: var(--accent); }
.contact .left p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 40ch;
}
.contact .card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  padding: 28px;
}
.contact .card .hdr {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.contact .card .hdr .ok { color: var(--accent); }
.contact .card .row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact .card label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact .card label::before { content: '> '; color: var(--accent); }
.contact .email-box {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.contact .email-val {
  flex: 1;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact .copy-btn {
  all: unset;
  cursor: pointer;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  background: var(--bg);
}
.contact .copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.contact .copy-btn.ok {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.contact .actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.contact .btn-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background 0.15s;
  font-family: var(--mono);
}
.contact .btn-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.contact .btn-ghost {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--line-2);
  background: var(--bg);
  transition: all 0.15s;
  font-family: var(--mono);
}
.contact .btn-ghost:hover {
  color: var(--ink);
  border-color: var(--accent-dim);
}

/* ================================
   FOOTER
   ================================ */
.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  gap: 16px;
  flex-wrap: wrap;
}
.foot .brand { display: flex; align-items: center; gap: 8px; }
.foot .brand .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.foot .brand strong { color: var(--ink); font-weight: 500; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.foot a:hover { color: var(--accent); }

/* ================================
   LEGAL PAGE
   ================================ */
.legal-body {
  padding: 60px 0 80px;
  max-width: 760px;
}
.legal-body h1 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}
.legal-body .lead {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 40px;
}
.legal-body h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 20px;
  color: var(--accent);
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
.legal-body p, .legal-body li {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
.legal-body p { margin: 0 0 10px; }
.legal-body .k { color: var(--muted); display: inline-block; min-width: 160px; }
.legal-body .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}
.legal-body .back:hover { color: var(--accent); }

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 60px 0 80px; }
  .hero .sub { grid-template-columns: 1fr; gap: 40px; }
  .sh { padding-top: 60px; }
  .sh h2 { font-size: 28px; }
  .services .list { grid-template-columns: 1fr; }
  .process .steps { grid-template-columns: 1fr; }
  .price .grid { grid-template-columns: 1fr; }
  .plan.feat { order: -1; }
  .contact { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
}
