/* CSS Variables */
:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #475569;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

/* Light Mode */
body.light-mode {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-primary: #ffffff;
  --bg-secondary: #f3f4f6;
  --bg-card: #E5E7EB;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border: #D1D5DB;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation */
.navbar {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
}

.nav-title {
  color: var(--primary);
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: var(--bg-card);
}

.nav-menu a.nav-innov-link {
  color: var(--primary);
  font-weight: 600;
  border: 1px solid var(--primary);
}

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

.lang-btn {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.lang-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.lang-btn.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.view.hidden {
  display: none;
}

.container {
  width: 100%;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.section-header h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

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

/* Hero Image */
.hero-image {
  max-width: 825px;
  margin: 0 auto 40px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

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

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

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

/* Info Card */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

.info-card:hover .card-image img {
  transform: scale(1.05);
}

.card-emoji-banner {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  transition: transform 0.3s ease;
}

.info-card:hover .card-emoji-banner {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
}

.card-category {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.card-title {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin: 0.5rem 0;
}

.card-summary {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.card-meta-item {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Detail View */
.btn-back {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
}

.detail-image {
  text-align: center;
  margin-bottom: 2rem;
}

.detail-image img {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  border-radius: 1rem;
  object-fit: cover;
}

.detail-image-large {
  margin-top: 2rem;
  margin-bottom: 0;
}

.detail-image-large img {
  width: 50%;
  max-height: none;
  object-fit: contain;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.detail-image img.zoomable {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-image img.zoomable:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.img-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

.img-zoom-overlay img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

.detail-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  padding: 3rem;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border-radius: 1rem;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.detail-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.detail-title {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.detail-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-meta-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.spec-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
}

.spec-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.spec-value {
  display: block;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.detail-content {
  color: var(--text-secondary);
}

.detail-content h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.detail-content h4 {
  color: var(--text-primary);
  margin: 1.25rem 0 0.75rem;
}

.detail-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.detail-content ul {
  margin-left: 2rem;
  margin-top: 0.5rem;
}

.detail-content li {
  margin-bottom: 0.5rem;
}

.content-image {
  display: block;
  width: 70%;
  margin: 1.5rem auto;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.image-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: -1rem;
  margin-bottom: 1rem;
  font-style: italic;
}

/* Site Presentation */
.site-presentation {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.presentation-emoji {
  font-size: 6rem;
  margin-bottom: 1.5rem;
}

.site-presentation h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.site-presentation p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.btn-play {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  padding: 1rem 2.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-play:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-menu {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .main-content {
    padding: 1rem;
  }

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

  .detail-specs {
    grid-template-columns: 1fr;
  }
}

/* Sous-section Composants EE dans Plateforme EE */
.subsection-ee {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(0, 123, 255, 0.25);
}
