* {
  box-sizing: border-box;
}

/* Global safety for mobile */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* HEADER MOBILE LAYOUT */
@media (max-width: 768px) {

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  header {
    padding-top: 16px;
    padding-inline: 12px;
  }

  .header-row {
    flex-direction: column;
    /* <— CRITICAL */
    align-items: stretch;
    gap: 12px;
  }

  .title-block {
    max-width: 100%;
  }

  .title-block h1,
  .title-block h2 {
    text-align: left;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .user-info {
    width: 100%;
    min-width: 0;
  }

  .user-info-top {
    flex-wrap: wrap;
    gap: 6px;
    white-space: normal;
    /* allow Bonjour + PV to break */
  }

  .user-role,
  .user-name {
    white-space: normal;
  }

  .user-wallet {
    flex-wrap: wrap;
    gap: 6px;
  }

  .wallet-item {
    flex: 1 1 120px;
    min-width: 0;
  }

  .login-btn,
  #cartBtn {
    width: 100%;
    justify-content: center;
  }

  nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  nav a {
    width: 100%;
    text-align: center;
    white-space: normal;
  }

  header section,
  #filtres {
    flex-wrap: wrap;
    align-items: stretch;
  }

  header section input[type="text"],
  #filtres input[type="text"] {
    min-width: 0;
    /* override 280/320px */
    width: 100%;
  }

  progress {
    width: 100%;
    max-width: 220px;
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #fff;
  background: url("../../image-site/Prototype.png") no-repeat center center fixed;
  background-size: cover;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: -1;
}

header,
main {
  width: 92%;
  max-width: 1100px;
  margin: 0 auto;
}

header {
  width: 92%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* First row: title on left, user panel on right */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}



.title-block h1 {
  margin: 0;
  font-size: 3rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.title-block h2 {
  margin: 0.35rem 0 0;
  font-size: 1.2rem;
  opacity: .95;
}

#cartBtn.icon-btn {
  text-decoration: none;
}




.top-actions {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.login-btn {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  /* Prevents button text wrap */
}

.icon-btn:hover,
.login-btn:hover {
  background: rgba(0, 0, 0, 0.55);
}

h1 {
  margin: 0 0 8px;
  font-size: 3rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  text-align: center;
}

h2 {
  margin: 0 0 18px;
  font-size: 1.2rem;
  opacity: 0.95;
  text-align: center;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

nav a:hover {
  background: rgba(0, 0, 0, 0.55);
}

/* Search section (assuming it's after nav in HTML) */
header section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  /* Changed to wrap for mobile */
  width: min(900px, 92vw);
  margin: 0 auto;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

header section button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  /* Prevents button shrink */
}

header section button:hover {
  background: rgba(0, 0, 0, 0.55);
}

header section input[type="text"] {
  flex: 1;
  min-width: 280px;
  /* Slightly reduced for better mobile fit */
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  outline: none;
  box-sizing: border-box;
}

header section input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

header section input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #f6d26a;
  cursor: pointer;
  transform: translateY(2px);
  flex-shrink: 0;
}


main {
  padding-bottom: 90px;
}

section {
  margin: 18px 0 26px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

section>h3 {
  margin: 6px 6px 14px;
  font-size: 1.6rem;
  letter-spacing: .5px;
  text-transform: uppercase;
}

#conversion-monnaie {
  width: 100%;
  border-collapse: collapse;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

#conversion-monnaie td {
  padding: 14px;
  text-align: center;
  font-weight: bold;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

#conversion-monnaie td:last-child {
  border-right: none;
}

#conversion-monnaie td:nth-child(1) {
  color: #f6d26a;
}

#conversion-monnaie td:nth-child(2) {
  color: #d6d6d6;
}

#conversion-monnaie td:nth-child(3) {
  color: #c47a3a;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

#potions tr,
#armures tr,
#armes tr,
#sorts tr {
  display: grid;
  grid-template-columns: 88px 1.2fr .7fr 2fr .9fr .8fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

#potions td,
#armures td,
#armes td,
#sorts td {
  padding: 0;
  border: none;
  color: rgba(255, 255, 255, 0.92);
}

#potions img,
#armures img,
#armes img,
#sorts img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#potions td:nth-child(2),
#armures td:nth-child(2),
#armes td:nth-child(2),
#sorts td:nth-child(2) {
  font-weight: 800;
}

#potions td:nth-child(3),
#armures td:nth-child(3),
#armes td:nth-child(3),
#sorts td:nth-child(3) {
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 999px;
  width: fit-content;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}

#potions td:nth-child(4),
#armures td:nth-child(4),
#armes td:nth-child(4),
#sorts td:nth-child(4) {
  opacity: .9;
  line-height: 1.35;
}

#potions td:nth-child(5),
#potions td:nth-child(6),
#armures td:nth-child(5),
#armures td:nth-child(6),
#armes td:nth-child(5),
#armes td:nth-child(6),
#sorts td:nth-child(5),
#sorts td:nth-child(6) {
  opacity: .85;
  font-weight: 600;
  white-space: nowrap;
}

.btn-add {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.btn-add.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #555;
  border: none;
}

.btn-add:hover {
  background: rgba(0, 0, 0, 0.55);
}

.btn-add:active {
  transform: scale(0.95);
}


#cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 92vw;
  height: 100vh;
  transform: translateX(110%);
  transition: transform .2s ease;
  background: rgba(0, 0, 0, 0.70);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.35);
  padding: 16px;
  z-index: 999;

}

#cartBtn {
  text-decoration: none;
  color: #fff;
  font-weight: bold;

  padding: 10px 14px;
  border-radius: 12px;

  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
}

#cartBtn:hover {
  background: rgba(0, 0, 0, 0.55);
}

#cart:target {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 12px;
  margin-bottom: 12px;

}

.cart-head h4 {
  margin: 0;
}

.cart-close {
  text-decoration: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.cart-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cart-items {
  display: grid;
  gap: 10px;
}

.barreRecherche input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.Titre {
  text-align: center;
  margin-top: 20px;
  font-size: 24px;
  color: #333;
}

.SousTitre {
  text-align: center;
  margin-top: 10px;
  font-size: 18px;
  color: #666;

}

.boutonPanier {
  display: flex;
  justify-content: center;
  margin-top: 20px;


}

.boutonPanierHover:hover {
  background-color: #f0f0f0;
  cursor: pointer;
}

.caseItems {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.caseConversionMonnaie {
  display: flex;
  justify-content: center;
  margin-top: 20px;


}

.descriptionItem {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

.prixItem {
  text-align: center;
  margin-top: 5px;
  font-size: 16px;
  color: #000;
  font-weight: bold;
}

.Efficacite {
  text-align: center;
  margin-top: 5px;
  font-size: 14px;
  color: #000;
  font-weight: bold;
}

.imageItem {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 100px;
  height: 100px;
}

.admin-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
}

.admin-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}

.admin-title {
  margin-bottom: 1rem;
}

.msg-success {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid rgba(187, 247, 208, 0.18);
}

.msg-error {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid rgba(254, 202, 202, 0.18);
}

.admin-form {
  display: grid;
  gap: 1rem;
}

.admin-form input,
.admin-form select {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  outline: none;
}

.admin-form input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.admin-form select option {
  color: #000;
}

.admin-form label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.admin-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #a855f7;
}

.admin-form button,
.action-btn {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 700;
  transition: 0.2s ease;
}

.admin-form button {
  background: rgba(37, 99, 235, 0.85);
  color: white;
}

.admin-form button:hover {
  background: rgba(37, 99, 235, 1);
}

.disable-btn {
  background: rgba(220, 38, 38, 0.85);
  color: white;
}

.disable-btn:hover {
  background: rgba(220, 38, 38, 1);
}

.enable-btn {
  background: rgba(22, 163, 74, 0.85);
  color: white;
}

.enable-btn:hover {
  background: rgba(22, 163, 74, 1);
}

.admin-card table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  overflow: hidden;
}

.admin-card th,
.admin-card td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  text-align: left;
  vertical-align: middle;
  color: rgba(255, 255, 255, 0.92);
}

.admin-card th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
}

.admin-card tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: white;
  display: inline-block;
  font-weight: 700;
}

.badge.A {
  background: rgba(37, 99, 235, 0.9);
}

.badge.R {
  background: rgba(124, 58, 237, 0.9);
}

.badge.P {
  background: rgba(234, 88, 12, 0.9);
}

.badge.S {
  background: rgba(22, 163, 74, 0.9);
}

img.item-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px;
}

.status-on {
  color: #86efac;
  font-weight: 700;
}

.status-off {
  color: #fca5a5;
  font-weight: 700;
}

.type-fields {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.user-info {
  min-width: 290px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.coin-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}



.user-info-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
}

.user-name {
  font-weight: 800;
  font-size: 0.98rem;
}

.user-role {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
  align-content: center;

}

.user-wallet {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wallet-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;

  border-radius: 999px;
  /* pill shape */
  background: rgba(0, 0, 0, 0.40);
  min-width: 0;
  /* allow flex-grow without overflow */
  flex: 1 1 0;
  /* share width instead of adding height */
}

.wallet-emoji {
  font-size: 18px;
  flex-shrink: 0;
}

.wallet-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.wallet-value {
  margin-left: auto;
  /* push value to right edge of pill */
  font-weight: 700;
}

.wallet-item.gold .wallet-value,
.wallet-item.gold .wallet-label {
  color: #f6d26a;
}

.wallet-item.silver .wallet-value,
.wallet-item.silver .wallet-label {
  color: #d9d9d9;
}

.wallet-item.bronze .wallet-value,
.wallet-item.bronze .wallet-label {
  color: #c47a3a;
}

.section-items {
  margin: 18px 0 26px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.section-items h2 {
  margin: 0 0 18px;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.item-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #fff;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.item-card button {
  margin-top: auto;
}

.item-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.item-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.item-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #fff;
}

.item-card p {
  margin: 6px 0;
  color: rgba(255, 255, 255, 0.88);
}

.item-no-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

#detail-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

#detail-card {
  max-width: 400px;
  width: 100%;
  padding: 20px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

#detail-card img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin-bottom: 15px;
}

#detail-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #fff;
}

#detail-card p {
  margin: 6px 0;
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
}


/* Scoped reset - only affects login page */
.darquest-login * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.darquest-login body {
  font-family: 'Roboto', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0f23 0%, #1a0033 50%, #2d1b69 100%);
  background-attachment: fixed;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.darquest-login header {
  text-align: center;
  margin-bottom: 2rem;
}

.darquest-login header h1 {
  font-size: 2.5rem;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #c19e3d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  animation: darquest-glow 2s ease-in-out infinite alternate;
}

@keyframes darquest-glow {
  from {
    filter: drop-shadow(0 0 5px #ffd700);
  }

  to {
    filter: drop-shadow(0 0 20px #ffd700);
  }
}

.darquest-login main.darquest-login {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 100%;
  animation: darquest-slideIn 0.6s ease-out;
  margin: 0 auto;
}

@keyframes darquest-slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.darquest-login .error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.darquest-login .error p {
  color: #ff6b6b;
  font-size: 0.9rem;
  text-align: center;
  margin: 0;
}

.darquest-login .auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.darquest-login label {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
}

.darquest-login input[type="text"],
.darquest-login input[type="password"] {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  color: #ffffff;
  transition: all 0.3s ease;
}

.darquest-login input[type="text"]::placeholder,
.darquest-login input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.darquest-login input[type="text"]:focus,
.darquest-login input[type="password"]:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
  background: rgba(255, 255, 255, 0.2);
}

.darquest-login button[type="submit"] {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: bold;
  color: #1a0033;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.darquest-login button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

.darquest-login p {
  text-align: center;
  margin-top: 1.5rem;
}

.darquest-login p a {
  color: #ffd700;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.darquest-login p a:hover {
  color: #ffed4e;
  text-shadow: 0 0 10px #ffd700;
}

/* Responsive - scoped */
@media (max-width: 480px) {
  .darquest-login header h1 {
    font-size: 2rem;
  }

  .darquest-login main.darquest-login {
    padding: 2rem;
    margin: 1rem;
  }

  .darquest-login body {
    padding: 10px;
  }
}




/* Styles spécifiques à la page d'inscription */
.signup-page {
  max-width: 420px;
  margin: 40px auto 60px;
  padding: 20px 24px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.signup-page .auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signup-page label {
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.signup-page input[type="text"],
.signup-page input[type="email"],
.signup-page input[type="password"] {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.signup-page input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.signup-page button[type="submit"] {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.signup-page button[type="submit"]:hover {
  background: rgba(0, 0, 0, 0.9);
}

.signup-page .error {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(180, 40, 40, 0.8);
  font-size: 0.9rem;
}

.signup-page .success {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(40, 150, 80, 0.8);
  font-size: 0.9rem;
}


/* Scoped reset - only affects login page */
.darquest-login * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.darquest-login body {
  font-family: 'Roboto', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0f23 0%, #1a0033 50%, #2d1b69 100%);
  background-attachment: fixed;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.darquest-login header {
  text-align: center;
  margin-bottom: 2rem;
}

.darquest-login header h1 {
  font-size: 2.5rem;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #c19e3d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  animation: darquest-glow 2s ease-in-out infinite alternate;
}

@keyframes darquest-glow {
  from {
    filter: drop-shadow(0 0 5px #ffd700);
  }

  to {
    filter: drop-shadow(0 0 20px #ffd700);
  }
}

.darquest-login main.darquest-login {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 100%;
  animation: darquest-slideIn 0.6s ease-out;
  margin: 0 auto;
}

@keyframes darquest-slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.darquest-login .error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.darquest-login .error p {
  color: #ff6b6b;
  font-size: 0.9rem;
  text-align: center;
  margin: 0;
}

.darquest-login .auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.darquest-login label {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
}

.darquest-login input[type="text"],
.darquest-login input[type="password"] {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  color: #ffffff;
  transition: all 0.3s ease;
}

.darquest-login input[type="text"]::placeholder,
.darquest-login input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.darquest-login input[type="text"]:focus,
.darquest-login input[type="password"]:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
  background: rgba(255, 255, 255, 0.2);
}

.darquest-login button[type="submit"] {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: bold;
  color: #1a0033;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.darquest-login button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

.darquest-login p {
  text-align: center;
  margin-top: 1.5rem;
}

.darquest-login p a {
  color: #ffd700;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.darquest-login p a:hover {
  color: #ffed4e;
  text-shadow: 0 0 10px #ffd700;
}

/* Responsive - scoped */
@media (max-width: 480px) {
  .darquest-login header h1 {
    font-size: 2rem;
  }

  .darquest-login main.darquest-login {
    padding: 2rem;
    margin: 1rem;
  }

  .darquest-login body {
    padding: 10px;
  }
}

#filtres {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(900px, 92vw);
  margin: 0 auto;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

#filtres input[type="text"] {
  flex: 1;
  min-width: 320px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  outline: none;
}

#filtres input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

#filtres input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #f6d26a;
  cursor: pointer;
  transform: translateY(2px);
}

.btn-delete {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-weight: 800;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
  padding: 6px 10px;
}

.btn-delete:hover {
  background: #000000;
  transform: scale(1.1);
}


.btn-disable {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-disable:hover {
  background: #030302;
}

.btn-enable {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-enable:hover {
  background: #000000;
}



#cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  height: 100vh;

  background: rgba(5, 8, 15, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.1);

  display: flex;
  flex-direction: column;

  z-index: 200;
}

.cart-head {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}


.cart-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}


.cart-item-row {
  display: flex;
  gap: 10px;
  align-items: center;
}


.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}


.cart-item-info {
  font-size: 13px;
  color: #e5e7eb;
}


.cart-item-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}


.cart-item-actions button {
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  transition: 0.2s;
}


.btn-cart-minus {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-cart-minus:hover {
  background: rgba(255, 255, 255, 0.2);
}


.btn-cart-plus {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-cart-plus:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-cart-remove {
  background: #dc2626;
  color: white;
}

.btn-cart-remove:hover {
  background: #b91c1c;
}


.cart-total {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: bold;
  color: #a78bfa;
}


.cart-head-actions button,
.cart-head-actions input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.cart-head-actions button:hover,
.cart-head-actions input:hover {
  background: rgba(167, 139, 250, 0.2);
}


/*barre de vie*/

progress {
  /* Reset default look */
  -webkit-appearance: none;
  appearance: none;
  border: none;

  /* Size */
  width: 150px;
  height: 20px;

  /* Outer border */
  border: 2px solid white;
  border-radius: 10px;
  background: transparent;
  overflow: hidden;
  /* Important for rounded corners */
}

/* Background (empty part) */
progress::-webkit-progress-bar {
  background: transparent;
  border-radius: 10px;
}

/* low hp */
/* Filled part */
.low_hp::-webkit-progress-value {
  background-color: red;
  border-radius: 8px;
}

/* Firefox support */
.low_hp::-moz-progress-bar {
  background-color: red;
  border-radius: 10px;
}

/* mid hp */
.mid_hp::-webkit-progress-value {
  background-color: orange;
  border-radius: 8px;
}

/* Firefox support */
.mid_hp::-moz-progress-bar {
  background-color: orange;
  border-radius: 10px;
}

/*high hp*/
.high_hp::-webkit-progress-value {
  background-color: rgb(0, 200, 0);
  border-radius: 8px;
}

/* Firefox support */
.high_hp::-moz-progress-bar {
  background-color: rgb(0, 200, 0);
  border-radius: 10px;
}

/* overflowing hp*/

.overflow_hp::-webkit-progress-value {
  background-color: blue;
  border-radius: 8px;
}

/* Firefox support */
.overflow_hp::-moz-progress-bar {
  background-color: blue;
  border-radius: 10px;
}



/*barre de vie*/

progress {
  /* Reset default look */
  -webkit-appearance: none;
  appearance: none;
  border: none;

  /* Size */
  width: 150px;
  height: 20px;

  /* Outer border */
  border: 2px solid white;
  border-radius: 10px;
  background: transparent;
  overflow: hidden;
  /* Important for rounded corners */
}

/* Background (empty part) */
progress::-webkit-progress-bar {
  background: transparent;
  border-radius: 10px;
}

/* Filled part */
progress::-webkit-progress-value {
  background-color: red;
  border-radius: 8px;
}

/* Firefox support */
progress::-moz-progress-bar {
  background-color: red;
  border-radius: 10px;
}


.evaluations-section {
  margin: 30px auto;
  max-width: 800px;
  padding: 20px;
}

.evaluation-card {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #c9a44c;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
}

.evaluation-card h4 {
  margin: 0 0 8px;
  color: #ffd86b;
}

.evaluation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-menu {
  position: relative;
}

.comment-menu summary {
  list-style: none;
  cursor: pointer;
  background: #c9a44c;
  color: #1b1208;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: bold;
}

.comment-menu summary::-webkit-details-marker {
  display: none;
}

.comment-menu-content {
  position: absolute;
  right: 0;
  bottom: 35px;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid #c9a44c;
  border-radius: 10px;
  padding: 8px;
  min-width: 130px;
  z-index: 10;
}

.comment-menu-content button {
  width: 100%;
  margin: 4px 0;
  padding: 7px;
  border: none;
  border-radius: 6px;
  background: #c9a44c;
  color: #1b1208;
  cursor: pointer;
  font-weight: bold;
}

.comment-menu-content button:hover {
  background: #ffd86b;
}

.edit-comment-form {
  margin-top: 15px;
}

.edit-comment-form textarea {
  width: 100%;
  min-height: 70px;
}

.flash-message {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;

    display: flex;
    align-items: center;
    gap: 12px;

    width: max-content;
    max-width: min(90vw, 720px);
    padding: 14px 18px;

    border-radius: 16px;
    border: 1px solid rgba(255, 120, 120, 0.35);

    background: rgba(150, 24, 24, 0.92);
    color: #fff5f5;

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.4;
    text-align: left;

    opacity: 1;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.flash-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
}

.flash-text {
    display: block;
}

.flash-message.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    pointer-events: none;
}

@media (max-width: 640px) {
    .flash-message {
        top: 95px;
        left: 12px;
        right: 12px;
        transform: none;
        width: auto;
        max-width: none;
        padding: 12px 14px;
        border-radius: 14px;
        font-size: 0.92rem;
    }

    .flash-message.hide {
        transform: translateY(-10px);
    }
}


.btn-page-container {
  display: flex;
  justify-content: center;
}

.btn-page {
  display: block;
  margin: 1rem auto;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.btn-page.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #555;
    border: none;
}
.btn-page:hover {
  background: rgba(0, 0, 0, 0.55);
}
.btn-page:active {
  transform: scale(0.95);
}

/* =========================================================
   MOBILE PATCH - paste this at the VERY END of your CSS file
   Keeps desktop intact because everything is inside max-width
   ========================================================= */

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background-attachment: scroll;
    background-position: center top;
  }

  header,
  main,
  .admin-container {
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  header {
    padding-top: 16px;
    gap: 14px;
  }

  .header-row {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
  }

  .title-block,
  .top-actions,
  .user-info {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .title-block h1,
  h1 {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
    line-height: 1.1;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .title-block h2,
  h2 {
    font-size: clamp(1rem, 4vw, 1.2rem);
    text-align: center;
  }

  .top-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
  }

  .icon-btn {
    flex: 0 0 44px;
  }

  .login-btn,
  #cartBtn {
    flex: 1 1 140px;
    width: auto;
    min-height: 44px;
    justify-content: center;
    text-align: center;
  }

  .user-info {
    padding: 10px;
  }

  .user-info-top {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    white-space: normal;
  }

  .user-name,
  .user-role {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .user-wallet {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .wallet-item {
    width: 100%;
    flex: unset;
    min-width: 0;
  }

  nav ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  nav a {
    display: block;
    width: 100%;
    text-align: center;
    white-space: normal;
  }

  header section,
  #filtres {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  header section input[type="text"],
  #filtres input[type="text"] {
    width: 100%;
    min-width: 0;
  }

  header section button,
  #filtres button {
    width: 100%;
    min-height: 44px;
  }

  section,
  .section-items,
  .admin-card,
  .signup-page,
  .evaluations-section {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 12px;
  }

  section > h3,
  .section-items h2 {
    font-size: clamp(1.25rem, 6vw, 1.6rem);
    text-align: center;
  }

  #conversion-monnaie,
  #conversion-monnaie tbody,
  #conversion-monnaie tr,
  #conversion-monnaie td {
    display: block;
    width: 100%;
  }

  #conversion-monnaie td {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  #conversion-monnaie td:last-child {
    border-bottom: none;
  }

  .items-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .item-card {
    padding: 14px;
  }

  .item-card img,
  .item-no-image {
    height: 150px;
  }

  /* Product rows become clean mobile cards */
  #potions tr,
  #armures tr,
  #armes tr,
  #sorts tr {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 8px 12px;
    align-items: start;
  }

  #potions img,
  #armures img,
  #armes img,
  #sorts img {
    width: 64px;
    height: 64px;
  }

  #potions td,
  #armures td,
  #armes td,
  #sorts td {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #potions td:first-child,
  #armures td:first-child,
  #armes td:first-child,
  #sorts td:first-child {
    grid-row: span 6;
  }

  #potions td:nth-child(3),
  #armures td:nth-child(3),
  #armes td:nth-child(3),
  #sorts td:nth-child(3) {
    width: max-content;
    max-width: 100%;
    white-space: normal;
  }

  #potions td:nth-child(5),
  #potions td:nth-child(6),
  #armures td:nth-child(5),
  #armures td:nth-child(6),
  #armes td:nth-child(5),
  #armes td:nth-child(6),
  #sorts td:nth-child(5),
  #sorts td:nth-child(6) {
    white-space: normal;
  }

  .btn-add,
  .btn-page,
  .btn-delete,
  .btn-disable,
  .btn-enable,
  .action-btn,
  .admin-form button {
    width: 100%;
    min-height: 44px;
    text-align: center;
  }

  /* Admin tables scroll instead of breaking the page */
  .admin-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-card table {
    min-width: 720px;
  }

  /* Cart becomes full-width slide panel on mobile */
  #cart {
    width: 100%;
    max-width: 100%;
    right: 0;
    left: auto;
    height: 100dvh;
    transform: translateX(110%);
    transition: transform 0.2s ease;
    z-index: 999;
  }

  #cart:target {
    transform: translateX(0);
  }

  .cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .cart-item-row {
    align-items: flex-start;
  }

  .cart-item-info {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .cart-item-actions {
    flex-wrap: wrap;
  }

  .cart-item-actions button {
    flex: 1 1 80px;
    min-height: 36px;
  }

  #detail-container {
    padding: 16px 0;
  }

  #detail-card {
    max-width: 100%;
  }

  .evaluation-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .comment-menu-content {
    right: auto;
    left: 0;
    bottom: auto;
    top: 35px;
  }

  progress {
    width: 100%;
    max-width: 220px;
  }
}

@media (max-width: 480px) {
  header,
  main,
  .admin-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .coin-icon {
    width: 30px;
    height: 30px;
  }

  .wallet-label,
  .wallet-value {
    font-size: 0.85rem;
  }

  #potions tr,
  #armures tr,
  #armes tr,
  #sorts tr {
    grid-template-columns: 1fr;
    text-align: center;
  }

  #potions td:first-child,
  #armures td:first-child,
  #armes td:first-child,
  #sorts td:first-child {
    grid-row: auto;
    justify-self: center;
  }

  #potions td:nth-child(3),
  #armures td:nth-child(3),
  #armes td:nth-child(3),
  #sorts td:nth-child(3) {
    justify-self: center;
  }

  .item-card img,
  .item-no-image {
    height: 130px;
  }

  .signup-page,
  .darquest-login main.darquest-login {
    padding: 1.5rem;
  }
}
