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

:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --accent: #f59e0b;
  --bg-dark: #0f172a;
  --card-bg-dark: #1e293b;
  --text-dark: #f1f5f9;
  --text-secondary-dark: #94a3b8;
  --border-dark: #334155;
  --bg-light: #f8fafc;
  --card-bg-light: #ffffff;
  --text-light: #1e293b;
  --text-secondary-light: #64748b;
  --border-light: #e2e8f0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-dark);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

body.light-mode {
  background-color: var(--bg-light);
  color: var(--text-light);
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.nav-title {
  font-size: 1.6rem;
  font-weight: bold;
  color: white;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background-color 0.3s;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-menu a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  list-style: none;
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  padding: 8px;
  z-index: 1100;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.dropdown-menu a:hover {
  background-color: var(--primary);
  color: white;
}

body.light-mode .dropdown-menu {
  background: var(--card-bg-light);
  border-color: var(--border-light);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

body.light-mode .dropdown-menu a {
  color: var(--text-light);
}

/* Language Switch */
.lang-switch {
  display: flex;
  gap: 0.25rem;
  margin-left: 1rem;
}

.lang-btn {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: background-color 0.3s;
  white-space: nowrap;
}

.lang-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.lang-btn.active {
  background: #ffffff;
  color: #333333;
  border-color: #ffffff;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

.view {
  animation: fadeIn 0.4s ease;
}

.view.hidden {
  display: none;
}

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

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

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-secondary-dark);
  font-size: 1.1rem;
}

.section-header-essentiel {
  margin-top: 60px;
}
}

body.light-mode .section-subtitle {
  color: var(--text-secondary-light);
}

/* Hero Image */
.hero-image {
  max-width: 825px;
  margin: 0 auto 40px;
  overflow: hidden;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Cards List */
.cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Info Card */
.info-card {
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

body.light-mode .info-card {
  background: var(--card-bg-light);
  border-color: var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

body.light-mode .info-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-image {
  height: 160px;
  overflow: hidden;
}

.card-emoji-banner {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}

.card-photo {
  width: 100%;
  height: 160px;
  object-fit: contain;
  display: block;
  background: var(--card-bg-dark);
}

.essentiel-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

body.light-mode .card-photo {
  background: var(--card-bg-light);
}

.card-content {
  padding: 20px;
}

.card-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.card-summary {
  color: var(--text-secondary-dark);
  font-size: 0.95rem;
}

body.light-mode .card-summary {
  color: var(--text-secondary-light);
}

/* Detail View / Site Presentation */
.btn-back {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 24px;
  transition: background-color 0.3s;
}

.btn-back:hover {
  background: var(--primary-dark);
}

.site-presentation {
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

body.light-mode .site-presentation {
  background: var(--card-bg-light);
  border-color: var(--border-light);
}

.presentation-emoji {
  font-size: 5rem;
  margin-bottom: 20px;
}

.presentation-photo {
  display: block;
  max-width: 420px;
  width: 100%;
  height: auto;
  margin: 0 auto 20px auto;
  border-radius: 12px;
  object-fit: contain;
}

.site-presentation h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.presentation-tagline {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 25px;
}

.presentation-content {
  text-align: left;
  margin-bottom: 25px;
}

.presentation-content h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  text-align: left;
}

.presentation-content h4 {
  font-size: 1.1rem;
  margin: 20px 0 10px;
  color: var(--primary-light);
}

body.light-mode .presentation-content h4 {
  color: var(--primary-dark);
}

.presentation-content p {
  color: var(--text-secondary-dark);
  margin-bottom: 15px;
}

body.light-mode .presentation-content p {
  color: var(--text-secondary-light);
}

.presentation-content ul {
  margin: 0 0 15px 25px;
  color: var(--text-secondary-dark);
}

body.light-mode .presentation-content ul {
  color: var(--text-secondary-light);
}

.presentation-content li {
  margin-bottom: 8px;
}

.presentation-content strong {
  color: var(--text-dark);
}

body.light-mode .presentation-content strong {
  color: var(--text-light);
}

.presentation-content em {
  color: var(--accent);
}

.btn-play {
  display: inline-block;
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 10px;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-play:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--text-secondary-dark);
  border-top: 1px solid var(--border-dark);
  margin-top: 40px;
}

body.light-mode .footer {
  color: var(--text-secondary-light);
  border-top-color: var(--border-light);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 15px;
    gap: 12px;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .cards-list {
    grid-template-columns: 1fr;
  }

  .site-presentation {
    padding: 25px;
  }
}
