/* =========================================================
   NEX6 — Design tokens
   Palette : fond sombre (navy/anthracite) + accents néon
   cyan (précision technique) / violet (innovation) et
   une touche vert menthe (bienveillance/accompagnement)
   pour éviter un monochrome trop clinique.
   ========================================================= */
:root {
  /* Surfaces */
  --bg-0: #0A0E17;
  --bg-1: #0D1420;
  --bg-2: #111827;
  --bg-card: #10182a;
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(0, 240, 255, 0.35);

  /* Texte */
  --text-primary: #E7E9EE;
  --text-secondary: #9CA6B8;
  --text-muted: #6B7488;

  /* Accents néon */
  --neon-cyan: #00F0FF;
  --neon-violet: #7B61FF;
  --neon-mint: #4ADE80;

  --gradient-primary: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));

  /* Typo */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Rythme */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-glow-cyan: 0 0 24px rgba(0, 240, 255, 0.25);
  --shadow-glow-violet: 0 0 24px rgba(123, 97, 255, 0.25);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   Reset & base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 var(--space-sm); color: var(--text-secondary); }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section { padding: var(--space-2xl) 0; position: relative; }

.section-head { max-width: 680px; margin: 0 0 var(--space-xl); }

.section-lead { font-size: 1.05rem; color: var(--text-secondary); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin: 0 0 var(--space-xs);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--neon-cyan);
  color: #00131a;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 999;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* =========================================================
   Fond décoratif : grille HUD + halos + scanline
   ========================================================= */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.bg-glow {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
}
.bg-glow--cyan { top: -20vmax; left: -10vmax; background: var(--neon-cyan); }
.bg-glow--violet { top: 20vmax; right: -20vmax; background: var(--neon-violet); }

.bg-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 240, 255, 0.03) 50%, transparent 50%);
  background-size: 100% 4px;
  opacity: 0.4;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 23, 0.75);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}
.logo-accent { color: var(--neon-cyan); }

.logo-img {
  display: block;
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.3));
}
.footer-brand .logo-img { height: 32px; }

.main-nav { flex: 1; display: flex; justify-content: center; }

.nav-list { display: flex; gap: var(--space-lg); }

.nav-link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 2px;
  transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: right 0.25s var(--ease);
  border-radius: 2px;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after, .nav-link.is-active::after { right: 0; }
.nav-link.is-active { color: var(--text-primary); }

.header-actions { display: flex; align-items: center; gap: var(--space-sm); }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #041018;
}
.btn-primary:hover { box-shadow: var(--shadow-glow-cyan); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-soft);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--border-strong); color: var(--neon-cyan); }

.btn-full { width: 100%; justify-content: center; }

/* Bouton connexion désactivé — visible, distinct, non cliquable */
.btn-login {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-soft);
  color: var(--text-muted);
  opacity: 0.55;
  cursor: not-allowed;
  font-size: 0.85rem;
  position: relative;
}
.btn-login:hover { transform: none; box-shadow: none; }
.btn-login svg { color: var(--text-muted); }
.badge-soon {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  padding: 2px 6px;
  border-radius: 20px;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .btn-login span:not(.badge-soon) { display: none; }
  .btn-login { padding: 10px 12px; }
}

/* Bouton "Connexion" une fois l'espace privé disponible (remplace l'état grisé "Bientôt") */
.btn-login--active {
  opacity: 1;
  cursor: pointer;
  border-style: solid;
  color: var(--text-primary);
}
.btn-login--active svg { color: var(--neon-cyan); }
.btn-login--active:hover { border-color: var(--border-strong); color: var(--neon-cyan); }

/* Menu burger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--text-primary);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: clamp(64px, 12vw, 140px) 0 var(--space-2xl); }

.hero-inner { max-width: 780px; }

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 620px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-lg) 0 var(--space-xl);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-soft);
  margin: 0;
}
.stat dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* =========================================================
   Intro (présentation activité)
   ========================================================= */
.intro-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.intro-visual {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(0,240,255,0.04), rgba(123,97,255,0.03));
  padding: var(--space-lg);
}

.orbit-node { animation: float 6s ease-in-out infinite; transform-origin: center; }
.orbit-node--delay { animation-delay: 1.2s; }
.orbit-node--delay2 { animation-delay: 2.4s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.value-list { display: flex; flex-direction: column; gap: 12px; margin-top: var(--space-md); }
.value-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-primary);
  font-size: 0.98rem;
}
.value-list svg { flex-shrink: 0; margin-top: 2px; }

/* =========================================================
   Services
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  z-index: 0;
  mix-blend-mode: overlay;
}
.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-cyan);
}
.service-card:hover::before { opacity: 0.06; }

.service-card > * { position: relative; z-index: 1; }

.service-card--wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: linear-gradient(90deg, rgba(0,240,255,0.06), rgba(123,97,255,0.06));
}
.service-card--wide .service-icon { margin-bottom: 0; flex-shrink: 0; }
.service-card--wide h3 { margin-bottom: 4px; }
.service-card--wide p { margin: 0; }

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  margin-bottom: var(--space-sm);
}
.service-icon svg { width: 22px; height: 22px; }

.service-card h3 { margin-bottom: 6px; font-size: 1.05rem; }
.service-card p { font-size: 0.92rem; margin: 0; }

/* =========================================================
   Pourquoi NEX6
   ========================================================= */
.why { background: var(--bg-1); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.why-card {
  padding: var(--space-md);
  border-left: 2px solid var(--border-soft);
  transition: border-color 0.25s var(--ease);
}
.why-card:hover { border-left-color: var(--neon-cyan); }

.why-index {
  display: block;
  font-family: var(--font-mono);
  color: var(--neon-violet);
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
}
.why-card p { font-size: 0.92rem; margin: 0; }

/* =========================================================
   À propos
   ========================================================= */
.about-grid { max-width: 780px; }

.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-md); }
.tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--neon-cyan);
  border: 1px solid var(--border-soft);
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0, 240, 255, 0.05);
}

/* =========================================================
   Contact
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-details { display: flex; flex-direction: column; gap: var(--space-sm); margin-top: var(--space-lg); }
.contact-details li { display: flex; align-items: center; gap: 12px; color: var(--text-primary); }
.contact-details svg { color: var(--neon-cyan); flex-shrink: 0; }
.contact-details a:hover { color: var(--neon-cyan); }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.form-row { margin-bottom: var(--space-md); }
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.form-row .optional { font-weight: 400; color: var(--text-muted); }

.form-row input,
.form-row textarea {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}

.form-note {
  margin: var(--space-sm) 0 0;
  font-size: 0.88rem;
  min-height: 1.2em;
  color: var(--neon-mint);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-lg);
  align-items: start;
}

.footer-brand p { margin-top: var(--space-xs); font-size: 0.9rem; }

.footer-nav { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.footer-nav a { font-size: 0.9rem; color: var(--text-secondary); }
.footer-nav a:hover { color: var(--neon-cyan); }

.footer-legal {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-md);
  margin: var(--space-md) 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =========================================================
   Scroll reveal
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .main-nav.is-open { max-height: 260px; }
  .nav-list { flex-direction: column; gap: 0; padding: var(--space-sm) var(--space-md); }
  .nav-list li { border-bottom: 1px solid var(--border-soft); }
  .nav-list li:last-child { border-bottom: none; }
  .nav-link { display: block; padding: 14px 0; }
  .nav-toggle { display: flex; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card--wide { flex-direction: column; align-items: flex-start; text-align: left; }
  .why-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-stats { gap: var(--space-md); }
}
