/* Cyberpunk CTF Cards & Filters */
#ctf-main {
  background: linear-gradient(120deg, #0a0a0a 80%, #1a1a1a 100%);
}
#ctf-cards {
  margin-top: 2rem;
}
.ctf-card, .ctf-card-grok {
  background: #181a1b !important;
  border-radius: 1.1rem;
  box-shadow: 0 2px 8px 0 #0006 !important;
  border: 1.5px solid #23272f !important;
  padding: 2.1rem 1.5rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 200px;
  transition: box-shadow 0.28s cubic-bezier(.4,0,.2,1), transform 0.28s cubic-bezier(.4,0,.2,1), z-index 0.18s, border-color 0.18s, background 0.18s;
  animation: none !important;
  filter: none !important;
  z-index: 1;
}
.ctf-card:hover, .ctf-card-grok:hover {
  transform: translateY(-32px) scale(1.035) !important;
  box-shadow: 0 16px 48px 0 #00ffb355, 0 2px 8px 0 #0008 !important;
  z-index: 10 !important;
  border-color: #00ffb3 !important;
  background: #191c1e !important;
}
.ctf-card .ctf-title, .ctf-card-grok .ctf-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: #f3f3f3;
  margin-top: 0.2rem;
  letter-spacing: 0.5px;
  text-shadow: none;
}
.ctf-card .ctf-category {
  font-size: 1rem;
  font-family: 'Orbitron', sans-serif;
  color: #f0f0f0;
  background: rgba(0,255,180,0.12);
  border-radius: 0.5rem;
  padding: 0.2rem 0.9rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  border: 1.5px solid #00ffb3;
  box-shadow: 0 0 8px var(--cat-color, #00ffb3);
  text-shadow: 0 0 4px var(--cat-color, #00ffb3);
}
.ctf-card .ctf-points {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px #00ffb3;
}
.ctf-card .ctf-solve {
  font-size: 0.95rem;
  color: #f0f0f0;
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 0 8px #e879f9;
}
.ctf-card .ctf-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}
.ctf-card .ctf-btn {
  margin-top: 0.7rem;
  background: #23272f;
  color: #00ffb3;
  border: none;
  border-radius: 0.8rem;
  padding: 0.7rem 2.1rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.18s;
  box-shadow: 0 1px 8px 0 #0003;
  letter-spacing: 0.4px;
  position: relative;
  overflow: hidden;
}
.ctf-card-btn::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 2.5px;
  background: linear-gradient(90deg, #00ffb3 0%, #fff 100%);
  transition: width 0.28s cubic-bezier(.4,0,.2,1);
}
.ctf-card-btn:hover {
  color: #fff;
  background: #00ffb3;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 24px #00ffb355;
}
.ctf-card-btn:hover::after {
  width: 100%;
}
#reset-filters {
  border: none;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  opacity: 1;
  background: linear-gradient(90deg, #00ffb3 0%, #f0f 100%);
  color: #0a0a0a;
  box-shadow: 0 0 8px #00ffb3;
  transition: background 0.2s, color 0.2s;
}
#reset-filters:hover {
  background: linear-gradient(90deg, #f0f 0%, #00ffb3 100%);
  color: #fff;
}
.sort-btn {
  background: #111;
  border: 1.5px solid #00ffb3;
  color: #00ffb3;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.sort-btn:hover {
  background: linear-gradient(90deg, #00ffb3 0%, #f0f 100%);
  color: #0a0a0a;
  border-color: #f0f;
}
.sort-btn.active {
  background: linear-gradient(90deg, #00ffb3 0%, #f0f 100%);
  color: #0a0a0a;
  border-color: #00ffb3;
}
#category-filter, #points-filter, #search-bar {
  background: #111;
  border: 1.5px solid #00ffb3;
  color: #00ffb3;
}
#category-filter:focus, #points-filter:focus, #search-bar:focus {
  border-color: #f0f;
  box-shadow: 0 0 0 2px #f0f;
}
#result-count {
  color: #00ffb3;
  font-size: 1.1rem;
}
@media (max-width: 640px) {
  .ctf-card { padding: 1.2rem 0.7rem; }
  .ctf-card .ctf-title { font-size: 1.1rem; }
  .ctf-card .ctf-btn { font-size: 0.95rem; padding: 0.5rem 1rem; }
}

/* Animation d'apparition cyberpunk pour les cartes */
@keyframes cyberpunkFadeIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.98) skewY(2deg); filter: blur(2px) brightness(0.7); }
  60% { opacity: 1; transform: translateY(-4px) scale(1.01) skewY(-1deg); filter: blur(0.5px) brightness(1.1); }
  100% { opacity: 1; transform: none; filter: none; }
}
.animate-challenge-card {
  animation: cyberpunkFadeIn 0.7s cubic-bezier(.77,0,.18,1) both;
}

.ctf-card-difficulty {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.13rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.98rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  background: #181c22;
  color: #00ffb3;
  border: 1.2px solid #23272f;
  box-shadow: 0 0 8px #00ffb344;
  letter-spacing: 0.2px;
  vertical-align: middle;
}
.ctf-card-difficulty:after {
  content: '';
}
.ctf-card-difficulty:contains('Facile') { color: #00ffb3; border-color: #00ffb3; }
.ctf-card-difficulty:contains('Moyen') { color: #22d3ee; border-color: #22d3ee; }
.ctf-card-difficulty:contains('Difficile') { color: #a259f7; border-color: #a259f7; }
.ctf-card-difficulty:contains('Expert') { color: #f59e42; border-color: #f59e42; }
.ctf-card-difficulty:contains('Légendaire') { color: #ff3c7d; border-color: #ff3c7d; }

.ctf-card-desc {
  font-size: 1.01rem;
  color: #b5e0c7;
  font-style: italic;
  margin-bottom: 0.2rem;
  margin-top: -0.5rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.92;
}

.ctf-card-funfact {
  font-size: 0.97rem;
  color: #ffe066;
  font-style: italic;
  margin-bottom: 0.2rem;
  margin-top: 0.1rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.ctf-card-funfact i {
  color: #ffd700;
  font-size: 1.1em;
}

.ctf-card-icon {
  background: #23272f;
  color: #00ffb3;
  font-size: 2.1rem;
  border-radius: 0.8rem;
  padding: 0.5rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  filter: none;
}
.ctf-card-grok {
  position: relative;
  overflow: hidden;
}
/* Désactive tous les effets de hover sur .ctf-card-grok */
.ctf-card-grok::before,
.ctf-card-grok:hover::before,
.ctf-card-grok:active::before {
  opacity: 0 !important;
  animation: none !important;
  background: none !important;
  content: none !important;
}
.ctf-card-grok:active,
.ctf-card:active {
  transform: translateY(-16px) scale(1.01) !important;
  box-shadow: 0 8px 24px 0 #00ffb355, 0 2px 8px 0 #0008 !important;
}
.ctf-card-grok .ctf-card-icon,
.ctf-card .ctf-card-icon {
  filter: none !important;
  animation: none !important;
  box-shadow: none !important;
}
.icon-emoji {
  font-size: 1.7rem;
  z-index: 2;
}
.icon-label {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  background: rgba(0,0,0,0.18);
  border-radius: 0.5rem;
  padding: 0.05rem 0.4rem;
  margin-top: 0.1rem;
  letter-spacing: 0.1em;
  z-index: 2;
}
/* Exemples d'effets uniques par attaque */
.icon-sqli { background: linear-gradient(135deg, #00ffb3 60%, #23272f 100%); box-shadow: 0 0 12px #00ffb3; }
.icon-xss { background: linear-gradient(135deg, #00eaff 60%, #23272f 100%); box-shadow: 0 0 12px #00eaff; }
.icon-csrf { background: linear-gradient(135deg, #f59e42 60%, #23272f 100%); box-shadow: 0 0 12px #f59e42; }
.icon-upload { background: linear-gradient(135deg, #a259f7 60%, #23272f 100%); box-shadow: 0 0 12px #a259f7; }
.icon-redirect { background: linear-gradient(135deg, #ff3c7d 60%, #23272f 100%); box-shadow: 0 0 12px #ff3c7d; }
.icon-path { background: linear-gradient(135deg, #22d3ee 60%, #23272f 100%); box-shadow: 0 0 12px #22d3ee; }
.icon-auth { background: linear-gradient(135deg, #ffd700 60%, #23272f 100%); box-shadow: 0 0 12px #ffd700; }
.icon-cj { background: linear-gradient(135deg, #ef4444 60%, #23272f 100%); box-shadow: 0 0 12px #ef4444; }
.icon-csp { background: linear-gradient(135deg, #00ffb3 60%, #23272f 100%); box-shadow: 0 0 12px #00ffb3; }
.icon-sub { background: linear-gradient(135deg, #22d3ee 60%, #23272f 100%); box-shadow: 0 0 12px #22d3ee; }
/* Crypto */
.icon-rsa { background: linear-gradient(135deg, #ffd700 60%, #23272f 100%); box-shadow: 0 0 12px #ffd700; }
.icon-aes { background: linear-gradient(135deg, #00ffb3 60%, #23272f 100%); box-shadow: 0 0 12px #00ffb3; }
.icon-hash { background: linear-gradient(135deg, #ef4444 60%, #23272f 100%); box-shadow: 0 0 12px #ef4444; }
.icon-pad { background: linear-gradient(135deg, #f59e42 60%, #23272f 100%); box-shadow: 0 0 12px #f59e42; }
.icon-nonce { background: linear-gradient(135deg, #22d3ee 60%, #23272f 100%); box-shadow: 0 0 12px #22d3ee; }
.icon-prng { background: linear-gradient(135deg, #ffd700 60%, #23272f 100%); box-shadow: 0 0 12px #ffd700; }
.icon-cbc { background: linear-gradient(135deg, #00ffb3 60%, #23272f 100%); box-shadow: 0 0 12px #00ffb3; }
.icon-time { background: linear-gradient(135deg, #f59e42 60%, #23272f 100%); box-shadow: 0 0 12px #f59e42; }
.icon-lfsr { background: linear-gradient(135deg, #22d3ee 60%, #23272f 100%); box-shadow: 0 0 12px #22d3ee; }
.icon-ecc { background: linear-gradient(135deg, #a259f7 60%, #23272f 100%); box-shadow: 0 0 12px #a259f7; }
/* Forensic */
.icon-stego { background: linear-gradient(135deg, #22d3ee 60%, #23272f 100%); box-shadow: 0 0 12px #22d3ee; }
.icon-mem { background: linear-gradient(135deg, #ffd700 60%, #23272f 100%); box-shadow: 0 0 12px #ffd700; }
.icon-pcap { background: linear-gradient(135deg, #00ffb3 60%, #23272f 100%); box-shadow: 0 0 12px #00ffb3; }
.icon-carve { background: linear-gradient(135deg, #a259f7 60%, #23272f 100%); box-shadow: 0 0 12px #a259f7; }
.icon-meta { background: linear-gradient(135deg, #f59e42 60%, #23272f 100%); box-shadow: 0 0 12px #f59e42; }
.icon-log { background: linear-gradient(135deg, #00ffb3 60%, #23272f 100%); box-shadow: 0 0 12px #00ffb3; }
.icon-reg { background: linear-gradient(135deg, #ffd700 60%, #23272f 100%); box-shadow: 0 0 12px #ffd700; }
.icon-brow { background: linear-gradient(135deg, #22d3ee 60%, #23272f 100%); box-shadow: 0 0 12px #22d3ee; }
.icon-cloud { background: linear-gradient(135deg, #00ffb3 60%, #23272f 100%); box-shadow: 0 0 12px #00ffb3; }
.icon-mal { background: linear-gradient(135deg, #ef4444 60%, #23272f 100%); box-shadow: 0 0 12px #ef4444; }
/* Reverse */
.icon-crack { background: linear-gradient(135deg, #ffd700 60%, #23272f 100%); box-shadow: 0 0 12px #ffd700; }
.icon-obf { background: linear-gradient(135deg, #a259f7 60%, #23272f 100%); box-shadow: 0 0 12px #a259f7; }
.icon-adbg { background: linear-gradient(135deg, #ef4444 60%, #23272f 100%); box-shadow: 0 0 12px #ef4444; }
.icon-shell { background: linear-gradient(135deg, #00ffb3 60%, #23272f 100%); box-shadow: 0 0 12px #00ffb3; }
.icon-rop { background: linear-gradient(135deg, #22d3ee 60%, #23272f 100%); box-shadow: 0 0 12px #22d3ee; }
.icon-vm { background: linear-gradient(135deg, #a259f7 60%, #23272f 100%); box-shadow: 0 0 12px #a259f7; }
.icon-str { background: linear-gradient(135deg, #ffd700 60%, #23272f 100%); box-shadow: 0 0 12px #ffd700; }
.icon-elf { background: linear-gradient(135deg, #00ffb3 60%, #23272f 100%); box-shadow: 0 0 12px #00ffb3; }
.icon-pe { background: linear-gradient(135deg, #22d3ee 60%, #23272f 100%); box-shadow: 0 0 12px #22d3ee; }
.icon-sym { background: linear-gradient(135deg, #f59e42 60%, #23272f 100%); box-shadow: 0 0 12px #f59e42; }
/* Effet cyberpunk glitch sur les boutons */
.ctf-card-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.ctf-card-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(120deg, transparent 0 8px, #fff2 8px 16px);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.18s;
}
.ctf-card-btn:hover::before {
  opacity: 1;
  animation: btnGlitch 0.4s linear;
}
@keyframes btnGlitch {
  0% { background-position: 0 0; }
  20% { background-position: 8px 4px; }
  40% { background-position: -8px 8px; }
  60% { background-position: 12px -4px; }
  80% { background-position: -12px 12px; }
  100% { background-position: 0 0; }
}
.ctf-card-btn:hover {
  box-shadow: 0 0 24px 4px var(--cat-color, #00ffb3cc), 0 0 0 2px #fff inset;
  color: var(--cat-color, #00ffb3);
  background: #15171a;
  border: 1.5px solid var(--cat-color, #00ffb3);
  transform: scale(1.04) skewX(-2deg);
  text-shadow: 0 0 8px var(--cat-color, #00ffb3);
  transition: box-shadow 0.18s, color 0.18s, background 0.18s, border 0.18s, transform 0.18s;
}

/* --- CARTES CTF SOBRES ET ANIMATION AU SURVOL --- */
.ctf-card, .ctf-card-grok {
  background: #181a1b !important;
  border-radius: 1.1rem;
  box-shadow: 0 2px 8px 0 #0006 !important;
  border: 1.5px solid #23272f !important;
  padding: 2.1rem 1.5rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 200px;
  transition: box-shadow 0.28s cubic-bezier(.4,0,.2,1), transform 0.28s cubic-bezier(.4,0,.2,1), z-index 0.18s, border-color 0.18s, background 0.18s;
  animation: none !important;
  filter: none !important;
  z-index: 1;
}
.ctf-card:hover, .ctf-card-grok:hover {
  transform: translateY(-32px) scale(1.035) !important;
  box-shadow: 0 16px 48px 0 #00ffb355, 0 2px 8px 0 #0008 !important;
  z-index: 10 !important;
  border-color: #00ffb3 !important;
  background: #191c1e !important;
}

/* Désactive tous les anciens effets de hover, glitch, matrix, etc. */
.ctf-card-grok::before,
.ctf-card-grok:hover::before,
.ctf-card-grok:active::before {
  opacity: 0 !important;
  animation: none !important;
  background: none !important;
  content: none !important;
}

.ctf-card-grok:active,
.ctf-card:active {
  transform: translateY(-16px) scale(1.01) !important;
  box-shadow: 0 8px 24px 0 #00ffb355, 0 2px 8px 0 #0008 !important;
}

.ctf-card-grok .ctf-card-icon,
.ctf-card .ctf-card-icon {
  filter: none !important;
  animation: none !important;
  box-shadow: none !important;
}

/* Nettoyage : désactive les effets inutiles sur les badges, titres, etc. */
.ctf-card-badge,
.ctf-card-title,
.ctf-card-meta,
.ctf-card-points,
.ctf-card-solve {
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  background: none !important;
  color: inherit !important;
  border: none;
}

/* Supprime les keyframes inutilisées */
@keyframes matrixGlitch {}
@keyframes iconGlitch {}
