/**
 * MELISSA PHOTOGRAPHY PARIS - ADVANCED ANIMATIONS CSS
 * Animations modernes et effets visuels pour site de photographie
 */

/* ===== ANIMATIONS DE BASE ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* ===== ANIMATIONS SCROLL REVEAL ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.fade-left {
  transform: translateX(-30px);
}

.animate-on-scroll.fade-left.animate-in {
  transform: translateX(0);
}

.animate-on-scroll.fade-right {
  transform: translateX(30px);
}

.animate-on-scroll.fade-right.animate-in {
  transform: translateX(0);
}

.animate-on-scroll.scale-in {
  transform: scale(0.8);
}

.animate-on-scroll.scale-in.animate-in {
  transform: scale(1);
}

/* ===== ANIMATIONS SPÉCIFIQUES ===== */

/* Service Cards */
.service-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.service-card .service-icon {
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Gallery Items */
.gallery-item {
  overflow: hidden;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.gallery-item img {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1);
  filter: brightness(1);
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(44,44,44,0.1), rgba(44,44,44,0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.gallery-item:hover::before {
  opacity: 1;
}

/* Buttons */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(0);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* ===== ANIMATIONS DE FORMULAIRE ===== */
.form-group {
  position: relative;
  margin-bottom: 25px;
}

.form-group input,
.form-group textarea,
.form-group select {
  transition: all 0.3s ease;
  border: 2px solid #e0e0e0;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #2c2c2c;
  box-shadow: 0 0 0 3px rgba(44,44,44,0.1);
  transform: translateY(-2px);
}

.form-group label {
  position: absolute;
  top: 15px;
  left: 15px;
  color: #999;
  transition: all 0.3s ease;
  pointer-events: none;
  background: white;
  padding: 0 5px;
}

.form-group.focused label,
.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group select:focus + label {
  top: -10px;
  left: 10px;
  font-size: 12px;
  color: #2c2c2c;
  font-weight: 600;
}

.form-group.valid input {
  border-color: #28a745;
}

.form-group.invalid input {
  border-color: #dc3545;
}

.form-group.valid::after {
  content: '✓';
  position: absolute;
  right: 15px;
  top: 15px;
  color: #28a745;
  font-weight: bold;
}

.form-group.invalid::after {
  content: '✗';
  position: absolute;
  right: 15px;
  top: 15px;
  color: #dc3545;
  font-weight: bold;
}

/* ===== LIGHTBOX AVANCÉE ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

.lightbox-info {
  position: absolute;
  bottom: -50px;
  left: 0;
  color: white;
  font-size: 14px;
  background: rgba(0,0,0,0.5);
  padding: 10px 15px;
  border-radius: 5px;
}

/* ===== LAZY LOADING ===== */
.lazy {
  opacity: 0;
  transition: opacity 0.6s ease;
  filter: blur(5px);
}

.lazy.loaded {
  opacity: 1;
  filter: blur(0);
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #2c2c2c, #666, #2c2c2c);
  z-index: 10000;
  transition: width 0.1s ease-out;
}

/* ===== PARALLAX ===== */
.parallax {
  will-change: transform;
  transform: translateZ(0);
}

/* ===== LOADING ANIMATIONS ===== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.page-loader.fade-out {
  opacity: 0;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

.loader-text {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: #2c2c2c;
  margin-bottom: 20px;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #2c2c2c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== ANIMATIONS DE NAVIGATION ===== */
.site-navbar {
  transition: all 0.3s ease;
}

.site-navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.site-menu li a {
  position: relative;
  transition: all 0.3s ease;
}

.site-menu li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #2c2c2c;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.site-menu li a:hover::after,
.site-menu li a.active::after {
  width: 100%;
}

/* ===== ANIMATIONS RESPONSIVES ===== */
@media (max-width: 768px) {
  .animate-on-scroll {
    transform: translateY(20px);
  }
  
  .service-card:hover {
    transform: translateY(-5px) scale(1.01);
  }
  
  .gallery-item:hover img {
    transform: scale(1.02);
  }
}

/* ===== OPTIMISATIONS PERFORMANCE ===== */
.service-card,
.gallery-item,
.btn,
.parallax {
  will-change: transform;
  transform: translateZ(0);
}

/* ===== ANIMATIONS PERSONNALISÉES ===== */
@keyframes photographyReveal {
  0% {
    opacity: 0;
    transform: translateY(30px) rotateX(20deg);
  }
  50% {
    opacity: 0.5;
    transform: translateY(15px) rotateX(10deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

.photography-reveal {
  animation: photographyReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes melissaSignature {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-5deg);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.melissa-signature {
  animation: melissaSignature 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== EFFETS SPÉCIAUX ===== */
.glass-effect {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.gradient-text {
  background: linear-gradient(45deg, #2c2c2c, #666);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-elegant {
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.shadow-hover {
  transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ===== ANIMATIONS DE TEXTE ===== */
.typewriter {
  overflow: hidden;
  border-right: 2px solid #2c2c2c;
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #2c2c2c; }
}

/* ===== RIPPLE EFFECT ===== */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

