/* ============================================================
   AGENCE UIO — upgrades.css
   Effets visuels avancés impossibles sur Wix / Squarespace
   ============================================================ */

/* ── VARIABLES SUPPLÉMENTAIRES ── */
:root {
  --purple:   #a855f7;
  --glow-blue: rgba(0,170,255,0.35);
  --glow-green: rgba(126,223,74,0.25);
  --glow-purple: rgba(168,85,247,0.3);
}

/* ── CANVAS WEBGL HERO ── */
#hero-webgl {
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}
@media (max-width: 900px) {
  #hero-webgl {
    width: 340px;
    height: 340px;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    opacity: 0.5;
  }
}

/* ── CURSEUR AVANCÉ ── */
#cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width .15s, height .15s, opacity .3s;
}
#cursor.hover {
  width: 20px; height: 20px;
}
#cursor-ring { display: none !important; }
#cursor-trail-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 99997;
}

/* ── NAV AMÉLIORÉE ── */
nav::after {
  width: 160px !important;
  background: linear-gradient(90deg, transparent, var(--blue), var(--purple), var(--green), transparent) !important;
  animation: laser 3.5s linear infinite !important;
}
.nav-cta {
  background: linear-gradient(135deg, var(--blue), var(--purple)) !important;
  box-shadow: 0 0 24px rgba(168,85,247,0.3);
}
.nav-cta:hover {
  box-shadow: 0 0 40px rgba(168,85,247,0.6) !important;
  transform: translateY(-1px);
}
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transform: scaleX(0);
  transition: transform .3s;
}
.nav-links a:hover::after {
  transform: scaleX(1);
}

/* ── HERO AMÉLIORÉ ── */
.hero {
  background: radial-gradient(ellipse at 50% 40%,
    rgba(0,170,255,0.07) 0%,
    rgba(168,85,247,0.04) 40%,
    transparent 70%) !important;
}

/* Titre hero — gradient animé sur em */
.hero h1 em {
  background: linear-gradient(135deg,
    var(--blue) 0%,
    var(--purple) 45%,
    var(--green) 100%) !important;
  background-size: 200% 200% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  animation: gradientShift 4s ease infinite !important;
}
@keyframes gradientShift {
  0%  { background-position: 0% 50%;   }
  50% { background-position: 100% 50%; }
  100%{ background-position: 0% 50%;   }
}

/* Morphing text zone — taille réservée */
#morph-target {
  display: inline-block;
  min-width: 260px;
  position: relative;
}

/* Hero badge amélioré */
.hero-badge {
  background: rgba(0,170,255,0.07) !important;
  border-color: rgba(168,85,247,0.3) !important;
  box-shadow: 0 0 30px rgba(0,170,255,0.12);
  backdrop-filter: blur(10px);
}

/* Boutons hero améliorés */
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--purple)) !important;
  box-shadow: 0 0 40px rgba(0,170,255,0.35) !important;
  transition: transform .25s, box-shadow .25s !important;
}
.btn-primary:hover {
  transform: translateY(-4px) scale(1.03) !important;
  box-shadow: 0 0 70px rgba(168,85,247,0.55) !important;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: conic-gradient(transparent 270deg, rgba(255,255,255,0.15), transparent);
  animation: btn-spin 2.5s linear infinite;
  border-radius: inherit;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.btn-secondary:hover {
  border-color: var(--purple) !important;
  background: rgba(168,85,247,0.08) !important;
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(168,85,247,0.2);
}

/* Indicateur de scroll */
.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  animation: fadeUp 1s 1.8s ease both;
}
.scroll-hint span {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-hint-line {
  width: 1px;
  height: 0;
  background: linear-gradient(to bottom, var(--blue), transparent);
  animation: growLine 2s 2s ease-in-out infinite;
}
@keyframes growLine {
  0%   { height: 0;    opacity: 1; }
  60%  { height: 48px; opacity: 1; }
  100% { height: 48px; opacity: 0; }
}

/* ── STAT STRIP AMÉLIORÉ ── */
.stat-item {
  position: relative;
  overflow: hidden;
  transition: background .3s;
}
.stat-item:hover {
  background: rgba(0,170,255,0.04);
}
.stat-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transform: scaleX(0);
  transition: transform .4s;
}
.stat-item:hover::after {
  transform: scaleX(1);
}

/* ── CARTES AVANTAGES — tilt 3D + spotlight ── */
.av-card {
  transition: border-color .3s, box-shadow .4s, transform .2s !important;
}
.av-card:hover {
  border-color: rgba(168,85,247,0.45) !important;
  box-shadow: 0 30px 80px rgba(0,170,255,0.14),
              0 0 0 1px rgba(168,85,247,0.2) !important;
}
.av-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(0,170,255,0.07) 0%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity .3s;
  border-radius: inherit;
  pointer-events: none;
}
.av-card:hover::after {
  opacity: 1;
}
.av-icon {
  background: linear-gradient(135deg,
    rgba(0,170,255,0.14),
    rgba(168,85,247,0.1)) !important;
  border: 1px solid rgba(0,170,255,0.18);
  transition: box-shadow .3s, transform .3s;
}
.av-card:hover .av-icon {
  box-shadow: 0 0 20px rgba(0,170,255,0.3);
  transform: scale(1.08) rotate(-3deg);
}

/* ── ÉTAPES PROCÉDURE ── */
.step {
  transition: transform .3s;
  position: relative;
}
.step:hover {
  transform: translateX(10px);
}
.step::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--blue), transparent);
  opacity: 0;
  transition: opacity .4s;
}
.step:hover::before {
  opacity: 1;
}
.step-num {
  transition: color .3s, text-shadow .3s !important;
}
.step:hover .step-num {
  color: rgba(168,85,247,0.45) !important;
  text-shadow: 0 0 40px rgba(168,85,247,0.3);
}

/* ── CHAT WIDGET AMÉLIORÉ ── */
.chat-widget {
  box-shadow:
    0 40px 100px rgba(0,0,0,0.5),
    0 0 0 1px rgba(0,170,255,0.07),
    inset 0 1px 0 rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(20px) !important;
}
.chat-top {
  background: linear-gradient(135deg, #004e99, #0077cc, #5500aa) !important;
  position: relative;
  overflow: hidden;
}
.chat-top::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 60% 60%,
    rgba(255,255,255,0.06) 0%,
    transparent 50%);
  animation: chat-shimmer 4s ease-in-out infinite;
}
@keyframes chat-shimmer {
  0%,100% { transform: translate(0,0);   }
  50%      { transform: translate(5%,5%); }
}
.chat-top-info span::before {
  animation: pulse-dot 1.5s ease-in-out infinite !important;
}
.chat-sugg {
  border-color: rgba(0,170,255,0.45) !important;
  transition: all .2s, transform .2s !important;
}
.chat-sugg:hover {
  transform: translateX(4px) !important;
  box-shadow: 0 0 16px rgba(0,170,255,0.25);
}
.bubble.bot {
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.05) !important;
}
.chat-input-row input:focus {
  box-shadow: 0 0 0 3px rgba(0,170,255,0.12) !important;
}

/* ── CARTES SERVICES — glow amélioré ── */
.svc-card {
  position: relative;
  overflow: hidden;
}
.svc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, var(--blue), var(--purple), transparent);
  opacity: 0;
  transition: opacity .4s;
}
.svc-card:hover::before {
  opacity: 1;
}
.svc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%,
    rgba(0,170,255,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.svc-card:hover::after {
  opacity: 1;
}
.svc-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,170,255,0.45) !important;
  box-shadow: 0 40px 100px rgba(0,170,255,0.14) !important;
}
.svc-card[style*="rgba(126,223,74"]:hover {
  border-color: rgba(126,223,74,0.55) !important;
  box-shadow: 0 40px 100px rgba(126,223,74,0.12) !important;
}
.svc-icon {
  transition: transform .3s, box-shadow .3s;
}
.svc-card:hover .svc-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 0 24px rgba(0,170,255,0.3);
}

/* ── CONTACT AMÉLIORÉ ── */
.contact-item {
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid transparent;
  transition: all .3s;
}
.contact-item:hover {
  border-color: var(--border);
  background: rgba(0,170,255,0.04);
  transform: translateX(4px);
}
.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(0,170,255,0.1) !important;
  border-color: var(--purple) !important;
}
.contact-form button {
  background: linear-gradient(135deg, var(--blue), var(--purple)) !important;
  transition: transform .25s, box-shadow .25s, opacity .2s !important;
}
.contact-form button:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 0 50px rgba(168,85,247,0.4) !important;
  opacity: 1 !important;
}

/* ── FOOTER LIGNE GRADIENT ── */
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, var(--blue), var(--purple), var(--green), transparent);
  opacity: 0.6;
}
footer { position: relative; }

/* ── RÉVÉAL AU SCROLL — amélioré ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .85s cubic-bezier(.16,1,.3,1),
              transform .85s cubic-bezier(.16,1,.3,1) !important;
}
.reveal.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity .85s cubic-bezier(.16,1,.3,1),
              transform .85s cubic-bezier(.16,1,.3,1);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .85s cubic-bezier(.16,1,.3,1),
              transform .85s cubic-bezier(.16,1,.3,1);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── RIPPLE AMÉLIORÉ ── */
.ripple-effect {
  background: rgba(255,255,255,0.2) !important;
  animation: ripple-anim .8s cubic-bezier(.16,1,.3,1) forwards !important;
}
@keyframes ripple-anim {
  0%   { transform: scale(0); opacity: 1;   }
  100% { transform: scale(5); opacity: 0;   }
}

/* ── BADGE FLOTTANT ── */
.live-badge {
  position: fixed;
  bottom: 88px; right: 18px;
  background: rgba(10,20,36,0.92);
  border: 1px solid rgba(0,170,255,0.3);
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 11px;
  color: var(--blue);
  z-index: 9996;
  backdrop-filter: blur(12px);
  letter-spacing: .08em;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ── PROMO BANNER AMÉLIORÉ ── */
.promo-banner {
  background: linear-gradient(135deg,
    rgba(126,223,74,0.09),
    rgba(0,170,255,0.07)) !important;
  border-color: rgba(126,223,74,0.4) !important;
  box-shadow: 0 0 40px rgba(126,223,74,0.08),
              inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  transition: box-shadow .3s, transform .3s;
}
.promo-banner:hover {
  box-shadow: 0 0 60px rgba(126,223,74,0.14),
              inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

/* ── SECTION AVANTAGES — fond amélioré ── */
#avantages::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%,
    rgba(168,85,247,0.05) 0%, transparent 60%);
  pointer-events: none;
}
#avantages { position: relative; overflow: hidden; }

/* ── GRILLE HERO — animation plus visible ── */
.hero-grid {
  background-image:
    linear-gradient(rgba(0,170,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,170,255,0.055) 1px, transparent 1px) !important;
}

/* ── HALO HERO — subtil ── */
.hero-glow {
  background: radial-gradient(circle,
    rgba(0,170,255,0.13) 0%,
    rgba(168,85,247,0.05) 35%,
    transparent 70%) !important;
  width: 480px !important;
  height: 480px !important;
}
@media (max-width: 900px) {
  .hero-glow {
    width: 220px !important;
    height: 220px !important;
  }
}

/* ── RESPONSIVE UPGRADES ── */
@media (max-width: 900px) {
  #cursor-trail-canvas { display: none; }
  .scroll-hint { display: none; }
  .live-badge  { display: none; }
}
