/* ==========================================================================
   KeysGaming DZ — Direction artistique e-commerce premium
   Références : Rockstar Games / Razer. Sombre, tranchant, doré.
   HTML/CSS/JS natif. Fonts : Bebas Neue (display) + Plus Jakarta Sans (texte).
   ========================================================================== */

:root {
  /* Fonds */
  --bg:       #0b0e14;
  --bg-2:     #0e1119;
  --panel:    #121620;
  --panel-2:  #171c28;
  --panel-3:  #1c2230;

  /* Lignes */
  --line:   rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);

  /* Encre */
  --ink:     #f2f4f8;
  --ink-mut: #99a3b2;
  --ink-dim: #5a6474;

  /* Accents */
  --gold:     #eab308;
  --gold-2:   #facc15;
  --gold-ink: #141007;
  --danger:   #ef4444;
  --ok:       #34d399;

  --r:  4px;
  --r-lg: 6px;
  --wrap: 1200px;
  --ease: cubic-bezier(.4, 0, .2, 1);

  --font-display: "Bebas Neue", "Arial Narrow", "Oswald", sans-serif;
  --font-sans: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain très léger façon impression — pas de dégradé néon */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }
input { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Typographie utilitaire ---------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
}
.kicker__rule { width: 34px; height: 2px; background: var(--gold); flex: 0 0 auto; }

/* ---------- Boutons ---------- */
.btn {
  --bg-btn: var(--panel-2);
  --fg-btn: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: var(--r);
  background: var(--bg-btn);
  color: var(--fg-btn);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1;
  transition: transform .12s var(--ease), background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn--gold { --bg-btn: var(--gold); --fg-btn: var(--gold-ink); }
.btn--gold:hover { --bg-btn: var(--gold-2); }
.btn--ghost { --bg-btn: transparent; border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--outline { --bg-btn: transparent; border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }
.btn--sm { padding: 10px 16px; font-size: .74rem; }
.btn--block { width: 100%; }

/* ---------- Topbar ---------- */
.topbar {
  background: #05070b;
  border-bottom: 1px solid var(--line);
  font-size: .72rem;
  color: var(--ink-mut);
  letter-spacing: .04em;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 34px;
  overflow: hidden;
  white-space: nowrap;
}
.topbar__dot { color: var(--gold); }
@media (max-width: 620px) {
  .topbar__inner { justify-content: flex-start; gap: 8px; font-size: .68rem; }
  .topbar__inner span:nth-child(n+4) { display: none; }
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 14, 20, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.header.is-scrolled {
  background: rgba(8, 10, 15, 0.94);
  border-bottom-color: var(--line-2);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 74px;
  transition: height .2s var(--ease);
}
.header.is-scrolled .header__inner { height: 62px; }

.brand { display: inline-flex; align-items: center; }
.brand__img {
  height: 46px;
  width: auto;
  transition: height .2s var(--ease);
}
.header.is-scrolled .brand__img { height: 38px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  display: none;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mut);
  padding: 10px 14px;
}
.nav__link:hover { color: var(--ink); }
@media (min-width: 860px) {
  .nav { gap: 12px; }
  .nav__link { display: inline-block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(234, 179, 8, 0.05), transparent 40%),
    var(--bg);
}
.hero__emblem {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: min(560px, 44vw);
  opacity: .05;
  filter: grayscale(1) contrast(1.2);
  pointer-events: none;
  user-select: none;
}
@media (max-width: 780px) { .hero__emblem { display: none; } }

.hero__inner { position: relative; padding: 72px 20px 64px; max-width: 820px; }
.hero__title {
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 10vw, 6.4rem);
  line-height: .92;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.hero__title span { color: var(--gold); }
.hero__lead {
  margin-top: 22px;
  max-width: 560px;
  color: var(--ink-mut);
  font-size: 1.03rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero__facts {
  list-style: none;
  display: flex;
  gap: 40px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero__facts li { display: flex; flex-direction: column; gap: 2px; }
.hero__facts strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  color: var(--ink);
  letter-spacing: .02em;
}
.hero__facts span {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
@media (max-width: 520px) {
  .hero__inner { padding: 52px 20px 48px; }
  .hero__facts { gap: 26px; }
  .hero__facts strong { font-size: 1.5rem; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { margin-bottom: 34px; }
.section__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.section__meta { margin-top: 8px; color: var(--ink-mut); font-size: .9rem; }

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 30px;
  padding-bottom: 4px;
}
.search { position: relative; max-width: 420px; }
.search__icon {
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-dim);
  pointer-events: none;
}
.search__input {
  width: 100%;
  padding: 12px 8px 12px 30px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  outline: none;
  font-size: .98rem;
  transition: border-color .15s var(--ease);
}
.search__input::placeholder { color: var(--ink-dim); }
.search__input:focus { border-bottom-color: var(--gold); }

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 12px 14px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
  white-space: nowrap;
}
.chip:hover { color: var(--ink-mut); }
.chip.is-active { color: var(--ink); border-bottom-color: var(--gold); }
.chip--promo.is-active { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- States ---------- */
.state {
  text-align: center;
  padding: 60px 20px;
  display: grid;
  gap: 14px;
  place-items: center;
  color: var(--ink-mut);
}
.state[hidden] { display: none; }
.state--error {
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--panel);
}
.state--error h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.state--error p { max-width: 420px; font-size: .9rem; }

/* ---------- Grille produits ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 720px)  { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(234, 179, 8, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.card.is-out { opacity: .55; }
.card.is-out:hover { transform: none; border-color: var(--line); box-shadow: none; }

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--panel-3);
  overflow: hidden;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .card__media img { transform: scale(1.05); }
.card__media::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 14, 20, 0.55));
  z-index: 1;
}
.card__media--ph::after {
  content: "KEYS";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: .2em;
  color: var(--ink-dim);
  z-index: 2;
}

.card__flag {
  position: absolute;
  top: 0; left: 0;
  z-index: 3;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .04em;
  padding: 5px 10px;
  border-bottom-right-radius: var(--r);
}
.card__stock {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 3;
  background: rgba(5, 7, 11, 0.85);
  border: 1px solid var(--line-2);
  color: var(--ink-mut);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--r);
}

.card__info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  padding: 4px 8px;
  border-radius: 3px;
}
.chip-tag::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 1px;
}
.chip-tag--muted { color: var(--ink-mut); }
.chip-tag--muted::before { background: var(--ink-dim); }

.card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.28rem;
  line-height: 1.05;
  letter-spacing: .015em;
  text-transform: uppercase;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.1em;
}

.card__price { margin-top: auto; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card__price-old {
  color: var(--ink-dim);
  text-decoration: line-through;
  font-size: .82rem;
}
.card__price-now {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--gold);
  letter-spacing: .02em;
}
.card__price-now i { font-family: var(--font-sans); font-style: normal; font-size: .64rem; font-weight: 700; color: var(--ink-dim); letter-spacing: .1em; }

.btn--buy {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.btn--buy:hover:not(:disabled) { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn--buy:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Skeleton ---------- */
.grid.is-loading .card { pointer-events: none; }
.sk {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 37%, var(--panel) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 3px;
}
.sk--media { aspect-ratio: 16 / 10; }
.sk--line { height: 1.3em; }
.sk--line.s2 { width: 60%; }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--bg-2); padding: 30px 26px; }
.step__num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.4rem;
  color: var(--gold);
  line-height: 1;
}
.step__title {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.step p { color: var(--ink-mut); font-size: .9rem; }

/* ---------- Footer ---------- */
.footer { background: #05070b; border-top: 1px solid var(--line); padding-top: 46px; }
.footer__grid { display: grid; gap: 28px; padding-bottom: 32px; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.8fr 1fr 1fr; } }
.footer__logo { height: 44px; width: auto; }
.footer__tag { margin-top: 14px; color: var(--ink-mut); font-size: .86rem; max-width: 320px; }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col h4 {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 4px;
}
.footer__col a, .footer__col span { color: var(--ink-mut); font-size: .88rem; }
.footer__col a:hover { color: var(--gold); }
.footer__secure { color: var(--ink-dim) !important; }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- WhatsApp FAB ---------- */
.wa-fab {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 45;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #1faa52;
  color: #eafff1;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  transition: transform .15s var(--ease), background .15s var(--ease);
}
.wa-fab:hover { transform: scale(1.08); background: #25d366; }

/* ---------- Modales ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal[hidden] { display: none; }
@media (min-width: 640px) { .modal { align-items: center; } }

.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(4px);
  animation: fade .2s var(--ease);
}
.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 26px 24px 24px;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp .24s var(--ease);
  max-height: 92vh;
  overflow-y: auto;
}
@media (min-width: 640px) {
  .modal__dialog { border-radius: var(--r-lg); animation: pop .18s var(--ease); }
}
.modal__dialog--sm { max-width: 400px; }
.modal__close {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px;
  border-radius: var(--r);
  color: var(--ink-mut);
  font-size: 1.5rem;
  line-height: 1;
}
.modal__close:hover { color: var(--ink); background: var(--panel-3); }
.modal__kicker {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
}
.modal__title {
  margin: 6px 0 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding-right: 30px;
}

/* Récap produit */
.co-product {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 20px;
}
.co-product img {
  width: 92px; height: 62px;
  object-fit: cover;
  border-radius: 3px;
  flex: 0 0 auto;
  background: var(--panel-3);
}
.co-product__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .015em;
}
.co-product__meta {
  margin-top: 4px;
  color: var(--ink-mut);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.co-product__price {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
  letter-spacing: .02em;
}
.co-product__price i { font-family: var(--font-sans); font-style: normal; font-size: .6rem; font-weight: 700; color: var(--ink-dim); letter-spacing: .1em; }
.co-product__old {
  font-family: var(--font-sans);
  font-size: .78rem;
  color: var(--ink-dim);
  text-decoration: line-through;
  margin-right: 8px;
}

/* Champs */
.field { display: block; margin-bottom: 16px; }
.field__label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mut);
  margin-bottom: 7px;
}
.field__label i { color: var(--gold); font-style: normal; }
.field input {
  width: 100%;
  padding: 12px 13px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.14); }
.field.has-error input { border-color: var(--danger); }
.field__error { display: block; color: var(--danger); font-size: .76rem; margin-top: 6px; min-height: 1em; }

.co-hint { color: var(--ink-dim); font-size: .74rem; text-align: center; margin-top: 12px; }

/* Contact */
.contact-list { list-style: none; display: grid; gap: 16px; margin-bottom: 16px; }
.contact-list li { display: flex; gap: 12px; }
.contact-list__ico {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-size: 1.05rem;
}
.contact-list li > div { display: flex; flex-direction: column; }
.contact-list__k {
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 3px;
}
.contact-list a { color: var(--ink); font-size: .92rem; }
.contact-list a:hover { color: var(--gold); }
.contact-secure {
  text-align: center;
  font-size: .78rem;
  color: var(--ink-mut);
  padding: 12px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  margin-bottom: 16px;
}

/* ---------- Animations ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
