/* ============================================================
   1. DESIGN SYSTEM: "GROWTH" (Pro, Clean, Emerald)
   ============================================================ */
:root {
  /* --- Couleurs --- */
  --primary: #059669;       /* Vert Émeraude */
  --primary-hover: #047857; 
  --primary-light: #ecfdf5; 
  
  /* --- Neutres --- */
  --bg-page: #ffffff;       
  --bg-secondary: #f1f5f9;  /* Gris très clair pour les fonds */
  --border-color: #e2e8f0;  
  
  /* --- Textes --- */
  --text-title: #1e293b;    
  --text-body: #475569;     
  --text-muted: #94a3b8;    

  /* --- Ombres --- */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================================
   2. RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  /* Motif grille léger */
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 24px 24px;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
button, input { font-family: inherit; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   3. HEADER
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}
.brand-text { font-size: 20px; font-weight: 800; color: var(--text-title); }
.topnav a { font-size: 14px; font-weight: 600; color: var(--text-body); padding: 8px 16px; border-radius: 8px; }
.topnav a.active, .topnav a:hover { color: var(--primary); background: var(--primary-light); }

/* ============================================================
   4. HERO SECTION (FIX BUGS)
   ============================================================ */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; 
  align-items: center;
  /* Padding généreux en haut pour éviter que ça touche le header */
  padding: 120px 24px 80px; 
  max-width: 1200px; margin: 0 auto;
  overflow: visible; /* INDISPENSABLE pour l'animation */
}

.hero-text h1 {
  font-size: clamp(36px, 4vw, 54px); line-height: 1.1; font-weight: 800; 
  color: var(--text-title); margin-bottom: 24px;
}
.accent, .accent-2 { color: var(--primary); }
.sub { font-size: 18px; color: var(--text-body); margin-bottom: 32px; max-width: 500px; }

.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 15px; 
  cursor: pointer; transition: 0.2s; border: 1px solid transparent;
}
.btn.primary {
  background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}
.btn.primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn.ghost { background: white; border-color: var(--border-color); color: var(--text-title); }
.btn.ghost:hover { border-color: var(--text-muted); background: var(--bg-secondary); }
.btn.small { padding: 0 16px; height: 44px; }

/* -- DÉMO ET CORRECTION DU BUG BLANC -- */
.hero-demo {
  position: relative;
  margin-top: 20px;
  animation: float 6s ease-in-out infinite;
  z-index: 10;
}

.demo-panel {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden; /* Empêche tout débordement */
}
/* Ligne verte décorative */
.demo-panel::before {
  content:""; position: absolute; top:0; left:0; right:0; height: 6px;
  background: var(--primary);
}

/* TABS - VERSION SIMPLE ET ROBUSTE */
.demo-tabs {
  display: flex; 
  background: var(--bg-secondary); 
  padding: 4px;
  border-radius: 12px; 
  margin-bottom: 16px; 
  border: 1px solid var(--border-color);
  gap: 4px;
}

/* On cache l'élément JS qui buguait */
.tabs-indicator { display: none !important; }

.tab {
  flex: 1; border: none; background: transparent; 
  font-weight: 600; font-size: 13px; color: var(--text-muted); 
  padding: 8px; cursor: pointer; border-radius: 8px;
  transition: all 0.2s;
}

/* Style direct de l'onglet actif (plus de bug de position) */
.tab.active { 
  background: white; 
  color: var(--text-title); 
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* CHAT */
.chat {
  height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
  padding-bottom: 10px;
}
.bubble {
  padding: 12px 16px; border-radius: 14px; font-size: 14px; max-width: 88%; line-height: 1.5;
}
.bubble.user { align-self: flex-end; background: var(--text-title); color: white; border-bottom-right-radius: 2px; }
.bubble.bot { align-self: flex-start; background: var(--bg-secondary); color: var(--text-title); border: 1px solid var(--border-color); border-bottom-left-radius: 2px; }

.ask { display: flex; gap: 10px; }
.ask input {
  width: 100%; background: var(--bg-secondary); border: 1px solid var(--border-color);
  padding: 12px 16px; border-radius: 10px; outline: none; color: var(--text-title);
}
.ask input:focus { background: white; border-color: var(--primary); }
#demoSend {
  background: var(--primary); color: white; border: none; width: 44px;
  border-radius: 10px; font-size: 18px; cursor: pointer;
}
.note { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 10px; }

/* ============================================================
   5. SLIDES (FIXED IMAGES)
   ============================================================ */
.slides {
  padding: 80px 0;
  background: #fafafa;
  border-top: 1px solid var(--border-color);
}
.slides-shell { max-width: 1000px; margin: 0 auto; overflow: hidden; }
.slides-track { display: flex; transition: transform 0.5s ease; }

.slide {
  min-width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
  align-items: center; padding: 0 24px;
}

.slide-media {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  /* Fixe la hauteur pour uniformiser */
  height: 380px; 
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}

.slide-media img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain; /* L'image ne sera jamais coupée */
  border-radius: 8px;
}

.slide-body h3 { font-size: 28px; margin: 0 0 16px; color: var(--text-title); font-weight: 800; }
.slide-body p { font-size: 16px; color: var(--text-body); margin-bottom: 12px; }
.bullets li { padding-left: 24px; position: relative; margin-bottom: 8px; font-weight: 500; }
.bullets li::before { content: "✓"; color: var(--primary); font-weight: 900; position: absolute; left: 0; }
.slide-note { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border-color); font-size: 13px; color: var(--text-muted); }

.slides-controls { display: flex; justify-content: center; gap: 16px; margin-top: 40px; }
.ctrl {
  width: 48px; height: 48px; border-radius: 50%; background: white;
  border: 1px solid var(--border-color); color: var(--text-title); font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.ctrl:hover { border-color: var(--primary); color: var(--primary); }
.dots button { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; border:none; cursor: pointer; }
.dots button[aria-current="true"] { background: var(--primary); transform: scale(1.3); }

/* ============================================================
   6. FOOTER
   ============================================================ */
.site-footer { padding: 60px 24px; text-align: center; background: white; border-top: 1px solid var(--border-color); }
.footer-nav a { margin: 0 12px; font-size: 14px; color: var(--text-muted); }
.footer-nav a:hover { color: var(--primary); text-decoration: underline; }

/* ============================================================
   7. ANIMATIONS
   ============================================================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================================
   8. MOBILE
   ============================================================ */
@media (max-width: 950px) {
  .hero { grid-template-columns: 1fr; padding: 40px 20px; gap: 30px; text-align: center; }
  .sub { margin: 0 auto 24px; }
  .cta { justify-content: center; }
  
  .hero-demo { animation: none; margin-top: 10px; }
  .chat { height: 220px; }

  .slide { grid-template-columns: 1fr !important; gap: 24px; padding: 10px; }
  .slide-media { order: -1; height: 250px; padding: 10px; }
  .slide-body { text-align: center; }
  .bullets li { text-align: left; display: inline-block; }
  .ctrl { display: none; }
}
/* ============================================================
   9. BONUS : ANIMATIONS & POLISH
   ============================================================ */

/* 1. Animation douce sur les checkmarks des listes */
.bullets li::before {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.slide:hover .bullets li::before {
  transform: scale(1.3); /* Grossit légèrement au survol de la slide */
}

/* 2. Effet "Pulse" sur le bouton Démarrer pour inciter au clic */
.btn.primary {
  position: relative;
  overflow: hidden;
}
/* Petit éclat lumineux qui passe de temps en temps */
.btn.primary::after {
  content: "";
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg);
  animation: shine 4s infinite;
}
@keyframes shine {
  0%, 80% { left: -100%; }
  100% { left: 200%; }
}

/* 3. Amélioration visuelle des images (si tu les changes pour des fonds blancs) */
/* Cela va aider à fondre les nouvelles images si elles ont un fond blanc */
.slide-media {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%); /* Très léger vert en bas */
  border: 1px solid #dcfce7; /* Bordure verte très pâle */
}

/* 4. Apparition fluide des éléments (nécessite un petit JS, voir plus bas) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
