/* ============================================
   VARIABLES CSS & BASE STYLES
============================================ */
:root {
  --color-cream: #F5F1E8;
  --color-beige: #E8DCC8;
  --color-caramel: #C4A878;
  --color-dark-brown: #4A3F35;
  --color-orange: #FF8C42;
  --color-orange-dark: #E67329;
  --color-white: #FFFFFF;
  --color-shadow: rgba(74, 63, 53, 0.08);

  --font-display: 'Playfair Display', serif;
  --font-body: 'Work Sans', sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  --sidebar-width: 250px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-beige) 100%);
  color: var(--color-dark-brown);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 140, 66, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(196, 168, 120, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
}

/* ============================================
   HAMBURGER BUTTON
============================================ */
#hamburger-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 3001;
  background: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
}

#hamburger-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#hamburger-btn:active {
  transform: scale(0.95);
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 24px;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background: #ff7b00;
  border-radius: 2px;
  transition: all 0.3s ease;
}

#hamburger-btn.open .hamburger-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#hamburger-btn.open .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

#hamburger-btn.open .hamburger-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   SIDEBAR OVERLAY (Mobile)
============================================ */
#sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#sidebar-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   SIDEBAR
============================================ */
#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #18181b;
  color: #e4e4e7;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  border-right: 1px solid #27272a;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3000;
  overflow-y: auto;
  pointer-events: auto;
}

#sidebar.open {
  transform: translateX(0);
}

/* ============================================
   MAIN CONTENT ADJUSTMENT
============================================ */
#main-content {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 0;
  padding: var(--spacing-md);
  position: relative;
  z-index: 1;
}

/* Desktop: sidebar pousse le contenu */
@media (min-width: 1024px) {
  #main-content.sidebar-open {
    margin-left: var(--sidebar-width);
  }
}

/* Mobile: sidebar en overlay */
@media (max-width: 1023px) {
  #main-content.sidebar-open {
    margin-left: 0;
  }
}


.section {
  max-width: 1400px;
  margin: 0 auto var(--spacing-xl);
  padding: var(--spacing-md);
}

.section h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--color-dark-brown);
  margin-bottom: var(--spacing-lg);
  font-weight: 700;
}


.chart-card {
  background: var(--color-white);
  border-radius: 16px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  box-shadow: 0 4px 20px var(--color-shadow);
  transition: var(--transition-smooth);
}

.chart-card:hover {
  box-shadow: 0 8px 30px rgba(74, 63, 53, 0.12);
  transform: translateY(-2px);
}

.chart-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-dark-brown);
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.chart-container {
  position: relative;
  min-height: 300px;
  padding: var(--spacing-sm);
}

.chart-container canvas {
  max-width: 100%;
  height: auto !important;
}

/* ============================================
   TAB BUTTONS
============================================ */
.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

.tab-button {
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-button:hover {
  background-color: #f5f5f5;
  border-color: #bbb;
}

.tab-button.active {
  background-color: #ff7b00;
  color: white;
  border-color: #ff7b00;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(255, 123, 0, 0.3);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
  #main-content {
    padding: var(--spacing-sm);
  }

  .presentation-section {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .presentation-card {
    padding: var(--spacing-md);
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .section {
    padding: var(--spacing-sm);
  }

  .chart-card {
    padding: var(--spacing-sm);
  }

  .chart-card h3 {
    font-size: 1.2rem;
  }

  .social-links {
    gap: 1.5rem;
  }

  .social-link {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

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

  .hero-decoration {
    width: 200px;
    height: 200px;
  }

  .hero-decoration:nth-child(2) {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 100px;
  }

  .presentation-text {
    font-size: 1rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
  animation: fadeInUp 1s ease-out 0.5s backwards;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: #FF8C42;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-stat-label {
  display: block;
  font-size: 0.9rem;
  color: #C4A878;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: linear-gradient(135deg, #F5F1E8, #E8DCC8);
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: #FF8C42;
  box-shadow: 0 8px 25px rgba(74, 63, 53, 0.1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #4A3F35;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.feature-desc {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

.hero-decoration:nth-child(3) {
  bottom: 30%;
  right: 20%;
  width: 250px;
  height: 250px;
  animation-delay: 14s;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


@media (max-width: 768px) {
  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  
  .hero-stat-number {
    font-size: 2rem;
  }
  
  .hero-stat-label {
    font-size: 0.8rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-icon {
    font-size: 2.5rem;
  }
  
  .feature-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    gap: 1rem;
  }
  
  .hero-stat-number {
    font-size: 1.8rem;
  }
}