/* Polices */
body, input, button {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  margin: 0;
  background-color: #0c0a17;
  color: #ccc;
  background-image: radial-gradient(circle at top left, #3a2a6a, #0c0a17 70%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  width: 100%;
  background: #2d276a;
  padding: 20px 0;
  border-bottom: 3px solid #7b59ff;
  text-align: center;
  box-shadow: 0 0 15px #7b59ff88;
  position: sticky;
  top: 0;
  z-index: 100;
}

h1 {
  margin: 0;
  font-size: 3rem;
  font-family: 'Orbitron', sans-serif;
  color: #b593ff;
  text-shadow: 0 0 12px #9b7fff, 0 0 25px #ab87ff;
}

.logo-nx {
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0%, 100% { text-shadow: 0 0 10px #ab87ff; }
  50% { text-shadow: 0 0 25px #ff7eff; }
}

nav {
  margin-top: 10px;
}

.nav-btn {
  background-color: #5a3fbb;
  border: none;
  color: #dcd6f7;
  font-weight: 700;
  margin: 0 10px;
  padding: 10px 22px;
  border-radius: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  font-size: 1.1rem;
  box-shadow: 0 0 8px #7b59ffcc;
  user-select: none;
}

.nav-btn:hover {
  background-color: #7b59ff;
  box-shadow: 0 0 18px #c199ffcc;
}

.hidden {
  display: none !important;
}

main {
  max-width: 1000px;
  width: 95vw;
  margin: 30px auto 60px;
  padding: 20px;
  background: #171326;
  border-radius: 18px;
  box-shadow: 0 0 35px #5c41a5aa;
}

/* User info */
#userInfo p {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 30px;
  color: #c6b4ff;
}

.coins {
  font-weight: 700;
  color: #dcb4ff;
  margin-left: 10px;
  font-size: 1.5rem;
}

/* Auth forms */
.auth-form {
  background-color: #2a254a;
  padding: 25px 30px;
  border-radius: 18px;
  box-shadow: 0 0 25px #7b59ffbb;
  max-width: 420px;
  margin: 0 auto 40px;
  text-align: center;
}

.auth-form h2 {
  color: #ab7eff;
  margin-bottom: 25px;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 8px #a374ff;
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  font-size: 2rem;
}

.auth-form .icon {
  font-size: 1.8rem;
  animation: glow 3s infinite alternate;
}

@keyframes glow {
  from { text-shadow: 0 0 6px #bb7fff; }
  to { text-shadow: 0 0 16px #ff8eff; }
}

.auth-form input {
  width: 100%;
  padding: 14px 20px;
  margin: 12px 0;
  border-radius: 12px;
  border: none;
  background-color: #413a7d;
  color: #eee;
  font-size: 1.1rem;
  box-shadow: inset 0 0 6px #7b59ff77;
  transition: background-color 0.3s ease;
}

.auth-form input::placeholder {
  color: #b0a5d9;
}

.auth-form input:focus {
  outline: none;
  background-color: #5a47ba;
  box-shadow: 0 0 14px #ab7effcc inset;
}

.btn {
  background-color: #7b59ff;
  color: white;
  border: none;
  padding: 14px 0;
  margin-top: 20px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.3rem;
  box-shadow: 0 0 20px #a585ffcc;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.btn:hover {
  background-color: #9b7fff;
  box-shadow: 0 0 28px #d1afff;
}

.btn-danger {
  background-color: #a4377f;
  box-shadow: 0 0 20px #d14affcc;
}

.btn-danger:hover {
  background-color: #c94a9f;
  box-shadow: 0 0 28px #ff66bb;
}

.msg {
  margin-top: 15px;
  font-weight: 600;
  color: #ff6c6c;
  min-height: 20px;
  user-select: none;
  text-align: center;
  font-size: 1.1rem;
}

/* Produits */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 28px;
  margin-bottom: 40px;
  padding: 0 10px;
}

.product-card {
  background: linear-gradient(145deg, #3c3273, #271e4f);
  border-radius: 24px;
  padding: 28px 20px 28px 24px;
  box-shadow: 0 0 40px #7b59ffcc;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #d7caf6;
  transition: transform 0.3s ease;
  cursor: default;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 60px #c199ffcc;
}

.product-icon {
  font-size: 48px;
  margin-bottom: 12px;
  user-select: none;
  filter: drop-shadow(0 0 3px #a174ffbb);
}

.product-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 0 0 5px #a57dffcc;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 600;
  color: #c1a7ff;
  margin-bottom: 18px;
  user-select: none;
}

.add-to-cart {
  background-color: #7b59ff;
  border: none;
  padding: 14px 0;
  font-weight: 700;
  border-radius: 16px;
  color: white;
  cursor: pointer;
  box-shadow: 0 0 18px #b08fffcc;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  font-size: 1.2rem;
  user-select: none;
}

.add-to-cart:hover {
  background-color: #a07bff;
  box-shadow: 0 0 28px #d6b1ffcc;
}

/* Panier */
#cartSection {
  background-color: #2e2753;
  border-radius: 24px;
  padding: 28px 40px;
  box-shadow: 0 0 60px #a485ffc0;
  max-width: 700px;
  margin: 0 auto 40px;
}

#cartItems {
  list-style: none;
  padding-left: 0;
  margin-bottom: 30px;
  max-height: 250px;
  overflow-y: auto;
}

#cartItems li {
  background-color: #413a7d;
  margin-bottom: 12px;
  padding: 14px 20px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: #e4dfffcc;
  box-shadow: inset 0 0 8px #9b7eff99;
}

#cartItems li button {
  background: #a574ff;
  border: none;
  color: white;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  padding: 8px 14px;
  transition: background-color 0.3s ease;
  user-select: none;
}

#cartItems li button:hover {
  background: #c09fff;
}

#cartTotal, #discountPercent, #cartFinalTotal {
  font-weight: 700;
  font-size: 1.4rem;
  color: #e5d4ff;
  margin: 6px 0;
  user-select: none;
}

.btn-paypal {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background-color: #003087;
  padding: 14px 36px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 900;
  color: white;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin-top: 15px;
  user-select: none;
  filter: drop-shadow(0 0 4px #0040ffcc);
}

.btn-paypal img {
  height: 36px;
}

.btn-paypal:disabled,
.btn-paypal[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-paypal:hover:not(:disabled) {
  background-color: #0059cc;
  filter: drop-shadow(0 0 14px #3399ffff);
}

/* Coupon */
.coupon-section {
  max-width: 420px;
  margin: 20px auto 60px;
  text-align: center;
}

.coupon-section h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #b9a4ff;
  font-weight: 700;
}

.coupon-section input {
  width: 60%;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  font-size: 1.1rem;
  color: #292248;
  font-weight: 600;
  box-shadow: inset 0 0 8px #9b7fffaa;
  transition: box-shadow 0.3s ease;
  margin-right: 10px;
}

.coupon-section input:focus {
  outline: none;
  box-shadow: 0 0 12px #d5b7ffcc;
}

.coupon-section button {
  width: 30%;
  padding: 11px 0;
  border-radius: 12px;
  border: none;
  background-color: #7b59ff;
  color: white;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 0 20px #b08fffcc;
  transition: background-color 0.3s ease;
  user-select: none;
}

.coupon-section button:hover {
  background-color: #9b7fff;
}

/* Admin section */
#adminSection {
  background-color: #2a234a;
  padding: 25px 30px;
  border-radius: 20px;
  box-shadow: 0 0 25px #7b59ffbb;
  max-width: 500px;
  margin: 40px auto;
  text-align: center;
}

#adminSection h2 {
  color: #d3afff;
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 20px;
  font-size: 2rem;
}

#adminSection input {
  width: 80%;