:root {
  --bg: #0c0d0c;
  --bg-card: #131513;
  --bg-card-hover: #1a1d1a;
  --border: rgba(236, 232, 222, 0.08);
  --border-light: rgba(236, 232, 222, 0.18);
  --text: #ece8de;
  --text-muted: #8a8d87;
  --red: #ff2a2a;
  --red-glow: rgba(255, 42, 42, 0.45);
  --lime: #d9e678;
  
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'Inter', sans-serif;
  --page-max: 1360px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

::selection {
  background: var(--red);
  color: #fff;
}

/* Curseur personnalisé */
.cursor-dot, .cursor-circle {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
}
.cursor-circle {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 42, 42, 0.4);
  transition: width 0.25s, height 0.25s, border-color 0.25s, transform 0.08s linear;
}

/* Grille d'arrière-plan */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(236, 232, 222, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(236, 232, 222, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
}

.shell {
  width: min(var(--page-max), calc(100% - 8vw));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

/* Le SVG Global du Fil Rouge */
#thread-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.thread-guide {
  fill: none;
  stroke: rgba(255, 42, 42, 0.12);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.thread-pulse {
  fill: none;
  stroke: var(--red);
  stroke-width: 3.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px var(--red-glow));
}

/* Knots / Pastilles d'ancrage du fil */
.knot {
  display: inline-flex;
  width: 12px;
  height: 12px;
  background: var(--bg);
  border: 2px solid var(--red);
  border-radius: 50%;
  position: relative;
  vertical-align: middle;
  box-shadow: 0 0 12px var(--red-glow);
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 13, 12, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.04em;
}
.brand span { color: var(--red); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(217, 230, 120, 0.08);
  color: var(--lime);
  border: 1px solid rgba(217, 230, 120, 0.2);
  padding: 6px 14px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  animation: blink 2s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.nav { display: flex; gap: 2.2rem; }
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav a:hover { color: var(--red); }

/* Typographie & Titres Massifs */
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--red);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}
.tag::before { content: "//"; color: var(--text-muted); }

.massive-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 8.8rem);
  line-height: 0.88;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  font-weight: 800;
}
.massive-title em {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}
.massive-title span.accent { color: var(--red); }

/* Sections */
.section { padding: 9rem 0; border-top: 1px solid var(--border); }

/* Hero */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 0;
}
.hero-meta {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  margin-top: 4.5rem;
  align-items: end;
}
.hero-p {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 680px;
}
.hero-p strong { color: var(--text); font-weight: 500; }
.hero-stats {
  display: flex;
  gap: 3rem;
  border-left: 1px solid var(--border);
  padding-left: 3rem;
}
.stat-box h4 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--text);
}
.stat-box p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.4rem;
}

/* Manifeste / Switchboard */
.manifesto-box {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4vw;
  margin-top: 3rem;
}
.manifesto-lead {
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.switchboard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: clamp(2rem, 4vw, 4rem);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
}
.switch-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.switch-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0;
}
.switch-term {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4.4rem);
  letter-spacing: -0.04em;
}
.switch-term.target { color: var(--lime); }
.switch-sep {
  color: var(--red);
  font-size: 2rem;
  font-family: var(--font-mono);
}

/* Services */
.service-list { margin-top: 4rem; }
.service-row {
  border-bottom: 1px solid var(--border);
  padding: 2.8rem 0;
  display: grid;
  grid-template-columns: 80px 1.4fr 1.6fr 50px;
  align-items: baseline;
  gap: 2rem;
  transition: background 0.3s, padding 0.3s, border-color 0.3s;
  text-decoration: none;
  color: inherit;
}
.service-row:hover {
  background: rgba(255, 42, 42, 0.02);
  border-bottom-color: var(--red);
  padding-inline: 1.5rem;
}
.service-row .idx {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--red);
}
.service-row h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}
.service-row p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}
.service-row .arrow {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: transform 0.25s, color 0.25s;
  text-align: right;
}
.service-row:hover .arrow {
  transform: translate(5px, -5px);
  color: var(--red);
}

/* Cartes Projets */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(2rem, 3.5vw, 3.2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover {
  border-color: var(--border-light);
  transform: translateY(-6px);
}
.card-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.card-center {
  margin: 3rem 0;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .card-center { transform: scale(1.03) rotate(-1deg); }
.card-center-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--lime);
  margin-bottom: 0.8rem;
  display: block;
}
.card-center h4 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.card-center p { font-size: 0.85rem; color: var(--text-muted); }
.card-bottom h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}
.card-bottom p { color: var(--text-muted); font-size: 0.95rem; }

/* Timeline Méthode */
.steps-timeline {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
}
.step-item {
  display: grid;
  grid-template-columns: 120px 1.2fr 1.8fr;
  padding: 2.8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  gap: 2rem;
}
.step-idx {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--lime);
}
.step-item h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}
.step-item p { color: var(--text-muted); line-height: 1.6; }

/* FAQ Accordéon */
.faq-wrapper {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 5vw;
  margin-top: 3rem;
}
.faq-list { border-top: 1px solid var(--border); }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.8rem 0;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  cursor: pointer;
  user-select: none;
}
.faq-question span {
  color: var(--red);
  font-family: var(--font-mono);
  transition: transform 0.25s ease;
}
.faq-answer {
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.65;
  display: none;
}
.faq-item.active .faq-answer { display: block; }
.faq-item.active .faq-question span {
  transform: rotate(45deg);
  display: inline-block;
}

/* Contact */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(2.5rem, 6vw, 6rem);
  margin: 4rem 0 8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
}
.contact-form { display: flex; flex-direction: column; gap: 1.8rem; }
.input-group { display: flex; flex-direction: column; gap: 0.6rem; }
.input-group label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.input-group input, .input-group textarea, .input-group select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  padding: 0.8rem 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 0;
  transition: border-color 0.2s;
}
.input-group input:focus, .input-group textarea:focus, .input-group select:focus {
  outline: none;
  border-bottom-color: var(--red);
}
.input-group select option { background: var(--bg); color: var(--text); }

.btn-submit {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 1.2rem 2.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 100px;
  cursor: pointer;
  align-self: flex-start;
  box-shadow: 0 0 25px var(--red-glow);
  transition: transform 0.2s, background 0.2s;
}
.btn-submit:hover {
  transform: scale(1.04);
  background: #ff4747;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-meta, .manifesto-box, .cards-grid, .faq-wrapper, .contact-box {
    grid-template-columns: 1fr;
  }
  .service-row {
    grid-template-columns: 40px 1fr 30px;
    gap: 1rem;
  }
  .service-row p { grid-column: 2; margin-top: 0.5rem; }
  .step-item { grid-template-columns: 50px 1fr; }
  .hero-stats { border-left: none; padding-left: 0; margin-top: 2rem; }
  .nav { display: none; }
}