@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&display=swap');

/* ─── VARIABLES ─────────────────────────────── */
:root {
  --green: #28a745;
  --green-dark: #1e7e34;
}

/* ─── RESET ─────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
}

/* ─── NAVBAR ─────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  background: #111;
  color: white;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  gap: 16px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: white;
  white-space: nowrap;
}

.logo span {
  color: var(--green);
}

/* ─── NAV MENU ───────────────────────────────── */
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin-left: 20px;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.nav-menu a:hover {
  text-decoration: underline;
}

/* ─── HAMBURGER ──────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: white;
  margin: 4px 0;
  display: block;
}

/* ─── CART BUTTON ────────────────────────────── */
.cart-btn {
  background: var(--green);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  margin-left: auto;
}

.cart-btn:hover {
  background: var(--green-dark);
  transform: scale(1.02);
}

.cart-count {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1px 6px;
  font-size: 0.75rem;
  font-weight: bold;
}

/* ─── HERO ───────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  margin-top: 20px;
}

.hero-left {
  padding: 42px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e1f5ee;
  color: #0f6e56;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  width: fit-content;
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: 1.9rem;
  color: #0d1f1a;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-title em {
  color: var(--green);
  font-style: normal;
}

.hero-sub {
  color: #64748b;
  margin-bottom: 36px;
  line-height: 1.6;
  max-width: 440px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-btns .btn-primary {
  background: #0d1f1a;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.hero-btns .btn-primary:hover {
  background: #1a2e28;
}

.btn-ghost {
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.hero-right {
  background: #0d1f1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 40px;
  gap: 24px;
}

.led-display-mock {
  width: 100%;
  max-width: 340px;
  background: #1a2e28;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.led-pixel-grid {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  gap: 3px;
  aspect-ratio: 16 / 9;
}

.led-pixel {
  background: rgba(40, 167, 69, 0.1);
  border-radius: 2px;
  transition: background 0.1s;
}

.led-pixel.on {
  background: rgba(40, 167, 69, 0.9);
  box-shadow: 0 0 4px var(--green);
}

/* Force hero-stats à rester sur UNE SEULE LIGNE sans jamais passer à la ligne */
.hero-stats {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;        /* PAS DE PASSAGE À LA LIGNE */
  gap: 8px;
  width: 100%;
  justify-content: center;
  overflow-x: auto;         /* permet scroll si trop étroit, mais pas de retour ligne */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Chaque stat garde sa largeur fixe / minimale */
.hero-stat {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
  min-width: 70px;          /* largeur minimale fixe */
  flex-shrink: 0;           /* empêche le rétrécissement */
  white-space: nowrap;      /* texte interne pas de retour ligne */
}

.hero-stat-num {
  font-weight: 800;
  font-size: 0.9rem;
  color: white;
  white-space: nowrap;
}

.hero-stat-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

/* Ajustement pour très petits écrans (ex: 320px) - on réduit légèrement le padding */
@media (max-width: 480px) {
  .hero-stats {
    gap: 6px;
  }
  .hero-stat {
    padding: 6px 10px;
    min-width: 65px;
  }
  .hero-stat-num {
    font-size: 0.8rem;
  }
  .hero-stat-label {
    font-size: 0.6rem;
  }
}
/* ─── PRODUCTS ───────────────────────────────── */
.content {
  padding: 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.product-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 12px;
  object-fit: cover;
}

.product-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
}

.product-card .price {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--green);
  margin-bottom: 12px;
}

.product-card button {
  background: var(--green);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
  margin-top: auto;
}

.product-card button:hover {
  background: var(--green-dark);
}

/* ─── TRUST BAR ──────────────────────────────── */
.trust-bar {
  background: white;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 20px 40px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin: 40px 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #64748b;
}

.trust-icon {
  width: 32px;
  height: 32px;
  background: #e1f5ee;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.trust-item strong {
  color: #0d1f1a;
}

/* ─── MODALS (cart + product) ────────────────── */
.cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.cart-box {
  background: #0d1f1a;
  width: 450px;
  max-width: 90%;
  border-radius: 20px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  animation: slideUp 0.25s ease-out;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cart-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-family: 'Syne', sans-serif;
}

.cart-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.cart-close:hover {
  background: rgba(255,255,255,0.1);
}

.cart-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  max-height: 300px;
  overflow-y: auto;
}

.cart-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 10px;
  flex-wrap: wrap;
}

.item-info {
  flex: 2;
  min-width: 100px;
}

.item-info strong {
  display: block;
  font-size: 0.9rem;
}

.item-info small {
  font-size: 0.75rem;
  opacity: 0.7;
}

.item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: var(--green);
  border-color: var(--green);
}

.item-qty {
  min-width: 28px;
  text-align: center;
}

.remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s;
}

.remove-btn:hover {
  background: rgba(255,0,0,0.2);
}

.item-subtotal {
  font-weight: 600;
  min-width: 70px;
  text-align: right;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 1.1rem;
}

.cart-total strong {
  font-size: 1.2rem;
  color: var(--green);
}

.cart-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-secondary,
.btn-primary {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
}

.btn-primary {
  background: var(--green);
  border: none;
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

/* ─── WHATSAPP FLOAT ─────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 9999;
  transition: all 0.25s ease;
  text-decoration: none;
  animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.05);
  background: #20b859;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

/* ─── ANIMATIONS ─────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes whatsapp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70%  { box-shadow: 0 0 0 12px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ─── RESPONSIVE : TABLET 768px ──────────────── */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 60px;
    left: 0;
    width: 50%;
    background: #111;
    flex-direction: column;
    display: none;
    z-index: 1000;
    border-radius: 0 0 12px 0;
    overflow: hidden;
  }

  .nav-menu.active {
    display: flex;
    animation: slideDown 0.25s ease-out;
  }

  .nav-menu li {
    margin: 4px 0;
    text-align: center;
    width: 100%;
  }

  .nav-menu a {
    display: block;
    padding: 8px 16px;
    font-size: 0.85rem;
    transition: all 0.2s;
  }

  .nav-menu a:hover {
    background: rgba(40, 167, 69, 0.15);
    padding-left: 20px;
  }

  .cart-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .cart-count {
    font-size: 0.7rem;
    padding: 1px 5px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-left {
    padding: 28px 20px;
  }

  .hero-title {
    font-size: 1.35rem;
  }

  .hero-sub {
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 20px;
    max-width: 100%;
  }

  .hero-right {
    padding: 20px;
  }

  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 28px 40px;
  }

  .trust-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px;
    margin: 20px 0;
  }

  .trust-item {
    gap: 8px;
    font-size: 0.75rem;
  }

  .trust-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .cart-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .item-subtotal,
  .item-controls {
    align-self: flex-end;
  }

  .cart-actions {
    flex-direction: column;
  }

  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }

  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}

/* ─── RESPONSIVE : MOBILE 480px ──────────────── */
@media (max-width: 480px) {
  .cart-text {
    display: none;
  }

  .cart-btn {
    padding: 6px 10px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .product-card {
    padding: 12px;
  }

  .product-card h3 {
    font-size: 0.85rem;
  }

  .product-card .price {
    font-size: 1rem;
  }

  .product-card button {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
}

/* ─── DESKTOP : 3 CARTES PAR LIGNE ──────────────── */
@media (min-width: 769px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 28px 40px;
  }
}

/* Ajoutez à la fin de votre fichier styles.css */
html {
  scroll-behavior: smooth;
}

#productsSection {
  scroll-margin-top: 14px;
}