/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Montserrat:wght@500;600;700;800&display=swap');

:root {
  /* Colors */
  --color-bg: #000000; /* dark background */
  --color-text: #ffffff; /* white text */
  --color-muted: #b7acbd;
  --color-accent: #341C44; /* violet */
  --color-accent-2: #533d60;
  --color-accent-3: #95859d;
  --color-accent-4: #95859d;
  --color-accent-5: #b7acbd;
  --color-accent-6: #dbd5dd;
  --color-card: #1a1a1a;
  --gradient-accent: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2a2a2a 100%);

  /* Layout */
  --max-width: 1200px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 6px 18px rgba(0,0,0,0.08);
  --shadow-2: 0 14px 36px rgba(52, 28, 68, 0.18);

  /* Typography */
  --font-body: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-heading: 'Montserrat', var(--font-body);

  /* Spacing */
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
}

/* Global reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

img, video { max-width: 100%; height: auto; display: block; }

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

.section {
  padding: var(--space-7) 0;
}
.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: clamp(28px, 3vw, 40px);
  margin: 0 0 var(--space-4);
}
.section-subtitle {
  color: var(--color-muted);
  margin-top: -8px;
  margin-bottom: var(--space-5);
}

/* Skip link (accessibilité) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 10px 20px;
  background: #341C44;
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 9998;
  backdrop-filter: saturate(160%) blur(6px);
  background: var(--color-accent);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 800;
  text-decoration: none;
  color: #ffffff;
}
.brand img { width: 40px; height: 40px; object-fit: contain; }

.nav-links { display: flex; gap: var(--space-4); align-items: center; }
.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); }

.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 26px; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 70px 0 auto 0;
    background: var(--color-accent);
    backdrop-filter: blur(8px);
    padding: var(--space-5);
    flex-direction: column;
    transform: translateY(-120%);
    transition: transform 0.35s ease;
  }
  .nav-links.open { transform: translateY(0); }
}

/* Homepage transparent header at top */
.home .header {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}
.home .header .brand img { opacity: 0; transition: opacity 0.35s ease; }
.home.scrolled .header {
  background: var(--color-accent);
  border-bottom-color: rgba(255,255,255,0.08);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.home.scrolled .header .brand img { opacity: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.btn:hover {
  background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}
.btn.primary {
  background: linear-gradient(135deg, #341C44 0%, #533d60 40%, #73607e 100%);
  color: #ffffff;
  border: none;
}

.tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0.4px;
}

/* Cards */
.card {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  border: 8px solid #341C44;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  color: #000000;
}
.card * {
  color: #000000;
}

/* Footer */
footer {
  background: #341C44;
  padding: 20px 40px;
  position: relative;
  color: white;
  overflow: hidden;
}
.footer-first-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  pointer-events: none;
}

.footer-text {
  display: none;
}

.footer-image {
  position: absolute;
  left: -200px;
  top: 30px;
  z-index: 10;
}

.footer-image img {
  max-width: 120px;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
}

.rocket-trail {
  display: none;
}

.footer-rocket-animate .footer-image {
  animation: rocketFly 2.5s ease-out forwards;
}

@keyframes rocketFly {
  0% {
    left: -200px;
  }
  100% {
    left: calc(100% - 150px);
  }
}

.footer-second-line {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.footer-second-line .footer-column {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.footer-content-visible .footer-column:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

.footer-content-visible .footer-column:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.9s;
}

.footer-content-visible .footer-column:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.4s;
}

.footer-column h2 {
  color: white;
  font-size: 1.5em;
  margin-bottom: 10px;
}

.footer-divider {
  width: 30px;
  height: 2px;
  background-color: white;
  margin-bottom: 20px;
}

.footer-column ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

.footer-column li {
  margin-bottom: 10px;
  color: white;
}

.footer-column a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-column a:hover {
  text-decoration: underline;
}

.footer-column img {
  width: 20px;
  height: 20px;
}

/* Section Contact Mobile - cachée par défaut */
.footer-contact-mobile {
  display: none;
}

@media screen and (max-width: 997px) {
  footer { padding: 20px; }
  
  /* Centrer et descendre l'astronaute animé */
  .footer-image {
    left: 50%;
    transform: translateX(-50%);
    top: 40px;
  }
  
  .footer-image img { max-width: 150px; }
  
  /* Cacher la colonne "Nos services" (2ème colonne) */
  .footer-second-line .footer-column:nth-child(2) {
    display: none;
  }
  
  /* Afficher 2 colonnes centrées */
  .footer-second-line {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 700px;
  }
}

@media screen and (max-width: 800px) {
  /* Décaler la colonne Contact vers la gauche */
  .footer-second-line {
    padding-left: 0;
  }
  
  .footer-second-line .footer-column:nth-child(1) {
    padding-left: 0;
  }
  
  .footer-second-line .footer-column:nth-child(3) {
    padding-left: 0;
    margin-left: -40px;
  }
}

@media screen and (max-width: 641px) {
  /* Cacher toutes les colonnes du footer-second-line */
  .footer-second-line {
    display: none;
  }
  
  /* Centrer et descendre l'astronaute animé */
  .footer-image {
    left: 50%;
    transform: translateX(-50%);
    top: 100px;
  }
  
  .footer-image img { max-width: 150px; }
  
  /* Afficher la nouvelle section Contact Mobile */
  .footer-contact-mobile {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
  }
  
  .footer-contact-mobile h2 {
    color: white;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .footer-contact-mobile .footer-divider {
    width: 30px;
    height: 2px;
    background-color: white;
    margin-bottom: 20px;
  }
  
  .footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    padding-left: 60px;
  }
  
  /* Trait vertical unique continu */
  .footer-contact-list::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255,255,255,0.5);
  }
  
  .footer-contact-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    position: relative;
  }
  
  .footer-contact-item:last-child {
    border-bottom: none;
  }
  
  /* Logo cliquable */
  .footer-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    position: absolute;
    left: -60px;
  }
  
  .footer-contact-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }
  
  /* Cacher les séparateurs individuels */
  .footer-contact-separator {
    display: none;
  }
  
  /* Texte ou lien */
  .footer-contact-text {
    grid-column: 2;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
  }
  
  .footer-contact-text:hover {
    text-decoration: underline;
  }
}

@media screen and (max-width: 500px) {
  /* Réduire et remonter l'astronaute */
  .footer-image {
    top: 20px;
  }
  
  .footer-image img {
    max-width: 100px;
  }
}

@media screen and (max-width: 400px) {
  /* Réduire l'espacement dans footer-contact-mobile */
  .footer-contact-list {
    padding-left: 40px;
  }
  
  .footer-contact-list::before {
    left: 28px;
  }
  
  .footer-contact-item {
    grid-template-columns: 28px 1fr;
    gap: 6px;
    padding: 12px 0;
  }
  
  .footer-contact-icon {
    left: -40px;
  }
  
  .footer-contact-icon img {
    width: 20px;
    height: 20px;
  }
  
  .footer-contact-text {
    font-size: 13px;
  }
}

/* Utilities */
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 980px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-5 { grid-template-columns: 1fr; } }

.center { text-align: center; }
.muted { color: var(--color-muted); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Forms */
.input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #1a1a1a;
  color: var(--color-text);
}
label { font-weight: 600; display: inline-block; margin-bottom: 8px; }
form .row { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { form .row.two { grid-template-columns: 1fr 1fr; } }

/* Section: CTA */
.cta {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-1);
}

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 2000;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(92vw, 900px);
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.modal header {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.modal .content { padding: var(--space-4); }
.modal .close { background: none; border: none; color: var(--color-text); font-size: 24px; }

/* Hero defaults (page-specific can override) */
.hero {
  position: relative; min-height: 70vh; display: grid; place-items: center; overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.9));
}
.hero-inner { position: relative; text-align: center; z-index: 1; padding: var(--space-6) var(--space-4); }
.hero h1 { font-family: var(--font-heading); font-size: clamp(32px, 5vw, 56px); margin-bottom: var(--space-3); }
.hero p { color: var(--color-accent-3); font-size: clamp(16px, 2.2vw, 20px); }