/* ==========================================================================
   GROWTH-IA · STYLES V4
   Système de design : sombre/orange premium avec mode clair switchable
   ========================================================================== */

:root {
  /* Couleurs sombres (par défaut) */
  --bg: #0a0a09;
  --bg-elev: #15151200;
  --bg-card: rgba(250,248,243,0.03);
  --ink: #faf8f3;
  --ink-soft: rgba(250,248,243,0.7);
  --ink-mute: rgba(250,248,243,0.5);
  --border: rgba(250,248,243,0.1);
  --border-strong: rgba(250,248,243,0.2);
  --accent: #ff5b35;
  --accent-soft: rgba(255,91,53,0.12);
  --accent-glow: rgba(255,91,53,0.4);
  --gold: #c9a96e;
  --green: #10b981;
  --red: #ef4444;
  --yellow: #fbbf24;
  --grid: rgba(250,248,243,0.04);
  --paper: #faf8f3;
  --shadow-glow: 0 24px 60px rgba(255,91,53,0.15);
  --shadow-card: 0 4px 16px rgba(0,0,0,0.3);
}

/* Mode clair */
:root[data-theme="light"] {
  --bg: #faf8f3;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --ink: #0a0a09;
  --ink-soft: rgba(10,10,9,0.75);
  --ink-mute: rgba(10,10,9,0.5);
  --border: rgba(10,10,9,0.08);
  --border-strong: rgba(10,10,9,0.15);
  --accent: #e63d18;
  --accent-soft: rgba(230,61,24,0.08);
  --accent-glow: rgba(230,61,24,0.3);
  --grid: rgba(10,10,9,0.03);
  --paper: #ffffff;
  --shadow-glow: 0 24px 60px rgba(230,61,24,0.1);
  --shadow-card: 0 4px 16px rgba(10,10,9,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
  font-feature-settings: "ss01", "cv01";
}

.serif { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.mono { font-family: 'JetBrains Mono', monospace; }

::selection { background: var(--accent); color: var(--paper); }

/* ==========================================================================
   SCROLL PROGRESS
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #ff8c66);
  z-index: 1000;
  width: 0%;
  transition: width 0.1s;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ==========================================================================
   NAVIGATION V4.1 — Menu hamburger toujours visible (style Linear/Stripe)
   ========================================================================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s, background 0.3s;
}
nav.scrolled { padding: 14px 48px; }

.logo {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 101;
}
.logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}
.logo-text {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  letter-spacing: -0.5px;
  font-size: 22px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 101;
}
.logo-dot {
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.5s infinite;
  box-shadow: 0 0 12px var(--accent-glow);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.4); }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 101;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-size: 16px;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.cta-nav {
  background: var(--accent);
  color: var(--paper);
  padding: 10px 22px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.cta-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.cta-nav:hover::before { transform: translateX(100%); }
.cta-nav:hover {
  background: #ff7253;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

/* MENU TOGGLE - toujours visible */
.menu-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  padding: 0;
  font-family: inherit;
}
.menu-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.menu-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.menu-toggle-icon span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.3s;
}
.menu-toggle.open .menu-toggle-icon span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.menu-toggle.open .menu-toggle-icon span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .menu-toggle-icon span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* PANEL MENU SLIDE-IN */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 100;
  padding: 100px 48px 48px;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  text-align: left;
}
.nav-panel.open {
  transform: translateX(0);
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 48px;
  padding: 0;
  text-align: left;
}
.nav-links li {
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.nav-links li:last-child { border-bottom: none; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s;
  opacity: 0;
  transform: translateX(-20px);
  text-align: left;
}
.nav-panel.open .nav-links a {
  opacity: 1;
  transform: translateX(0);
}
.nav-panel.open .nav-links li:nth-child(1) a { transition-delay: 0.1s; }
.nav-panel.open .nav-links li:nth-child(2) a { transition-delay: 0.15s; }
.nav-panel.open .nav-links li:nth-child(3) a { transition-delay: 0.2s; }
.nav-panel.open .nav-links li:nth-child(4) a { transition-delay: 0.25s; }
.nav-panel.open .nav-links li:nth-child(5) a { transition-delay: 0.3s; }
.nav-panel.open .nav-links li:nth-child(6) a { transition-delay: 0.35s; }
.nav-links a::after {
  content: '→';
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
}
.nav-links a:hover {
  color: var(--accent);
  padding-left: 12px;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  opacity: 1;
  transform: translateX(0);
}
.nav-links a.active { color: var(--accent); }

.nav-panel-footer {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.nav-panel-footer-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 16px;
}
.nav-panel-footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-panel-footer-contact a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav-panel-footer-contact a:hover { opacity: 1; color: var(--accent); }

@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  nav.scrolled { padding: 12px 20px; }
  .nav-panel { padding: 80px 24px 24px; }
  .nav-links a { font-size: 22px; }
  .cta-nav { display: none; }
}

/* ==========================================================================
   COMPOSANTS COMMUNS
   ========================================================================== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

h1.page-title, h2.section-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(40px, 5.5vw, 80px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 32px;
  color: var(--ink);
}
h1.page-title em, h2.section-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.btn-primary {
  background: var(--accent);
  color: var(--paper);
  padding: 18px 32px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
  background: #ff7253;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px var(--accent-glow);
}
.btn-primary span:last-child { transition: transform 0.3s; }
.btn-primary:hover span:last-child { transform: translateX(4px); }

.btn-secondary {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ink);
  transition: opacity 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover { opacity: 0.7; }

.btn-ghost {
  background: var(--bg-card);
  color: var(--ink);
  padding: 14px 24px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid var(--border-strong);
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   PAGE HERO (interne)
   ========================================================================== */
.page-hero {
  padding: 180px 48px 80px;
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-soft), transparent 60%);
  pointer-events: none;
}
.page-hero-content { max-width: 1200px; margin: 0 auto; position: relative; }
.page-hero-subtitle {
  font-size: 20px;
  line-height: 1.5;
  max-width: 720px;
  color: var(--ink-soft);
  font-weight: 300;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: var(--bg);
  color: var(--ink);
  padding: 80px 48px 40px;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}
.footer-brand {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 360px;
}
.footer-col h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  color: var(--ink-mute);
  font-weight: 600;
}
.footer-col a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 12px;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.2s;
}
.footer-col a:hover { opacity: 1; transform: translateX(2px); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-mute);
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   ANIMATIONS REVEAL
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.slide-in-left.visible { opacity: 1; transform: translateX(0); }

.slide-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.slide-in-right.visible { opacity: 1; transform: translateX(0); }

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.scale-in.visible { opacity: 1; transform: scale(1); }

/* ==========================================================================
   CHATBOT FLOTTANT
   ========================================================================== */
.chat-bubble-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px var(--accent-glow);
  transition: all 0.3s;
  animation: chatPulse 2.5s infinite;
}
@keyframes chatPulse {
  0%, 100% { box-shadow: 0 8px 32px var(--accent-glow), 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 8px 32px var(--accent-glow), 0 0 0 16px transparent; }
}
.chat-bubble-trigger:hover { transform: scale(1.08); }
.chat-bubble-trigger svg { width: 28px; height: 28px; fill: white; transition: transform 0.3s; }
.chat-bubble-trigger.open svg { transform: rotate(180deg); }
.chat-bubble-trigger .chat-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: white;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
}

.chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 91;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: chatSlideUp 0.3s ease;
}
.chat-window.open { display: flex; }
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-header {
  background: #0a0a09;
  color: #faf8f3;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-avatar-bot {
  width: 40px;
  height: 40px;
  background: #ff5b35;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 18px;
  position: relative;
  color: white;
}
.chat-avatar-bot::after {
  content: '';
  position: absolute;
  bottom: 2px; right: 2px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  border: 2px solid #0a0a09;
}
.chat-header-info .name { font-weight: 600; font-size: 15px; }
.chat-header-info .status { font-size: 12px; opacity: 0.7; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #faf8f3;
  color: #0a0a09;
}
.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: msgIn 0.3s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot {
  background: rgba(10, 10, 9, 0.06);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: #0a0a09;
  color: #faf8f3;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg.error {
  background: #fee;
  color: #c00;
  align-self: flex-start;
  font-size: 13px;
}

.chat-typing {
  align-self: flex-start;
  background: rgba(10, 10, 9, 0.06);
  padding: 12px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  display: none;
}
.chat-typing.show { display: flex; gap: 4px; }
.chat-typing span {
  width: 6px; height: 6px;
  background: rgba(10,10,9,0.5);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chat-suggestions {
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(10,10,9,0.08);
  background: #faf8f3;
}
.chat-suggestion {
  background: rgba(255,91,53,0.1);
  border: 1px solid rgba(255,91,53,0.3);
  color: #ff5b35;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.chat-suggestion:hover { background: #ff5b35; color: white; }

.chat-input-wrap {
  padding: 16px 20px;
  border-top: 1px solid rgba(10,10,9,0.08);
  background: #faf8f3;
  display: flex;
  gap: 8px;
}
.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(10,10,9,0.15);
  border-radius: 100px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: white;
  color: #0a0a09;
}
.chat-input:focus { border-color: #ff5b35; }
.chat-send {
  background: #ff5b35;
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
}
.chat-send:hover { background: #ff7253; transform: rotate(-15deg); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .page-hero { padding: 140px 20px 60px; }
  .footer-content { grid-template-columns: 1fr; gap: 40px; }
  footer { padding: 60px 20px 30px; }
  .chat-bubble-trigger { bottom: 16px; right: 16px; width: 56px; height: 56px; }
  .chat-window { bottom: 84px; right: 16px; width: calc(100vw - 32px); height: calc(100vh - 110px); }
}
