/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Styles globaux */
body {
  font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

/* Custom animations */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.animate-pulse-slow {
  animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth transitions for text */
.hero-text {
  animation: fadeInUp 0.8s ease-out;
}

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

/* Glowing circle effect - Like inspiration */
.glow-circle {
  box-shadow: 
    0 0 150px rgba(106, 13, 173, 1),
    0 0 250px rgba(106, 13, 173, 0.8),
    0 0 350px rgba(106, 13, 173, 0.5),
    0 0 450px rgba(106, 13, 173, 0.3),
    inset 0 0 100px rgba(106, 13, 173, 0.2);
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 
      0 0 150px rgba(106, 13, 173, 1),
      0 0 250px rgba(106, 13, 173, 0.8),
      0 0 350px rgba(106, 13, 173, 0.5),
      0 0 450px rgba(106, 13, 173, 0.3),
      inset 0 0 100px rgba(106, 13, 173, 0.2);
  }
  50% {
    box-shadow: 
      0 0 180px rgba(106, 13, 173, 1),
      0 0 280px rgba(106, 13, 173, 0.9),
      0 0 380px rgba(106, 13, 173, 0.6),
      0 0 480px rgba(106, 13, 173, 0.4),
      inset 0 0 120px rgba(106, 13, 173, 0.3);
  }
}

/* Hero Section Modern Animations 2025-2026 */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
    opacity: 1;
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes scroll-indicator {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(8px);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

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

/* Glassmorphism effect amélioré */
.backdrop-blur-xl {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Gradient radial pour les effets de lumière */
.bg-gradient-radial {
  background: radial-gradient(circle, var(--tw-gradient-stops));
}

/* Smooth transitions pour tous les éléments hero - Optimisé performance */
[data-hero-target] {
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}

/* Optimisation performance pour les animations */
.hero-optimized {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Amélioration de la lisibilité du texte sur image */
.hero-text-shadow {
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5), 0 4px 40px rgba(0, 0, 0, 0.3);
}

/* Accessibilité - Respecter les préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  /* Désactiver les animations spécifiques */
  .animate-pulse-slow,
  .animate-float,
  .animate-scroll-indicator,
  .animate-bounce {
    animation: none !important;
  }
  
  /* Garder les transitions essentielles mais instantanées */
  [data-hero-target] {
    transition: none !important;
  }
}

/* Amélioration des contrastes pour l'accessibilité */
.hero-text-white {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-text-white-90 {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Carousel Annuaire - Défilement infini */
.annuaire-carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 3rem 0;
  margin: 0 auto;
}

.annuaire-carousel-track {
  display: flex;
  gap: 2rem; /* Espacement horizontal augmenté pour plus de respiration */
  will-change: transform;
  transition: none;
  width: max-content; /* Permet au track de dépasser la largeur du container */
  align-items: flex-start; /* Permet le décalage vertical des items */
}

.annuaire-carousel-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 200px;
  min-height: 320px; /* Hauteur minimale pour garantir la cohérence */
  animation: fadeInUp 0.6s ease-out, waveAnimation 4s ease-in-out infinite;
  animation-fill-mode: both;
  transition: transform 0.3s ease, margin-top 0.3s ease;
}

/* Animation de vague qui se propage de gauche à droite */
@keyframes waveAnimation {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-15px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(15px);
  }
}

/* Délais progressifs pour créer l'effet de vague qui se propage */
.annuaire-carousel-item:nth-child(1) {
  animation-delay: 0s, 0s;
}

.annuaire-carousel-item:nth-child(2) {
  animation-delay: 0.1s, 0.3s;
}

.annuaire-carousel-item:nth-child(3) {
  animation-delay: 0.2s, 0.6s;
}

.annuaire-carousel-item:nth-child(4) {
  animation-delay: 0.3s, 0.9s;
}

.annuaire-carousel-item:nth-child(5) {
  animation-delay: 0.4s, 1.2s;
}

.annuaire-carousel-item:nth-child(6) {
  animation-delay: 0.5s, 1.5s;
}

.annuaire-carousel-item:nth-child(7) {
  animation-delay: 0.6s, 1.8s;
}

.annuaire-carousel-item:nth-child(8) {
  animation-delay: 0.7s, 2.1s;
}

/* Pour les items suivants, répéter le pattern */
.annuaire-carousel-item:nth-child(n+9) {
  animation-delay: 0s, calc(var(--wave-delay, 0s) + 0.3s);
}

/* Décalage vertical alterné subtil : items pairs (2, 4, 6...) décalés vers le bas */
.annuaire-carousel-item:nth-child(even) {
  margin-top: 2.5rem; /* Décalage réduit pour un effet plus moderne et subtil */
}

/* Items impairs (1, 3, 5...) restent à la hauteur normale */
.annuaire-carousel-item:nth-child(odd) {
  margin-top: 0;
}

/* Animation de vague réduite pour mobile */
@keyframes waveAnimationMobile {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-8px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(8px);
  }
}

/* Sur mobile : décalage encore plus subtil et animation réduite */
@media (max-width: 767px) {
  .annuaire-carousel-item:nth-child(even) {
    margin-top: 1.5rem; /* Décalage réduit sur mobile */
  }
  
  .annuaire-carousel-item {
    min-height: 280px; /* Hauteur réduite sur mobile */
    /* Animation de vague plus subtile sur mobile */
    animation: fadeInUp 0.6s ease-out, waveAnimationMobile 5s ease-in-out infinite;
  }
  
  .annuaire-carousel-track {
    gap: 1.5rem; /* Espacement réduit sur mobile */
  }
}

/* Responsive: ajuster le nombre d'items visibles et le décalage */
@media (min-width: 640px) {
  .annuaire-carousel-item {
    width: 220px;
    min-height: 340px;
  }
  
  .annuaire-carousel-item:nth-child(even) {
    margin-top: 2.5rem;
  }
}

@media (min-width: 768px) {
  .annuaire-carousel-item {
    width: 240px;
    min-height: 360px;
  }
  
  .annuaire-carousel-item:nth-child(even) {
    margin-top: 3rem; /* Décalage légèrement augmenté sur tablette+ */
  }
  
  .annuaire-carousel-track {
    gap: 2.5rem; /* Plus d'espace sur les grands écrans */
  }
}

@media (min-width: 1024px) {
  .annuaire-carousel-item {
    width: 260px;
    min-height: 380px;
  }
}

@media (min-width: 1280px) {
  .annuaire-carousel-item {
    width: 280px;
    min-height: 400px;
  }
  
  .annuaire-carousel-track {
    gap: 3rem; /* Espacement maximal sur très grands écrans */
  }
}

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

/* Styles pour les avatars avec anneaux simplifiés en CSS */
.gwana-avatar {
  position: relative;
}

.gwana-avatar::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 3px solid rgba(241, 240, 243, 0.9);
  z-index: 0;
  pointer-events: none;
}

.gwana-avatar::after {
  content: '';
  position: absolute;
  top: -16px;
  left: -16px;
  right: -16px;
  bottom: -16px;
  border-radius: 50%;
  border: 8px solid rgba(243, 235, 247, 0.9);
  z-index: -1;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(245, 244, 242, 0.25);
}


/* Masculinity Carousel Styles */
.masculinity-carousel-track {
  will-change: transform;
  display: flex;
  align-items: stretch;
}

.masculinity-carousel-track > div {
  display: flex;
  align-items: stretch;
}

.carousel-dot {
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: white !important;
  width: 2rem !important;
  border-radius: 0.375rem;
}

/* Article Reader Styles */
.toc-link.active {
  @apply text-purple-700 bg-purple-50 border-purple-300 font-medium;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Scroll margin for headings to account for fixed header */
h1[id^="heading-"],
h2[id^="heading-"],
h3[id^="heading-"] {
  scroll-margin-top: 6rem;
}

/* Article content overflow handling */
.article-content,
.admin-article-content {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Gwana bio overflow handling */
.gwana-bio {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

