/* ========== RESET LÉGER ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #211b3b 0%, #05020a 45%, #020108 100%);
  color: #f5f5ff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========== UTILS ========== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========== BACKGROUND ORBITS ========== */
.bg-orbit {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.25;
  z-index: -1;
  pointer-events: none;
}

.bg-orbit-1 {
  width: 420px;
  height: 420px;
  background: #7c3aed;
  top: -80px;
  left: -120px;
  animation: floatOrbit1 18s infinite alternate ease-in-out;
}

.bg-orbit-2 {
  width: 350px;
  height: 350px;
  background: #22c55e;
  bottom: -120px;
  right: -80px;
  animation: floatOrbit2 22s infinite alternate ease-in-out;
}

.bg-orbit-3 {
  width: 260px;
  height: 260px;
  background: #0ea5e9;
  top: 40%;
  right: 15%;
  animation: floatOrbit3 26s infinite alternate ease-in-out;
}

@keyframes floatOrbit1 {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(40px, 30px, 0); }
}
@keyframes floatOrbit2 {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-20px, -50px, 0); }
}
@keyframes floatOrbit3 {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(20px, -30px, 0); }
}

/* ========== PRELOADER ========== */
#preloader {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, #141428 0, #05010b 55%, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  overflow: hidden;
}

/* Orbites visuelles */
.preloader-orbit {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-orbit-ring {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow:
    0 0 20px rgba(168, 85, 247, 0.5),
    0 0 40px rgba(34, 197, 94, 0.3);
  animation: orbitSpin 10s linear infinite;
}

.preloader-orbit-core {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 0, #22c55e, #a855f7 60%, #1d4ed8);
  box-shadow:
    0 0 30px rgba(168, 85, 247, 0.8),
    0 0 60px rgba(34, 197, 94, 0.9);
  animation: corePulse 2.6s ease-in-out infinite;
}

.preloader-orbit-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent);
  filter: blur(4px);
}

/* Contenu du préloader */
.preloader-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 340px;
  padding: 22px 22px 18px;
  border-radius: 26px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.95),
    0 0 60px rgba(15, 23, 42, 1);
}

.preloader-logo {
  font-size: 22px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #f9fafb;
  margin-bottom: 4px;
}

.preloader-logo span {
  color: #a855f7;
}

.preloader-subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 14px;
}

/* Console de statut */
.preloader-console {
  background: radial-gradient(circle at top left, #020617, #020617 60%, #020617);
  border-radius: 14px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 10px 12px 8px;
  margin-bottom: 14px;
  text-align: left;
}

.preloader-console-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #e5e7eb;
  opacity: 0.5;
  transform: translateY(4px);
  transition:
    opacity 0.35s ease-out,
    transform 0.35s ease-out;
}

.preloader-console-line.active {
  opacity: 1;
  transform: translateY(0);
}

.preloader-console-line .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.35s ease-out,
    transform 0.35s ease-out;
}

.preloader-console-line.active .dot {
  opacity: 1;
  transform: scale(1);
}

/* Barre de chargement */
.preloader-bar {
  width: 100%;
  max-width: 260px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
  margin: 0 auto 10px;
}

.preloader-bar-fill {
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #a855f7, #22d3ee);
  animation: loadingBar 1.5s infinite ease-in-out;
}

.preloader-text {
  font-size: 12px;
  color: #e5e7eb;
  opacity: 0.9;
}

/* Disparition du préloader */
.preloader-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-out;
}

@keyframes loadingBar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

@keyframes orbitSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes corePulse {
  0%, 100% {
    transform: scale(0.96);
    box-shadow:
      0 0 24px rgba(168, 85, 247, 0.7),
      0 0 48px rgba(34, 197, 94, 0.8);
  }
  50% {
    transform: scale(1.04);
    box-shadow:
      0 0 36px rgba(168, 85, 247, 0.95),
      0 0 60px rgba(34, 197, 94, 1);
  }
}

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    to bottom,
    rgba(9, 9, 22, 0.96),
    rgba(9, 9, 22, 0.86),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #a855f7, #22c55e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #020617;
  box-shadow:
    0 0 22px rgba(168, 85, 247, 0.7),
    0 0 40px rgba(34, 197, 94, 0.4);
}

.logo-text span {
  font-size: 15px;
  font-weight: 600;
}

.logo-text small {
  font-size: 11px;
  color: #9ca3af;
}

/* NAV */
.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.15s ease-out;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #a855f7);
  transition: width 0.18s ease-out;
}

.main-nav a:hover {
  color: #f9fafb;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.btn-nav {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 6px 16px;
}

/* ========== HERO ========== */
.hero {
  padding: 72px 0 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.hero-tag {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 14px;
}

.hero h1 span {
  color: #a855f7;
}

.hero-sub {
  font-size: 15px;
  color: #d1d5db;
  max-width: 460px;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.1s ease-out,
    box-shadow 0.15s ease-out,
    background 0.15s ease-out,
    color 0.15s ease-out;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #a855f7, #22d3ee);
  color: #020617;
  box-shadow:
    0 8px 24px rgba(34, 197, 94, 0.35),
    0 0 30px rgba(168, 85, 247, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 32px rgba(34, 197, 94, 0.4),
    0 0 36px rgba(168, 85, 247, 0.6);
}

.btn-ghost {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.7);
}

.btn-big {
  padding: 12px 26px;
  font-size: 15px;
}

/* HERO META */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #9ca3af;
}

.hero-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* HERO VISUAL */
.hero-visual {
  position: relative;
  min-height: 220px;
}

.hero-card.main {
  position: relative;
  z-index: 2;
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 100%);
  border-radius: 22px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.9),
    0 0 60px rgba(168, 85, 247, 0.7);
}

.hero-card-title {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.hero-code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  background: radial-gradient(circle at top left, #020617, #020617 60%, #020617);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.hero-code .line {
  display: block;
  margin-bottom: 4px;
}

.hero-code .success {
  color: #22c55e;
}

.hero-code .info {
  color: #38bdf8;
}

.hero-floating {
  position: absolute;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top, rgba(148, 163, 184, 0.1), transparent);
  backdrop-filter: blur(16px);
}

.hero-floating-1 {
  width: 120px;
  height: 80px;
  top: -18px;
  right: 10px;
  animation: floatCard1 9s infinite ease-in-out;
}

.hero-floating-2 {
  width: 90px;
  height: 90px;
  bottom: -10px;
  left: -8px;
  animation: floatCard2 11s infinite ease-in-out;
}

@keyframes floatCard1 {
  0% { transform: translate3d(0, 0, 0); opacity: 0.8;}
  100% { transform: translate3d(-8px, 10px, 0); opacity: 1; }
}
@keyframes floatCard2 {
  0% { transform: translate3d(0, 0, 0); opacity: 0.7;}
  100% { transform: translate3d(8px, -12px, 0); opacity: 1; }
}

/* ========== SECTIONS GÉNÉRIQUES ========== */
.section {
  padding: 40px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 26px;
}

.section-header h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.section-header p {
  font-size: 14px;
  color: #9ca3af;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 18px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.85);
  font-size: 14px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 17px;
}

.card p {
  margin: 0 0 10px;
  color: #d1d5db;
}

.card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #9ca3af;
}

.card ul li {
  margin-bottom: 4px;
}

/* UNIVERS SECTION */
.section-universe {
  padding-top: 24px;
}

.universe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.universe-card {
  border-radius: 18px;
  padding: 14px 14px 12px;
  background: radial-gradient(circle at top, rgba(148, 85, 247, 0.25), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(168, 85, 247, 0.6);
  font-size: 14px;
}

.universe-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.universe-card p {
  margin: 0;
  color: #e5e7eb;
}

/* CTA SECTION */
.section-cta {
  padding-bottom: 56px;
}

.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.4), rgba(15, 23, 42, 0.96));
  border-radius: 22px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(34, 197, 94, 0.7);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.9),
    0 0 40px rgba(34, 197, 94, 0.5);
}

.cta-inner h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.cta-inner p {
  margin: 0;
  font-size: 14px;
  color: #e5e7eb;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(9, 9, 22, 0.96);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 12px;
  font-size: 12px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
}

.footer-links a:hover {
  color: #e5e7eb;
}

/* ========== ANIMATIONS SCROLL ========== */
[data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: -1;
  }

  .cta-inner {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .cards-grid,
  .universe-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .main-nav {
    display: none;
  }

  .hero {
    padding-top: 44px;
  }

  .cta-inner {
    padding: 16px 14px;
  }
}
