/* ============================================
   CNPE Consulting — Accueil en slides plein écran
   Chargé uniquement par index.html. Par défaut (sans JS,
   ou avec prefers-reduced-motion), .fullpage/.fp-track/.fp-slide
   restent en flux normal : la page défile normalement, sans
   dégradation fonctionnelle.
   ============================================ */

:root {
  --fp-transition: 650ms cubic-bezier(0.65, 0, 0.35, 1);
  --fp-offset-top: 0px;
}

/* --- Mode slide actif --- */
html.fp-active,
html.fp-active body {
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}
html.fp-active .fullpage {
  position: fixed;
  top: var(--fp-offset-top);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 10;
  background: var(--surface-1);
}
html.fp-active .fp-track {
  height: 100%;
  transition: transform var(--fp-transition);
  will-change: transform;
}
html.fp-active .fp-slide {
  height: 100%;
  overflow-y: auto;
}

/* --- Contenu compact en mode slide : tout doit tenir dans une
   seule vue, sans scroll interne, sur les hauteurs d'écran usuelles
   (sauf la dernière slide, CTA + footer, volontairement plus longue
   que l'écran — voir plus bas) --- */
html.fp-active .fp-slide.section {
  padding: clamp(2rem, 4vh, 3.5rem) 0;
}
html.fp-active .fp-slide .hero {
  padding: clamp(0.75rem, 2vh, 1.5rem) 0 0;
}
html.fp-active .hero__title {
  font-size: clamp(2.45rem, 4.9vh, 3.9rem);
  line-height: 1.07;
}
html.fp-active .hero__lead {
  margin-top: 1rem;
  font-size: 1.12rem;
  line-height: 1.55;
}
html.fp-active .hero__cta {
  margin-top: 1.3rem;
}
html.fp-active .hero__inner {
  height: 100%;
  align-content: stretch;
  align-items: stretch;
}
html.fp-active .hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
html.fp-active .hero__visual {
  max-height: none;
  height: 100%;
  min-height: 0;
}
html.fp-active .fp-slide .trust-bar {
  padding: 0.65rem 0;
}
html.fp-active .trust-bar__inner {
  font-size: 0.72rem;
  gap: 0.35rem 0.9rem;
}
html.fp-active .about__header,
html.fp-active .stats__header,
html.fp-active .services-preview__header {
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
}
html.fp-active .services-preview__list li {
  padding: clamp(1rem, 2.5vh, 1.75rem) 0;
}
html.fp-active .fp-slide h2 {
  font-size: clamp(2.05rem, 4.25vh, 2.9rem);
}
html.fp-active .fp-slide.stats h2 {
  font-size: clamp(2.3rem, 4.75vh, 3.2rem);
}
html.fp-active .stats__intro {
  font-size: 1.22rem;
  line-height: 1.6;
  max-width: 62ch;
}
html.fp-active .about__header .lead {
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 62ch;
}

/* --- Centrage vertical du contenu (slides 1 à 4). overflow:hidden
   sur le conteneur interne garantit qu'un contenu trop long est
   clippé plutôt que de rendre toute la slide scrollable. --- */
html.fp-active .fp-slide.about,
html.fp-active .fp-slide.services-preview,
html.fp-active .fp-slide.stats {
  display: flex;
  align-items: center;
  align-items: safe center;
}
html.fp-active .fp-slide.about > .container,
html.fp-active .fp-slide.services-preview > .container,
html.fp-active .fp-slide.stats > .container {
  max-height: 100%;
  overflow: hidden;
}
html.fp-active .fp-slide:not(.section):not(.final-cta) {
  display: flex;
  flex-direction: column;
}
html.fp-active .fp-slide:not(.section):not(.final-cta) > .hero {
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  min-height: 0;
}
html.fp-active .fp-slide:not(.section):not(.final-cta) > .hero > .hero__inner {
  width: 100%;
}
html.fp-active .fp-slide:not(.section):not(.final-cta) > .trust-bar {
  flex: 0 0 auto;
}

/* --- Slide 5 : CTA final + footer réunis dans une seule vue,
   répartis 65 % blanc (CTA) / 35 % bleu (footer) de la hauteur.
   overflow:hidden sur les deux zones garantit qu'aucun débordement
   de contenu ne peut rendre la slide scrollable (comme les slides
   3 et 4) — un léger dépassement est absorbé par un clip plutôt
   que par un scroll. --- */
html.fp-active .fp-slide.final-cta {
  display: flex;
  flex-direction: column;
  padding: 0;
}
html.fp-active .fp-slide.final-cta .final-cta__inner {
  flex: 0 0 65%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  border-top: none;
  padding: 0;
}
html.fp-active .fp-slide.final-cta .final-cta__btn {
  padding: 0.85rem 1.5rem;
  font-size: 0.92rem;
}
html.fp-active .fp-slide.final-cta .site-footer {
  flex: 0 0 35%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
  padding: clamp(0.35rem, 0.9vh, 0.65rem) 0;
}
html.fp-active .fp-slide.final-cta .site-footer__grid {
  gap: clamp(0.85rem, 1.75vw, 1.5rem);
  margin-bottom: clamp(0.5rem, 1vh, 0.85rem);
  padding-bottom: clamp(0.5rem, 1vh, 0.75rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
html.fp-active .fp-slide.final-cta .site-footer__brandmark {
  position: relative;
  padding-bottom: 0.4rem;
  margin-bottom: 0.4rem;
}
html.fp-active .fp-slide.final-cta .site-footer__brandmark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 2px;
  background: var(--gold);
}
html.fp-active .fp-slide.final-cta .site-footer h4 {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  margin-bottom: 0.35rem;
}
html.fp-active .fp-slide.final-cta .site-footer__brand p,
html.fp-active .fp-slide.final-cta .site-footer address,
html.fp-active .fp-slide.final-cta .site-footer ul li {
  font-size: 0.72rem;
  line-height: 1.3;
}
html.fp-active .fp-slide.final-cta .site-footer ul li {
  margin-bottom: 0.2rem;
}
html.fp-active .fp-slide.final-cta .site-footer__bottom {
  border-top: none;
  padding-top: 0;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

/* --- Points de navigation --- */
.fp-dots {
  position: fixed;
  right: clamp(1.25rem, 3vw, 2.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
html.fp-active .fp-dots {
  opacity: 1;
  pointer-events: auto;
}
.fp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--blue);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}
.fp-dot:hover { transform: scale(1.2); }
.fp-dot.is-active {
  background: var(--gold);
  border-color: var(--gold);
}

@media (max-width: 880px) {
  .fp-dots { right: 1rem; gap: 0.7rem; }
  .fp-dot { width: 12px; height: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html.fp-active .fp-track { transition: none; }
  .fp-dot { transition: none; }
}
