@import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Roboto+Mono:wght@400;600&display=swap');

:root {
  --primary-color: #00f2ff; /* Cyan Néon */
  --secondary-color: #bc13fe; /* Violet Électrique */
  --background-dark: #05010a; /* Fond sombre cyber */
  --card-bg: #0d0216;
  --panel-bg: rgba(13, 2, 22, 0.6);
  --border-soft: rgba(0, 242, 255, 0.2);
  --text-soft: #8e82a3;
  --hover-color: #7000ff; /* Violet plus profond au hover */
  --danger-color: #ff003c;
}

/* === GLOBAL === */
body {
  background: linear-gradient(90deg, #0d0216, #0d0216);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  color: #e5e5e5;
}

/* === HEADER === */
header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 10px;
  border-bottom: 1px dashed var(--border-soft);
}

header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin: 0;

  /* --- TEXTURE ANIMÉE --- */
  background-image: url('https://www.transparenttextures.com/patterns/carbon-fibre.png'), 
                    linear-gradient(90deg, #7000ff, #00f2ff, #7000ff);
  background-size: 200% auto;
  
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* --- ANIMATION SOBRE --- */
  animation: shine 8s linear infinite;

  /* --- SHADOWS INTERNES & EXTERNES --- */
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.5)); 
}

@keyframes shine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes moveBackground {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

header .logo {
  max-height: 46px;
}

/* === PRODUCTS GRID === */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

/* === PRODUCT CARD === */
.product {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease-in-out;
}

.product:hover {
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Image */
.product img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
  z-index: 1;
}

/* Overlay */
.product::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.342),
    rgba(0, 0, 0, 0.034)
  );
  z-index: 2;
}

/* Title */
.product h3 {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: calc(100% - 16px);
  padding: 5px 12px;
  box-sizing: border-box;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product .product-media {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  max-width: 150%;
  max-height: 150%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: transform 0.3s ease;
}

/* === TAGS === */
/* === TAGS === */
.tag {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 4;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
  background: #ffffff;
  color: #333;
  border: 1px solid #eee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 8px; /* Un peu plus d'espace pour le rond plus gros */
}

/* Le rond (pastille) */
.tag::before {
  content: "";
  display: inline-block;
  width: 10px;  /* Agrandi */
  height: 10px; /* Agrandi */
  border-radius: 50%;
  position: relative;
  /* L'animation est appliquée ici */
  animation: pulse-dot 1.5s infinite;
}

/* Couleurs spécifiques (utilisées pour la pastille et son ombre de pulsation) */
.tag.new::before { background: #e03030; color: rgba(224, 48, 48, 0.4); }
.tag.hot::before { background: #fc782c; color: rgba(252, 120, 44, 0.4); }
.tag.best::before { background: #3f51b5; color: rgba(63, 81, 181, 0.4); }
.tag.none::before { background: #9e9e9e; color: rgba(158, 158, 158, 0.4); }

/* Animation de pulsation */
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 currentcolor; /* Utilise la couleur définie au-dessus */
  }
  70% {
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0); /* Crée l'effet de halo qui s'étend */
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* Animation de pulsation */
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 currentcolor; /* Utilise la couleur définie au-dessus */
  }
  70% {
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0); /* Crée l'effet de halo qui s'étend */
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* === MODAL === */
#modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

#modal .modal-content {
  padding: 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
  color: #fff;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.3);
  background-color: rgba(20, 10, 30, 0.8);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#modal h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.modal-media {
  width: 100%;
  max-width: 100%;
  max-height: 40vh;
  object-fit: contain;
  border-radius: 10px; 
}

.modal-media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh;
}

.modal-button {
  margin-top: -20px;
  display: flex;
  gap: 5px;
}

.add-modal-button {
  background: linear-gradient(90deg, var(--hover-color), var(--primary-color));
}

.close-modal-button {
  background: linear-gradient(90deg, var(--primary-color), var(--hover-color));
}

#modal select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #05010a;
  color: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.05);
  width: 100%;
  margin-top: 10px;
  padding: 10px 40px 10px 18px;
  border-radius: 28px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f2ff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center; 
  background-size: 18px;
}

#modal select:hover, #modal select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(0, 242, 255, 0.2);
}

#modal select option {
  background-color: #0d0216;
  color: #fff;
  padding: 10px;
}

button {
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--primary-color);
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: black;
}

button:hover {
  background: var(--hover-color);
  color: white;
}

/* === CART === */
.cart {
  margin-bottom: 0;
  max-width: 90%;
  margin: 25px auto;
  padding: 15px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.2);
  background-color: rgba(0, 0, 0, 0.356);
  border-radius: 8px;
}

.cart h2 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--primary-color);
  text-align: center;
  font-weight: 600;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.vldcart {
  width: 20%;
  background: linear-gradient(90deg, var(--hover-color), var(--primary-color));
}

.cart-item button {
  flex-shrink: 0;
  background-color: var(--danger-color);
  box-shadow: none;
  color: white;
  font-size: 0.75rem;
  padding: 3px 4px;
  border-radius: 6px;
  white-space: nowrap;
}

.cart-item button:hover {
  background-color: #922b21;
}

/* === OPTIONS === */
option {
  background: #111;
  color: #fff;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
}