/* main.css - Styles principaux pour le site Lecteur Omniscient */

:root {
  /* Palette de couleurs */
  --primary-dark: #0a0e17;
  --secondary-dark: #1a1f2c;
  --accent-blue: #3d5afe;
  --accent-teal: #00b8d4;
  --accent-purple: #6a0dad;
  --accent-gold: #ffd700;
  --text-light: #e0e0e0;
  --text-gray: #aaaaaa;
  --text-highlight: #ffffff;
  --danger: #f44336;
  --success: #4caf50;
  --warning: #ff9800;
  
  /* Espacement */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.5rem;
  
  /* Police */
  --font-primary: 'Roboto', sans-serif;
  --font-display: 'Spectral', serif;
}

/* Reset et bases */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--primary-dark);
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  margin-top: 0;
  line-height: 1.2;
  color: var(--text-highlight);
}

a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-blue);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Effets Star Stream */
.star-stream-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.star-stream {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(7, 11, 25, 0.2) 0%, var(--primary-dark) 100%);
}

.star-stream::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 90px 40px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 160px 120px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 230px 50px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 250px 250px;
  opacity: 0.3;
  animation: twinkle 4s infinite;
}

@keyframes twinkle {
  0% { opacity: 0.3; }
  50% { opacity: 0.5; }
  100% { opacity: 0.3; }
}

/* Header */
.site-header {
  background-color: rgba(10, 14, 23, 0.95);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--spacing-md);
}

.main-nav li {
  position: relative;
}

.main-nav a {
  color: var(--text-light);
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.main-nav a:hover {
  color: var(--text-highlight);
  background-color: rgba(255, 255, 255, 0.1);
}

.main-nav a.featured {
  color: var(--primary-dark);
  background-color: var(--accent-gold);
  font-weight: 600;
}

.main-nav a.featured:hover {
  background-color: #e6c200;
}

.dropdown {
  position: relative;
}

.dropdown-toggle::after {
  content: '▼';
  font-size: 0.8em;
  margin-left: 5px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--secondary-dark);
  border-radius: 4px;
  padding: var(--spacing-sm) 0;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10;

  /* Rendre le menu invisible par défaut */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
  }
  
.dropdown:hover .dropdown-menu {
  /* Afficher le menu au survol avec animation */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
  }

.dropdown-menu li {
    display: block;
    width: 100%;
  }
  
.dropdown-menu a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  }
  
#menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  }
  
/* Footer */
.site-footer {
  background-color: var(--secondary-dark);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-xl);
  }
  
  .footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--spacing-lg);
  }

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent-teal);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.copyright {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* Alerts */
.alert {
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  border-radius: 4px;
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  border-left: 4px solid var(--success);
  color: #c8e6c9;
}

.alert-danger {
  background-color: rgba(244, 67, 54, 0.1);
  border-left: 4px solid var(--danger);
  color: #ffcdd2;
}

.alert-warning {
  background-color: rgba(255, 152, 0, 0.1);
  border-left: 4px solid var(--warning);
  color: #ffe0b2;
}

/* Hero section */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-highlight);
  overflow: hidden;
  background-image: linear-gradient(135deg, #0a0e17 0%, #1a1f2c 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/static/img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: 0;
}

.hero-content {
  position: relative;
  max-width: 800px;
  padding: var(--spacing-lg);
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero .highlight {
  color: var(--accent-gold);
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.hero .tagline {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xl);
  color: var(--text-light);
  font-family: var(--font-display);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.cta-button.primary {
  background-color: var(--accent-blue);
  color: white;
}

.cta-button.primary:hover {
  background-color: #304ffe;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(61, 90, 254, 0.3);
}

.cta-button.secondary {
  background-color: transparent;
  color: var(--text-highlight);
  border: 2px solid var(--text-light);
}

.cta-button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.cta-button.large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Sections */
section {
  padding: var(--spacing-xl) 0;
}

section h2 {
  font-size: 2.2rem;
  margin-bottom: var(--spacing-lg);
  text-align: center;
  position: relative;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent-blue);
  margin: var(--spacing-sm) auto 0;
}

section h2 .star-icon,
section h2 .dokkaebi-icon {
  margin-left: var(--spacing-sm);
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.introduction {
  background-color: var(--secondary-dark);
}

.lead-text {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  text-align: center;
  color: var(--text-light);
}

/* Info cards grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.info-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: var(--spacing-lg);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 20px;
  height: 20px;
  background-color: var(--accent-blue);
  opacity: 0.1;
  border-radius: 50%;
  transition: all 0.5s ease;
}

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

.info-card:hover::before {
  transform: scale(20);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--accent-teal);
  position: relative;
  z-index: 1;
}

.info-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  z-index: 1;
}

.info-card p {
  color: var(--text-gray);
  position: relative;
  z-index: 1;
}

/* Timeline styles */
.event-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.event-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 120px;
  height: 100%;
  width: 2px;
  background: var(--accent-blue);
  opacity: 0.3;
}

.timeline-item {
  display: flex;
  margin-bottom: var(--spacing-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

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

.timeline-item .date {
  width: 100px;
  padding-right: var(--spacing-md);
  text-align: right;
  font-weight: bold;
  color: var(--accent-gold);
}

.timeline-item .event {
  position: relative;
  padding-left: var(--spacing-xl);
  flex: 1;
}

.timeline-item .event::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 10px rgba(61, 90, 254, 0.5);
}

.timeline-item h4 {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-xs);
}

.view-more {
  text-align: center;
  margin-top: var(--spacing-xl);
}

.text-link {
  font-weight: 500;
}

.text-link i {
  margin-left: 5px;
  transition: transform 0.2s ease;
}

.text-link:hover i {
  transform: translateX(5px);
}

/* Character creation promo */
.character-creation-promo {
  background: linear-gradient(45deg, #0c1225, #1c2e4a);
  padding: var(--spacing-xl) 0;
}

.character-creation-promo .container {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.promo-content {
  flex: 1;
}

.promo-content h2 {
  font-size: 2rem;
  text-align: left;
  margin-bottom: var(--spacing-md);
}

.promo-content h2::after {
  margin: var(--spacing-sm) 0 0;
}

.promo-content p {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
}

.promo-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.character-silhouette {
  width: 300px;
  height: 400px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.character-silhouette::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
    45deg,
    transparent 25%,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 50%,
    transparent 75%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 10px 10px;
  opacity: 0.3;
  animation: move-bg 20s linear infinite;
}

@keyframes move-bg {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

/* Responsive */
@media (max-width: 992px) {
  .character-creation-promo .container {
    flex-direction: column;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero .tagline {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  #menu-toggle {
    display: block;
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--secondary-dark);
    width: 250px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: var(--spacing-sm) 0;
  }

  .main-nav ul.show {
    display: flex;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: var(--spacing-md);
  }

  .dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    height: 0;
    transform: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s, height 0.3s ease;
  }

  .dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    height: auto;
    transition: opacity 0.3s ease, visibility 0s, height 0.3s ease;
  }

  .timeline-item .date {
    width: 80px;
    font-size: 0.9rem;
  }

  .event-timeline::before {
    left: 100px;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  section h2 {
    font-size: 1.8rem;
  }

  .footer-content {
    flex-direction: column;
  }
}
