/**
 * BB MC - Enhanced Styles CSS
 * Styles modernes pour une expérience utilisateur magnifique
 */

/* ============================================
   VARIABLES CSS PERSONNALISÉES
   ============================================ */
:root {
  --primary-color: #ff6b35;
  --secondary-color: #1a1a2e;
  --accent-color: #ffd700;
  --text-light: #f8f9fa;
  --text-dark: #333;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(45deg, #ff6b35, #ff8a65);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

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

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

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

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

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

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--accent-color), 0 0 10px var(--accent-color);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-color), 0 0 30px var(--accent-color);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* ============================================
   CLASSES D'ANIMATION
   ============================================ */
.animate-fade-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.animate-fade-down {
  animation: fadeInDown 0.8s ease-out forwards;
  opacity: 0;
}

.animate-fade-left {
  animation: fadeInLeft 0.8s ease-out forwards;
  opacity: 0;
}

.animate-fade-right {
  animation: fadeInRight 0.8s ease-out forwards;
  opacity: 0;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out forwards;
  opacity: 0;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
  animation: bounce 2s ease infinite;
}

/* Délais d'animation */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* ============================================
   AMÉLIORATIONS DES CARTES
   ============================================ */
.video-card,
.album-card,
.theme-card,
.team-card,
.media-card {
  position: relative;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.video-card::after,
.album-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(118, 75, 162, 0.1));
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
  border-radius: inherit;
}

.video-card:hover::after,
.album-card:hover::after {
  opacity: 1;
}

.video-card:hover,
.album-card:hover,
.theme-card:hover,
.team-card:hover,
.media-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* ============================================
   EFFETS SUR LES IMAGES
   ============================================ */
img {
  transition: transform var(--transition-normal), filter var(--transition-normal);
}

.img-hover-zoom:hover {
  transform: scale(1.1);
}

.img-hover-brightness:hover {
  filter: brightness(1.2);
}

.img-hover-saturate:hover {
  filter: saturate(1.5);
}

/* Effet de chargement pour les images */
img[loading="lazy"] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================
   BOUTONS AMÉLIORÉS
   ============================================ */
.btn-custom,
.button {
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  z-index: 1;
}

.btn-custom::before,
.button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.btn-custom:hover::before,
.button:hover::before {
  width: 400%;
  height: 400%;
}

.btn-custom:active,
.button:active {
  transform: scale(0.95);
}

/* Effet de ripple au clic */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

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

.btn-ripple:active::after {
  width: 200%;
  height: 200%;
}

/* ============================================
   TIMELINE AMÉLIORÉE
   ============================================ */
.timeline {
  position: relative;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 20px;
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  border: 4px solid white;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px var(--primary-color);
  z-index: 2;
  animation: pulse 2s ease-in-out infinite;
}

.timeline-year {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  background: var(--gradient-secondary);
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  z-index: 3;
}

.timeline-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  margin-top: 60px;
  transition: all var(--transition-normal);
}

.timeline-content:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   GALERIE PHOTOS AMÉLIORÉE
   ============================================ */
.gallery-container {
  perspective: 1000px;
}

.gallery-main {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.gallery-main:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}

.main-image {
  transition: transform var(--transition-slow), filter var(--transition-normal);
}

.main-image:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.thumbnail {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.thumbnail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(255, 215, 0, 0.3));
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 1;
}

.thumbnail:hover::before {
  opacity: 1;
}

.thumbnail.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
  transform: scale(1.1);
}

.thumbnail img {
  transition: transform var(--transition-slow);
}

.thumbnail:hover img {
  transform: scale(1.15);
}

/* ============================================
   LIGHTBOX AMÉLIORÉE
   ============================================ */
.lightbox {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-image {
  animation: scaleIn 0.4s ease;
}

.lightbox-close,
.lightbox-nav {
  transition: all var(--transition-normal);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  transform: scale(1.2) rotate(90deg);
  background: var(--primary-color);
}

.lightbox-nav:hover {
  transform: scale(1.2) rotate(0deg);
}

/* ============================================
   SOCIAL LINKS AMÉLIORÉS
   ============================================ */
.social-link {
  position: relative;
  transition: all var(--transition-normal);
}

.social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width var(--transition-normal), height var(--transition-normal);
  z-index: -1;
}

.social-link:hover::before {
  width: 120%;
  height: 120%;
}

.social-link i {
  transition: transform var(--transition-normal);
}

.social-link:hover i {
  transform: scale(1.3) rotate(360deg);
}

/* ============================================
   FORMULAIRE AMÉLIORÉ
   ============================================ */
.form-wrap {
  position: relative;
  margin-bottom: 25px;
}

.form-input,
.form-label {
  transition: all var(--transition-normal);
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
  transform: scale(1.02);
}

.form-wrap.focused .form-label {
  color: var(--primary-color);
  transform: translateY(-5px);
  font-weight: 600;
}

.form-wrap.has-value .form-label {
  color: var(--accent-color);
}

/* Animation de validation */
.form-input.valid {
  border-color: #28a745;
  animation: successPulse 0.5s ease;
}

.form-input.invalid {
  border-color: #dc3545;
  animation: shake 0.5s ease;
}

@keyframes successPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* ============================================
   HERO SECTION AMÉLIORÉE
   ============================================ */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 107, 53, 0.1), transparent 70%);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero-title {
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5),
               0 0 40px rgba(255, 107, 53, 0.3);
  animation: glow 3s ease-in-out infinite;
}

/* ============================================
   STATISTIQUES ANIMÉES
   ============================================ */
.stat-item {
  transition: all var(--transition-normal);
}

.stat-item:hover {
  transform: translateY(-10px) scale(1.1);
}

.stat-number {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  background-size: 200% 100%;
}

/* ============================================
   THÈME CARDS
   ============================================ */
.theme-card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.theme-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
  transition: left var(--transition-slow);
}

.theme-card:hover::before {
  left: 100%;
}

.theme-card:hover {
  transform: translateY(-10px) rotate(2deg);
  box-shadow: var(--shadow-lg);
}

.theme-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: inline-block;
  animation: bounce 2s ease infinite;
}

/* ============================================
   AUDIO PLAYER AMÉLIORÉ
   ============================================ */
audio {
  width: 100%;
  border-radius: 10px;
  transition: all var(--transition-normal);
}

audio:hover {
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
  transform: scale(1.02);
}

/* ============================================
   BREADCRUMBS AMÉLIORÉS
   ============================================ */
.breadcrumbs-custom {
  position: relative;
  background-attachment: fixed;
  background-size: cover;
  transition: background-position var(--transition-slow);
}

.breadcrumbs-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(255, 107, 53, 0.3));
  animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.6;
  }
}

.breadcrumbs-custom-title {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  animation: fadeInDown 0.8s ease;
}

/* ============================================
   FOOTER AMÉLIORÉ
   ============================================ */
.footer-custom,
.footer-classic {
  position: relative;
  overflow: hidden;
}

.footer-custom::before,
.footer-classic::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
  animation: shimmer 8s linear infinite;
}

/* ============================================
   SCROLLBAR PERSONNALISÉE
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-secondary);
  border-radius: 6px;
  transition: background var(--transition-normal);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item::before {
    left: 20px;
  }
  
  .timeline-year {
    left: 20px;
    transform: translateX(0);
  }
  
  .timeline-content {
    margin-left: 60px;
  }
  
  .hero-title {
    font-size: 2rem !important;
  }
  
  .stat-number {
    font-size: 1.5rem !important;
  }
}

/* ============================================
   UTILITAIRES
   ============================================ */
.text-gradient {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-glow {
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.hover-lift {
  transition: transform var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-10px);
}

.blur-bg {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border: 3px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: rotate 1s linear infinite;
  transform: translate(-50%, -50%);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .rd-navbar,
  .footer-custom,
  .social-section,
  #backToTop {
    display: none !important;
  }
  
  * {
    animation: none !important;
    transition: none !important;
  }
}
