/* ============================================================
   SETIC Fluides — Premium Animations & Effects
   Version wow — thème Alpes / Fluides / Ingénierie
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --blue-dark:   #012A4A;
  --blue:        #0057E0;
  --blue-light:  #D4EEFF;
  --orange:      #f97316;
  --orange-dark: #c2410c;
  --easing:        cubic-bezier(0.16, 1, 0.3, 1);
  --easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --anim-fast:   0.3s;
  --anim-medium: 0.65s;
  --anim-slow:   1.0s;
}

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-48px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-14px) rotate(0.8deg); }
  66%       { transform: translateY(-7px) rotate(-0.8deg); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.3), 0 4px 16px rgba(0,0,0,0.2); }
  50%       { box-shadow: 0 0 48px rgba(249, 115, 22, 0.65), 0 0 80px rgba(249, 115, 22, 0.2), 0 4px 16px rgba(0,0,0,0.2); }
}
@keyframes pulseGlowBlue {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 87, 224, 0.3); }
  50%       { box-shadow: 0 0 48px rgba(0, 87, 224, 0.6), 0 0 80px rgba(0, 87, 224, 0.15); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmer {
  0%   { transform: translateX(-150%) skewX(-18deg); }
  100% { transform: translateX(280%) skewX(-18deg); }
}
@keyframes aurora {
  0%   { transform: rotate(0deg)   scale(1);   opacity: 0.45; }
  33%  { transform: rotate(120deg) scale(1.25); opacity: 0.65; }
  66%  { transform: rotate(240deg) scale(0.88); opacity: 0.30; }
  100% { transform: rotate(360deg) scale(1);   opacity: 0.45; }
}
@keyframes particleFloat {
  0%, 100% { transform: translateY(0)    translateX(0)    rotate(0deg);   opacity: 0.75; }
  25%       { transform: translateY(-28px) translateX(14px)  rotate(90deg);  opacity: 1.00; }
  50%       { transform: translateY(-14px) translateX(-10px) rotate(180deg); opacity: 0.50; }
  75%       { transform: translateY(-38px) translateX(6px)   rotate(270deg); opacity: 0.90; }
}
@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.55; }
  100% { transform: scale(4); opacity: 0; }
}
@keyframes borderFlowAnim {
  0%   { border-color: rgba(249, 115, 22, 0.25); }
  50%  { border-color: rgba(249, 115, 22, 0.75); }
  100% { border-color: rgba(249, 115, 22, 0.25); }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes morphBlob {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}
@keyframes progressSlide {
  from { width: 0%; }
}
@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes numberPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ── Scroll Reveal base ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity var(--anim-slow) var(--easing),
              transform var(--anim-slow) var(--easing);
}
.reveal.from-left  { transform: translateX(-44px) translateY(0); }
.reveal.from-right { transform: translateX(44px) translateY(0); }
.reveal.from-scale { transform: scale(0.88) translateY(0); }
.reveal.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0.06s; }
.stagger > *:nth-child(2) { transition-delay: 0.12s; }
.stagger > *:nth-child(3) { transition-delay: 0.18s; }
.stagger > *:nth-child(4) { transition-delay: 0.24s; }
.stagger > *:nth-child(5) { transition-delay: 0.30s; }
.stagger > *:nth-child(6) { transition-delay: 0.36s; }
.stagger > *:nth-child(7) { transition-delay: 0.42s; }
.stagger > *:nth-child(8) { transition-delay: 0.48s; }

/* ── Gradient text ──────────────────────────────────────────── */
.text-gradient-hero {
  background: linear-gradient(135deg, #ffffff 0%, #D4EEFF 35%, #ffffff 65%, #fed7aa 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 7s ease infinite;
}
.text-gradient-blue {
  background: linear-gradient(135deg, #0057E0 0%, #D4EEFF 50%, #0057E0 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 5s ease infinite;
}
.text-gradient-orange {
  background: linear-gradient(135deg, #f97316 0%, #fbbf24 50%, #f97316 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3.5s ease infinite;
}

/* ── Premium Cards ──────────────────────────────────────────── */
.card-premium {
  position: relative;
  overflow: hidden;
  transition: transform 0.45s var(--easing-bounce),
              box-shadow 0.45s ease;
  will-change: transform;
}
.card-premium::before {
  content: '';
  position: absolute;
  top: 0; left: -150%;
  width: 55%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.14), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 2;
}
.card-premium:hover::before {
  animation: shimmer 0.65s ease forwards;
}
.card-premium:hover {
  transform: translateY(-10px) scale(1.025);
  box-shadow: 0 28px 64px rgba(0, 87, 224, 0.18),
              0 10px 30px rgba(0, 0, 0, 0.14);
}

/* ── Glow effects ───────────────────────────────────────────── */
.glow-orange {
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.25);
  transition: box-shadow 0.3s ease;
}
.glow-orange:hover {
  animation: pulseGlow 1.8s ease infinite;
}
.glow-blue {
  box-shadow: 0 4px 20px rgba(0, 87, 224, 0.25);
  transition: box-shadow 0.3s ease;
}
.glow-blue:hover {
  animation: pulseGlowBlue 1.8s ease infinite;
}

/* ── Premium Buttons ────────────────────────────────────────── */
.btn-premium {
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--easing);
  z-index: 1;
}
.btn-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.btn-premium:hover::after { opacity: 1; }
.btn-premium:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}
.btn-premium:active { transform: translateY(-1px) scale(1.00); }

/* Ripple click effect */
.btn-ripple { position: relative; overflow: hidden; }
.btn-ripple .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  transform: scale(0);
  animation: ripple 0.65s linear;
  pointer-events: none;
}

/* ── Aurora background effect ───────────────────────────────── */
.aurora-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.aurora-orb-1 {
  width: 550px; height: 550px;
  top: -12%; left: -8%;
  background: radial-gradient(circle, rgba(0, 87, 224, 0.55) 0%, transparent 70%);
  opacity: 0.40;
  animation: aurora 22s ease infinite;
}
.aurora-orb-2 {
  width: 420px; height: 420px;
  top: 15%; right: 2%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.35) 0%, transparent 70%);
  opacity: 0.30;
  animation: aurora 28s ease infinite;
  animation-delay: -9s;
}
.aurora-orb-3 {
  width: 650px; height: 650px;
  bottom: -25%; left: 28%;
  background: radial-gradient(circle, rgba(0, 42, 74, 0.65) 0%, transparent 70%);
  opacity: 0.50;
  animation: aurora 35s ease infinite;
  animation-delay: -18s;
}

/* ── Floating particles ─────────────────────────────────────── */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.particle-blue {
  background: rgba(212, 238, 255, 0.65);
  box-shadow: 0 0 8px rgba(212, 238, 255, 0.9);
}
.particle-orange {
  background: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.8);
}
.particle-white {
  background: rgba(255, 255, 255, 0.40);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

/* ── Trust badges hero ──────────────────────────────────────── */
.trust-badge {
  position: relative;
  overflow: hidden;
  transition: all 0.45s var(--easing-bounce);
  cursor: default;
}
.trust-badge:hover {
  transform: translateY(-8px) scale(1.06);
  box-shadow: 0 22px 44px rgba(255,255,255,0.1),
              0 0 0 1px rgba(255,255,255,0.35);
}
.trust-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.trust-badge:hover::after { opacity: 1; }

/* ── Section heading decoration ─────────────────────────────── */
.section-title-line {
  display: block;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #f97316, #fbbf24);
  margin: 14px auto 0;
  transition: width 0.7s var(--easing);
}
.section-title-line.expanded { width: 128px; }

/* ── Icon containers premium ────────────────────────────────── */
.icon-container-premium {
  position: relative;
  transition: all 0.45s var(--easing-bounce);
}
.icon-container-premium::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, transparent 30%, rgba(249, 115, 22, 0.5) 60%, transparent 90%);
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: rotateSlow 3s linear infinite;
}
.card-premium:hover .icon-container-premium::before { opacity: 1; }
.card-premium:hover .icon-container-premium {
  transform: rotate(-6deg) scale(1.12);
}

/* ── Hero image floating frame ──────────────────────────────── */
.hero-image-frame {
  position: relative;
  animation: float 7s ease-in-out infinite;
}
.hero-image-frame::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(249,115,22,0.55), rgba(0,87,224,0.5), rgba(249,115,22,0.25));
  background-size: 300% 300%;
  animation: gradientShift 5s ease infinite;
  z-index: -1;
}

/* ── Stats / counter section ────────────────────────────────── */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: all 0.45s var(--easing-bounce);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f97316, #fbbf24, #f97316);
  background-size: 200% auto;
  animation: gradientShift 2.5s linear infinite;
}
.stat-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.22);
}
.stat-number-pop {
  animation: numberPop 0.4s var(--easing-bounce) forwards;
}

/* ── Highlight band ─────────────────────────────────────────── */
.highlight-band {
  background: linear-gradient(135deg, #012A4A 0%, #0057E0 50%, #012A4A 100%);
  background-size: 300% 300%;
  animation: gradientShift 9s ease infinite;
}

/* ── Badge premium ──────────────────────────────────────────── */
.badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.45);
  color: #f97316;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  animation: borderFlowAnim 3s ease infinite;
}
.badge-premium::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.8);
  flex-shrink: 0;
  animation: pulseGlow 1.5s ease infinite;
}

/* ── Animated card border ───────────────────────────────────── */
.card-border-animated {
  position: relative;
}
.card-border-animated::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(0,87,224,0.4), transparent 40%, rgba(249,115,22,0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card-premium:hover .card-border-animated::after,
.card-border-animated:hover::after { opacity: 1; }

/* ── Step numbers ───────────────────────────────────────────── */
.step-number {
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem;
  background: linear-gradient(135deg, #0057E0, #012A4A);
  color: white;
  box-shadow: 0 4px 18px rgba(0, 87, 224, 0.45);
  transition: all 0.35s var(--easing-bounce);
  flex-shrink: 0;
}
.card-premium:hover .step-number {
  transform: scale(1.18) rotate(-5deg);
  box-shadow: 0 8px 28px rgba(0, 87, 224, 0.55);
}

/* ── Footer premium border ──────────────────────────────────── */
.footer-premium {
  position: relative;
}
.footer-premium::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #0057E0 25%,
    #f97316 50%,
    #0057E0 75%,
    transparent 100%
  );
  background-size: 300% auto;
  animation: gradientShift 5s ease infinite;
}

/* ── Cursor glow (desktop) ──────────────────────────────────── */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 87, 224, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  will-change: transform;
}

/* ── Reading progress bar ───────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #0057E0, #f97316);
  z-index: 10000;
  transition: width 0.1s ease;
  pointer-events: none;
}

/* ── Premium scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #001d36; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0057E0, #f97316);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #3b82f6, #c2410c);
}

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: rgba(249, 115, 22, 0.32);
  color: #ffffff;
}

/* ── BIM section images premium ─────────────────────────────── */
.bim-image-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  transition: all 0.45s var(--easing);
}
.bim-image-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(1,42,74,0.6) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.bim-image-card:hover::after { opacity: 1; }
.bim-image-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 56px rgba(0, 87, 224, 0.22);
}

/* ── Domains list items ─────────────────────────────────────── */
.domain-card {
  transition: all 0.4s var(--easing-bounce);
}
.domain-card:hover {
  transform: translateX(8px);
  box-shadow: 0 20px 48px rgba(0, 87, 224, 0.15);
}

/* ── CTA section glow orb ───────────────────────────────────── */
.cta-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.cta-glow-orb-1 {
  width: 300px; height: 300px;
  top: -50%; left: -5%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.35) 0%, transparent 70%);
  animation: aurora 18s ease infinite;
}
.cta-glow-orb-2 {
  width: 400px; height: 400px;
  bottom: -40%; right: -5%;
  background: radial-gradient(circle, rgba(0, 87, 224, 0.4) 0%, transparent 70%);
  animation: aurora 25s ease infinite;
  animation-delay: -10s;
}

/* ── Nav active ─────────────────────────────────────────────── */
.nav-link-active {
  color: #ffffff !important;
}
.nav-link-active::after {
  width: 100% !important;
}

/* ── Responsive: reduce motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-image-frame { animation: none; }
  .text-gradient-hero,
  .text-gradient-blue,
  .text-gradient-orange { animation: none; background-position: 0% 50%; }
}

/* ── Responsive: mobile (≤767px) ────────────────────────────── */
@media (max-width: 767px) {
  /* Aurora orbs: scale way down to avoid overflow + paint cost */
  .aurora-orb-1 { width: 220px; height: 220px; top: -5%; left: -10%; }
  .aurora-orb-2 { width: 160px; height: 160px; top: 20%; right: -5%; }
  .aurora-orb-3 { width: 260px; height: 260px; bottom: -15%; left: 20%; }

  /* CTA glow orbs */
  .cta-glow-orb-1 { width: 160px; height: 160px; }
  .cta-glow-orb-2 { width: 200px; height: 200px; }

  /* Disable float animation on mobile (reduces jank & battery drain) */
  .hero-image-frame { animation: none; }

  /* Badge premium: more compact on small screens */
  .badge-premium {
    padding: 0.3rem 0.7rem;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    gap: 0.35rem;
  }
  .badge-premium::before { width: 6px; height: 6px; }

  /* Step number: slightly smaller */
  .step-number { width: 2.5rem; height: 2.5rem; font-size: 0.85rem; }

  /* Reduce card 3D hover lift on small screens */
  .card-premium:hover { transform: translateY(-5px) scale(1.01); }

  /* Domain card: disable horizontal slide on mobile */
  .domain-card:hover { transform: none; }

  /* Section title line: centered and smaller start */
  .section-title-line { width: 40px; }
  .section-title-line.expanded { width: 96px; }
}

/* ── Responsive: touch devices (no hover) ───────────────────── */
/* Prevents "sticky" hover states after tap on iOS/Android */
@media (hover: none) and (pointer: coarse) {
  .card-premium:hover {
    transform: none;
    box-shadow: none;
  }
  .card-premium:hover::before { animation: none; }
  .bim-image-card:hover { transform: none; box-shadow: none; }
  .bim-image-card:hover::after { opacity: 0; }
  .trust-badge:hover { transform: none; box-shadow: none; }
  .trust-badge:hover::after { opacity: 0; }
  .btn-premium:hover { transform: none; box-shadow: none; }
  .domain-card:hover { transform: none; box-shadow: none; }
  .stat-card:hover { transform: none; box-shadow: none; }
}

/* ── Responsive: small phones (≤375px) ──────────────────────── */
@media (max-width: 375px) {
  .aurora-orb-1 { width: 160px; height: 160px; }
  .aurora-orb-2 { width: 120px; height: 120px; }
  .aurora-orb-3 { width: 200px; height: 200px; }

  .badge-premium {
    font-size: 0.62rem;
    padding: 0.25rem 0.55rem;
    letter-spacing: 0.04em;
  }
}
