/* Reset & Base – thème medium (entre styles-dark.css et styles-light.css) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #a78bfa;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --text: #e8edf4;
  --text-muted: #a8b2c0;
  --dark-light: #252b38;
  --gray: #7b8494;
  --gray-light: #a8b2c0;
  --gray-lighter: #c5ccd6;
  --white: #ffffff;
  --bg: #2a3140;
  --bg-light: #323945;
  --bg-card: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.16);
  --border-outer: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(22px) saturate(155%);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 32px rgba(0, 0, 0, 0.28);
  --shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 22px 44px -10px rgba(0, 0, 0, 0.45);
  --radius: 12px;
  --radius-lg: 20px;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 15% 15%, rgba(139, 92, 246, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 55%, rgba(6, 182, 212, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 45% 95%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
    linear-gradient(165deg, #2f3646 0%, #252b38 48%, #2a3140 100%);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero avec orbes (style v3) */
header {
  position: relative;
  padding: 64px 0 64px;
  text-align: center;
  overflow: hidden;
  background: transparent;
}

.figure-schema-container {
  img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 800px;
    object-fit: contain;
  }
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 15s infinite ease-in-out;
}

.hero-bg .orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.48) 0%, transparent 70%);
  top: -150px;
  left: -100px;
  animation-delay: 0s;
}

.hero-bg .orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.38) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-delay: 4s;
}

.hero-bg .orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
  top: 40%;
  right: 15%;
  animation-delay: 8s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.45;
  }

  25% {
    transform: translate(40px, -40px) scale(1.08);
    opacity: 0.55;
  }

  50% {
    transform: translate(-30px, 25px) scale(0.95);
    opacity: 0.38;
  }

  75% {
    transform: translate(20px, 35px) scale(1.05);
    opacity: 0.5;
  }
}

header .container {
  position: relative;
  z-index: 1;
}

/* Sections avec fond orbes (types-intervention, dashboards, autres) */
.section-with-bg {
  position: relative;
  overflow: hidden;
  background: transparent;
}

section:nth-child(even).section-with-bg {
  background: transparent;
}

.section-with-bg .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
}

.section-with-bg .container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
}

header h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav ancres – style nav v3 (glassmorphism) */
nav.anchors {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(42, 49, 64, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-outer);
  box-shadow: inset 0 1px 0 var(--border);
  padding: 14px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

nav.anchors.scrolled {
  background: rgba(42, 49, 64, 0.88);
  box-shadow: inset 0 1px 0 var(--border), 0 4px 16px -2px rgba(0, 0, 0, 0.35);
}

nav.anchors .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

nav.anchors a {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-light);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.3s ease, background 0.3s ease;
  position: relative;
}

nav.anchors a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  border-radius: 1px;
}

nav.anchors a:hover {
  color: var(--white);
}

nav.anchors a:hover::after {
  transform: scaleX(1);
}

nav.anchors a.active {
  color: var(--primary-light);
}

nav.anchors a.active::after {
  transform: scaleX(1);
}

/* Sections */
section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-outer);
  background: transparent;
}

section:nth-child(even) {
  background: rgba(50, 57, 69, 0.45);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  margin: 0 0 28px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  padding-bottom: 12px;
  display: inline-block;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

h3 {
  margin: 40px 0 12px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

h3:first-child {
  margin-top: 0;
}

p {
  margin: 0 0 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

ul {
  margin: 0 0 24px;
  padding-left: 1.4em;
  color: var(--text-muted);
}

li {
  margin-bottom: 8px;
}

/* Description – trois points en cartes glassmorphism */
.description-points,
.pour-qui {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
}

.description-points li,
.pour-qui li {
  list-style: none;
  padding: 20px 24px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-outer);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  margin: 0;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.description-points li:hover,
.pour-qui li:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateX(4px);
}

.description-points li::before,
.pour-qui li::before {
  content: "→ ";
  color: var(--primary);
  font-weight: 700;
}

.description-text {
  margin-top: 0.5rem;
}

.description-text p {
  margin-bottom: 1rem;
}

.figure-video {
  margin: 2rem 0;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--dark-light);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.points-forts-title {
  margin-top: 2rem;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

.points-forts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.point-fort-card {
  padding: 1.5rem;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-outer);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.point-fort-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.4), 0 0 24px rgba(139, 92, 246, 0.12);
}

/* Figures / images – cartes glassmorphism */
.figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-outer);
  box-shadow: var(--glass-shadow);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  background: var(--dark-light);
}

.figure figcaption {
  display: none;
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--gray-light);
  font-family: 'JetBrains Mono', monospace;
  border-top: 1px solid var(--border-outer);
}

.figure-section {
  margin-bottom: 3rem;
}


/* Sub-sections – style floating-card (landingpage_v3) */
.sub-section {
  margin-bottom: 48px;
  padding: 2rem;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-outer);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.sub-section:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4), 0 0 32px rgba(139, 92, 246, 0.1);
}

.sub-section:last-child {
  margin-bottom: 0;
}

.sub-section-row {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.sub-section-figure {
  flex: 0 1 58%;
  min-width: 0;
}

.sub-section-body {
  flex: 1 1 42%;
  min-width: 0;
}

.sub-section-body ul {
  margin-bottom: 0;
}

.sub-section.image-right .sub-section-row {
  flex-direction: row-reverse;
}

.sub-section-row .figure img {
  max-height: 520px;
}

/* À venir – pills gradient */
.a-venir ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.a-venir li {
  margin: 0;
  padding: 12px 20px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-outer);
  box-shadow: var(--glass-shadow);
  color: var(--primary-light);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.a-venir li:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.a-venir li::before {
  content: none;
}

/* Footer */
footer {
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray);
  border-top: 1px solid var(--border-outer);
  background: rgba(50, 57, 69, 0.5);
}

/* Animations au scroll (optionnel, géré par JS) */
.sub-section.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.sub-section.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .sub-section-row {
    flex-direction: column !important;
  }

  .sub-section-figure,
  .sub-section-body {
    flex: 1 1 100%;
  }

  .points-forts {
    grid-template-columns: 1fr;
  }

  header {
    padding: 80px 0 48px;
  }

  section {
    padding: 3rem 0;
  }
}

@media (max-width: 640px) {
  header h1 {
    font-size: 1.9rem;
  }

  section {
    padding: 2.5rem 0;
  }

  nav.anchors a {
    padding: 6px 14px;
    font-size: 0.85rem;
  }
}

/* Réduction des animations si préféré */
@media (prefers-reduced-motion: reduce) {

  .gradient-orb,
  .pour-qui li,
  .a-venir li {
    animation: none;
    transition: none;
  }

  .sub-section.reveal {
    opacity: 1;
    transform: none;
  }
}
