/* ================================== */
/* STYLES CULTURE SCIENTIFIQUE */
/* ================================== */

:root {
  --primary-orange: #ff6a00;
  --secondary-yellow: #FFE066;
  --text-primary: #222;
  --text-secondary: #555;
  --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 16px;

  /* Couleurs pour les catégories */
  --color-discoveries: #4CAF50;
  --color-personalities: #2196F3;
  --color-phenomena: #FF9800;
  --color-history: #9C27B0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-x: hidden;
  text-align: center;
  background: #fff2beff;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================================== */
/* SECTION HERO */
/* ================================== */

.culture-hero {
  padding: 50px 0 20px 0;
  background: transparent;
}

.culture-header {
  text-align: center;
  margin-bottom: 40px;
}

.culture-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 106, 0, 0.1);
  color: var(--primary-orange);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 106, 0, 0.2);
}

.culture-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 15px;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-orange), #ff9500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.culture-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

/* ================================== */
/* NAVIGATION CATÉGORIES */
/* ================================== */

.categories-nav {
  padding: 15px 0 25px 0;
  /* Reduced padding */
  background: transparent;
  /* Removed sticky positioning */
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-btn {
  padding: 8px 18px;
  border: 1px solid rgba(255, 106, 0, 0.3);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover,
.nav-btn.active {
  background: var(--primary-orange);
  color: white;
  border-color: var(--primary-orange);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 106, 0, 0.2);
}

/* ================================== */
/* GRID D'ARTICLES */
/* ================================== */

.articles-section {
  padding: 10px 0 40px 0;
  /* Reduced padding */
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  /* Better responsive grid */
  gap: 25px;
}

.article-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeIn 0.6s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.03);
  cursor: pointer;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.article-image {
  height: 180px;
  /* Slightly shorter */
  overflow: hidden;
  position: relative;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.08);
}

.article-card.coming-soon {
  filter: grayscale(100%);
  opacity: 0.8;
  pointer-events: none;
  cursor: default;
  position: relative;
}

.article-card.coming-soon::after {
  content: "Bientôt disponible";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.article-card.coming-soon:hover {
  transform: none;
  box-shadow: var(--shadow-light);
}

.article-card.coming-soon .article-image img {
  transform: none;
}

.article-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-tag.discoveries {
  background: var(--color-discoveries);
}

.article-tag.personalities {
  background: var(--color-personalities);
}

.article-tag.phenomena {
  background: var(--color-phenomena);
}

.article-tag.history {
  background: var(--color-history);
}

.article-content h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 600;
}

.article-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
  flex-grow: 1;
}

.read-more {
  align-self: flex-start;
  color: var(--primary-orange);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.read-more:hover {
  gap: 8px;
  color: #e65100;
}

/* ================================== */
/* SECTION QUIZ */
/* ================================== */

.quiz-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #fff8e1 0%, #fff 100%);
  /* Soft gradient background */
  margin-top: 40px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.quiz-section h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.quiz-section>p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  background: white;
  border-radius: 24px;
  /* Rounder corners */
  padding: 40px;
  box-shadow: 0 10px 40px rgba(255, 106, 0, 0.1);
  /* Orange-tinted shadow */
  border: 1px solid rgba(255, 106, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.quiz-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-orange), var(--secondary-yellow));
}

.quiz-progress {
  background: rgba(255, 106, 0, 0.1);
  color: var(--primary-orange);
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 0.85rem;
}

.quiz-question h3 {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--text-primary);
  line-height: 1.4;
}

.quiz-options {
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}

.quiz-option {
  background: white;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
}

.quiz-option:hover {
  border-color: var(--secondary-yellow);
  background: #fffde7;
  transform: translateX(5px);
}

.quiz-option:disabled {
  cursor: default;
  transform: none !important;
}

.quiz-option.correct {
  background: #e8f5e9;
  border-color: var(--color-discoveries);
  color: #2e7d32;
}

.quiz-option.incorrect {
  background: #ffebee;
  border-color: #ef5350;
  color: #c62828;
  opacity: 0.7;
}

.quiz-result {
  margin: 20px 0;
  padding: 20px;
  border-radius: 12px;
  background: #f9f9f9;
  border-left: 4px solid transparent;
  text-align: left;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-feedback {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-feedback.correct {
  color: var(--color-discoveries);
}

.quiz-feedback.incorrect {
  color: #d32f2f;
}

.quiz-explanation {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.quiz-next,
.quiz-restart {
  background: var(--primary-orange);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
}

.quiz-next:hover,
.quiz-restart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 106, 0, 0.4);
  background: #f57c00;
}

/* Final Result Screen */
.quiz-final-result {
  padding: 20px;
}

.quiz-score {
  font-size: 5rem;
  margin-bottom: 10px;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

.quiz-score-big {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary-orange);
  margin: 10px 0;
  line-height: 1;
}

.quiz-percentage {
  font-size: 1.5rem;
  font-weight: 600;
  color: #777;
  margin-bottom: 25px;
}

/* ================================== */
/* MODAL */
/* ================================== */
/* ... (Keeping modal styles mostly same but refining) ... */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  /* Darker backdrop */
  backdrop-filter: blur(5px);
  /* Blur effect */
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* ================================== */
/* RESPONSIVE */
/* ================================== */

@media (max-width: 768px) {
  .culture-header h1 {
    font-size: 1.8rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    /* Reduced gap */
  }

  .quiz-container {
    padding: 25px 20px;
  }

  .quiz-option {
    padding: 14px 18px;
  }

  /* Added mobile improvements */
  .culture-hero {
    padding: 10px 0;
  }

  .categories-nav {
    padding: 10px 0 20px 0;
  }

  .article-content {
    padding: 15px;
  }

  .article-image {
    height: 160px;
    /* Slightly smaller images on mobile */
  }

  .article-content h3 {
    font-size: 1.1rem;
  }

  .article-content p {
    font-size: 0.9rem;
  }

  /* Fix for button wrapping and overflow */
  .nav-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 10px;
    /* Space for scrollbar if visible */
    -webkit-overflow-scrolling: touch;
  }

  .nav-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.85rem;
  }

  /* Global overflow prevention */
  body {
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .culture-header h1 {
    font-size: 1.6rem;
  }

  .container {
    padding: 0 15px;
  }
}