/* ==========================================================================
   APEX ELECTRONICS — feuille de style
   Mobile-first, RTL, aucune dépendance externe (hors police Google Fonts)
   ========================================================================== */

:root {
  --ink: #0e1b2c;          /* bleu nuit — textes et fonds sombres */
  --ink-soft: #47586e;     /* texte secondaire */
  --bg: #f2f5f9;           /* fond de page */
  --surface: #ffffff;      /* cartes */
  --line: #dde5ee;         /* bordures fines */
  --brand: #1a5cff;        /* bleu électrique — accents de marque */
  --wa: #1ebe5b;           /* vert WhatsApp — uniquement pour commander */
  --wa-dark: #169c4a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 27, 44, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ----- Boutons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 22px rgba(26, 92, 255, 0.32);
}
.btn-primary:hover { background: #0f4ae0; transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-wa {
  background: var(--wa);
  color: #fff;
  box-shadow: 0 8px 22px rgba(30, 190, 91, 0.35);
}
.btn-wa:hover { background: var(--wa-dark); transform: translateY(-2px); }

.btn-lg { padding: 18px 36px; font-size: 1.1rem; }

.wa-icon { flex-shrink: 0; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--ink);
  color: #7ea4ff;
}
.brand-name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-nav > a:not(.header-wa) {
  display: none;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}
.header-nav > a:not(.header-wa):hover { color: var(--ink); }
.header-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wa);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.18s ease;
}
.header-wa:hover { background: var(--wa-dark); }

/* ----- Hero ----- */
.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 320px at 85% -10%, rgba(26, 92, 255, 0.45), transparent 70%),
    radial-gradient(500px 300px at 10% 110%, rgba(30, 190, 91, 0.18), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  padding-block: 72px 84px;
  text-align: center;
  animation: hero-in 0.7s ease both;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero-kicker {
  color: #8fb1ff;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(1.9rem, 6.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 18px;
}
.hero-sub {
  max-width: 620px;
  margin-inline: auto;
  color: #b9c6d8;
  font-size: 1.02rem;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ----- Sections ----- */
.section { padding-block: 64px; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-title {
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 10px;
}
.section-sub {
  color: var(--ink-soft);
  max-width: 560px;
  margin-inline: auto;
}

/* ----- Products ----- */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(14, 27, 44, 0.13);
}
.product-media {
  aspect-ratio: 1 / 1;
  background: #e9eef5;
  overflow: hidden;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-media img { transform: scale(1.045); }
.product-body {
  padding: 18px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-name { font-size: 1.15rem; font-weight: 700; }
.product-desc { color: var(--ink-soft); font-size: 0.95rem; }
.product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}
.product-price strong {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand);
}
.product-price span { color: var(--ink-soft); font-size: 0.95rem; }
.product-btn { margin-top: 8px; width: 100%; }

/* ----- Benefits ----- */
.benefits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  text-align: center;
}
.benefit-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-inline: auto;
  margin-bottom: 14px;
  border-radius: 16px;
  background: rgba(26, 92, 255, 0.1);
  color: var(--brand);
}
.benefit h3 { font-size: 1.08rem; margin-bottom: 6px; }
.benefit p { color: var(--ink-soft); font-size: 0.95rem; max-width: 280px; margin-inline: auto; }

/* ----- CTA band ----- */
.cta-band {
  background: linear-gradient(135deg, var(--ink) 0%, #14304f 100%);
  color: #fff;
  padding-block: 64px;
}
.cta-inner { text-align: center; }
.cta-inner h2 {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  margin-bottom: 12px;
}
.cta-inner p { color: #b9c6d8; margin-bottom: 28px; }

/* ----- Footer ----- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 36px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.footer-wa {
  color: var(--wa-dark);
  font-weight: 700;
  text-decoration: none;
  direction: ltr;
}
.footer-wa:hover { text-decoration: underline; }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-nav a:hover { color: var(--ink); }
.copyright { color: var(--ink-soft); font-size: 0.88rem; }

/* ----- Sticky WhatsApp float ----- */
.wa-float {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 10px 26px rgba(30, 190, 91, 0.45);
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.wa-float:hover { background: var(--wa-dark); transform: scale(1.07); }

/* ----- Scroll reveal ----- */
.will-reveal { opacity: 0; transform: translateY(16px); }
.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .will-reveal { opacity: 1; transform: none; }
}

/* ----- Tablet ≥ 640px ----- */
@media (min-width: 640px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Desktop ≥ 960px ----- */
@media (min-width: 960px) {
  .header-nav > a:not(.header-wa) { display: inline; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits { grid-template-columns: repeat(4, 1fr); }
  .hero-inner { padding-block: 96px 108px; }
  .wa-float { width: 62px; height: 62px; }
}
