/* ===========================
   KN WEB & TECHNOLOGY - CSS Global
   Agence Digitale Propulsée par l'IA
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@400;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --primary: #3a0ca3;
  --secondary: #4361ee;
  --accent: #f72585;
  --ai-glow: #7209b7;
  --dark: #0a0a0f;
  --dark-2: #12121a;
  --dark-3: #1a1a28;
  --light: #f8f9ff;
  --gray: #6c757d;
  --gray-2: #9a9ab0;
  --success: #4cc9f0;
  --warning: #f8961e;
  --danger: #ef233c;
  --gradient-main: linear-gradient(135deg, #3a0ca3, #4361ee);
  --gradient-ai: linear-gradient(135deg, #7209b7, #f72585);
  --gradient-full: linear-gradient(135deg, #3a0ca3, #7209b7, #f72585);
  --transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  --font-display: 'Syne', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 4px 20px rgba(58, 12, 163, 0.1);
  --shadow-md: 0 10px 40px rgba(58, 12, 163, 0.15);
  --shadow-lg: 0 20px 60px rgba(58, 12, 163, 0.2);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--light);
  color: var(--dark);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- BUTTONS ---- */
.btn {
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 4px 20px rgba(67, 97, 238, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(67, 97, 238, 0.45); }

.btn-ai {
  background: var(--gradient-ai);
  color: white;
  box-shadow: 0 4px 20px rgba(114, 9, 183, 0.35);
}
.btn-ai:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(247, 37, 133, 0.45); }

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: white; }

.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 20px rgba(247, 37, 133, 0.35);
}
.btn-accent:hover { transform: translateY(-3px); }

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline-white:hover { background: white; color: var(--primary); }

.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }

/* ---- NAVBAR ---- */
.nav-container {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(58,12,163,0.08);
  transition: var(--transition);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo img {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  background: var(--gradient-full);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-sub {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  color: var(--ai-glow);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  font-size: 0.92rem;
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gradient-main);
  transition: width 0.3s;
  border-radius: 2px;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.cart-icon {
  position: relative;
  cursor: pointer;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(58,12,163,0.07);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  transition: var(--transition);
}
.cart-icon:hover { background: rgba(58,12,163,0.12); }

.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.hamburger {
  display: none;
  cursor: pointer;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(58,12,163,0.07);
  align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  transition: var(--transition);
}
.hamburger:hover { background: rgba(58,12,163,0.12); }

/* ---- SECTIONS ---- */
section { padding: 6rem 5%; }
.section-header { text-align: center; margin-bottom: 4rem; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(114, 9, 183, 0.08);
  color: var(--ai-glow);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1rem;
}

.section-title span {
  background: var(--gradient-full);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px; height: 4px;
  background: var(--gradient-main);
  border-radius: 2px;
  margin: 0.8rem auto 0;
}

.section-subtitle {
  color: var(--gray);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ---- CARDS COMMONS ---- */
.card-hover {
  transition: var(--transition);
  border-radius: var(--radius-lg);
}
.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* ---- AI BADGE ---- */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gradient-ai);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ---- FOOTER ---- */
footer {
  background: var(--dark);
  color: white;
  padding: 5rem 5% 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-brand .logo-footer {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient-full);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.footer-brand p { color: #888; font-size: 0.9rem; line-height: 1.8; margin-bottom: 1.5rem; }

.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
}
.footer-social a:hover { background: var(--primary); transform: translateY(-3px); }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 30px; height: 2px;
  background: var(--gradient-main);
  border-radius: 2px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a {
  color: #888;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-links a:hover { color: white; padding-left: 5px; }
.footer-links a i { font-size: 0.75rem; color: var(--secondary); }

.footer-newsletter { margin-top: 1rem; }
.footer-newsletter p { color: #888; font-size: 0.85rem; margin-bottom: 1rem; }
.newsletter-form {
  display: flex;
  gap: 0.5rem;
}
.newsletter-form input {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: white;
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.newsletter-form input::placeholder { color: #666; }
.newsletter-form input:focus { outline: none; border-color: var(--secondary); }
.newsletter-form button {
  padding: 0.7rem 1.2rem;
  background: var(--gradient-main);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}
.newsletter-form button:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
.footer-bottom p { color: #666; font-size: 0.85rem; }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: #666; text-decoration: none; font-size: 0.82rem; transition: color 0.3s; }
.footer-bottom-links a:hover { color: white; }

/* ---- FLOATING BUTTONS ---- */
.floating-whatsapp {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.6rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  z-index: 999;
  transition: var(--transition);
  animation: floatWA 3s ease-in-out infinite;
}
.floating-whatsapp:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6); }

.floating-ai-chat {
  position: fixed;
  bottom: 92px;
  left: 25px;
  width: 56px; height: 38px;
  background: var(--gradient-main);
  border-radius: 19px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  z-index: 999;
  transition: var(--transition);
  animation: floatAI 3s ease-in-out 0.5s infinite;
}
.floating-ai-chat:hover { transform: scale(1.1); }

@keyframes floatWA { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes floatAI { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---- CART PANEL ---- */
.cart-panel {
  position: fixed;
  top: 0; right: -420px;
  width: 400px; height: 100vh;
  background: white;
  box-shadow: -10px 0 40px rgba(0,0,0,0.12);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.65,0,0.35,1);
  display: flex;
  flex-direction: column;
}
.cart-panel.open { right: 0; }
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  backdrop-filter: blur(4px);
}
.cart-overlay.active { display: block; }
.cart-panel-header {
  padding: 1.5rem;
  background: var(--gradient-main);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-panel-header h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.close-cart-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.close-cart-btn:hover { background: rgba(255,255,255,0.3); }
.cart-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray-2); }
.cart-empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.3; }
.cart-item-row {
  display: flex; gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f8;
}
.cart-item-img { width: 70px; height: 55px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info .name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.cart-item-info .cat { font-size: 0.78rem; color: var(--gray-2); margin-bottom: 0.3rem; }
.cart-item-info .price { color: var(--primary); font-weight: 700; }
.cart-qty-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1px solid #dde;
  background: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}
.qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.qty-val { font-weight: 700; min-width: 20px; text-align: center; font-size: 0.9rem; }
.remove-cart-item { margin-left: auto; background: none; border: none; color: var(--danger); cursor: pointer; font-size: 0.85rem; }
.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid #f0f0f8;
  background: #fafafe;
}
.cart-total-row { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.checkout-btn {
  width: 100%;
  padding: 1rem;
  background: var(--gradient-main);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.checkout-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.cart-notification {
  position: fixed;
  top: 90px; right: 20px;
  background: var(--gradient-main);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 1002;
  transform: translateX(150%);
  transition: transform 0.4s cubic-bezier(0.65,0,0.35,1);
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.9rem;
}
.cart-notification.show { transform: translateX(0); }

/* ---- HIDDEN SECTIONS ---- */
.hidden-section { display: none; }
.hidden-section.active { display: block; animation: fadeUp 0.5s ease; }

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

.toggle-btn {
  background: var(--gradient-main);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem auto;
}
.toggle-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.toggle-btn i { transition: transform 0.3s; }
.toggle-btn.active i { transform: rotate(180deg); }

/* ---- MOBILE NAV ---- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px; left: -100%;
    width: 70%; height: calc(100vh - 72px);
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: 5px 0 20px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: auto;
  }
  .nav-links.active { left: 0; }
  .nav-actions .btn { display: none; }
  .hamburger { display: flex; }
  .section-title { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .cart-panel { width: 100%; right: -100%; }
}
