@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: #a68dff; /* Violet doux et professionnel */
  --secondary-color: #2b1f47; /* Violet sombre profond */
  --background-dark: #0f0f15; /* Fond sombre neutre */
  --card-bg: #16202d;
  --panel-bg: rgba(30, 20, 50, 0.6);
  --border-soft: rgba(255,255,255,0.1);
  --text-soft: #b5c0d0;
  --hover-color: #6d56d9; /* Violet plus foncé au hover */
  --danger-color: #e74c3c;
}

/* === GLOBAL === */
body {
  background: linear-gradient(90deg, #1b1230, #1b1230);
  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; /* Ton Orbitron reste parfait pour ça */
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin: 0;

  /* --- TEXTURE ANIMÉE --- */
  /* On utilise une image de texture abstraite sombre ou métallique */
  background-image: url('https://www.transparenttextures.com/patterns/carbon-fibre.png'), 
                    linear-gradient(90deg, #4a3a7d, #a68dff, #4a3a7d);
  background-size: 200% auto;
  
  /* On coupe l'image à la forme du texte */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent; /* Le texte devient le masque de l'image */

  /* --- ANIMATION SOBRE --- */
  animation: shine 8s linear infinite;

  /* --- SHADOWS INTERNES & EXTERNES --- */
  /* On utilise drop-shadow au lieu de text-shadow pour plus de réalisme */
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.5)); 
}

@keyframes shine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
/* Définition de l'animation pour bouger le background */
@keyframes moveBackground {
  0% {
    background-position: 0% 50%; /* Commence à gauche */
  }
  100% {
    background-position: 100% 50%; /* Finit à droite */
  }
}

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; /* plutôt que cover pour vidéos */
  transform: translate(-50%, -50%); /* centre parfaitement */
  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);
  }
}

/* === MODAL === */
#modal {
  display: none; /* reste caché par défaut */
  position: fixed;
  inset: 0; /* top:0; left:0; right:0; bottom:0; */
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow-y: auto; /* scroll si contenu trop grand */
  padding: 20px;
}

#modal .modal-content {
  padding: 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 400px; /* responsive sur mobile */
  color: #fff;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.3);
  background-color: rgba(112, 112, 112, 0.144);
  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);
}

/* Image ou vidéo dans le modal */
.modal-media {
  width: 100%;            /* prend toute la largeur du modal */
  max-width: 100%;        /* jamais dépasser le modal */
  max-height: 40vh;       /* jamais dépasser 60% de la hauteur de l'écran */
  object-fit: contain;    /* conserve les proportions, pas de découpe */
  border-radius: 10px; 
}

/* Si la vidéo a controls, les forcer à s'afficher correctement */
.modal-media video {
  display: block;         /* enlever le inline par défaut */
  width: 100%;
  height: auto;           /* proportionnelle */
  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; /* Supprime la flèche par défaut du navigateur */
  -webkit-appearance: none;
  -moz-appearance: none;
  
  background-color: #111;
  color: #fff;
  /* Bordure avec un léger effet de relief violet */
  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; /* Padding droit plus large pour laisser la place à la flèche */
  border-radius: 28px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;

  /* --- FLÈCHE PERSONNALISÉE --- */
  /* Utilisation d'un SVG de flèche violette (var --primary-color #a68dff) */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a68dff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  /* Position : 15px depuis la droite (décalée vers la gauche) et centrée verticalement */
  background-position: right 15px center; 
  background-size: 18px;
}

/* Effet au focus ou survol */
#modal select:hover, #modal select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(166, 141, 255, 0.2);
}

/* Stylisation minimale des options (selon les limites du navigateur) */
#modal select option {
  background-color: #1a142d; /* Fond violet sombre pour le menu ouvert */
  color: #fff;
  padding: 10px;
}

/* Inputs / buttons */
button {
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
}


button {
  background: var(--primary-color);
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: black;
}

button:hover {
  background: var(--hover-color);
}

/* === 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 layout fixe */
.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;
}



