:root {
  --blue: #0b1f36;
  --blue-dark: #081a2d;
  --green: #2eb67d;
  --coral: #e94f37;
  --white: #ffffff;
  --glass: rgba(255,255,255,0.06);
  --glass-strong: rgba(255,255,255,0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ffffff;
  background:
    radial-gradient(circle at 30% 10%, #112744 0%, #081a2d 60%, #050f1d 100%);
}

body {
  padding-top: 72px; /* espace pour le header fixe */
}

/* Typo */
h1, h2, h3 { margin: 0 0 10px; font-weight: 700; }
p { margin: 0.4rem 0; line-height: 1.6; }

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--green);
  text-align: center;
}
h2::after {
  content: "";
  width: 60px;
  height: 3px;
  background: var(--coral);
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(11,31,54,0.97);
  border-bottom: 2px solid var(--coral);
  z-index: 99999;
}

.brand {
  display: flex;
  align-items: center;
}
.brand-link {
  display: inline-flex;
  align-items: center;
}
.brand-logo-img {
  display: block;
  height: 42px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  margin-left: 12px;
}

/* Lang flags */
.lang-flags {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: 12px;
}
.lang-flag {
  width: 18px;
  height: 12px;
  cursor: pointer;
  opacity: 0.7;
  border-radius: 2px;
  transition: opacity .2s, transform .2s, box-shadow .2s;
}
.lang-flag:hover {
  opacity: 1;
  transform: scale(1.05);
}
.lang-flag.active {
  opacity: 1;
  box-shadow: 0 0 0 1px var(--coral);
}

/* Hero */
.hero {
  min-height: calc(100vh - 72px);
  padding: 40px 7vw 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-small {
  min-height: 220px;
}

.hero-title {
  text-align: left;
  max-width: 700px;
  margin: 0 auto 18px;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
}
.hero-green { color: var(--green); }
.hero-coral { color: var(--coral); }

.hero p {
  max-width: 700px;
  margin-inline: auto;
  opacity: 0.95;
}

.hero-cta {
  margin-top: 24px;
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Sections */
.section {
  padding: 80px 7vw;
  border-top: 1px solid rgba(233,79,55,0.2);
  text-align: center;
}

/* Grid & cards */
.grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 20px;
}

.card {
  background: var(--glass);
  padding: 22px;
  border-radius: 12px;
  text-align: left;
  border-top: 3px solid transparent;
  transition: transform .2s, background .2s, border-color .2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--coral);
  background: var(--glass-strong);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-small {
  padding: 6px 14px;
  font-size: 0.85rem;
}
.btn-green {
  background: var(--green);
  color: var(--blue);
}
.btn-coral {
  background: var(--coral);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.btn-green:hover,
.btn-coral:hover,
.btn-outline:hover {
  box-shadow: 0 0 12px rgba(233,79,55,0.5);
}

/* Auth */
.auth-box {
  max-width: 420px;
  margin: 20px auto;
  background: var(--glass);
  padding: 24px;
  border-radius: 12px;
  border-left: 3px solid var(--coral);
  text-align: left;
}
.auth-box input {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.auth-message {
  text-align: center;
  margin-top: 10px;
}

/* Missions */
.filter-bar {
  margin-bottom: 18px;
}
.tag {
  display: inline-block;
  margin: 0 4px 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: var(--glass);
  font-size: 0.85rem;
  cursor: pointer;
}
.tag--active {
  border-color: var(--coral);
}
.missions-list {
  display: grid;
  gap: 18px;
  text-align: left;
}
.mission-card {
  background: var(--glass);
  border-radius: 12px;
  padding: 18px;
  border-left: 3px solid var(--coral);
}
.mission-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Contact */
.contact-form {
  max-width: 480px;
  margin: 28px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-form input,
.contact-form textarea {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2000;
}
.modal {
  background: var(--glass);
  padding: 22px;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  border-left: 3px solid var(--coral);
}
.modal textarea,
.modal input,
.modal select {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Tables */
.table-wrapper {
  margin-top: 18px;
  background: var(--glass);
  border-radius: 12px;
  padding: 14px;
  overflow-x: auto;
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.dash-table th,
.dash-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.dash-toolbar {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Footer */
.site-footer {
  padding: 16px;
  text-align: center;
  border-top: 2px solid var(--coral);
  background: rgba(0,0,0,0.2);
  font-size: 0.85rem;
}

/* Anim */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive: overlay menu --- */
@media (max-width: 880px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 0 0;
    background: rgba(5,15,29,0.98);
    display: none;
    flex-direction: column;
    padding: 24px 32px;
    gap: 18px;
    z-index: 9999;
  }
  .nav-links.show {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
}


/* Ensure contact scroll is visible under fixed header */
#contact { scroll-margin-top: 90px; }

/* === AXXORIANS PAGE FIX (scopé, n'impacte pas le reste du site) === */
body.axxorians .hero{
  min-height: auto !important;
  padding: 40px 7vw 60px !important;
  display: block !important;
}

body.axxorians .hero-title{
  text-align: center !important;
  margin: 0 auto 24px !important;
}

/* si ton bloc login est dans une "card" ou un conteneur centré */
body.axxorians .card,
body.axxorians .auth-box,
body.axxorians .auth-card{
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 520px;
}

/* évite que des éléments passent derrière le header sticky */
body.axxorians main{
  padding-top: 80px;
}


/* === ANIMATION "Engineering. Reinvented." === */
.hero-title {
  opacity: 1;
}

.hero-title span {
  opacity: 0;
  display: inline-block;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-title span:nth-child(1) { animation-delay: 0.2s; } /* Engineering */
.hero-title span:nth-child(2) { animation-delay: 0.3s; } /* . */
.hero-title span:nth-child(4) { animation-delay: 0.9s; } /* Reinvented */
.hero-title span:nth-child(5) { animation-delay: 1s; }   /* . */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === FEATURE PILLS (mini cards sous Services et Teams) === */
.feature-pills {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.feature-pill {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--glass);
  padding: 16px;
  border-radius: 10px;
  border-left: 3px solid var(--green);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.feature-pill:hover {
  transform: translateY(-2px);
  background: var(--glass-strong);
  border-color: var(--coral);
}

.feature-emoji {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.feature-content {
  flex: 1;
}

.feature-content h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green);
}

.feature-content p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .feature-pills {
    grid-template-columns: 1fr;
  }
}

/* === ANIMATION HERO TITLE === */
.hero-title span {
  opacity: 0;
  display: inline-block;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-title span:nth-child(1) { animation-delay: 0.2s; }
.hero-title span:nth-child(2) { animation-delay: 0.3s; }
.hero-title span:nth-child(4) { animation-delay: 0.9s; }
.hero-title span:nth-child(5) { animation-delay: 1s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === FEATURE PILLS === */
.feature-pills {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-pill {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--glass);
  padding: 28px 24px;
  border-radius: 12px;
  border-top: 3px solid transparent;
  text-align: center;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.feature-pill:hover {
  transform: translateY(-4px);
  background: var(--glass-strong);
  border-color: var(--coral);
}

.feature-emoji {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
  display: block;
  margin: 0 auto 12px;
}

.feature-content {
  flex: 1;
  text-align: center;
}

.feature-content h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green);
}

.feature-content p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.4;
}

/* === CENTRER TITRES === */
.card h3 {
  text-align: center;
}

/* === CENTRER 2 DERNIERES BOX APPROCHE === */
@media (min-width: 1000px) {
  #approach .grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
  
  #approach .card:nth-child(6) {
    grid-column: 2 / 3;
  }
  
  #approach .card:nth-child(7) {
    grid-column: 4 / 5;
  }
}

@media (max-width: 768px) {
  .feature-pills {
    grid-template-columns: 1fr;
  }
}

/* === 3D CONSTELLATION HERO BACKGROUND === */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-title,
.hero p,
.hero-cta {
  position: relative;
  z-index: 10;
}

/* === CENTRER LE HERO SUBTITLE === */
.hero p {
  text-align: center;
}
