/* Section 4 — Performance et précision (fond clair, trois bandes) */

.sci-section.sci-perf {
  --sci-perf-bg: #eef1f5;
  --sci-perf-ink: #151b33;
  --sci-perf-body: #3d4a63;
  --sci-perf-muted: #5c6b84;
  --sci-perf-line: color-mix(in srgb, #5b6cc7 22%, rgba(21, 27, 51, 0.1));
  --sci-perf-indigo: #5b6cc7;
  position: relative;
  z-index: 1;
  background: var(--sci-perf-bg);
  color: var(--sci-perf-body);
  border-color: rgba(21, 27, 51, 0.08);
  /* padding-block = --sci-section-y via .sci-page :is(.sci-section, ...) */
  overflow: hidden;
}

.sci-perf > .absolute {
  display: none;
}

/* Conteneur = même schéma que les autres sci-section (.max-w-8xl + gutters) */

.sci-perf__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 4.5rem);
  align-items: end;
  margin-bottom: clamp(3.5rem, 6vw, 5.25rem);
}

.sci-page .sci-perf__title {
  margin: 0;
  font-family: var(--font-title);
  font-size: var(--fs-title);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--sci-perf-ink);
}

.sci-perf__title::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin-top: 1.25rem;
  background: var(--sci-orange);
}

.sci-page .sci-perf__lead {
  margin: 0;
  color: var(--sci-perf-muted);
  font-size: var(--fs-lead);
  line-height: 1.75;
}

.sci-perf__bands {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sci-section.sci-perf article.sci-perf__band,
.sci-perf__band {
  display: grid;
  grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
  gap: clamp(1.75rem, 4vw, 3.75rem);
  align-items: center;
  margin: 0;
  padding: clamp(2.25rem, 4vw, 3.35rem) 0;
  border: 0;
  border-top: 1px solid var(--sci-perf-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.sci-perf__band:last-child {
  padding-bottom: 0.35rem;
}

.sci-section.sci-perf article.sci-perf__band--alt,
.sci-perf__band--alt {
  /* Illustration à gauche (56 %), texte à droite (44 %) */
  grid-template-columns: minmax(0, 0.56fr) minmax(0, 0.44fr);
}

.sci-section.sci-perf article.sci-perf__band--alt .sci-perf__copy,
.sci-perf__band--alt .sci-perf__copy {
  order: 2;
}

.sci-section.sci-perf article.sci-perf__band--alt .sci-perf__figure,
.sci-perf__band--alt .sci-perf__figure {
  order: 1;
}

.sci-perf__copy {
  min-width: 0;
}

.sci-perf__step {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.95rem;
}

.sci-perf__index {
  font-family: var(--font-code);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--sci-orange);
  line-height: 1;
}

.sci-perf__rule {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: var(--sci-orange);
  transform-origin: left center;
  border-radius: 1px;
}

.sci-page .sci-perf__subtitle {
  margin: 0 0 1rem;
  font-family: var(--font-subtitle);
  font-size: var(--fs-subtitle);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sci-perf-ink);
}

.sci-page .sci-perf__text {
  margin: 0;
  max-width: 38rem;
  color: var(--sci-perf-body);
  font-size: clamp(0.98rem, 1.05vw, 1.08rem);
  line-height: 1.8;
}

.sci-perf__figure {
  min-width: 0;
  margin: 0;
}

.sci-perf__figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.sci-perf__caption {
  margin: 0.65rem 0 0;
  color: var(--sci-perf-muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.sci-perf__motion {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Sans JS : tout reste visible. Avec .is-enhanced, GSAP pilote l’apparition. */
@media (prefers-reduced-motion: no-preference) {
  .sci-perf.is-enhanced .sci-perf__figure[data-sci-perf-figure]:not(.is-revealed) {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }

  .sci-perf.is-enhanced .sci-perf__rule[data-sci-perf-rule]:not(.is-revealed) {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sci-perf__figure[data-sci-perf-figure],
  .sci-perf__rule[data-sci-perf-rule] {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 1023px) {
  .sci-perf__intro {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    align-items: start;
    margin-bottom: 2.25rem;
  }

  .sci-page .sci-perf__title {
    max-width: 18ch;
  }

  .sci-section.sci-perf article.sci-perf__band,
  .sci-section.sci-perf article.sci-perf__band--alt,
  .sci-perf__band,
  .sci-perf__band--alt {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .sci-section.sci-perf article.sci-perf__band--alt .sci-perf__copy,
  .sci-section.sci-perf article.sci-perf__band--alt .sci-perf__figure,
  .sci-perf__band--alt .sci-perf__copy,
  .sci-perf__band--alt .sci-perf__figure {
    order: initial;
  }

  .sci-section.sci-perf article.sci-perf__band,
  .sci-perf__band {
    padding-block: 2rem;
  }
}

@media (max-width: 639px) {
  .sci-page .sci-perf__subtitle {
    font-size: 1.45rem;
  }
}
