/**
 * Styles principaux du site Il était une fois
 */

:root {
  --color-primary: #fcd34d; /* amber-300 */
  --color-primary-dark: #f59e0b; /* amber-500 */
  --color-text: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.8);
  --color-bg: #000000;
  --color-bg-secondary: #18181b; /* zinc-900 */
  --font-sans: 'Montserrat', Arial, sans-serif;
  --font-display: 'Playfair Display', serif;
}

/* Base */
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  scroll-behavior: smooth;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
}

/* Animation de fondu pour les images et contenus */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
}

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

/* Animation pour les cartes */
.card-hover {
  transition: transform 0.3s, box-shadow 0.3s;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Personnalisation de la barre de défilement */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-dark);
  border-radius: 5px;
}

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

/* Accessibilité : focus visible */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Section héro avec animation subtile */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
}

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

/* Galerie et modales */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
  }
  
  .hero-text h1 {
    font-size: 2.5rem;
  }
  
  .hero-text p {
    font-size: 1rem;
  }
}

/* Navigation mobile */
@media (max-width: 768px) {
  .menu-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 80%;
    max-width: 300px;
    background: var(--color-bg);
    z-index: 100;
    transition: right 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    padding: 4rem 1.5rem;
    overflow-y: auto;
  }
  
  .menu-mobile.active {
    right: 0;
  }
  
  .mobile-nav-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Timeline de moments */
.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 3rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-primary);
  z-index: 1;
}

/* Améliorer l'accessibilité */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Animations pour le chargement du contenu */
.slide-in-bottom {
  animation: slideInBottom 0.5s ease-out forwards;
  opacity: 0;
}

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

/* Classes utilitaires supplémentaires */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gradient-overlay {
  position: relative;
}

.gradient-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  pointer-events: none;
}

/* Optimisation pour l'impression */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
}

/* Animations légères pour les transitions et entrées */

/* Animation de fondu simple : élément qui apparaît progressivement */
.animate-fade-in { 
  opacity: 0; /* L'élément commence invisible */
  animation: fadeIn 1.2s forwards; /* L'animation dure 1.2s et maintient l'état final */
}

/* Animation de fondu avec déplacement vertical : élément qui monte en apparaissant */
.animate-fade-in-up { 
  opacity: 0; /* L'élément commence invisible */
  transform: translateY(30px); /* L'élément commence 30px plus bas */
  animation: fadeInUp 1.2s forwards; /* L'animation dure 1.2s et maintient l'état final */
}

/* Délais d'animation pour créer des effets séquentiels */
.delay-100 { 
  animation-delay: .1s; /* Retarde l'animation de 0.1 seconde */
}

.delay-200 { 
  animation-delay: .2s; /* Retarde l'animation de 0.2 seconde */
}

/* Définition des keyframes pour l'animation de fondu simple */
@keyframes fadeIn { 
  to { opacity: 1; } /* L'élément devient complètement visible à la fin */
}

/* Définition des keyframes pour l'animation de fondu avec montée */
@keyframes fadeInUp { 
  to { 
    opacity: 1; /* L'élément devient complètement visible */
    transform: none; /* L'élément revient à sa position normale (sans décalage) */
  } 
}

/* Animation de rebond : élément qui monte et descend en continu */
.animate-bounce { 
  animation: bounce 1.4s infinite alternate; /* Rebond continu avec alternance */
}

/* Définition des keyframes pour l'animation de rebond */
@keyframes bounce { 
  0% { transform: translateY(0); } /* Position initiale */
  100% { transform: translateY(-12px); } /* Position haute (12px au-dessus) */
}
