/* ============================================================
   GBECHI BONIFACE — ANIMATIONS & BACKGROUNDS v1
   Arrière-plans stylés + animations modernes
   ============================================================ */

/* ============= KEYFRAMES GLOBAUX ============= */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes particleFloat {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(60px) rotate(720deg); opacity: 0; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes morphBlob {
  0%,100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25%      { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50%      { border-radius: 50% 60% 30% 70% / 40% 70% 60% 30%; }
  75%      { border-radius: 40% 70% 60% 30% / 70% 40% 50% 60%; }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 20px rgba(29,78,216,.3), 0 0 40px rgba(29,78,216,.1); }
  50%     { box-shadow: 0 0 40px rgba(29,78,216,.6), 0 0 80px rgba(29,78,216,.2), 0 0 120px rgba(249,115,22,.15); }
}
@keyframes textGlow {
  0%,100% { text-shadow: 0 0 10px rgba(249,115,22,.4); }
  50%     { text-shadow: 0 0 30px rgba(249,115,22,.9), 0 0 60px rgba(249,115,22,.4); }
}
@keyframes borderRun {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}
@keyframes floatSlow {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-20px) scale(1.03); }
}
@keyframes rotateSlowCCW {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
@keyframes ripple {
  0%   { transform: scale(1); opacity: .6; }
  100% { transform: scale(2.5); opacity: 0; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px) scale(.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes scanLine {
  0%   { top: -10%; }
  100% { top: 110%; }
}
@keyframes neonBorder {
  0%,100% { border-color: rgba(29,78,216,.5); box-shadow: 0 0 8px rgba(29,78,216,.3); }
  50%     { border-color: rgba(249,115,22,.7); box-shadow: 0 0 20px rgba(249,115,22,.5); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes wavyBg {
  0%   { transform: translateX(0) scaleY(1); }
  50%  { transform: translateX(-5%) scaleY(1.05); }
  100% { transform: translateX(0) scaleY(1); }
}
@keyframes aurora {
  0%   { transform: rotate(0deg) scale(1); opacity: .4; }
  33%  { transform: rotate(120deg) scale(1.2); opacity: .6; }
  66%  { transform: rotate(240deg) scale(.9); opacity: .3; }
  100% { transform: rotate(360deg) scale(1); opacity: .4; }
}
@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes blink {
  50% { border-color: transparent; }
}
@keyframes particleDrift {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  20%  { opacity: .8; }
  80%  { opacity: .6; }
  100% { transform: translateY(-80px) translateX(40px); opacity: 0; }
}

/* ============================================================
   SECTION ABOUT — Fond avec mesh gradient animé
   ============================================================ */
.about {
  position: relative;
  overflow: hidden;
}
.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% 30%, rgba(29,78,216,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 70%, rgba(249,115,22,.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.about .container { position: relative; z-index: 1; }

/* Blob flottant derrière la photo about */
.about-photo-wrap::before {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(29,78,216,.12), rgba(249,115,22,.08));
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: morphBlob 10s ease-in-out infinite;
  z-index: 0;
  filter: blur(30px);
}
.about-photo { position: relative; z-index: 1; }

/* ============================================================
   SECTION SERVICES — Grille avec effets de carte 3D
   ============================================================ */
.services {
  position: relative;
  overflow: hidden;
}
.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(29,78,216,.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(249,115,22,.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Ligne lumineuse animée sur les service-card au hover */
.service-card {
  transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(.25,.46,.45,.94), box-shadow .4s ease, border-color .4s ease;
}
.service-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 0 20px 60px rgba(29,78,216,.15), 0 8px 24px rgba(0,0,0,.08);
}
/* Shimmer sur le header image des cartes */
.service-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 40%,
    rgba(255,255,255,.12) 50%,
    transparent 60%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  opacity: 0;
  transition: opacity .3s ease;
}
.service-card:hover .service-img::after { opacity: 1; }

/* ============================================================
   SECTION WHY-ME / STATS — Particules flottantes
   ============================================================ */
.why-me {
  position: relative;
  overflow: hidden;
}

/* Particules décoratives */
.why-me::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px),
    radial-gradient(circle, rgba(249,115,22,.1) 1px, transparent 1px);
  background-size: 40px 40px, 80px 80px;
  background-position: 0 0, 20px 20px;
  animation: wavyBg 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.why-me .container,
.why-me .section-header,
.stats-grid, .why-bottom { position: relative; z-index: 1; }

/* Stat cards avec glow animé */
.stat-card {
  transition: transform .4s ease, background .4s ease, box-shadow .4s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 300deg,
    rgba(249,115,22,.15) 300deg 360deg
  );
  animation: rotate 6s linear infinite;
  opacity: 0;
  transition: opacity .4s ease;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 50px rgba(0,0,0,.3), 0 0 30px rgba(249,115,22,.2);
}
.stat-num { display: inline-block; animation: countUp .6s ease backwards; }

/* ============================================================
   SECTION PORTFOLIO — Overlay amélioré
   ============================================================ */
.portfolio {
  position: relative;
  overflow: hidden;
}
.portfolio::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  top: -100px; right: -200px;
  background: radial-gradient(circle, rgba(29,78,216,.06) 0%, transparent 70%);
  pointer-events: none;
}

.portfolio-card {
  transition: transform .4s cubic-bezier(.25,.46,.45,.94), box-shadow .4s ease;
}
.portfolio-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 64px rgba(29,78,216,.18), 0 8px 24px rgba(0,0,0,.1);
}
/* Bordure lumineuse animée sur hover */
.portfolio-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(var(--angle, 0deg), var(--blue), var(--orange), var(--blue));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s ease;
}
.portfolio-card:hover::after { opacity: 1; }

/* ============================================================
   SECTION TESTIMONIALS — Fond avec aurora
   ============================================================ */
.testimonials {
  position: relative;
  overflow: hidden;
}
.testimonials::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 0deg,
    rgba(29,78,216,.04),
    rgba(249,115,22,.04),
    rgba(29,78,216,.04),
    rgba(59,130,246,.04),
    rgba(29,78,216,.04)
  );
  border-radius: 50%;
  animation: aurora 20s linear infinite;
  pointer-events: none;
}
.testi-card {
  transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
  position: relative;
  overflow: hidden;
}
.testi-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
  transition: left .6s ease;
}
.testi-card:hover::before { left: 140%; }
.testi-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(29,78,216,.12);
  border-color: var(--border-blue);
}

/* ============================================================
   SECTION TARIFS — Effet spotlight
   ============================================================ */
.tarifs {
  position: relative;
  overflow: hidden;
}
.tarifs::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(29,78,216,.07) 0%, transparent 70%);
  pointer-events: none;
  animation: floatSlow 8s ease-in-out infinite;
}
.tarif-card {
  transition: transform .4s cubic-bezier(.25,.46,.45,.94), box-shadow .4s ease;
  position: relative;
  overflow: hidden;
}
.tarif-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--orange), var(--blue));
  background-size: 200% 100%;
  animation: borderRun 3s linear infinite;
  opacity: 0;
  transition: opacity .4s ease;
}
.tarif-card:hover::before { opacity: 1; }
.tarif-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(29,78,216,.15), 0 8px 24px rgba(0,0,0,.08);
}
.tarif-featured {
  animation: glowPulse 3s ease-in-out infinite;
}
.tarif-featured:hover {
  animation: none;
  box-shadow: 0 28px 70px rgba(29,78,216,.25), 0 0 40px rgba(249,115,22,.15);
}

/* ============================================================
   SECTION BLOG — Cards avec sweep effect
   ============================================================ */
.blog {
  position: relative;
  overflow: hidden;
}
.blog::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(29,78,216,.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 100% 0%, rgba(249,115,22,.03) 0%, transparent 60%);
  pointer-events: none;
}
.blog-card {
  transition: transform .4s cubic-bezier(.25,.46,.45,.94), box-shadow .4s ease;
  position: relative;
  overflow: hidden;
}
.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(29,78,216,.12), 0 6px 20px rgba(0,0,0,.08);
}
/* Scan line sur l'image blog */
.blog-img::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(249,115,22,.6), transparent);
  top: -10%;
  animation: scanLine 4s linear infinite;
  z-index: 2;
  opacity: 0;
  transition: opacity .3s ease;
}
.blog-card:hover .blog-img::before { opacity: 1; }

/* ============================================================
   SECTION BENI CAVANNO — Fond dégradé avec orbes
   ============================================================ */
.beni-cavanno,
.cavanno-section {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.beni-cavanno::before,
.cavanno-section::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  top: -100px; left: -100px;
  background: radial-gradient(circle, rgba(249,115,22,.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatSlow 10s ease-in-out infinite;
  pointer-events: none;
}
.beni-cavanno::after,
.cavanno-section::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  bottom: -80px; right: -80px;
  background: radial-gradient(circle, rgba(29,78,216,.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatSlow 12s ease-in-out infinite reverse;
  pointer-events: none;
}

/* Photo card Cavanno avec effet de bordure animée */
.cavanno-photo-card {
  position: relative;
  transition: transform .4s ease, box-shadow .4s ease;
}
.cavanno-photo-card::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, var(--blue), var(--orange), var(--blue-mid), var(--orange));
  background-size: 300% 300%;
  border-radius: calc(var(--radius-xl) + 3px);
  animation: gradientShift 4s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity .4s ease;
}
.cavanno-photo-card:hover::before { opacity: 1; }
.cavanno-photo-card:hover { transform: translateY(-6px) scale(1.01); }

/* ============================================================
   CTA BANNER — Particules animées
   ============================================================ */
.cta-banner {
  position: relative;
  overflow: hidden;
}
/* Orbes décoratifs supplémentaires dans le CTA */
.cta-banner::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  top: -80px; right: -80px;
  background: radial-gradient(circle, rgba(249,115,22,.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatSlow 7s ease-in-out infinite;
  pointer-events: none;
}

/* ============================================================
   SECTION CONTACT — Scan effect sur le formulaire
   ============================================================ */
.contact-form-wrap,
.contact-pro-form {
  position: relative;
  overflow: hidden;
  transition: box-shadow .4s ease;
}
.contact-form-wrap::before,
.contact-pro-form::before {
  content: '';
  position: absolute;
  top: -100%; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(29,78,216,.4), rgba(249,115,22,.4), transparent);
  animation: scanLine 5s linear infinite;
}
.contact-form-wrap:hover,
.contact-pro-form:hover {
  box-shadow: 0 32px 80px rgba(0,0,0,.4), 0 0 40px rgba(29,78,216,.15);
}

/* Input focus avec glow */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,78,216,.12), 0 0 20px rgba(29,78,216,.08);
  transform: translateY(-1px);
  transition: all .3s ease;
}

/* ============================================================
   FOOTER — Ligne séparatrice animée
   ============================================================ */
.footer-top {
  position: relative;
}
.footer-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--orange), var(--blue), transparent);
  background-size: 200% 100%;
  animation: borderRun 4s linear infinite;
}

/* ============================================================
   CANVAS PARTICLES — Fond global avec particules flottantes
   ============================================================ */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
}

/* ============================================================
   SECTION HEADER — Tag avec shimmer
   ============================================================ */
.section-tag {
  position: relative;
  overflow: hidden;
}
.section-tag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
}

/* ============================================================
   NAV LINKS — Underline animée sur hover
   ============================================================ */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; right: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  border-radius: 2px;
  transition: left .3s ease, right .3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { left: 8px; right: 8px; }

/* ============================================================
   SKILL TAGS — Animation d'entrée en cascade
   ============================================================ */
.skill-tag {
  animation: fadeInScale .5s ease backwards;
}
.about-skills .skill-tag:nth-child(1) { animation-delay: .05s; }
.about-skills .skill-tag:nth-child(2) { animation-delay: .10s; }
.about-skills .skill-tag:nth-child(3) { animation-delay: .15s; }
.about-skills .skill-tag:nth-child(4) { animation-delay: .20s; }
.about-skills .skill-tag:nth-child(5) { animation-delay: .25s; }
.about-skills .skill-tag:nth-child(6) { animation-delay: .30s; }

/* ============================================================
   HERO — Améliorations visuelles supplémentaires
   ============================================================ */

/* Orbe supplémentaire violet dans le hero */
.hero-bg::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  bottom: 10%; left: 35%;
  background: rgba(139,92,246,.08);
  border-radius: 50%;
  filter: blur(60px);
  animation: floatSlow 14s ease-in-out infinite;
}

/* Ligne de scan sur la photo du hero */
.hero-photo-frame::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(249,115,22,.5), transparent);
  top: 0;
  animation: scanLine 6s linear infinite;
}

/* Ripple sur le badge "Disponible" */
.hero-badge {
  position: relative;
}
.badge-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #F97316;
  animation: ripple 2s ease-out infinite;
}
.badge-dot { position: relative; }

/* Float cards avec hover interactif */
.hero-float-card {
  cursor: default;
  transition: transform .3s ease, box-shadow .3s ease;
}
.hero-float-card:hover {
  transform: translateY(-4px) scale(1.05) !important;
  box-shadow: 0 12px 32px rgba(29,78,216,.25);
  animation-play-state: paused;
}

/* ============================================================
   ABOUT-ID-BLOCK — Bordure animée (version EN)
   ============================================================ */
.about-id-block {
  position: relative;
  overflow: hidden;
}
.about-id-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--orange), var(--blue));
  background-size: 200% 100%;
  animation: borderRun 3s linear infinite;
}

/* ============================================================
   SECTION DIVIDERS — Vagues entre sections
   ============================================================ */
.section-wave-divider {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
}
.section-wave-divider svg {
  display: block;
  width: 100%;
  animation: wavyBg 8s ease-in-out infinite;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  z-index: 9999;
  transition: width .1s linear;
  box-shadow: 0 0 10px rgba(249,115,22,.5);
}

/* ============================================================
   GLOW CURSOR — Effet lumineux suivant la souris
   ============================================================ */
#glow-cursor {
  position: fixed;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29,78,216,.06) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity .3s ease;
  mix-blend-mode: screen;
}

/* ============================================================
   ABOUT PHOTO — Animation d'entrée
   ============================================================ */
.about-photo-col[data-aos="fade-right"].aos-animate .about-photo,
.about-id-block {
  animation: fadeInScale .8s ease backwards;
}

/* ============================================================
   RESPONSIVE — Désactiver les animations lourdes sur mobile
   ============================================================ */
@media (max-width: 768px) {
  .stat-card::before,
  .service-img::after,
  .blog-img::before,
  .cavanno-photo-card::before,
  #glow-cursor { display: none !important; }

  .tarif-featured { animation: none !important; }
  .about-photo-wrap::before { display: none !important; }

  /* Désactiver les transform 3D sur les cartes */
  .service-card,
  .portfolio-card,
  .testi-card,
  .tarif-card   { transform-style: flat !important; }

  /* Simplifier les hover transforms sur mobile (pas de survol tactile) */
  .service-card:hover,
  .portfolio-card:hover,
  .testi-card:hover,
  .tarif-card:hover,
  .blog-card:hover { transform: none !important; }
}

/* Breakpoint intermédiaire — réduire les effets mais les garder */
@media (max-width: 1100px) {
  .hero-float-card { animation-duration: 6s !important; }
  .ring-outer { animation-duration: 40s !important; }
  .ring-inner { animation-duration: 30s !important; }
}

/* Respect des préférences d'accessibilité */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
