/* ================================================================
   NIMXUS BOUTIQUE — feuille de style
   Même ADN que afridomo.com : sombre, cyan/vert, pilule flottante.
   ================================================================ */
:root {
  --bg:        #020c1b;
  --bg2:       #071428;
  --cyan:      #00d4ff;
  --cyan-dim:  rgba(0,212,255,0.12);
  --green:     #00ff88;
  --green-dim: rgba(0,255,136,0.12);
  --text:      #e2f0fb;
  --muted:     rgba(226,240,251,0.55);
  --muted2:    rgba(226,240,251,0.3);
  --border:    rgba(0,212,255,0.2);
  --border2:   rgba(0,212,255,0.08);
  --danger:    #ff6b6b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Fond ambiant */
.shop-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 420px at 85% -5%, rgba(0,212,255,0.09), transparent 60%),
    radial-gradient(600px 380px at 0% 100%, rgba(0,255,136,0.06), transparent 60%),
    var(--bg);
}

/* ---- Navbar pilule ------------------------------------------- */
.navbar {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 9000;
  padding: 0 16px; display: flex; align-items: center;
}
.nav-inner {
  max-width: 1080px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px 8px 18px;
  border-radius: 999px;
  background: rgba(4,16,33,0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border2);
  box-shadow: 0 12px 36px -18px rgba(0,0,0,0.65);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif; font-weight: 800; letter-spacing: 1.5px;
  font-size: 15px;
}
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.logo small {
  font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: .5px;
  color: var(--cyan); font-size: 11px; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  padding: 8px 13px; border-radius: 999px; transition: all .2s;
  display: flex; align-items: center; gap: 6px;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,0.06); }
.cart-link { position: relative; }
.cart-badge {
  position: absolute; top: -2px; right: 0;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: none; place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: var(--bg); font-size: 10.5px; font-weight: 800;
  border-radius: 999px;
}

/* ---- Sections -------------------------------------------------- */
.page { padding: 120px 0 70px; }
.page-head { margin-bottom: 34px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 2px; color: var(--cyan);
}
.tag::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px var(--green);
}
h1.title {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(1.8rem, 4.4vw, 2.9rem); line-height: 1.1;
  margin: 10px 0 12px; letter-spacing: -0.5px;
}
.title .tc { color: var(--cyan); }
.title .tg { color: var(--green); }
.sub { color: var(--muted); max-width: 60ch; }

/* ---- Filtres / recherche --------------------------------------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 26px 0; }
.search {
  flex: 1; min-width: 220px;
  padding: 12px 16px; border-radius: 999px;
  background: rgba(2,12,27,0.7); border: 1px solid var(--border2);
  color: var(--text); font-size: .95rem;
}
.search:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,212,255,0.12); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 16px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: transparent; border: 1px solid var(--border2); color: var(--muted);
  transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--border); }
.chip.on {
  background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan);
}

/* ---- Grille produits ------------------------------------------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(6,18,36,0.78), rgba(2,12,27,0.96));
  border: 1px solid var(--border2); border-radius: 18px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .4s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border);
  box-shadow: 0 22px 54px -24px rgba(0,212,255,0.4);
}
.card-img { position: relative; aspect-ratio: 4/3; background: #071428; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-cat {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(2,12,27,0.85); color: var(--cyan);
  border: 1px solid var(--border2);
}
.card-stock {
  position: absolute; bottom: 10px; right: 10px;
  font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.stock-ok  { background: rgba(0,255,136,0.14); color: var(--green); }
.stock-low { background: rgba(255,180,0,0.16); color: #ffc14d; }
.stock-out { background: rgba(255,107,107,0.15); color: var(--danger); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px; flex: 1; }
.card-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; line-height: 1.25; }
.card-price { font-weight: 800; color: var(--cyan); font-size: 1.05rem; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }

/* ---- Boutons ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: none;
  font-size: .9rem; font-weight: 700; transition: all .25s;
}
.btn-cyan {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #02121f;
  box-shadow: 0 8px 24px -10px rgba(0,212,255,0.6);
}
.btn-cyan:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(0,212,255,0.75); }
.btn-cyan:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--cyan-dim); border-color: var(--cyan); }
.btn-sm { padding: 9px 14px; font-size: .82rem; }
.btn-block { width: 100%; }

/* ---- Page produit ----------------------------------------------- */
.product-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}
.product-visual {
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border2); background: #071428;
}
.product-visual img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.pd-price { font-size: 1.9rem; font-weight: 800; color: var(--cyan); margin: 14px 0; }
.pd-desc { color: var(--muted); margin-bottom: 22px; }
.qty {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid var(--border2); border-radius: 999px; overflow: hidden;
}
.qty button {
  width: 42px; height: 42px; background: rgba(2,12,27,0.7);
  border: none; color: var(--cyan); font-size: 1.2rem; font-weight: 700;
}
.qty button:hover { background: var(--cyan-dim); }
.qty input {
  width: 52px; height: 42px; text-align: center;
  background: transparent; border: none; color: var(--text);
  font-size: 1rem; font-weight: 700;
}
.qty input:focus { outline: none; }

/* ---- Panier / récap --------------------------------------------- */
.cart-line {
  display: grid; grid-template-columns: 72px 1fr auto auto auto;
  gap: 16px; align-items: center;
  padding: 14px; border: 1px solid var(--border2); border-radius: 16px;
  background: rgba(6,18,36,0.6); margin-bottom: 12px;
}
.cart-line img { width: 72px; height: 56px; object-fit: cover; border-radius: 10px; }
.cart-line .rm {
  background: none; border: none; color: var(--muted); font-size: 1.15rem;
}
.cart-line .rm:hover { color: var(--danger); }
.totals {
  border: 1px solid var(--border2); border-radius: 18px;
  background: rgba(6,18,36,0.75); padding: 22px;
}
.totals .row {
  display: flex; justify-content: space-between; padding: 7px 0;
  color: var(--muted); font-size: .95rem;
}
.totals .row.total {
  color: var(--text); font-weight: 800; font-size: 1.15rem;
  border-top: 1px solid var(--border2); margin-top: 8px; padding-top: 14px;
}

/* ---- Formulaire checkout ----------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: start; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--cyan); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 15px; border-radius: 12px;
  background: rgba(2,12,27,0.7); border: 1px solid var(--border2);
  color: var(--text); font-family: inherit; font-size: .95rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
}
.field textarea { resize: vertical; min-height: 80px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pay-opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border2); border-radius: 14px;
  margin-bottom: 10px; cursor: pointer; transition: all .2s;
}
.pay-opt:hover { border-color: var(--border); }
.pay-opt.on { border-color: var(--cyan); background: var(--cyan-dim); }
.pay-opt input { margin-top: 4px; accent-color: var(--cyan); }
.pay-opt strong { display: block; font-size: .95rem; }
.pay-opt span { color: var(--muted); font-size: .82rem; }
.feedback { min-height: 22px; font-size: .92rem; margin-top: 10px; }
.feedback.err { color: var(--danger); }
.feedback.ok { color: var(--green); }

/* ---- Suivi ------------------------------------------------------- */
.track-box { max-width: 560px; }
.steps { display: flex; flex-direction: column; gap: 0; margin: 26px 0; }
.tstep { display: flex; gap: 16px; }
.tstep .dot {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: .85rem; font-weight: 800;
  background: rgba(2,12,27,0.8); border: 2px solid var(--border2); color: var(--muted2);
}
.tstep .bar { width: 2px; flex: 1; min-height: 26px; background: var(--border2); margin: 4px auto; }
.tstep.done .dot { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.tstep.done .bar { background: var(--green); }
.tstep.now .dot {
  border-color: var(--cyan); color: var(--bg);
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 0 18px rgba(0,212,255,0.55);
}
.tstep .lbl strong { display: block; }
.tstep .lbl span { color: var(--muted); font-size: .84rem; }

/* ---- Toast / divers ----------------------------------------------- */
.nx-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(4,16,33,0.95); color: var(--text);
  border: 1px solid var(--cyan); border-radius: 999px;
  padding: 12px 22px; font-size: .9rem; font-weight: 600;
  box-shadow: 0 14px 40px -12px rgba(0,212,255,0.5);
  opacity: 0; visibility: hidden; transition: all .3s; z-index: 9600;
}
.nx-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
  border: 1px dashed var(--border2); border-radius: 18px;
}
.notice {
  border: 1px solid rgba(255,193,77,0.35); background: rgba(255,193,77,0.07);
  color: #ffd27f; border-radius: 14px; padding: 14px 18px; font-size: .88rem;
  margin: 18px 0;
}
.skeleton { opacity: .5; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---- Footer ------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border2); margin-top: 60px;
  padding: 30px 0; color: var(--muted); font-size: .85rem;
}
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer a { color: var(--cyan); }

/* ---- Responsive ---------------------------------------------------- */
@media (max-width: 860px) {
  .product-split, .form-grid { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 60px 1fr; grid-template-rows: auto auto; }
  .cart-line img { width: 60px; height: 48px; }
  .nav-links a span.txt { display: none; }
  .nav-links a { padding: 8px 10px; }
}

/* ================================================================
   MOTION DESIGN — fond animé signature + entrées + micro-interactions
   ================================================================ */

/* Fond : grille technique en mouvement + halos qui respirent */
.shop-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  animation: gridMove 22s linear infinite;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 78%);
}
.shop-bg::after {
  content: '';
  position: absolute; inset: -10%;
  background:
    radial-gradient(520px 380px at 82% 8%, rgba(0,212,255,0.13), transparent 60%),
    radial-gradient(460px 360px at 8% 92%, rgba(0,255,136,0.10), transparent 60%);
  animation: orbBreathe 12s ease-in-out infinite alternate;
}
@keyframes gridMove { to { background-position: 54px 54px; } }
@keyframes orbBreathe {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1);    opacity: .75; }
  100% { transform: translate3d(2%, 2%, 0)   scale(1.07); opacity: 1; }
}

/* Dégradé animé sur les mots clés du titre */
.grad-animate {
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--green));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradShift 5s linear infinite;
}
@keyframes gradShift { to { background-position: 200% center; } }

/* Entrée des cartes produit : pop en cascade (délai posé inline au rendu) */
.card { animation: cardIn .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Révélation au scroll (sections statiques) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Bouton principal : balayage lumineux au survol */
.btn-cyan { position: relative; overflow: hidden; }
.btn-cyan::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.btn-cyan:hover::before { transform: translateX(110%); }

/* Badge panier : pop quand un article est ajouté */
.cart-badge.pop { animation: badgePop .45s cubic-bezier(.2,.8,.2,1); }
@keyframes badgePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.55); }
  100% { transform: scale(1); }
}

/* Bandeau marquee (confiance commerce) */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
  background: rgba(4,16,33,0.5);
  padding: 12px 0;
  margin: 8px 0 30px;
}
.marquee-track {
  display: flex; align-items: center; gap: 32px;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}
.marquee-track span {
  font-family: 'Syne', sans-serif;
  font-size: 11.5px; font-weight: 700; letter-spacing: 2.2px;
  color: var(--muted); white-space: nowrap;
}
.marquee-track i { font-style: normal; color: var(--cyan); font-size: 11px; }
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* Focus visibles (accessibilité) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .shop-bg::before, .shop-bg::after,
  .grad-animate, .card, .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-cyan::before { display: none; }
}

/* ================================================================
   THÈME CLAIR — activé par html[data-theme="light"]
   (bouton 🌓 dans la barre, préférence mémorisée)
   ================================================================ */
html[data-theme="light"] {
  --bg:        #f2f6fb;
  --bg2:       #e8eef6;
  --cyan:      #0077a8;          /* accent lisible sur fond clair (4.5:1) */
  --cyan-dim:  rgba(0,119,168,0.10);
  --green:     #00854f;
  --green-dim: rgba(0,133,79,0.10);
  --text:      #0b2239;
  --muted:     rgba(11,34,57,0.62);
  --muted2:    rgba(11,34,57,0.38);
  --border:    rgba(0,119,168,0.32);
  --border2:   rgba(0,119,168,0.14);
}
html[data-theme="light"] .shop-bg {
  background:
    radial-gradient(700px 420px at 85% -5%, rgba(0,150,200,0.10), transparent 60%),
    radial-gradient(600px 380px at 0% 100%, rgba(0,170,110,0.08), transparent 60%),
    var(--bg);
}
html[data-theme="light"] .shop-bg::before {
  background-image:
    linear-gradient(rgba(0,119,168,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,119,168,0.06) 1px, transparent 1px);
}
html[data-theme="light"] .shop-bg::after {
  background:
    radial-gradient(520px 380px at 82% 8%, rgba(0,150,200,0.12), transparent 60%),
    radial-gradient(460px 360px at 8% 92%, rgba(0,170,110,0.10), transparent 60%);
}
html[data-theme="light"] .nav-inner {
  background: rgba(255,255,255,0.82);
  box-shadow: 0 12px 36px -18px rgba(30,60,90,0.35);
}
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active { background: rgba(0,119,168,0.08); }
html[data-theme="light"] .card,
html[data-theme="light"] .cart-line,
html[data-theme="light"] .totals,
html[data-theme="light"] .pay-opt,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .modal,
html[data-theme="light"] .stat {
  background: #ffffff;
}
html[data-theme="light"] .card:hover {
  box-shadow: 0 22px 54px -24px rgba(0,119,168,0.35);
}
html[data-theme="light"] .card-img { background: #eef2f7; }
html[data-theme="light"] .card-cat { background: rgba(255,255,255,0.9); }
html[data-theme="light"] .search,
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .status-sel,
html[data-theme="light"] .qty button,
html[data-theme="light"] .qty input {
  background: #ffffff; color: var(--text);
}
html[data-theme="light"] .marquee { background: rgba(255,255,255,0.65); }
html[data-theme="light"] .nx-toast { background: #ffffff; color: var(--text); }
html[data-theme="light"] .btn-cyan {
  background: linear-gradient(135deg, #00a8d8, #00c078);
  color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
html[data-theme="light"] .tstep .dot { background: #ffffff; }
html[data-theme="light"] .modal-bg { background: rgba(20,40,60,0.45); }
html[data-theme="light"] .product-visual { background: #eef2f7; }

/* ---- Bouton bascule de thème ---- */
.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border2);
  background: transparent; color: var(--text);
  font-size: 1.05rem; transition: all .25s;
}
.theme-toggle:hover { border-color: var(--cyan); background: var(--cyan-dim); transform: rotate(20deg); }

/* ---- Habillage des photos produit (fini le blanc brut) ----
   Les photos sur fond blanc deviennent des « tuiles produit »
   volontaires : fond doux, padding, coins arrondis, comme les
   grandes boutiques en mode sombre. ---- */
.card-img img, .product-visual img {
  padding: 10px;
  background:
    radial-gradient(120% 90% at 50% 0%, #f6f8fb 0%, #e3e9f1 100%);
  object-fit: contain;
}
html[data-theme="light"] .card-img img,
html[data-theme="light"] .product-visual img {
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #eef2f7 100%);
}
