@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600&family=Poppins:wght@400;600&display=swap');

body {
  position: relative;
  background-color: #011406;
  color: #fff;
  font-family: "Poppins", sans-serif;
  text-align: center;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden; /* pour que l'effet radial ne déborde pas */
  z-index: 0; /* body lui-même */
}

body::before {
  content: '';
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,127,0.3) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1; /* <--- important : derrière tout le contenu */
}


h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #00ff7f;
  text-shadow: 0 0 20px rgba(0, 255, 127, 0.6);
  margin-bottom: 20px;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

.options label {
  font-weight: 600;
  color: #b8ffcf;
  cursor: pointer;
  transition: color 0.3s;
}

.options label:hover {
  color: #00ff88;
}

.options select {
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  background: #013E1A;
  color: #fff;
  cursor: pointer;
}

/* Zone cartes */
.zone-cartes {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 21px;
  padding-top: 10px;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #00ff7f rgba(0, 20, 0, 0.3); /* Firefox */
}

/* Scrollbar Chrome, Edge, Safari */
.zone-cartes::-webkit-scrollbar {
  height: 10px;
}
.zone-cartes::-webkit-scrollbar-track {
  background: rgba(0, 20, 0, 0.3);
  border-radius: 10px;
}
.zone-cartes::-webkit-scrollbar-thumb {
  background: #00ff7f;
  border-radius: 10px;
  border: 2px solid rgba(0, 20, 0, 0.3);
}
.zone-cartes::-webkit-scrollbar-thumb:hover {
  background: #00ff99;
}

.carte-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carte-wrapper img {
  cursor: pointer;
  border-radius: 8px;
  /* Ombre principale bien visible */
    box-shadow: 0 0 15px rgba(0, 255, 127, 0.2);
      transition: box-shadow 0.3s, filter 0.3s, transform 0.2s;
  height: 70px;
  /* Légère lumière pour effet relief permanent */
  background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(0,0,0,0.05));
}

.carte-wrapper img:hover {
  filter: brightness(1.15);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.75), 0 0 15px rgba(0, 255, 127, 0.35);
}

img {
  border: 3px solid lightgrey;
}

.card-counter-bar {
  height: 8px;
  border-radius: 4px;
  margin-top: 4px;
  background-color: #3399ff;
  transition: width 0.3s, background-color 0.3s;
}

.card-counter-bar.green { background-color: #00ff7f; }
.card-counter-bar.red { background-color: #ff4c4c; }
.card-counter-bar.blue { background-color: #3399ff; }

.card-percent {
  font-size: 0.7rem;
  font-weight: normal;
  color: #8effb8;
  margin-top: 2px;
}

/* Compteurs et indicateur harmonisés */
.zone-compteurs-cartes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-bottom: 20px;
}

.zone-compteurs-cartes .compteur-label,
#indication {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 20, 0, 0.6);
  padding: 10px 15px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 255, 127, 0.2);
  min-height: 60px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  text-align: center;
  border: 1px solid #00ff7f;
}

.zone-compteurs-cartes .compteur-label span {
  font-size: 0.70rem;
  text-transform: uppercase;
  margin-bottom: 5px;
  letter-spacing: 1px;
  color: #8effb8;
}

.zone-compteurs-cartes input,
.zone-compteurs-cartes select,
.zone-compteurs-cartes button {
  width: 60px;
  height: 30px;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  border-radius: 8px;
  border: none;
  background: linear-gradient(145deg, #1b3b25, #0c2014);
  box-shadow: inset 0 0 10px rgba(0,255,127,0.4);
  color: #fff;
  cursor: pointer;
}

.zone-compteurs-cartes button {
  background: linear-gradient(90deg, #00ff7f, #00cc66);
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0,255,127,0.4);
  transition: transform 0.2s, box-shadow 0.3s;
}

.zone-compteurs-cartes button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0,255,127,0.7);
}

/* Animation clignotante */
@keyframes blinkBlue {
  0%, 100% { box-shadow: 0 0 10px 3px rgba(0, 255, 127, 0.7); } /* vert clair */
  50% { box-shadow: 0 0 7px 7px rgba(0, 255, 127, 1); }         /* vert plus lumineux */
}
@keyframes blinkRed {
  0%, 100% { box-shadow: 0 0 10px 3px rgba(255, 0, 0, 0.7); }
  50% { box-shadow: 0 0 7px 7px rgba(255, 0, 0, 1); }
}
.blink-blue { animation: blinkBlue 1s infinite; }
.blink-red { animation: blinkRed 1s infinite; }

.options-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Option select noir */
#deckSelect option {
  color: #000;
  background: #fff;
}

@media(max-width: 768px) {
  .carte-wrapper img { height: 60px; }
  .zone-compteurs-cartes { flex-direction: column; gap: 15px; }
  .zone-compteurs-cartes input,
  .zone-compteurs-cartes select { width: 50px; height: 28px; font-size: 1rem; }
}


.historique-cartes {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
}


/* Conteneur principal */
.zone-principale {
  display: flex;
  gap: 44px;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  padding-left:10px;
  padding-right:10px;
}

/* Zone gauche : cartes + compteurs */
.zone-gauche {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

/* Zone droite : historique */
.zone-droite {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 250px; /* largeur fixe ou adaptative */
}

.historique-bloc {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 20, 0, 0.6);
  padding: 10px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 255, 127, 0.2);
  border: 1px solid #00ff7f;
  margin-top: 10px;
}

.historique-bloc h2 {
  font-size: 0.9rem;
  color: #8effb8;
  margin-bottom: 5px;
}

.historique-cartes {
  display: flex;
  flex-direction: row;  /* cartes horizontales */
  flex-wrap: wrap;      /* permet aux cartes de passer à la ligne suivante */
  gap: 8px;             /* espace entre cartes */
  max-width: 100%;      /* largeur max du conteneur */
  overflow-x: visible;  /* pas de scroll horizontal */
}

.historique-cartes img {
  height: 33px;
  border-radius: 8px;
  border: 2px solid lightgrey;
  flex-shrink: 0;       /* empêche l'image de rétrécir */
}

@keyframes blinkYellow {
  0%, 100% { box-shadow: 0 0 10px 3px yellow; }
  50% { box-shadow: 0 0 15px 5px gold; }
}

.blink-yellow {
  animation: blinkYellow 1s infinite;
}

#undo {
  background: linear-gradient(90deg, #ffcc00, #d4a000);
  color: black;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}
#undo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.7);
}

#reset1 {
  background: linear-gradient(90deg, #ff4c4c, #d40000);
  color: white;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}
#reset1:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.7);
}

.history-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
