/* ============================================================
   ROOT & RESET
   ============================================================ */


.md-footer {
  display: none;
}

.md-sidebar {
  display: none;
}

.md-main__inner {
  max-width: 100%;
  margin: 0 auto;
}

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

*, *::before, *::after { cursor: none !important; }

:root {
  --bg:       #0a0714;
  --bg2:      #0d0a1a;
  --purple:   #aa00ff;
  --pink:     #ff00cc;
  --cyan:     #00e5cc;
  --yellow:   #ffe566;
  --white:    #f0e8ff;
  --muted:    rgba(200,170,255,0.45);
  --card-bg:  rgba(20,12,40,0.85);
  --border:   rgba(170,0,255,0.2);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  overflow-x: hidden;
  cursor: none;
}

.md-content {
  font-family: 'Sora', sans-serif;
  font-weight: 300;
  color: var(--white);
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--pink);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 2147483647;
  transform: translate(-50%,-50%);
  transition: transform 0.05s;
  box-shadow: 0 0 8px var(--pink), 0 0 20px var(--pink);
}
.cursor-ring {
  width: 30px; height: 30px;
  border: 1px solid rgba(255,0,204,0.5);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 2147483646;
  transform: translate(-50%,-50%);
  transition: transform 0.12s ease, width 0.2s, height 0.2s, border-color 0.2s;
}

/* ============================================================
   BACKGROUND GRID
   ============================================================ */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.bg-grid canvas { width: 100%; height: 100%; opacity: 0.35; }

/* ============================================================
   SECTION SHARED
   ============================================================ */
section { position: relative; z-index: 1; }

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 1rem;
  opacity: 0.8;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 8vw;
  position: relative;
  overflow: hidden;
}

.hero-path-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(170,0,255,0.1);
  border: 0.5px solid rgba(170,0,255,0.4);
  border-radius: 100px;
  padding: 4px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--purple);
  margin-bottom: 2rem;
  letter-spacing: 1px;
  animation: fadeSlideDown 0.8s ease both;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--purple);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%,100% { opacity: 1; box-shadow: 0 0 6px var(--purple); }
  50%      { opacity: 0.4; box-shadow: none; }
}

.hero-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeSlideUp 0.9s 0.2s ease both;
}

.hero-title .line-1 {
  color: var(--white);
  display: block;
}
.hero-title .line-2 {
  background: linear-gradient(90deg, var(--purple), var(--pink), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  filter: drop-shadow(0 0 20px rgba(170,0,255,0.4));
}

.hero-desc {
  max-width: 540px;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fadeSlideUp 0.9s 0.4s ease both;
}

.hero-chips {
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.6rem;
  margin-top: 3rem;
  animation: fadeSlideUp 0.9s 0.6s ease both;
}
.chip {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(170,0,255,0.3);
  border-radius: 6px;
  padding: 5px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #cc88ff;
  letter-spacing: 0.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chip:hover {
  border-color: rgba(255,0,204,0.6);
  box-shadow: 0 0 12px rgba(255,0,204,0.2);
  color: var(--pink);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 1.5s 1.2s ease both;
}
.scroll-line {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, var(--purple), transparent);
  animation: scrollPulse 2s ease infinite;
}
.scroll-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}

@keyframes scrollPulse {
  0% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: top; opacity: 0; }
}

/* ============================================================
   STATS BAND
   ============================================================ */
#stats {
  padding: 3rem 8vw;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  background: rgba(170,0,255,0.03);
}

.stats-inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
}

.stat-item {
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stat-item.visible { opacity: 1; transform: none; }

.stat-num {
  font-family: 'Pacifico', cursive;
  font-size: 2.8rem;
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(255,229,102,0.6), 0 0 30px rgba(255,153,0,0.3);
  display: block;
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   PIPELINE SECTION
   ============================================================ */
#pipeline {
  padding: 7rem 8vw;
}

.pipeline-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan), 0 0 25px rgba(0,229,204,0.4);
  margin-bottom: 0.8rem;
}

.pipeline-sub {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 4rem;
}

.pipeline-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 1rem;
  position: relative;
  overflow: visible;
  padding-top: 8px;
}

.pipe-block {
  flex: 1;
  min-width: 160px;
  background: var(--card-bg);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.2rem;
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s, box-shadow 0.3s;
  cursor: default;
  overflow: hidden;
}
.pipe-block.visible { opacity: 1; transform: none; }

.pipe-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 12px 12px 0 0;
  border-radius: 12px 12px 0 0;
  overflow: visible;
}
.pipe-block.color-purple::before { background: linear-gradient(90deg, var(--purple), var(--pink)); }
.pipe-block.color-blue::before   { background: linear-gradient(90deg, #3b82f6, #00e5cc); }
.pipe-block.color-green::before  { background: linear-gradient(90deg, #10b981, var(--cyan)); }

.pipe-block:hover {
  border-color: rgba(170,0,255,0.5);
  box-shadow: 0 0 30px rgba(170,0,255,0.15), 0 0 60px rgba(255,0,204,0.05);
  transform: translateY(-4px);
}
.pipe-block.visible:hover { transform: translateY(-4px); }

.pipe-icon { font-size: 1.8rem; margin-bottom: 0.6rem; display: block; }

.pipe-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #cc88ff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.pipe-detail {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.pipe-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.pipe-arrow.visible { opacity: 1; }

.pipe-arrow svg {
  width: 70px;
  height: 35px;
}


.flow-particle {
  animation: flowMove 2s ease infinite;
}
@keyframes flowMove {
  0%   { offset-distance: 0%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* ============================================================
   MODULES SECTION
   ============================================================ */
#modules {
  padding: 5rem 8vw 7rem;
}

.modules-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(255,229,102,0.6), 0 0 30px rgba(255,153,0,0.3);
  margin-bottom: 0.8rem;
}

.modules-sub {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 3.5rem;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}

.mod-card-link {
  text-decoration: none !important;
  color: inherit !important;
  display: block;
  height: 100%;
}

.mod-card {
  background: var(--card-bg);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  
  /* Layout flex pour pousser les tags en bas */
  display: flex;
  flex-direction: column;
  height: 100%;
  
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s, box-shadow 0.3s;
}

.mod-card.visible { opacity: 1; transform: none; }

/* Barre néon en haut */
.mod-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  transition: height 0.25s ease;
}

/* Flèche au hover */
.mod-card::after {
  content: '→';
  position: absolute;
  bottom: 1rem;
  right: 1.2rem;
  font-size: 1.4rem;
  color: rgba(255, 0, 204, 0);
  transition: color 0.3s, transform 0.3s;
}

.mod-card-link:hover .mod-card {
  border-color: rgba(255, 0, 204, 0.5);
  box-shadow: 0 0 28px rgba(170,0,255,0.18), 0 0 60px rgba(255,0,204,0.05);
  transform: translateY(-5px);
}

.mod-card.visible:hover { transform: translateY(-5px); }
.mod-card-link:hover .mod-card::before { height: 4px; }
.mod-card-link:hover .mod-card::after { color: #ff00cc; transform: translateX(4px); }

.mod-num {
  position: absolute;
  top: 1rem; right: 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(170,0,255,0.1);
  user-select: none;
  transition: color 0.3s;
}
.mod-card-link:hover .mod-num { color: rgba(255,0,204,0.2); }

.mod-name {
  font-family: 'Pacifico', cursive;
  font-size: 1rem;
  color: var(--yellow);
  text-shadow: 0 0 8px rgba(255,229,102,0.5);
  margin-bottom: 0.6rem;
}

.mod-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.mod-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mod-tag {
  background: rgba(170,0,255,0.08);
  border: 0.5px solid rgba(170,0,255,0.3);
  border-radius: 4px;
  padding: 2px 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #cc88ff;
  letter-spacing: 0.3px;
}

/* ============================================================
   CONTROL HIGHLIGHT SECTION
   ============================================================ */
#highlight {
  padding: 5rem 8vw 6rem;
  position: relative;
  overflow: hidden;
}

#highlight::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(170,0,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
#highlight::after {
  content: '';
  position: absolute;
  bottom: -200px; left: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,0,204,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.highlight-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .highlight-inner { grid-template-columns: 1fr; gap: 2rem; }
}

.highlight-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--pink);
  text-shadow: 0 0 8px var(--pink), 0 0 25px rgba(255,0,204,0.4);
  margin-bottom: 1rem;
}

.highlight-text {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.85;
  margin-bottom: 2rem;
}

.control-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.control-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.88rem;
  color: var(--white);
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.control-list li.visible { opacity: 1; transform: none; }

.ctrl-dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0; margin-top: 0.45rem;
}
.ctrl-dot.purple { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.ctrl-dot.pink   { background: var(--pink);   box-shadow: 0 0 8px var(--pink);   }
.ctrl-dot.cyan   { background: var(--cyan);   box-shadow: 0 0 8px var(--cyan);   }
.ctrl-dot.yellow { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }

.ctrl-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--white);
  display: block;
  margin-bottom: 0.1rem;
}
.ctrl-sub {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Right side: animated diagram */
.highlight-right {
  position: relative;
}

.diagram-canvas-wrap {
  border: 0.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(10,7,20,0.7);
  padding: 0.5rem;
}

/* ============================================================
   TRAJECTORY SECTION
   ============================================================ */
#trajectory {
  padding: 5rem 8vw 6rem;
  text-align: center;
}

.traj-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan), 0 0 25px rgba(0,229,204,0.4);
  margin-bottom: 1rem;
}
.traj-sub {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.traj-canvas-wrap {
  border: 0.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(10,7,20,0.6);
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(170,0,255,0.08);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 3rem 8vw 2.5rem;
  border-top: 0.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative; z-index: 1;
}

.footer-name {
  font-family: 'Pacifico', cursive;
  font-size: 1.2rem;
  color: var(--white);
}
.footer-sub {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  margin-top: 0.2rem;
}

.footer-links {
  display: flex; gap: 1.5rem;
}
.footer-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--pink); }

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Neon line divider */
.neon-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--pink), var(--purple), var(--pink), transparent);
  box-shadow: 0 0 16px rgba(255,0,204,0.4);
  border: none;
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .pipeline-flow { flex-direction: column; }
  .pipe-arrow { transform: rotate(90deg); }
  .stats-inner { gap: 1.5rem; }
  #hero { padding: 0 5vw; }
  #stats, #pipeline, #modules, #highlight, #trajectory { padding-left: 5vw; padding-right: 5vw; }
  footer { flex-direction: column; align-items: flex-start; }
}

