/* ============================================
   GLOBAL — Header, Nav, Footer, Buttons, Cards
   ============================================ */

/* ── SCROLL : Lenis pilote le lissage ; éviter scroll-behavior: smooth sur html (double effet / conflit) ── */
html {
  scroll-behavior: auto;
}

/* ── PAGE TRANSITION OVERLAY ── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--n900);
  z-index: 9999;
  transform: scaleY(1);
  transform-origin: top;
  pointer-events: none;
}

/* ── HEADER ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  height: var(--header-h);
  transition:
    background 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease),
    padding 0.4s var(--ease);
}

.header--scrolled {
  background: rgba(2, 12, 27, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── NAV ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity var(--t-fast);
}

.nav__logo:hover {
  opacity: 0.75;
}

.nav__logo img {
  height: 36px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  font-family: var(--fi);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--t-fast);
  position: relative;
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--blue3);
  transition: width 0.3s var(--ease);
}

.nav__link:hover {
  color: var(--white);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link.active {
  color: var(--white);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__lang {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__lang-btn {
  font-family: var(--fi);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.25rem 0.4rem;
  border-radius: var(--r-xs);
  transition: all var(--t-fast);
  cursor: pointer;
  background: none;
  border: none;
  touch-action: manipulation;
}

.nav__lang-btn.active,
.nav__lang-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

/* Nav hamburger (mobile) */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  touch-action: manipulation;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

/* Mobile nav overlay */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 12, 27, 0.98);
  backdrop-filter: blur(20px);
  z-index: 998;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.25rem;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.nav__mobile-links {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
  overflow: visible;
}

.nav__mobile.open {
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-link {
  display: inline-block;
  width: max-content;
  max-width: min(100%, calc(100vw - 2.5rem));
  font-family: var(--fs);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: -0.02em;
  transition: color var(--t-fast);
  vertical-align: top;
  box-sizing: border-box;
  /* Réserve la place du trait : pas d’animation, pas de transition sur la bordure */
  border-bottom: 2px solid transparent;
  padding-bottom: 0.1em;
}

.nav__mobile-link:hover {
  color: var(--white);
}

.nav__mobile-link.active {
  color: var(--white);
  border-bottom: 2px solid var(--blue3);
}

.nav__mobile-cta {
  flex-shrink: 0;
  align-self: stretch;
  max-width: 100%;
  margin-bottom: env(safe-area-inset-bottom, 0);
}

/* ── HERO ── */
.page-hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  background: var(--n900);
  overflow: hidden;
  padding-top: var(--header-h);
}

.page-hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(2, 12, 27, 0.75) 0%,
    rgba(2, 12, 27, 0.4) 50%,
    rgba(2, 12, 27, 0.8) 100%
  );
  z-index: 1;
}

.page-hero__grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(26, 111, 240, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 111, 240, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

.page-hero__title em {
  color: var(--accent);
  font-style: normal;
}

.page-hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3.5rem var(--pad);
  position: relative;
  z-index: 2;
}

.page-hero__title {
  font-family: var(--fs);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.page-hero__subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--fs);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--r-xs);
  cursor: pointer;
  border: none;
  transition: all var(--t-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
}

/* Scan line hover effect on all CTAs */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.08) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
  transform: skewX(-15deg);
}

.btn:hover::before {
  animation: btnScan 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes btnScan {
  0% {
    left: -100%;
  }
  100% {
    left: 140%;
  }
}

.btn--primary {
  background: var(--blue2);
  color: #fff;
  padding: 0.85rem 1.8rem;
}

.btn--primary:hover {
  background: var(--blue3);
  color: #fff;
  transform: translateY(-2px);
}

.btn--primary-lg {
  background: var(--blue2);
  color: #fff;
  padding: 1.1rem 2.8rem;
}

.btn--primary-lg:hover {
  background: var(--blue3);
  color: #fff;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  padding: 0.85rem 1.8rem;
  border: 0.5px solid rgba(255, 255, 255, 0.15);
}

.btn--ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.btn--ghost-lg {
  background: transparent;
  color: #fff;
  padding: 1.1rem 2.8rem;
  border: 0.5px solid rgba(255, 255, 255, 0.15);
}

.btn--ghost-lg:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Ghost on light backgrounds */
.btn--ghost-light {
  color: var(--g700);
  border-color: var(--g200);
}

.btn--ghost-light:hover {
  border-color: var(--blue2);
  color: var(--blue);
}

/* Section-level CTA spacing */
.section-cta {
  margin-top: 2.5rem;
  text-align: center;
}

.btn--outline {
  background: transparent;
  color: var(--blue);
  padding: 0.85rem 1.8rem;
  border: 1px solid var(--blue2);
}

.btn--outline:hover {
  background: var(--off);
}

/* Arrow icon inside buttons */
.btn__arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ── LOUPE CARDS (shared: solutions + technologie) ── */
.loupe-card {
  background: rgba(6, 15, 30, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(93, 163, 255, 0.1);
  border-radius: var(--r-sm);
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.loupe-card:hover,
.loupe-card.is-open {
  background: rgba(26, 111, 240, 0.12);
  border-color: rgba(93, 163, 255, 0.3);
  transform: translateY(-3px);
}

.loupe-card__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.loupe-card__icon {
  width: 13px;
  height: 13px;
  stroke: rgba(93, 163, 255, 0.35);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: stroke 0.3s;
}

.loupe-card:hover .loupe-card__icon,
.loupe-card.is-open .loupe-card__icon {
  stroke: rgba(93, 163, 255, 0.7);
}

.loupe-card__tag {
  font-family: var(--fs);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.03em;
}

.loupe-card__text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition:
    max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s 0.05s,
    margin-top 0.3s;
}

.loupe-card:hover .loupe-card__text,
.loupe-card.is-open .loupe-card__text {
  max-height: 80px;
  opacity: 1;
  margin-top: 0.75rem;
}

/* ── CARDS ── */
.card-dark {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-sm);
  padding: 2rem;
  transition:
    background var(--t-base),
    border-color var(--t-base),
    transform var(--t-base);
}

.card-dark:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
  transform: translateY(-4px);
}

.card-light {
  background: var(--white);
  border: 1px solid var(--g100);
  border-radius: var(--r-sm);
  padding: 2rem;
  transition:
    border-color var(--t-base),
    transform var(--t-base);
}

.card-light:hover {
  border-color: var(--g300);
  transform: translateY(-4px);
}

/* ── ICON CONTAINER ── */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-xs);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  transition:
    background var(--t-base),
    border-color var(--t-base);
  flex-shrink: 0;
}

.icon-box--light {
  background: var(--off);
  border: 1px solid var(--g100);
}

.icon-box svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue3);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon-box--light svg {
  stroke: var(--blue);
}

/* ── GRID BACKGROUND PATTERN ── */
.grid-bg {
  background-image:
    linear-gradient(rgba(26, 111, 240, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 111, 240, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── GLOW EFFECTS ── */
.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}

.glow--tr {
  top: -10%;
  right: -5%;
  width: min(500px, 80vw);
  height: min(500px, 80vw);
  background: radial-gradient(
    circle,
    rgba(26, 111, 240, 0.14) 0%,
    transparent 70%
  );
}

.glow--bl {
  bottom: -10%;
  left: -5%;
  width: min(400px, 70vw);
  height: min(400px, 70vw);
  background: radial-gradient(
    circle,
    rgba(26, 111, 240, 0.1) 0%,
    transparent 70%
  );
}

/* ── FOOTER ── */
.footer {
  background: var(--n900);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 5rem 0 2.5rem;
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__brand {
  display: block;
  margin-bottom: 1.25rem;
}

.footer__brand img {
  height: 34px;
  width: auto;
}

.footer__tagline {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
  max-width: 260px;
  margin-bottom: 1.5rem;
}

.footer__social {
  display: flex;
  gap: 0.75rem;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-xs);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  transition: all var(--t-fast);
}

.footer__social-link:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.footer__social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.footer__col-title {
  font-family: var(--fs);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 1.25rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__links .footer__menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__link {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--t-fast);
  line-height: 1;
}

.footer__link:hover {
  color: var(--white);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.25);
}

.footer__legal {
  display: flex;
  gap: 1.5rem;
}

.footer__legal a {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.25);
  transition: color var(--t-fast);
}

.footer__legal a:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--fi);
  margin-bottom: 2rem;
}

.breadcrumb__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.breadcrumb__current {
  color: var(--accent);
}

/* ── RESPONSIVE GLOBAL ── */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* ── MOBILE CONTACT BAR ── */
.mobile-contact-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 997;
  background: rgba(2, 12, 27, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem var(--pad);
}

.mobile-contact-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 400px;
  margin: 0 auto;
}

.mobile-contact-bar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--fi);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--t-fast);
  text-decoration: none;
}

.mobile-contact-bar__btn:hover,
.mobile-contact-bar__btn:active {
  color: var(--white);
}

.mobile-contact-bar__btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-contact-bar__sep {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

/* Mobile lang in mobile nav */
.nav__mobile-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.nav__mobile-lang .nav__lang-btn {
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-xs);
}

.nav__mobile-lang .nav__lang-btn.active {
  background: var(--blue2);
  border-color: var(--blue2);
  color: var(--white);
}

@media (max-width: 768px) {
  .nav__links,
  .nav__actions {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__mobile {
    display: flex;
  }

  .section-pad {
    padding: 3.5rem 0;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Show sticky contact bar on mobile */
  .mobile-contact-bar {
    display: block;
  }

  /* Add bottom padding to body so content doesn't hide behind sticky bar */
  body {
    padding-bottom: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── HERO SCAN EFFECT ── */
.hero-scan {
  position: relative;
  overflow: hidden;
  /* Avoid clipping glyph ascenders/descenders during clip-path reveal. */
  padding-block: 0.12em;
  margin-block: -0.12em;
}

/* Neon scan line — sweeps across the title */
.hero-scan::after {
  content: "";
  position: absolute;
  top: 0;
  left: -4px;
  width: 3px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(93, 163, 255, 0) 0%,
    rgba(93, 163, 255, 0.9) 25%,
    rgba(93, 163, 255, 0.9) 75%,
    rgba(93, 163, 255, 0) 100%
  );
  box-shadow:
    0 0 14px 4px rgba(93, 163, 255, 0.5),
    0 0 36px 8px rgba(93, 163, 255, 0.2);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.hero-scan.is-scanning::after {
  animation: heroScanLine 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroScanLine {
  0% {
    left: -4px;
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Title text: revealed via clip-path behind the scan line */
.hero-scan__text {
  display: inline-block;
  clip-path: inset(-0.12em 100% -0.12em 0);
  -webkit-clip-path: inset(-0.12em 100% -0.12em 0);
  transition: none;
}

.hero-scan.is-scanning .hero-scan__text {
  animation: heroTextReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroTextReveal {
  0% {
    clip-path: inset(-0.12em 100% -0.12em 0);
    -webkit-clip-path: inset(-0.12em 100% -0.12em 0);
  }
  100% {
    clip-path: inset(-0.12em 0% -0.12em 0);
    -webkit-clip-path: inset(-0.12em 0% -0.12em 0);
  }
}

/* Elements that appear after scan completes */
.hero-scan__after {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.hero-scan__after.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
