/* ========================================
   substans.ai — Main Stylesheet
   ======================================== */

/* --- CSS Variables --- */
:root {
  --color-navy: #1B3A5C;
  --color-teal: #0A7A8F;
  --color-teal-light: #12A5BC;
  --color-white: #FFFFFF;
  --color-off-white: #F8F9FB;
  --color-dark: #0D1B2A;
  --color-gray-text: #4A5568;
  --color-border: #E2E8F0;
  --color-footer: #080F18;
  --max-width: 1200px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-navy);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-navy);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: var(--color-gray-text);
}

.label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-teal);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 100px 0;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-block;
  background: var(--color-teal);
  color: var(--color-white);
  padding: 14px 32px;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 122, 143, 0.3);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-navy);
  padding: 14px 32px;
  border-radius: 4px;
  border: 1px solid var(--color-navy);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(27, 58, 92, 0.15);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  background: var(--color-white);
}

.nav.scrolled {
  background: var(--color-white);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
  padding: 14px 0;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-navy);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-teal);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-teal);
  border-radius: 1px;
}

.lang-switch {
  font-size: 0.8rem;
  font-weight: 500;
}

.lang-switch a {
  color: var(--color-gray-text);
  transition: color 0.2s ease;
}

.lang-switch a.active {
  color: var(--color-teal);
}

.lang-switch .sep {
  color: var(--color-border);
  margin: 0 4px;
}

/* --- Hero --- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-white);
  padding-top: 80px;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-content .label {
  margin-bottom: 20px;
}

.hero-content h1 {
  margin-bottom: 24px;
}

.hero-content .hero-text {
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-cta .text-link {
  font-weight: 500;
  color: var(--color-teal);
  transition: color 0.2s ease;
}

.hero-cta .text-link:hover {
  color: var(--color-teal-light);
}

.hero-visual {
  flex: 0 0 45%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-animation-bg {
  background: #F0F7F9;
  border-radius: 20px;
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-logo-icon {
  width: 220px;
  height: auto;
  position: relative;
  z-index: 2;
  animation: heroFadeIn 1s ease-out forwards;
  opacity: 0;
}

@keyframes heroFadeIn {
  to { opacity: 1; }
}

.hero-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(10, 122, 143, 0.15);
  animation: pulseExpand 4s ease-out infinite;
}

.hero-pulse-ring-1 { width: 200px; height: 200px; animation-delay: 0s; }
.hero-pulse-ring-2 { width: 300px; height: 300px; animation-delay: 1.3s; }
.hero-pulse-ring-3 { width: 400px; height: 400px; animation-delay: 2.6s; }

@keyframes pulseExpand {
  0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

/* Footer logo on dark background */
.logo-light-on-dark {
  filter: brightness(0) invert(1);
}

/* --- Section Accessibilité --- */
#accessibilite {
  background: var(--color-navy);
  padding: 100px 0;
}

#accessibilite h2 {
  color: var(--color-white);
  margin-bottom: 24px;
}

#accessibilite p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.access-left .label {
  display: block;
  margin-bottom: 16px;
}

.access-right {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.access-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.access-item svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.access-item span {
  color: var(--color-white);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Section Personnalisation --- */
#personnalisation {
  background: var(--color-white);
}

#personnalisation .section-header {
  max-width: 680px;
}

#personnalisation .section-header p {
  font-size: 1.0625rem;
}

.cards-grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
}

/* --- Section Approche --- */
#approche {
  background: var(--color-white);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section-header .label {
  display: block;
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 20px;
}

.section-header p {
  font-size: 1.125rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.card {
  background: var(--color-off-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--color-teal);
  transform: translateY(-3px);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- Stats Banner --- */
.stats-banner {
  background: var(--color-navy);
  border-radius: 8px;
  padding: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item .stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 6px;
}

.stat-item .stat-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

/* --- Section Methode / PRISM --- */
#methode {
  background: var(--color-dark);
}

#methode h2,
#methode .label {
  color: var(--color-white);
}

#methode h2 {
  color: var(--color-white);
}

#methode .section-header p {
  color: rgba(255, 255, 255, 0.6);
}

.prism-flow {
  margin: 60px 0;
  overflow-x: auto;
}

.prism-flow svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 48px;
  margin-top: 60px;
}

.principle {
  border-left: 2px solid var(--color-teal);
  padding-left: 20px;
}

.principle h3 {
  color: var(--color-white);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.principle p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

/* --- Section Missions --- */
#missions {
  background: var(--color-off-white);
}

.missions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mission-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.mission-card:hover {
  border-color: var(--color-teal);
  transform: translateY(-3px);
}

.mission-tag {
  display: inline-block;
  background: rgba(10, 122, 143, 0.1);
  color: var(--color-teal);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.mission-card h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.mission-card p {
  font-size: 0.9rem;
  line-height: 1.65;
}

/* --- Section Secteurs --- */
#secteurs {
  background: var(--color-white);
  text-align: center;
}

#secteurs h2 {
  margin-bottom: 40px;
}

.sector-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.sector-pill {
  background: rgba(27, 58, 92, 0.05);
  color: var(--color-navy);
  border: 1px solid rgba(27, 58, 92, 0.2);
  border-radius: 99px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Section Contact --- */
#contact {
  background: var(--color-dark);
  text-align: center;
}

#contact h2 {
  color: var(--color-white);
  margin-bottom: 20px;
}

#contact .contact-text {
  color: rgba(255, 255, 255, 0.6);
  max-width: 540px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}

.contact-email {
  display: inline-block;
  color: var(--color-teal);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 16px;
  transition: color 0.2s ease;
}

.contact-email:hover {
  color: var(--color-teal-light);
}

#contact .contact-note {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}

/* --- Footer --- */
.footer {
  background: var(--color-footer);
  padding: 48px 0;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-logo svg {
  width: 120px;
  height: auto;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.footer-center {
  display: flex;
  gap: 24px;
}

.footer-center a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-center a:hover {
  color: var(--color-white);
}

.footer-right a {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: var(--color-white);
}

/* --- Fade-in animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-visual {
    flex: 0 0 300px;
    height: 300px;
  }

  .hero-cta {
    justify-content: center;
  }

  .cards-grid,
  .missions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-banner {
    grid-template-columns: repeat(3, 1fr);
    padding: 36px 24px;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .access-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cards-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  section {
    padding: 60px 0;
  }

  .cards-grid,
  .missions-grid,
  .stats-banner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    flex: 0 0 auto;
    width: 100%;
  }

  .cards-grid-2x2 {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 20px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
  }
}
