/* press-start-2p-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  src: url("fonts/press-start-2p-v15-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
@import url("https://fonts.googleapis.com/css2?family=Audiowide&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Audiowide&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

:root {
  --primary: #1976d2;
  --primary-light: #42a5f5;
  --white: #ffffff;
  --dark-bg: rgba(0, 0, 30, 1);
  --transition: 0.3s ease;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
  background: linear-gradient(to bottom, #0d47a1, #1976d2, #42a5f5);
  color: var(--white);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
/* Étoiles de fond */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><circle cx="2" cy="2" r="1" fill="white" opacity="0.2"/></svg>')
    repeat;
  animation: starMove 60s linear infinite;
  z-index: 0;
}
@keyframes starMove {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-500px, 500px);
  }
}
/* Parallax scroll */
body.parallax {
  background-position: center top;
  transition: background-position 0.1s ease-out;
}
/* Header and Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}
.nav-logo {
  font-family: "Press Start 2P";
  font-size: 1rem;
}

@media screen and (max-width: 723px) {
  .logo-img {
    height: 66px;
    margin-right: 0x;
    margin-top: 0px;
  }
}
@media screen and (min-width: 723px) {
  .logo-img {
    height: 105px;
    margin-right: 8px;
    margin-top: 17px;
  }
}
.avatar-gif {
  width: 86px;
  height: auto;
  display: block;
  margin: 0px auto;
  position: absolute;
  top: -21px;
  right: 2px;
}

@media screen and (max-width: 723px) {
  .avatar-gif {
    width: 65px;
    height: auto;
    display: block;
    margin: 0px auto;
    position: absolute;
    top: -7px;
    right: -10px;
  }
  #avatar-drink {
    opacity: 0;
    width: 65px;
    height: auto;
    display: block;
    margin: 0px auto;
    position: absolute;
    top: -7px;
    right: -10px;
  }
}

/* Twitch avatar style */
.twitch-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 8px;
}
.participant-card img,
.winner-card img,
.highlight-card img {
  border: 2px solid var(--primary-light);
}

/* Social Links */
#social-links {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 20px 0;
  margin-bottom: 0;
}
#social-links a {
  display: inline-block;
  margin: 0 10px;
  transition: transform 0.3s;
}
#social-links a img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.7));
}
#social-links a:hover {
  transform: scale(1.2);
}
/* Section Titles */
h2.section-title {
  font-family: "Press Start 2P";
  font-size: 1.4rem;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 723px) {
  h2.section-title {
    font-size: 18px;
  }
}
/* Sections invisibles avant reveal */
section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: relative;
  z-index: 1;
  padding: 20px 0;
}

.section-header {
  display: flex;
  flex-direction: column;
}
section.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Grid Layouts */
.grid {
  display: grid;
  gap: 16px;
}
/* Highlights Carousel */
#highlights-list {
  grid-auto-flow: column;
  grid-auto-columns: minmax(100px, 1fr);
  overflow-x: hidden;
  padding-bottom: 16px;
}
.highlight-card {
  background: var(--dark-bg);
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
  max-width: 200px;
  align-items: center;
}
.highlight-card:hover,
.highlight-card:focus-within {
  transform: scale(1.05);
  box-shadow: 0 0 10px var(--primary-light);
  outline: none;
}
.highlight-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  font-weight: 700;
}
.highlight-card p {
  font-size: 0.9rem;
}
/* Participants Grid */
#participants-list {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.participant-card {
  background: var(--dark-bg);
  border: 2px solid var(--white);
  border-radius: 4px;
  padding: 12px;
  text-align: center;
  transition: transform var(--transition);
  cursor: default;
}
.participant-card:hover {
  transform: scale(1.05);
}
/* VODs Grid */
#vods-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 1.5rem;
  height: 354px;
  overflow-y: auto;
}
.vod-card {
  background: var(--dark-bg);
  border: 2px solid var(--primary);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.vod-card:hover {
  transform: scale(1.02);
  box-shadow: 0 0 10px var(--primary-light);
}
.vod-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.vod-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 2px solid var(--primary);
  object-fit: cover;
}
.vod-content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.vod-title {
  font-weight: 700;
  margin-bottom: 8px;
  flex: 1;
}
.vod-info {
  font-size: 0.9rem;
}
/* Winners Marquee */
.marquee {
  overflow: hidden;
  position: relative;
  background: var(--dark-bg);
  padding: 16px 0;
}
.marquee-content {
  display: inline-flex;
  gap: 24px;
  animation: marquee 10s linear infinite;
}
.winner-card {
  background: var(--dark-bg);
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  min-width: 180px;
}
/* Footer */
/* Responsive tweaks */

.marquee {
  background: linear-gradient(
      135deg,
      rgba(255, 140, 0, 0.6),
      rgba(229, 46, 113, 0.6)
    )
    center/cover no-repeat;
  padding: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
}

/* **Contenu** : espacement + alignement */
.marquee-content {
  display: inline-flex;
  gap: 24px;
  align-items: flex-start;
}

/* **Cartes** : dégradé, ombre, trophée intégré, hover puissant */
.winner-card {
  background: linear-gradient(135deg, #ff8a00, #e52e71);
  border-radius: 12px;
  padding: 16px;
  width: 180px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

/* Icône de trophée au-dessus de chaque carte */
.winner-card::before {
  content: "🏆";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
}

/* Texte du mois en plus gros */
.winner-card h3 {
  font-size: 17px;
  margin: 8px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Pseudo et prix légèrement espacé */
.winner-card p {
  margin: 4px 0;
  font-weight: 500;
}
.filter-input {
  padding: 8px 12px;
  border: 2px solid var(--primary-light);
  border-radius: 4px;
  background: var(--dark-bg);
  color: var(--white);
  font-size: 1rem;
  transition: border var(--transition), box-shadow var(--transition);
  width: 100%;
  max-width: 250px;
  align-self: center;
}
.filter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 5px var(--primary-light);
  outline: none;
  background: rgba(0, 0, 30, 0.9);
}

/* Hover : soulèvement + agrandissement + ombre renforcée */
.winner-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
footer {
  text-align: center;
  padding: 16px 0;
  font-size: 0.8rem;
}
.participant-card {
  position: relative;
  padding: 1rem;
  border-radius: 12px;
  background: var(--dark-bg);
  color: white;
  text-align: center;
  overflow: hidden;
  margin: 1rem;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.participant-card img.twitch-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid white;
  margin-bottom: 0.5rem;
}

.participant-card.shiny::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  animation: pulseGlow 2s ease-in-out infinite;
  z-index: 1;
}

.participant-card.shiny * {
  position: relative;
  z-index: 2;
}

.shiny-badge {
  position: absolute;
  top: 8px;
  font-size: 1.5rem;
  animation: sparkle 1.2s infinite alternate ease-in-out;
  color: gold;
  text-shadow: 0 0 6px white, 0 0 10px yellow;
}

@keyframes pulseGlow {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.4;
  }
}

@keyframes sparkle {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.2) rotate(20deg);
    opacity: 1;
  }
}

.pokemon-card {
  width: 200px;
  background: #f2f2f2;
  border: 4px solid #444;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  font-family: "Verdana", sans-serif;
  overflow: hidden;
  position: relative;
  text-align: center;
  transform-style: preserve-3d;
}

.pokemon-card .card-header {
  background: var(--dark-bg);
  padding: 0.8rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 5px;
  padding-right: 5px;
  padding-bottom: 7px;
  padding-top: 7px;
}

.pokemon-card .card-name {
  font-size: 14px;
  text-align: left;
}
.pokemon-card .rankPseudo {
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pokemon-card .card-sub {
  color: #e60012;
}

.pokemon-card .card-image img {
  width: 100%;
}

.pokemon-card .card-info {
  padding: 0.5rem;
  font-size: 0.85rem;
  background: var(--dark-bg);
  height: 100%;
}

.pokemon-card .card-sub.sub {
  color: #5cc7f8;
  text-shadow: 0 0 5px black, 0 0 10px #5cc7f8;
}

.pokemon-card.shiny * {
  position: relative;
  z-index: 2;
}

@keyframes rotateShiny {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes shinyGlow {
  0% {
    box-shadow: 0 0 10px gold;
  }
  50% {
    box-shadow: 0 0 20px white;
  }
  100% {
    box-shadow: 0 0 10px gold;
  }
}
#participants-list {
  display: grid;
  gap: 0px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  justify-items: center;
}
.pokemon-card {
  width: 100%;
  max-width: 200px;
}

@media (max-width: 480px) {
  .pokemon-card .card-name {
    font-size: 0.9rem;
  }

  .pokemon-card .card-info {
    font-size: 0.75rem;
    padding: 0.4rem;
  }

  .shiny-badge {
    font-size: 1.2rem;
    top: 4px;
    right: 4px;
  }
}

.pokemon-card.shiny .shiny-overlay {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    rgba(255, 255, 255, 0.3) 0deg,
    rgba(255, 255, 255, 0) 60deg,
    rgba(255, 255, 255, 0.3) 120deg,
    rgba(255, 255, 255, 0) 180deg,
    rgba(255, 255, 255, 0.3) 240deg,
    rgba(255, 255, 255, 0) 300deg,
    rgba(255, 255, 255, 0.3) 360deg
  );
  animation: rotateShiny 6s linear infinite;
  opacity: 1;
  z-index: 8;
  pointer-events: none;
}
.pokemon-card.shiny.max {
  border: 3px solid gold;
  background: gold;
  border-radius: 10px;
}

.pokemon-card.shiny.sub-only {
  border: 3px solid #00bcd4;
  box-shadow: 0 0 10px #00bcd4;
  background: #00bcd4;
  border-radius: 10px;
}

.pokemon-card.shiny.ticket-only {
  border: 3px solid #d75178;
  box-shadow: 0 0 6px var(--dark-bg);
  animation: none;
  background: rgb(216, 80, 119);
  border-radius: 10px;
}

@keyframes shinyGlowMax {
  0%,
  100% {
    box-shadow: 0 0 16px gold;
  }
  50% {
    box-shadow: 0 0 28px white;
  }
}

@keyframes shinyGlowSub {
  0%,
  100% {
    box-shadow: 0 0 10px #00bcd4;
  }
  50% {
    box-shadow: 0 0 18px #b2ebf2;
  }
}

@keyframes shinyGlowTicket {
  0%,
  100% {
    box-shadow: 0 0 6px #ffca28;
  }
  50% {
    box-shadow: 0 0 12px #fff59d;
  }
}
.mirror-glint {
  position: absolute !important;
  top: -50%;
  left: -75%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  transform: rotate(25deg);
  animation: mirrorSweep 3s infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes mirrorSweep {
  0% {
    transform: translateX(-100%) rotate(25deg);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%) rotate(25deg);
    opacity: 0;
  }
}
.fade {
  opacity: 1;
  transition: opacity 0.6s ease-in-out;
}

.fade-out {
  opacity: 0;
}
#no-result-message {
  text-align: center;
  margin-top: 20px;
  font-size: 1rem;
  color: white;
  background: rgba(0, 0, 30, 0.6);
  padding: 16px;
  border: 2px dashed var(--primary-light);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  transition: opacity 0.4s ease;
}
.hidden {
  display: none;
}
#no-result-message a {
  color: #ffd700;
  text-decoration: underline;
  font-weight: bold;
}
#no-result-message a:hover {
  text-shadow: 0 0 6px gold;
}
.twitch-link {
  color: #ffd700;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.twitch-link img {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.twitch-link:hover {
  text-shadow: 0 0 6px gold;
  transform: scale(1.05);
}

.twitch-link:hover img {
  transform: rotate(15deg) scale(1.2);
  filter: drop-shadow(0 0 4px #fff);
}
.card-type {
  font-size: 0.85rem;
  padding: 4px;
  background: #1e1e1e;
  text-align: center;
  min-height: 63px;
  font-weight: 500;
}

.type-ticket {
  background: linear-gradient(135deg, #df3d6e, #b3afa4);
  color: #000;
}

.type-sub {
  background: linear-gradient(135deg, #81d4fa, #29b6f6);
  color: #003c6c;
}

.type-legendary {
  background: linear-gradient(135deg, gold, orange);
  color: #000;
  font-weight: bold;
  text-shadow: 0 0 3px white;
}

/* Section */
#vods {
  padding: 10px;
  background: #325e9b;
  color: #fff;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #ffffff;
  font-weight: 700;
  text-shadow: 1px 1px 2px #000;
}

/* Carte */
.vod-card {
  background-color: #1a2c46;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.vod-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.vod-card img {
  width: 100%;
  display: block;
}

/* Contenu */
.vod-content {
  padding: 1rem;
}

.vod-title {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  color: #f0f0f0;
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.vod-title:hover {
  text-decoration: underline;
  color: #a8d8ff;
}

.vod-info {
  font-size: 0.9rem;
  color: #ccc;
}
.vods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.vod-card {
  background-color: #12192c;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
  min-height: 200px;
  max-width: 200px;
}

.vod-card:hover {
  transform: scale(1.03);
}

.vod-thumbnail {
  position: relative;
  display: block;
}

.vod-thumbnail img {
  width: 100%;
  display: block;
}

.play-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  padding: 6px 10px;
  color: white;
  font-size: 1.2rem;
}

.vod-content {
  padding: 2px 7px;
}

.vod-title {
  font-weight: bold;
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  display: flex;
  margin-bottom: 8px;
  justify-content: center;
}

.vod-title:hover {
  text-decoration: underline;
}

.vod-info {
  font-size: 0.85rem;
  color: #bbb;
  display: flex;
  justify-content: space-between;
}
.vod-header {
  font-size: 0.8rem;
  color: #89cff0;
  margin-bottom: 5px;
}

.vod-game {
  background-color: #1a1f3a;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #00cfff;
  display: inline-block;
}

.vod-card.recent {
  border: 2px solid #00ffcc;
  box-shadow: 0 0 12px #00ffcc66;
}

@keyframes rotateCard {
  0% {
    transform: rotateY(0deg);
  }
  25% {
    transform: rotateY(30deg);
  }
  50% {
    transform: rotateY(0deg);
  }
  75% {
    transform: rotateY(-30deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

.card-back img {
  max-width: 70%;
  max-height: 70%;
  filter: drop-shadow(0 0 10px gold);
  transform: scale(1.1);
  transition: transform 0.3s ease;
}
.card-back:hover img {
  transform: scale(1.2);
}

.card-3d.rotate {
  transform-style: preserve-3d;
  position: relative;
  animation: rotateCard 12s infinite linear;
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
}

.card-front {
  transform: rotateY(0deg);
  z-index: 2;
}

.card-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1e1e2f; /* ton fond ici */
}

.card-logo-back img {
  max-width: 60%;
  max-height: 60%;
  opacity: 0.8;
}
.card-container {
  width: 200px;
  height: 300px;
  margin: 22px;
  margin-bottom: 0px;
  cursor: pointer;
}
@keyframes fastSpin {
  0% {
    transform: rotateY(0);
  }
  100% {
    transform: rotateY(720deg);
  }
}

/* Style de la carte plein écran */
.fullscreen-card {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(1.5) !important;
  width: 90vw !important;
  max-width: 200px;
  height: 300px !important;
  z-index: 9999;
  box-shadow: 0 0 20px #000;
  border-radius: 8%;
}
.card-3d.spinning {
  animation: fastSpin 1s ease-in-out;
}
.card-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
}
.fullscreen-close {
  position: absolute;
  top: 311px;
  right: 86px;
  font-size: 1.2rem;
  background: #db1717;
  color: white;
  border: none;
  border-radius: 67%;
  width: 27px;
  height: 27px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 0 8px #000;
  transition: background 0.2s ease;
}
.fullscreen-close:hover {
  background: #ff3366;
}

@keyframes flyToCenterSpin {
  0% {
    transform: translate(0, 0) rotateY(0deg) scale(1);
  }
  100% {
    transform: translate(var(--delta-x), var(--delta-y)) rotateY(720deg)
      scale(1.5);
  }
}
.fly-animation {
  animation: flyToCenterSpin 1s ease-in-out forwards;
  position: absolute !important;
  z-index: 10000;
  transform-origin: center center;
  pointer-events: none;
}
@keyframes flyBackToOrigin {
  0% {
    transform: translate(var(--delta-x), var(--delta-y)) rotateY(720deg)
      scale(1.5);
  }
  100% {
    transform: translate(0, 0) rotateY(0deg) scale(1);
  }
}
.return-animation {
  animation: flyBackToOrigin 1s ease-in-out forwards;
  position: absolute !important;
  z-index: 10000;
  transform-origin: center center;
  pointer-events: none;
}

.rankName {
  font-size: 10px;
  text-align: left;
}

/* Niveaux de style */
.rank-basic {
  color: #ccc;
}

.rank-bronze {
  color: #cd7f32;
  text-shadow: 0 0 2px #663300;
}

.rank-silver {
  color: #c0c0c0;
  text-shadow: 0 0 3px #666;
}

.rank-gold {
  color: gold;
  text-shadow: 0 0 4px orange;
}

/* 2) Shimmer doré pour un effet haut de gamme */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.rank-duc {
  background: linear-gradient(90deg, #bfa85b 25%, #f9e79f 50%, #bfa85b 75%);
  background-size: auto;
  background-size: 200% 100%;
  -webkit-text-fill-color: white;
  -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.6);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 0 8px rgba(191, 168, 91, 0.3);
  animation: shimmer 5s linear infinite;
}

/* 2) Animations clés */
@keyframes shake {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  20% {
    transform: translate(-2px, 2px) rotate(-1deg);
  }
  40% {
    transform: translate(2px, -2px) rotate(1deg);
  }
  60% {
    transform: translate(-2px, -2px) rotate(-1deg);
  }
  80% {
    transform: translate(2px, 2px) rotate(1deg);
  }
}

@keyframes colorShift {
  0%,
  100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(60deg);
  }
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  10% {
    opacity: 0.8;
  }
  20% {
    opacity: 0.6;
  }
  30% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  70% {
    opacity: 0.9;
  }
}

@keyframes blast {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* 3) Style “explosif” pour .rank-destruction */
.rank-destruction {
  position: relative;
  font-family: "Audiowide", sans-serif;
  letter-spacing: 0.05em;

  /* 3a) Gradient explosif et découpe du texte */
  background: radial-gradient(
    circle at center,
    #fffb00 0%,
    #ff0000 60%,
    #000000 100%
  );
  -webkit-text-stroke: 1px #ffffff;
  text-shadow: 2px 0 2px rgba(255, 0, 0, 0.8), -2px 0 2px rgba(0, 255, 255, 0.8),
    0 0 8px rgba(255, 255, 255, 0.6);

  /* 3c) Combinaison multiple d’animations */
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite,
    colorShift 3s ease-in-out infinite alternate, flicker 1.2s linear infinite;
}

/* 4) Pseudo-élément “onde de choc” pour l’explosion */
.rank-destruction::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 200, 0.6) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: blast 1.5s ease-out infinite;
}

/* conteneur : on masque tout ce qui dépasse */
.rank-bus {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

/* le texte, en span pour qu’on puisse animer son opacité seul */
.rank-bus__text {
  font-family: "Audiowide", sans-serif;
  letter-spacing: 0.05em;
  /* glitch RGB split */
  text-shadow: 1px 0 0 rgba(255, 0, 0, 0.7), -1px 0 0 rgba(0, 255, 255, 0.7);
  filter: contrast(1.4);

  /* on anime l’opacité pour qu’il disparaisse/réapparaisse */
  animation: fadeText 4s linear infinite;
}

/* l’icône du bus de côté */
.rank-bus::before {
  content: "🚌";
  position: absolute;
  top: 50%;
  left: -1.5em;
  transform: translateY(-50%);
  font-size: 1.2em;

  /* on fait rouler le bus de gauche à droite */
  animation: drive 4s linear infinite;
}

/* keyframes pour le bus */
@keyframes drive {
  0% {
    left: -1.5em;
  }
  100% {
    left: calc(100% + 1em);
  }
}

/* keyframes pour le texte */
@keyframes fadeText {
  /* visible en début et fin de cycle */
  0%,
  40%,
  60%,
  100% {
    opacity: 1;
  }
  /* invisible quand le bus est au milieu */
  50% {
    opacity: 0;
  }
}

.rank-platinum {
  position: relative;
  font-family: "Pacifico", cursive;
  color: #ffffff; /* rouge gourmand */
  text-shadow: 0 0 8px #e74c3c;
}

/* 2) Coeurs qui montent et s’estompent */
.rank-platinum::before,
.rank-platinum::after {
  content: "❤";
  position: absolute;
  color: #ff6b81;
  opacity: 1;
  animation: float 3s ease-out infinite;
}

/* Deux cœurs, décalés et délayés pour plus de vie */
.rank-platinum::before {
  left: 10%;
  top: -10%;
  animation-delay: 0s;
}
.rank-platinum::after {
  left: 80%;
  top: -10%;
  animation-delay: 1.5s;
}

@keyframes float {
  0% {
    transform: translateY(0) scale(0);
    opacity: 1;
  }
  20% {
    transform: translateY(-5px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-10px) scale(0.5);
    opacity: 0;
  }
}

.rank-diamond {
  /* Police chic à empattements et taille élégante */
  font-family: "Playfair Display", serif;
  text-transform: capitalize;
  /* Couleur de base : or antique */
  color: #b28f00;
  /* Ombre légère pour du relief */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.15);
  /* Fond dégradé pour l’effet “luxe” (clip sur le texte) */
  background: linear-gradient(
    120deg,
    rgba(255, 215, 0, 0.9) 0%,
    rgba(255, 235, 100, 0.9) 50%,
    rgba(255, 215, 0, 0.9) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* Animation subtile de reflet doré */
  position: relative;
}

/* Rainbow animé */
.rank-rainbow {
  background: linear-gradient(
    90deg,
    red,
    orange,
    yellow,
    green,
    blue,
    indigo,
    violet
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 400%;
  font-weight: 900;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}
/* Rainbow animé */
.rank-rainbow-animated {
  background: linear-gradient(
    90deg,
    red,
    orange,
    yellow,
    green,
    blue,
    indigo,
    violet
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowMove 4s linear infinite;
  background-size: 400%;
  font-weight: 900;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.rank-rainbow-animated-pixel {
  --px: 6px;
  --speed: 2s;
  --stroke: 1.6px;
  --stroke-color: rgba(8, 12, 28, 0.9);

  position: relative;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  image-rendering: pixelated;

  background: repeating-linear-gradient(
    90deg,
    #5b2aff 0 calc(var(--px) * 1),
    #00b3ff calc(var(--px) * 1) calc(var(--px) * 2),
    #00ff37 calc(var(--px) * 2) calc(var(--px) * 3),
    #4ade80 calc(var(--px) * 3) calc(var(--px) * 4),
    #ffdd55 calc(var(--px) * 4) calc(var(--px) * 5),
    #ff6ad5 calc(var(--px) * 5) calc(var(--px) * 6)
  );
  background-size: calc(var(--px) * 12) 100%;
  background-repeat: repeat-x;

  /* NE PAS mettre !important ici sinon l’animation est cassée */
  /* background-position: 0 0;  <-- inutile, défini dans @keyframes */

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  animation: rankPixelScroll var(--speed) steps(12, end) infinite;
  /* optionnel : meilleure perf */
  will-change: background-position;
}

@keyframes rankPixelScroll {
  from {
    background-position: 0 0;
  }
  to {
    background-position: calc(var(--px) * -12) 0;
  }
}

/* évite que le parent recolore le texte */
.button,
.btn,
.pill {
  color: inherit;
}

/* ===== ULTRA INSTINCT – Dragon Ball (CSS only) ===== */
.rank-ultra-instinct {
  /* Tweaks rapides */
  --ui-blue: #6fd6ff;
  --ui-deep: #1b76ff;
  --ui-ice: #ecf7ff;
  --ui-silver: #cfd8e6;

  position: relative;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.065em;

  /* Effet métal argenté + reflets bleus dans le texte */
  color: transparent;
  background:
    /* 1) Métal brossé argent/bleu */ linear-gradient(
      100deg,
      #ffffff 0%,
      #e9f2ff 10%,
      #ffffff 17%,
      #cfd8e6 28%,
      #ffffff 40%,
      #bed3ff 55%,
      #ffffff 68%,
      #cfd8e6 80%,
      #f2f8ff 100%
    ),
    /* 2) fines stries métalliques */
      repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.26) 0 2px,
        rgba(0, 0, 0, 0) 2px 4px
      );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  /* Liseré lumineux pour la lisibilité (fond sombre) */
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 3px #9fdfff, 0 0 8px #7bcfff,
    0 0 18px rgba(90, 160, 255, 0.8), 0 0 36px rgba(60, 120, 255, 0.55);

  /* Pulsation d’énergie + micro-flashs */
  animation: uiGlow 1.6s ease-in-out infinite alternate,
    uiTint 9s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(115, 200, 255, 0.45))
    drop-shadow(0 0 26px rgba(90, 150, 255, 0.28));
}

/* ===== Aura + particules + lignes de ki (DBZ) ===== */
.rank-ultra-instinct::before {
  content: "";
  position: absolute;
  inset: -18% -12%;
  pointer-events: none;
  mix-blend-mode: screen;
  /* Plusieurs couches : halo, lignes qui montent, arcs, particules */
  background:
    /* Halo bas (plus chaud) */ radial-gradient(
      120% 80% at 50% 100%,
      rgba(120, 200, 255, 0.25),
      transparent 65%
    ),
    /* Halo haut (froid) */
      radial-gradient(
        120% 80% at 50% 0%,
        rgba(255, 255, 255, 0.22),
        transparent 60%
      ),
    /* Lignes de ki qui montent */
      repeating-linear-gradient(
        to top,
        rgba(120, 200, 255, 0.17) 0 3px,
        transparent 3px 10px
      ),
    /* Arcs d’énergie (léger motif conique) */
      conic-gradient(
        from 90deg at 50% 50%,
        rgba(120, 200, 255, 0.18) 0 25%,
        transparent 25% 50%,
        rgba(120, 200, 255, 0.18) 50% 75%,
        transparent 75% 100%
      ),
    /* Quelques particules/étoiles fixes */
      radial-gradient(
        circle at 30% 20%,
        rgba(255, 255, 255, 0.9) 0 2px,
        transparent 3px
      ),
    radial-gradient(
      circle at 68% 72%,
      rgba(255, 255, 255, 0.75) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 42% 58%,
      rgba(255, 255, 255, 0.6) 0 1.5px,
      transparent 3px
    ),
    radial-gradient(
      circle at 78% 34%,
      rgba(255, 255, 255, 0.7) 0 1.5px,
      transparent 3px
    );
  background-size: 120% 120%, 120% 120%, 100% 200%, 200% 200%, auto, auto, auto,
    auto;
  background-position: 50% 80%, 50% 20%, 50% 100%, 50% 50%, 0 0, 0 0, 0 0, 0 0;
  filter: blur(10px);
  animation: auraPulse 2.4s ease-in-out infinite,
    energyRise 7.5s linear infinite;
}

/* ===== "Étoile" brillante qui balaie en vague (miroir/shine) ===== */
.rank-ultra-instinct::after {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
  mix-blend-mode: screen;
  width: 26%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.95) 0 10%,
      rgba(175, 220, 255, 0.85) 10% 25%,
      rgba(160, 210, 255, 0.18) 25% 48%,
      transparent 55%
    ),
    conic-gradient(
      from 0deg at 50% 50%,
      rgba(255, 255, 255, 0.45),
      rgba(160, 210, 255, 0.15),
      transparent 60%
    );
  filter: blur(6px) drop-shadow(0 0 10px rgba(155, 216, 255, 0.9))
    drop-shadow(0 0 22px rgba(120, 190, 255, 0.55));
  transform-origin: 50% 50%;
  animation: starSweep 5.2s cubic-bezier(0.37, 0.01, 0.19, 0.99) infinite;
}

/* ===== Animations ===== */
@keyframes uiGlow {
  0% {
    text-shadow: 0 0 2px #bfe9ff, 0 0 6px #98dcff,
      0 0 14px rgba(100, 170, 255, 0.7), 0 0 28px rgba(70, 130, 255, 0.45);
    transform: translateZ(0) scale(1);
  }
  100% {
    text-shadow: 0 0 3px #e8f7ff, 0 0 10px #bfe7ff,
      0 0 24px rgba(120, 190, 255, 0.95), 0 0 42px rgba(90, 150, 255, 0.7);
    transform: translateZ(0) scale(1.02);
  }
}

@keyframes uiTint {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(115, 200, 255, 0.45))
      drop-shadow(0 0 26px rgba(90, 150, 255, 0.28));
  }
  40% {
    filter: drop-shadow(0 0 14px rgba(170, 230, 255, 0.55))
      drop-shadow(0 0 34px rgba(110, 170, 255, 0.38));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(200, 245, 255, 0.75))
      drop-shadow(0 0 46px rgba(130, 190, 255, 0.5));
  } /* micro-flash UI */
  60% {
    filter: drop-shadow(0 0 14px rgba(170, 230, 255, 0.55))
      drop-shadow(0 0 34px rgba(110, 170, 255, 0.38));
  }
}

@keyframes auraPulse {
  0% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.03);
  }
  100% {
    opacity: 0.7;
    transform: scale(1.01);
  }
}

@keyframes energyRise {
  0% {
    background-position: 50% 80%, 50% 20%, 50% 100%, 50% 50%, 0 0, 0 0, 0 0, 0 0;
    transform: rotate(0deg);
  }
  100% {
    background-position: 50% 75%, 50% 25%, 50% 0%, 50% 50%, 0 0, 0 0, 0 0, 0 0;
    transform: rotate(8deg);
  }
}

@keyframes starSweep {
  /* Chemin en vague: gauche-bas -> milieu-haut -> droite-bas, puis fade */
  0% {
    opacity: 0;
    transform: translate(-12%, 18%) scale(0.8) rotate(-8deg);
  }
  8% {
    opacity: 1;
  }
  50% {
    opacity: 1;
    transform: translate(92%, -18%) scale(1.03) rotate(6deg);
  }
  60% {
    opacity: 0.95;
    transform: translate(108%, 2%) scale(0.95) rotate(10deg);
  }
  90% {
    opacity: 0;
    transform: translate(120%, 28%) scale(0.9) rotate(14deg);
  }
  100% {
    opacity: 0;
  }
}

/* Motion-friendly fallback */
@media (prefers-reduced-motion: reduce) {
  .rank-ultra-instinct,
  .rank-ultra-instinct::before,
  .rank-ultra-instinct::after {
    animation: none !important;
  }
}

@keyframes rainbow-slide {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes rainbowMove {
  0% {
    background-position: 0%;
  }
  100% {
    background-position: 400%;
  }
}
.card-pv {
  top: 50px;
  background: inherit;
  color: white;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  z-index: 10 !important;
  position: absolute !important;
  right: 2px;
}

.pv-label-text {
  font-size: 0.6rem;
  font-weight: bold;
  color: #fff;
  margin-right: 0px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  padding: 0px 4px;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 4px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
}

.pv-value {
  font-size: 0.8rem;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 0 3px #000;
}

.card-level {
  margin-top: 4px;
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(to right, #333, #222);
  border: 2px solid #888;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #f0f0f0;
  text-shadow: 0 0 2px black;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.level-label {
  opacity: 0.7;
  font-size: 0.7rem;
}
.level-value {
  font-size: 0.85rem;
  color: #ffd700;
  margin-left: 4px;
}
.fullscreen-legend {
  position: fixed;
  top: 51%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  text-align: center;
  line-height: 1.4;
  min-width: 281px;
}

.legend-label {
  font-weight: bold;
  color: #f00;
  margin-right: 4px;
}

.no-anim .shiny {
  animation: none !important;
  transition: none !important;
}
.twitch-login-btn {
  background-color: #9146ff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 10px;
}
.hidden {
  display: none;
}
.profile-card img {
  border-radius: 50%;
  width: 100px;
  height: 100px;
}
#user-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-left: 10px;
  vertical-align: middle;
  border: 2px solid white;
  margin-right: 46px;
}
#nav-profile-link {
  padding: 8px 12px;
  border-radius: 5px;
  color: white !important;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s;
}

#nav-profile-link:hover {
  background: linear-gradient(135deg, #a970ff, #8a4df7);
  transform: scale(1.05);
}

#profile-container.profile-card img {
  border-radius: 50%;
  width: 120px;
  height: 120px;
  border: 4px solid #9146ff;
  box-shadow: 0 0 12px #9146ff;
  margin-bottom: 1rem;
}

#profile-container.profile-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #ffd700;
}

#profile-container.profile-card p {
  margin: 6px 0;
  font-size: 0.95rem;
}

#profile-container .twitch-login-btn {
  background: linear-gradient(135deg, #9146ff, #772ce8);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s;
  margin-top: 1rem;
}

#profile-container .twitch-login-btn:hover {
  background: linear-gradient(135deg, #a970ff, #8a4df7);
  transform: scale(1.05);
}
.filter-input:disabled {
  background-color: #2b2b2b;
  color: #999;
  border-color: #555;
  cursor: not-allowed;
}
.nav-links {
  display: flex;
  gap: 16px;
}
.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-links a:focus {
  color: var(--primary-light);
  outline: none;
}
@media (max-width: 723px) {
  nav {
    flex-direction: column;
    height: auto;
    gap: 0px;
    padding: 8px 0;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
nav {
  justify-content: flex-start;
  padding: 0 1rem;
}
.nav-links {
  flex-grow: 1;
  justify-content: center;
}
.nav-links {
  display: flex;
  gap: 18px;
  margin: 0 auto;
}
.nav-links {
  opacity: 0;
  transform: translateY(-20px);
  animation: slideDown 0.8s forwards ease-out;
  animation-delay: 0.3s;
}
@keyframes slideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.nav-item {
  display: inline-block;
  transform: perspective(500px) rotateX(20deg);
  transition: transform 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}
.nav-item:hover {
  transform: perspective(500px) rotateX(0deg) translateY(-6px) scale(1.05);
}
/* === Style des boutons === */
.nav-item {
  position: relative;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Pop-up et changement de couleur */
.nav-item:hover {
  color: #ffd700;
  transform: translateY(-3px) scale(1.05);
}

/* Soulignement animé */
.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #ffd700;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-item:hover::after {
  width: 100%;
  left: 0;
}

/* Effet ripple */
.nav-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
  pointer-events: none;
}

.nav-item:focus::before,
.nav-item:hover::before {
  width: 200px;
  height: 200px;
}
#user-avatar {
  margin-left: auto;
}
main.container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  main.container {
    grid-template-columns: 1fr;
  }
}
.section-title {
  text-align: left;
  margin-left: 0.5rem;
}
main.container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

@media (max-width: 1024px) {
  main.container {
    grid-template-columns: 1fr;
  }
}

.main-left,
.main-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 300px;
}
/* Titres */
.section-title {
  text-align: left;
  font-size: 1.8rem;
  margin-bottom: 5px;
}

/* Encadrement des sections */
.section {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1rem;
}

/* Marquee des gagnants */
#winners-list {
  display: flex;
  gap: 1rem;
  justify-content: start;
}

/* VODs en liste verticale */
.vods-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Participants en grille */
#participants-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}
@media (min-width: 600px) {
  #participants-list {
    min-height: 327px;
  }
}
@media (max-width: 600px) {
  #participants-list {
    grid-template-columns: 1fr;
  }

  .card-container {
    width: 100%;
    max-width: 200px;
  }
}

/* RESPONSIVE LAYOUT */
@media (max-width: 768px) {
  .container {
    display: block;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .main-left {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  .section {
    max-width: 703px;
  }

  #participant-filter {
    max-width: 90%;
  }

  .grid {
    justify-content: center;
    grid-auto-flow: inherit !important;
    grid-auto-columns: inherit !important;
  }
}
@media (max-width: 768px) {
  #winners,
  .marquee {
    max-width: 100%;
    overflow-x: auto;
  }

  .winner-card {
    min-width: 140px;
  }
  .winner-card {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 180px;
  }
  .marquee {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
  }

  .marquee-content {
    display: flex;
    gap: 1rem;
    min-width: fit-content;
    padding: 0 1rem;
  }
  #winners {
    overflow-x: auto;
    padding: 1rem 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}
.profile-card-outer {
  background: linear-gradient(to bottom right, #1e1e2f, #2e2e44);
  color: #fff;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  margin: auto;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.profile-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #9147ff;
  box-shadow: 0 0 10px #9147ff;
  margin-bottom: 1rem;
}

.profile-name {
  font-size: 1.5rem;
  color: #ffdc00;
  margin-bottom: 0.5rem;
}

.profile-rank {
  font-size: 1rem;
  color: #00eaff;
  margin-bottom: 1rem;
}

.profile-info p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

.profile-layout {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  margin-top: 2rem;
}

.profile-cards {
  background: rgba(20, 20, 40, 0.9);
  border-radius: 15px;
  padding: 1.5rem;
  max-width: 400px;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  font-family: "Press Start 2P", monospace;
}

.profile-cards h4 {
  margin-bottom: 1rem;
  color: #ffcc00;
  font-size: 1rem;
  text-align: center;
}

.card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.mini-card {
  width: 80px;
  text-align: center;
}

.mini-card img {
  width: 100%;
  border-radius: 10px;
  border: 2px solid #9147ff;
  box-shadow: 0 0 6px #9147ff;
}

.mini-card p {
  font-size: 0.6rem;
  margin-top: 0.2rem;
}
.profile-cards {
  background: rgba(20, 20, 40, 0.9);
  border-radius: 15px;
  padding: 1rem;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  font-family: "Press Start 2P", monospace;
}

.profile-cards h4 {
  font-size: 1rem;
  color: #ffcc00;
  text-align: center;
  margin-bottom: 1rem;
}

.profile-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.card-profile {
  width: 180px;
  height: auto;
  perspective: none;
  transform: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 0.5rem;
}

/* Carte animée */
.highlight-card {
  background: linear-gradient(135deg, #1e1e2f, #292948);
  border: 2px solid #ffd700;
  border-radius: 16px;
  padding: 1rem;
  font-family: "Press Start 2P", monospace;
  color: white;
  box-shadow: 0 0 10px #0004;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.highlight-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 0 20px #ffd700aa;
}

/* Texte intérieur */
.highlight-card h3 {
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.4;
}
.highlight-card {
  position: relative;
  background: #222;
  color: white;
  border: 2px solid #8aff8a;
  border-radius: 12px;
  padding: 1rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.highlight-card::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 20px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-top-color: #8aff8a;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.highlight-lists {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.highlight-list-block {
  background: #1e1e2f;
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 0 10px #0006;
}

.highlight-subtitle {
  font-family: "Press Start 2P", monospace;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #ffd700;
  text-shadow: 0 0 4px black;
}

.highlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.highlight-list li {
  background: #292948;
  padding: 0.5rem 1rem;
  border-left: 4px solid #00ffcc;
  border-radius: 6px;
  color: #ffffff;
  box-shadow: 0 0 6px #0004;
  transition: background 0.3s;
}

.highlight-list li:hover {
  background: #374785;
}

.highlight-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #292948;
  padding: 0.5rem 1rem;
  border-left: 4px solid #00ffcc;
  border-radius: 6px;
  color: #ffffff;
  box-shadow: 0 0 6px #0004;
  transition: background 0.3s;
}

.highlight-list li:hover {
  background: #374785;
}

.highlight-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00ffcc;
  background: #000;
}
.highlight-list {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.highlight-list::-webkit-scrollbar {
  width: 6px;
}
.highlight-list::-webkit-scrollbar-thumb {
  background: #ffd700;
  border-radius: 10px;
}
.highlight-list li {
  animation: fadeSlideIn 2s ease both;
}
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.loader::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 5px solid #ffffff50;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Conteneur des réseaux + gardien */
.social-and-guardian {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0; /* espace au-dessus et en-dessous */
}

/* Le bloc social reste en flex row */
.social-links {
  display: flex;
  gap: 0.5rem;
}

@keyframes glow {
  from {
    box-shadow: 0 0 6px rgba(255, 69, 0, 0.6);
  }
  to {
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.9);
  }
}
/* Animation depuis la gauche */
/* ─── Chevalier ─── */
@keyframes knightSlide {
  0% {
    transform: translateX(-100vw) translateY(0);
  }
  25% {
    transform: translateX(-15px) translateY(0);
  }
  70% {
    transform: translateX(-15px) translateY(0);
  }
  100% {
    transform: translateX(-15px) translateY(0);
  }
}

.knight-entrance {
  position: absolute;
  width: 150px;
  z-index: 9;
  cursor: pointer;
}

.knight-entrance img {
  width: 73%;
  animation: knightSlide 2s ease-out forwards;
}

@media screen and (max-width: 723px) {
.knight-entrance img {
  width: 50%;
  animation: knightSlide 2s ease-out forwards;
  position: absolute;
    top: -24px;
    left: 4px;
}
}

/* ─── Nom du Gardien ─── */
.knight-name {
  position: absolute;
  /* à ajuster pour caler à droite du chevalier */
  left: 170px;
  font-family: "Press Start 2P", monospace;
  color: #ffd700;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.5s ease-in;
}
.medieval-frame {
  position: relative;
  border: 16px solid transparent;
  /* on utilise border-image pour charger une texture */
  border-image: url("images/stone-frame.png") 30 round;
  /* stone-frame.png : une image 9-slice d’un cadre en pierre/fer */
  max-width: 1200px;
  margin: 0 auto;
}
.medieval-frame::after {
  content: "";
  position: absolute;
  top: -16px;
  bottom: -16px;
  left: -16px;
  right: -16px;
  pointer-events: none;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0);
  animation: frameGlow 1.5s ease-out forwards;
}

.knight-name {
  padding: 0.5rem 2rem;
  background: linear-gradient(135deg, #222, #444);
  border: 4px solid #00ccff;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-family: "Press Start 2P", monospace;
  color: #ffd700;
  font-size: 1.5rem;
  text-shadow: 0 0 6px #000;
}
.guardian-card-container {
  position: relative;
  min-height: 280px;
}
.guardian-card {
  position: relative;
  z-index: 2;
  /* ton design existant */
}
.knight-bubble {
  position: absolute;
  top: 6px;
  left: 110px;
  transform: translateY(-100%);
  background: #fff;
  color: #000;
  font-family: "Press Start 2P", monospace;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border: 2px solid #00ccff;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in;
  width: 238px;
}
@media screen and (max-width: 723px) {
.knight-bubble {
position: absolute;
  top: -28px;
  left: 19px;
  transform: translateY(-100%);
  background: #fff;
  color: #000;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  padding: 0.5rem 1rem;
  border: 2px solid #00ccff;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in;
  width: 290px;
  max-height: 66px;
}
}

.avatar-bubble {
  background: #fff;
  color: #000;
  font-family: "Press Start 2P", monospace;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border: 2px solid #00ccff;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in;
  width: 238px;
}

@media (max-width: 723px) {
.avatar-bubble {
  font-size:10px;
  right: -80px !important;
  min-height: 58px;
}
}

.avatar-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 10px;
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: #00ccff transparent transparent transparent;
}

.avatar-bubble.visible {
  opacity: 1;
}

/* flèche sous la bulle */
.knight-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 10px;
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: #00ccff transparent transparent transparent;
}

.knight-bubble.visible {
  opacity: 1;
}
/* animation “parler” pour la carte */
@keyframes talk-card {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
/* animation “répondre” pour l’avatar */
@keyframes talk-avatar {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* classes à basculer en JS */
.animate-card {
  animation: talk-card 1.2s ease-in-out infinite;
}
.animate-avatar {
  animation: talk-avatar 1.2s ease-in-out infinite;
}

/* style optionnel : bulle de parole sur la carte */
#guardian-card.speaking::after {
  content: "…";
  position: absolute;
  top: 10%;
  left: 80%;
  font-size: 2rem;
  color: #00ccff;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
#avatar-normal {
  opacity: 1;
}
#avatar-drink {
  opacity: 0;
  width: 107px;
  height: 129px;
  display: block;
  margin: 0px auto;
  position: absolute;
  top: -21px;
  right: -2px;
}

/* quand on veut montrer #avatar-drink */
.show-drink #avatar-drink {
  opacity: 1;
}
@media screen and (max-width: 723px) {
  #avatar-drink {
    opacity: 0;
    width: 83px;
    height: auto;
    display: block;
    margin: 0px auto;
    position: absolute;
    top: -10px;
    right: -23px;
  }
}

.show-drink #avatar-normal {
  opacity: 0;
}

/* === Footer général === */
.site-footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 2rem 1rem;
  font-size: 0.9rem;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* Navigation interne */
.footer-nav a {
  color: var(--white);
  margin-right: 1.5rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav a:hover {
  color: var(--primary-light);
}

/* Icônes sociales */
.footer-social a {
  display: inline-block;
  margin-right: 0.75rem;
  transition: transform 0.3s;
}
.footer-social a img {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.7));
}
.footer-social a:hover {
  transform: scale(1.2);
}

/* Section copyright */
.footer-copy {
  flex: 1 1 100%;
  text-align: center;
  margin-top: 1rem;
  opacity: 0.7;
}

/* ==== Responsivité ==== */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-nav {
    order: 1;
    margin-bottom: 1rem;
  }
  .footer-social {
    order: 2;
    margin-bottom: 1rem;
  }
  .footer-copy {
    order: 3;
  }
}

/* Carte du Gardien – style « chevalier » */
.guardian-highlight {
  /* Bleu dégradé pour le fond, dans l’esprit armure et ciel nocturne */
  background: linear-gradient(135deg, #0d3b66, #005b96);
  /* Bordure ciselée façon métal brossé */
  border: 3px solid #1e90ff;
  border-radius: 8px;
  /* Légère ombre bleutée pour le relief */
  box-shadow: 0 0 12px rgba(30, 144, 255, 0.6);
  /* Un peu d’espace interne pour que ça respire */
  padding: 0.5em 1em;
  position: relative;
  overflow: hidden;
}

/* Petit bouclier devant la carte */
.guardian-highlight::before {
  content: "🛡️";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%) scale(1.2);
  /* Faire dépasser légèrement */
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  padding: 0.2em;
}

/* Style de l’avatar : encadrement circulaire façon heaume */
.guardian-highlight .highlight-avatar {
  border: 3px solid #82c0ff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(130, 192, 255, 0.8);
}

/* Texte en bleu clair pour contraster sur fond sombre */
.guardian-highlight span {
  color: #cce7ff;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
/* Podium Top 3 – tailles réduites, mêmes règles que l’original */

.podium-panel {
  padding: 0.8rem;
  max-width: 480px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 10px;
}

/* Disposition des 3 slots */
#top3-podium {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
}

/* Styles communs */
.podium-slot {
  position: relative;
  width: 88px;
  border-radius: 6px;
  padding-top: 1.6rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  background: #333;
  color: #fff;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: popIn 0.5s ease-out both;
}
.podium-slot:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Apparition « pop » */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Animations distinctes pour chaque place */
.podium-slot.first {
  height: 120px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  z-index: 2;
  animation-delay: 0.1s;
  animation-name: popIn, float;
  animation-duration: 0.5s, 3s;
  animation-iteration-count: 1, infinite;
  animation-timing-function: ease-out, ease-in-out;
}
.podium-slot.second {
  height: 102px;
  background: #bbb;
  animation-delay: 0.2s;
}
.podium-slot.third {
  height: 86px;
  background: linear-gradient(135deg, #cd7f32, #e1a44a);
  animation-delay: 0.3s;
}

/* Légère oscillation sur le 1ᵉʳ */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Le badge de rang */
.podium-slot .rank-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  line-height: 1.6rem;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Avatar rond et ombré */
.podium-slot .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  background-size: cover;
  background-position: center;
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.3s ease;
}
.podium-slot:hover .avatar {
  transform: translateX(-50%) scale(1.1);
}

/* Pseudo et victoires */
.podium-slot .pseudo {
  position: absolute;
  bottom: 2rem;
  width: 100%;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
}
.podium-slot .wins {
  position: absolute;
  bottom: 0.6rem;
  width: 100%;
  text-align: center;
  font-size: 0.6rem;
  opacity: 0.8;
}

/* Podium Top 3 – style Carte Pokémon */
.podium-panel {
  background: url("images/pokecard-bg.png") center/cover no-repeat;
  padding: 1rem;
}
#top3-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.2rem;
}

/* Carte de base */
.podium-slot {
  position: relative;
  width: 112px;
  height: 160px;
  background: #fff;
  border: 3px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 24px;
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 0%,
    rgba(240, 240, 240, 1) 100%
  );
}
.podium-slot:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

/* Avatar circulaire */
.podium-slot .avatar {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border: 3px solid #fff;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}
.podium-slot:hover .avatar {
  transform: translateX(-50%) scale(1.1);
}

/* Badge de rang – Pokéball */
.podium-slot .rank-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  background: url("images/pokeball-icon.png") center/contain no-repeat;
  font-size: 0.7rem;
  color: #333;
  text-shadow: none;
  line-height: 26px;
  text-align: center;
  z-index: 2;
}

/* Position et translation pour 1ᵉʳ/2ᵉ/3ᵉ */
.podium-slot.first {
  order: 2;
  transform: translateY(0);
}
.podium-slot.second {
  order: 1;
  transform: translateY(16px);
}
.podium-slot.third {
  order: 3;
  transform: translateY(8px);
}

/* Texte “Nom” et “Level” – police type Pokémon */
.podium-slot .pseudo,
.podium-slot .wins {
  font-family: "Press Start 2P", monospace;
  text-transform: uppercase;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
  color: #333;
  margin-top: auto;
  margin-bottom: 0.25rem;
  text-align: center;
  width: 100%;
  padding: 0 3px;
}
.podium-slot .pseudo {
  font-size: 0.65rem;
}
.podium-slot .wins {
  font-size: 0.55rem;
  opacity: 0.8;
}

/* Animation « pop » à l’apparition */
@keyframes popCard {
  from {
    transform: scale(0.5) translateY(50px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.podium-slot {
  animation: popCard 0.5s ease-out both;
}
/* === Podium Top 3 Style Carte Pokémon – Fix avatar coupé === */
#top3-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
}

/* Carte de base */
.podium-slot {
  position: relative;
  width: 104px;
  height: 144px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  overflow: visible;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(to bottom, #fdfdfd, #f5f5f5);
}
.podium-slot:hover {
  transform: translateY(-5px) scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Avatar circulaire */
.podium-slot .avatar {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 58px;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}
.podium-slot:hover .avatar {
  transform: translateX(-50%) scale(1.1);
}

/* Badge de rang – Pokéball */
.podium-slot .rank-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  background: url("images/pokeball-icon.png") center/contain no-repeat;
  font-size: 0.7rem;
  line-height: 22px;
  text-align: center;
  z-index: 2;
}

/* Ordre et translation pour 1ᵉʳ/2ᵉ/3ᵉ */
.podium-slot.second {
  order: 1;
  transform: translateY(10px);
}
.podium-slot.first {
  order: 2;
  transform: translateY(0);
}
.podium-slot.third {
  order: 3;
  transform: translateY(5px);
}

/* Texte pseudo / level */

.podium-slot .pseudo,
.podium-slot .wins {
  font-family: "Press Start 2P", monospace;
  text-transform: uppercase;
  text-align: center;
  color: #333;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
  margin: 3px 0 2px;
}
.podium-slot .pseudo {
  font-size: 0.6rem;
}
.podium-slot .wins {
  font-size: 0.5rem;
  opacity: 0.8;
}

/* Pop-in animation */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(40px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.podium-slot {
  animation: popIn 0.4s ease-out both;
}
.podium-title {
  font-family: "Press Start 2P", monospace;
  font-size: 1.2rem;
  color: #ffd700;
  text-align: center;
  margin-bottom: 33px;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}
/* Marquee conteneur */
.marquee {
  background: linear-gradient(
      135deg,
      rgba(255, 140, 0, 0.6),
      rgba(229, 46, 113, 0.6)
    )
    center/cover no-repeat;
  padding: 20px 0;
  border-radius: 12px;
  overflow: hidden;
}

/* Piste qui défile */
.marquee-content {
  display: inline-flex;
  gap: 24px;
  align-items: flex-start;
  animation: marquee var(--marquee-duration, 12s) linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  } /* car on duplique le contenu */
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  .marquee-content {
    animation: none !important;
  }
}

/* Skeletons */
.winner-skeleton {
  background: linear-gradient(135deg, #2b2b2b, #1c1c1c);
  border-radius: 12px;
  padding: 16px;
  width: 180px;
}
.winner-skeleton .avatar-skel {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 8px;
  background: #3a3a3a;
}
.winner-skeleton .line-skel {
  height: 10px;
  background: #3a3a3a;
  border-radius: 6px;
  margin: 8px 0;
}
.winner-skeleton .line-skel.big {
  height: 14px;
}

/* Optionnel: variantes de carte (si tu veux typer les prix) */
.winner-card--gold {
  background: linear-gradient(135deg, #ffdf81, #ffb74d);
}
.winner-card--sub {
  background: linear-gradient(135deg, #81d4fa, #29b6f6);
}
.winner-card--ticket {
  background: linear-gradient(135deg, #df3d6e, #b3afa4);
}
/* Skeletons légers pendant le chargement */
.podium-slot.loading .avatar {
  filter: grayscale(1);
  opacity: 0.5;
}
.podium-slot.loading .pseudo,
.podium-slot.loading .wins {
  position: relative;
  color: transparent !important;
}
.podium-slot.loading .pseudo::after,
.podium-slot.loading .wins::after {
  content: "";
  display: block;
  height: 0.7rem;
  border-radius: 4px;
  background: linear-gradient(90deg, #333 0%, #444 50%, #333 100%);
  animation: podiumShimmer 1.2s linear infinite;
}
@keyframes podiumShimmer {
  from {
    background-position: -150% 0;
  }
  to {
    background-position: 150% 0;
  }
}

/* Masquer slot si pas de data */
.podium-slot.is-hidden {
  visibility: hidden;
}

/* Highlight du champion (complète ton style .first) */
.podium-slot.is-champion {
  box-shadow: 0 0 0 3px #ffd700 inset, 0 0 16px #ffd700aa;
}

/* Confetti éphémère (emoji-free, léger) */
.podium-slot {
  position: relative;
}
.confetti {
  position: absolute;
  bottom: 40%;
  width: 6px;
  height: 10px;
  background: currentColor;
  color: #ffd700;
  border-radius: 1px;
  animation: confettiPop 0.9s ease-out forwards;
  transform: translate(-50%, 0) rotate(0deg);
  opacity: 0.9;
}
@keyframes confettiPop {
  0% {
    transform: translate(-50%, 0) rotate(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), var(--dy)) rotate(var(--r));
    opacity: 0;
  }
}

/* Respect des préférences d’animation */
@media (prefers-reduced-motion: reduce) {
  .podium-slot.first {
    animation: none !important;
  }
  .confetti {
    display: none;
  }
}
.leaderboard-wrap {
  margin-top: 0.5rem;
  text-align: center;
}
.lb-toggle {
  background: var(--dark-bg);
  color: var(--white);
  border: 1px solid #ffffff33;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
}
.leaderboard {
  margin: 0.6rem auto 0;
  padding: 0.4rem 0.6rem;
  max-width: 320px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #ffffff22;
  border-radius: 12px;
}
.lb-item {
  display: grid;
  grid-template-columns: 22px 28px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.3rem 0.2rem;
  border-radius: 8px;
}
.lb-item:not(:last-child) {
  border-bottom: 1px dashed #ffffff2a;
}
.lb-rank {
  font-weight: 800;
  opacity: 0.85;
}
.lb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff3;
}
.lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-score {
  font-weight: 700;
  opacity: 0.9;
}
/* Mini leaderboard — ouverture douce */
.leaderboard {
  --lb-h: 0px; /* hauteur calculée en JS */
  max-height: 0; /* fermé */
  opacity: 0;
  transform: translateY(-6px);
  overflow: hidden;
  transition: max-height 340ms cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 220ms ease, transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.leaderboard.is-open {
  max-height: var(--lb-h); /* ouvert → hauteur auto calculée */
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .leaderboard {
    transition: none !important;
  }
}
.typing-caret {
  display: inline-block;
  width: 0.6ch;
  animation: caretBlink 1s steps(1) infinite;
  margin-left: 2px;
}
@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}
.spotlight-wrap {
  display: grid;
  gap: 12px;
}
.spotlight {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: saturate(1.2) blur(2px);
}
.spotlight-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
.spotlight-content h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}
.chip {
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}
.achievements {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.achievement {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
}
.achv-body .muted {
  opacity: 0.75;
}
.achv-card {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.list-compact .lb-item {
  padding: 6px 8px;
}
.spotlight-wrap {
  position: relative;
  min-height: 120px;
}
.spotlight {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  filter: blur(8px);
  transition: opacity 0.55s ease,
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.55s ease;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(3px);
  will-change: opacity, transform, filter;
}
.spotlight.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.spotlight.leaving {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  filter: blur(10px);
}
.spotlight .spotlight-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: sp-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes sp-pop {
  0% {
    transform: scale(0.8) rotate(-3deg);
  }
  60% {
    transform: scale(1.06) rotate(1deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}
.spotlight .chips .chip {
  opacity: 0;
  transform: translateY(6px);
  animation: sp-chip 0.4s ease forwards;
  animation-delay: calc(60ms * var(--i, 0));
}
@keyframes sp-chip {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.spotlight .meta {
  opacity: 0;
  transform: translateY(6px);
  animation: sp-txt 0.4s ease 0.12s forwards;
}
@keyframes sp-txt {
  to {
    opacity: 1;
    transform: none;
  }
}
.spotlight-flare {
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  pointer-events: none;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255, 255, 255, 0.8),
    rgba(112, 68, 255, 0.65),
    rgba(0, 214, 255, 0.65),
    rgba(255, 255, 255, 0.8)
  );
  mask: radial-gradient(circle at 50% 50%, transparent 42%, #000 43%),
    linear-gradient(#000, #000);
  mix-blend-mode: screen;
  opacity: 0;
  animation: sp-flare 0.8s ease-out forwards;
}
@keyframes sp-flare {
  0% {
    opacity: 0.65;
    transform: scale(0.92) rotate(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.2) rotate(160deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spotlight,
  .spotlight * {
    transition: none !important;
    animation: none !important;
    filter: none !important;
  }
}
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.spot-col {
  position: relative;
  min-height: 120px; /* hauteur mini des cartes */
}

/* Responsive: une colonne sous 720px si tu veux */
@media (max-width: 720px) {
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
}
.spotlight-wrap {
  position: relative;
  min-height: 120px;
}
.spotlight {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  filter: blur(8px);
  transition: opacity 0.55s ease,
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.55s ease;
  border-radius: 16px;
  padding: 7px;
  padding-top: 15px;
  padding-bottom: 15px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(3px);
  will-change: opacity, transform, filter;
}
.spotlight.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.spotlight.leaving {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  filter: blur(10px);
}
.spotlight .spotlight-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: sp-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes sp-pop {
  0% {
    transform: scale(0.8) rotate(-3deg);
  }
  60% {
    transform: scale(1.06) rotate(1deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}
.spotlight .chips .chip {
  opacity: 0;
  transform: translateY(6px);
  animation: sp-chip 0.4s ease forwards;
  animation-delay: calc(60ms * var(--i, 0));
}
@keyframes sp-chip {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.spotlight .meta {
  opacity: 0;
  transform: translateY(6px);
  animation: sp-txt 0.4s ease 0.12s forwards;
  font-size: 14px;
}
@keyframes sp-txt {
  to {
    opacity: 1;
    transform: none;
  }
}
.spotlight-flare {
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  pointer-events: none;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255, 255, 255, 0.8),
    rgba(112, 68, 255, 0.65),
    rgba(0, 214, 255, 0.65),
    rgba(255, 255, 255, 0.8)
  );
  mask: radial-gradient(circle at 50% 50%, transparent 42%, #000 43%),
    linear-gradient(#000, #000);
  mix-blend-mode: screen;
  opacity: 0;
  animation: sp-flare 0.8s ease-out forwards;
}
@keyframes sp-flare {
  0% {
    opacity: 0.65;
    transform: scale(0.92) rotate(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.2) rotate(160deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spotlight,
  .spotlight * {
    transition: none !important;
    animation: none !important;
    filter: none !important;
  }
}
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.spot-col {
  position: relative;
  min-height: 134px; /* hauteur mini des cartes */
}

/* Responsive: une colonne sous 720px si tu veux */
@media (max-width: 720px) {
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
}
/* contenu interne du badge-pseudo */
.spotlight-content h3 {
  display: inline-flex; /* aligne nom + badge rank */
  align-items: center;
  gap: 8px;
}

.spotlight-content h3 .spot-name {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* petit badge pour le rank */
.spotlight-content h3 .spot-rank {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

/* ========= CLIPS SECTION (drop-in) ========= */
:root {
  --clip-accent: #9146ff; /* Twitch Purple */
  --clip-bg: #0f0f14;
  --clip-card: #151523;
  --clip-text: #e7e7f0;
  --clip-muted: #9aa0b4;
  --clip-border: rgba(255, 255, 255, 0.08);
  --clip-ring: rgba(145, 70, 255, 0.55);
}

#clips {
  padding: clamp(12px, 2vw, 20px) 0 8px;
  background: radial-gradient(
      1200px 240px at 10% 0%,
      rgba(145, 70, 255, 0.15),
      transparent 60%
    ),
    var(--clip-bg);
}

#clips .section-title {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--clip-text);
}

/* Loader */
#clips-loader {
  display: none; /* toggle en JS */
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 72px;
}
#clips-loader .spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(145, 70, 255, 0.25);
  border-top-color: var(--clip-accent);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Grille responsive */
#clips-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 680px) {
  #clips-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* Carte */
.clip-card {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(
    180deg,
    rgba(21, 21, 35, 0.92),
    rgba(21, 21, 35, 0.76)
  );
  border: 1px solid var(--clip-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease,
    border-color 0.22s ease;
  will-change: transform;
}
.clip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(145, 70, 255, 0.18);
  border-color: rgba(145, 70, 255, 0.35);
}
.clip-card:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px var(--clip-ring);
}

/* Vignette */
.clip-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: #0b0b11;
  overflow: hidden;
}
.clip-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transition: transform 0.32s ease;
}
.clip-card:hover .clip-thumbnail img {
  transform: scale(1.03);
}

/* Légère ombre haute pour la lisibilité du texte */
.clip-thumbnail::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 6%,
    rgba(0, 0, 0, 0.06) 60%
  );
  pointer-events: none;
}

/* Icône Play */
.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 20px;
  opacity: 0.95;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.clip-card:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.06);
  opacity: 1;
  background: rgba(145, 70, 255, 0.45);
}

/* Durée */
.clip-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font: 600 12px/1.6 system-ui, -apple-system, Segoe UI, Roboto;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

/* Contenu */
.clip-content {
  padding: 10px 12px 12px;
  color: var(--clip-text);
}
.clip-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clip-info {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--clip-muted);
}
.clip-info span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* État “pas de clip” */
#clips-list .muted {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--clip-muted);
  padding: 12px 0;
}

/* Motion respect */
@media (prefers-reduced-motion: reduce) {
  .clip-card,
  .clip-thumbnail img,
  .play-icon {
    transition: none;
  }
}
/* ===== CLIPS DOCKED (entre les 2 avatars du guardian) ===== */

/* Assure un contexte d'empilement pour les avatars du gardien */
#guardian {
  position: relative;
  z-index: 1;
}

/* Taille & placement du bloc clips */
#clips.docked {
  --dock-width: min(860px, 92vw); /* largeur max du bloc */
  --dock-offset: -68px; /* combien on remonte dans la zone guardian */
  --dock-radius: 18px;

  position: relative;
  z-index: 2; /* au dessus du fond, sous les têtes si besoin */
  width: var(--dock-width);
  margin: var(--dock-offset) auto 18px; /* centré + remonte */
  padding: 10px 12px 12px;
  border-radius: var(--dock-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 20, 0.55);
  backdrop-filter: blur(8px) saturate(1.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* Titre compact (badge) */
#clips.docked .section-title {
  margin: 0 6px 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #cfd3e6;
  align-items: center;
  gap: 8px;
}

/* Grille compacte (1 rangée sur desktop) */
#clips.docked #clips-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 10px;
}
@media (max-width: 1024px) {
  #clips.docked #clips-list {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}
@media (max-width: 760px) {
  /* sur mobile, on arrête de “remonter”, et on autorise le wrap */
  #clips.docked {
    margin: 10px auto 14px;
    padding: 8px 10px;
  }
  #clips.docked #clips-list {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
  }
}

/* Cartes réduites */
#clips.docked .clip-card {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}
#clips.docked .clip-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(145, 70, 255, 0.18);
  border-color: rgba(145, 70, 255, 0.28);
}

/* Vignette + éléments */
#clips.docked .clip-thumbnail {
  aspect-ratio: 16/9;
}
#clips.docked .play-icon {
  width: 36px;
  height: 36px;
  font-size: 16px;
}
#clips.docked .clip-duration {
  font-size: 11px;
  padding: 2px 7px;
  right: 6px;
  bottom: 6px;
}

/* Texte plus serré */
#clips.docked .clip-content {
  padding: 8px 9px 10px;
}
#clips.docked .clip-title {
  font-size: 13px;
  margin: 0 0 4px;
  -webkit-line-clamp: 1; /* une ligne pour garder la hauteur */
}
#clips.docked .clip-info {
  font-size: 11px;
  gap: 8px;
}

/* Loader dans le petit bloc */
#clips.docked #clips-loader {
  height: 56px;
}

/* Option : léger trait lumineux en haut pour coller au style guardian */
#clips.docked::before {
  content: "";
  position: absolute;
  inset: 0 8px auto 8px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(145, 70, 255, 0.5),
    transparent
  );
  pointer-events: none;
}
/* ===== CLIPS : CARROUSEL ULTRA-COMPACT ===== */

/* Placement docké au-dessus */
#clips.docked {
  --dock-width: min(800px, 96vw);
  --dock-offset: -64px;
  --dock-radius: 18px;
  position: relative;
  z-index: 2;
  width: var(--dock-width);
  margin: var(--dock-offset) auto 18px;
  padding: 10px 10px 12px;
  border-radius: var(--dock-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 20, 0.55);
  backdrop-filter: blur(8px) saturate(1.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
#clips.docked .section-title {
  margin: 0 6px 8px;
  font-size: 14px;
  font-weight: 800;
  color: #cfd3e6;
  display: flex;
  gap: 8px;
}

/* ---------- Carrousel ---------- */
#clips.carousel {
  --card-w: 170px; /* largeur d'une carte */
  --gap: 8px; /* espace entre cartes */
}
@media (max-width: 760px) {
  #clips.carousel {
    --card-w: 150px;
  }
  #clips.docked {
    margin: 10px auto 14px;
    padding: 8px 10px;
  }
}

/* Piste défilante horizontale */
#clips.carousel #clips-list {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  padding: 2px 34px 8px; /* place pour les flèches */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(
    to right,
    transparent 0,
    rgba(0, 0, 0, 0.9) 22px,
    rgba(0, 0, 0, 0.9) calc(100% - 22px),
    transparent 100%
  );
}
#clips.carousel #clips-list::-webkit-scrollbar {
  display: none;
}
#clips.carousel #clips-list.is-grabbing {
  cursor: grabbing;
}

/* Cartes ULTRA COMPACTES */
#clips.carousel .clip-card {
  flex: 0 0 var(--card-w);
  scroll-snap-align: start;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #0b0b12;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    border-color 0.16s ease;
}
#clips.carousel .clip-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(145, 70, 255, 0.18);
  border-color: rgba(145, 70, 255, 0.28);
}

/* Vignette serrée */
#clips.carousel .clip-thumbnail {
  aspect-ratio: 16/9;
  position: relative;
}
#clips.carousel .clip-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#clips.carousel .play-icon {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(2px);
}
#clips.carousel .clip-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Contenu minimal (1 ligne) */
#clips.carousel .clip-content {
  padding: 6px 7px 7px;
}
#clips.carousel .clip-title {
  font-size: 12px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Flèches ---------- */
#clips .clips-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
  color: #e6e6f0;
  font: 700 16px/1 system-ui;
}
#clips .clips-nav:hover {
  background: rgba(16, 16, 28, 0.9);
  transform: translateY(-50%) scale(1.05);
}
#clips .clips-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
#clips .clips-nav.prev {
  left: 6px;
}
#clips .clips-nav.next {
  right: 6px;
}
/* Petit liseré lumineux */
#clips.docked::before {
  content: "";
  position: absolute;
  inset: 0 8px auto 8px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(145, 70, 255, 0.5),
    transparent
  );
  pointer-events: none;
}
/* === CLIP PEEK — tiroir + pastille === */

/* Tiroir compact qui se “déroule” sous le header */
#clips.tray,
#tiktok.tray {
  position: sticky;
  top: 66px; /* sous ta nav collante */
  z-index: 6;
  width: min(800px, 96vw);
  margin: -8px auto -16px;
  border-radius: 16px;
  background: rgba(12, 12, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px) saturate(1.05);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  overflow: hidden;

  /* fermé par défaut */
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform-origin: top;
  transition: max-height 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.25s ease;
}

@media screen and (max-width: 723px) {
#clips.tray,
#tiktok.tray{
  top: 350px;
}
}

/* ouvert */
#clips.tray.is-open,
#tiktok.tray.is-open {
  max-height: 230px; /* hauteur du tiroir (1 rangée) */
  opacity: 1;
  pointer-events: auto;
}

/* Titre très discret dans le tiroir */
#clips.tray .section-title,
#tiktok.tray .section-title {
  font-size: 12px;
  margin: 6px 8px 6px;
  opacity: 0.8;
}

/* Pastille "Peek" — centrée entre les avatars sur la carte gardien */
#clips-peek,
#tiktok-peek {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font: 700 12px/1 system-ui, "Press Start 2P", monospace;
  color: #fff;
  border-radius: 999px;
  background: rgba(10, 10, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#clips-peek .dot,
#tiktok-peek .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9146ff;
  box-shadow: 0 0 12px #9146ff;
}
#clips-peek .txt,
#tiktok-peek .txt {
  letter-spacing: 0.2px;
}
#clips-peek:hover,
#tiktok-peek:hover {
  transform: translate(-50%, -100%) scale(1.05);
}
#clips-peek[aria-expanded="true"],
#tiktok-peek[aria-expanded="true"] {
  background: rgba(18, 18, 30, 0.95);
}

/* Petit halo de découverte la première fois */
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(145, 70, 255, 0.45);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(145, 70, 255, 0);
  }
}
#clips-peek.is-new .dot,
#tiktok-peek.is-new .dot {
  animation: ping 1.8s ease-out infinite;
}

/* Mobile : tiroir plein large, pastille plus basse */
@media (max-width: 760px) {
  #clips.tray.is-open {
    max-height: 210px;
  }
  #clips-peek,
  #tiktok-peek {
    top: 0;
    transform: translate(-50%, -60%);
  }
}

/* Respect des préférences */
@media (prefers-reduced-motion: reduce) {
  #clips.tray {
    transition: none;
  }
  #clips-peek .dot,
  #tiktok-peek .dot {
    animation: none !important;
  }
}
#clips {
  position: relative;
}

/* 2) Les flèches passent au-dessus de la piste et des cartes */
#clips .clips-nav {
  z-index: 30;
}

/* 3) La piste reste en-dessous des flèches */
#clips.carousel #clips-list {
  position: relative;
  z-index: 1;
}
/* header dédié */
.spotlight {
  padding-top: 37px !important;
}
.spotlight .spot-head {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.spotlight .spot-head .spot-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  font-size: 1rem;
}
.spotlight .spot-head .spot-rank {
  justify-self: end;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.spot-content {
  display: flex;
  flex-direction: column;
}
/* Hôte de la bulle */
.chip-tip-host {
  position: relative;
}

/* La bulle au-dessus (hors flux) */
.chip-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px) scale(0.98);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10;
}

/* Petit triangle */
.chip-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.85);
}

/* Afficher la bulle : hover/focus/clic persistant */
.chip.is-compact:hover .chip-tip,
.chip.is-compact:focus-visible .chip-tip,
.chip.is-compact.is-open .chip-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

/* Petite anim pop quand on fixe au clic */
.chip.is-compact.is-open {
  animation: chip-pop 0.22s ease-out;
}
@keyframes chip-pop {
  0% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}
/* Base */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.chip-text {
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Hôte tooltip (uniquement pour .is-compact) */
.chip-tip-host {
  position: relative;
}
.chip-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px) scale(0.98);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10;
}
.chip-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.85);
}

/* Affichage tooltip sans reflow (uniquement compact) */
.chip.is-compact:hover .chip-tip,
.chip.is-compact:focus-visible .chip-tip,
.chip.is-compact.is-open .chip-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

/* Petit pop quand fixé au clic */
.chip.is-compact.is-open {
  animation: chip-pop 0.22s ease-out;
}
@keyframes chip-pop {
  0% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}
/* ==== SPOTLIGHT V2 – plus punchy ==== */
.spotlight.spot--v2 {
  --sp-bg: rgba(255, 255, 255, 0.05);
  --sp-border: rgba(255, 255, 255, 0.08);
  background: var(--sp-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 0 0 1px var(--sp-border);
}
.spotlight.spot--v2::before {
  /* bordure néon animée */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: conic-gradient(
    from 220deg,
    rgba(255, 255, 255, 0.7),
    rgba(112, 68, 255, 0.8),
    rgba(0, 214, 255, 0.8),
    rgba(255, 255, 255, 0.7)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  opacity: 0.18;
  animation: sp-halo 6s linear infinite;
}
@keyframes sp-halo {
  to {
    transform: rotate(1turn);
  }
}

/* couleur d'accent selon le "tier" (lié au level) */
.spotlight[data-tier="basic"] {
  --sp-accent: #9aa0b4;
  --sp-accent-25: #9aa0b440;
}
.spotlight[data-tier="bronze"] {
  --sp-accent: #cd7f32;
  --sp-accent-25: #cd7f3240;
}
.spotlight[data-tier="silver"] {
  --sp-accent: #c0c0c0;
  --sp-accent-25: #c0c0c040;
}
.spotlight[data-tier="gold"] {
  --sp-accent: #ffd54f;
  --sp-accent-25: #ffd54f40;
}
.spotlight[data-tier="platinum"] {
  --sp-accent: #89f;
  --sp-accent-25: #8899ff40;
}
.spotlight[data-tier="diamond"] {
  --sp-accent: #67e8f9;
  --sp-accent-25: #67e8f940;
}
.spotlight[data-tier="rainbow"] {
  --sp-accent: #ff7ee7;
  --sp-accent-25: #ff7ee740;
}
.spotlight[data-tier="ultra"] {
  --sp-accent: #00bfff;
  --sp-accent-25: #00bfff40;
}

/* avatar avec anneau lumineux selon tier */
.spotlight.spot--v2 .spotlight-avatar {
  border-radius: 16px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 0 0 6px var(--sp-accent-25),
    0 10px 28px var(--sp-accent-25);
  outline: 2px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.spotlight.spot--v2:hover .spotlight-avatar {
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 0 0 8px var(--sp-accent-25),
    0 20px 40px var(--sp-accent-25);
}

/* titre et rang un peu plus lisibles */
.spotlight.spot--v2 .spot-head .spot-name {
  font-weight: 900;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.25);
}
.spotlight.spot--v2 .spot-head .spot-rank {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 12px var(--sp-accent-25);
}

/* effet "shine" discret sur la carte au hover */
.spotlight.spot--v2::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.spotlight.spot--v2:hover::after {
  transform: translateX(120%);
}

/* ==== BADGES (chips) plus expressifs ==== */
.chips {
  gap: 8px;
}
.chip {
  --c: var(--sp-accent, #8aa);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.06)
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.chip .chip-icon {
  font-size: 0.95rem;
  line-height: 1;
}
.chip:hover {
border: 2px solid rgba(1, 12, 43, 0.52);
}

/* Compact = pastille ronde */
.chip.is-compact {
  width: 29px;
  height: 29px;
  padding: 0;
  justify-content: center;
  border-radius: 999px;
}

/* Tooltips (déjà gérés en JS ; on renforce l’état "ouvert") */
.chip.is-compact.is-open .chip-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Couleurs par type (via id) */
.chip-sub {
  background: linear-gradient(180deg, #b388ff33, #9146ff33);
  border-color: #a37bff66;
  box-shadow: 0 0 0 2px #9146ff22 inset, 0 6px 16px #9146ff22;
}
.chip-ticket {
  background: repeating-linear-gradient(
      45deg,
      rgba(255, 215, 0, 0.25) 0 8px,
      rgba(255, 215, 0, 0.08) 8px 16px
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.04)
    );
  border-color: rgba(255, 215, 0, 0.45);
}
.chip-guardian {
  background: linear-gradient(180deg, #00d2ff33, #0066ff33);
  border-color: #5ab8ff77;
  box-shadow: 0 0 0 2px #00b0ff22 inset, 0 6px 16px #00b0ff22;
  position: relative;
}
.chip-guardian::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  box-shadow: 0 0 12px #00b0ff66;
  pointer-events: none;
}
.chip-top1 {
  background: linear-gradient(180deg, #ffe08255, #ffca2855);
  border-color: #ffd54f;
}
.chip-wins3 {
  background: linear-gradient(180deg, #34d39944, #05966933);
  border-color: #10b98177;
}
.chip-uptime100 {
  background: linear-gradient(180deg, #9aa0b444, #6b728033);
  border-color: #9aa0b499;
}

/* Texte de métadonnées un poil plus contrasté */
.spotlight .meta {
  color: #e9eefc;
  opacity: 0.9;
}
/* ===== Achievements – Variables (CSS custom properties) ===== */
.achv-section {
  --achv-bg: rgba(7, 21, 40, 0.6);
  --achv-glow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --txt: #eaf3ff;
  --chip-bg: rgba(255, 255, 255, 0.06);
  --chip-bd: rgba(255, 255, 255, 0.18);
  --primary: #46d3ff;
  --panel-grad: linear-gradient(
    180deg,
    rgba(25, 48, 78, 0.35),
    rgba(25, 48, 78, 0.15)
  );
  --sep-grad: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
  --thumb-a: #1aa0ff;
  --thumb-b: #3fb1ff;
  --avatar: 42px;
  --card-w: 56px;
  --card-h: 88px;
  --list-h: 420px;
}

/* ===== Header / titre ===== */
.achv-section .achv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.spotlight-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

@media (max-width: 800px) {
  .spotlight-header {
    flex-direction: column;
  }
}

@media (max-width: 800px) {
  .achv-section .achv-header {
    flex-direction: column;
  }
}
@media (max-width: 800px) {
  .spot-col {
    min-height: 151px;
  }
}

@media (max-width: 800px) {
  #clips-peek-bar {
    position: absolute;
    top: 89%;
    transform: translate(-50%, -60%);
    display: flex;
    gap: 8px;
    z-index: 20;
    flex-direction: column;
    margin-top: 20px;
  }
}

.achv-section .achv-header .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.achv-section .badge-new {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font: 700 10px/1.6 system-ui;
  letter-spacing: 0.12em;
  color: #0ff;
  background: linear-gradient(90deg, #093, #0aa);
  border: 1px solid rgba(0, 255, 255, 0.35);
  box-shadow: inset 0 0 12px rgba(0, 255, 255, 0.2);
}
.achv-section .achv-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* ===== Chips (filtres) ===== */
.achv-section .achv-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.achv-section .chip {
  border: 1px solid var(--chip-bd);
  background: var(--chip-bg);
  backdrop-filter: blur(4px);
  color: #e8f1ff;
  padding: 6px 10px;
  border-radius: 999px;
  font: 600 12px/1 system-ui;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}
.achv-section .chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}
.achv-section .chip.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(70, 211, 255, 0.25);
  background: rgba(70, 211, 255, 0.1);
}

/* ===== Search ===== */
.achv-section .filter-input {
  min-width: 280px;
  max-width: 360px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--chip-bd);
  background: var(--chip-bg);
  color: var(--txt);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.achv-section .filter-input::placeholder {
  color: rgba(234, 243, 255, 0.6);
}

/* ===== Liste + scrollbar ===== */
.achv-section .achievements {
  position: relative;
  list-style: none;
  margin: 8px 0 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel-grad);
  border-radius: 12px;
  box-shadow: var(--achv-glow);
  max-height: var(--list-h);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.achv-section .achievements {
  scrollbar-color: var(--thumb-a) rgba(255, 255, 255, 0.05);
}
.achv-section .achievements::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
.achv-section .achievements::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--thumb-a), var(--thumb-b));
  border-radius: 10px;
  border: 2px solid rgba(8, 18, 32, 0.8);
}
.achv-section .achievements::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

/* ===== Séparateurs de jour (sticky) ===== */
.achv-section .achievements .achv-separator {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 12px;
  margin: 10px -4px 4px;
  border-radius: 8px;
  background: var(--sep-grad);
  color: #cfe8ff;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

/* ===== Items ===== */
.achv-section .achievement {
  display: grid;
  grid-template-columns: var(--avatar) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--achv-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background 0.15s ease,
    border-color 0.15s ease;
}
.achv-section .achievement:hover {
  transform: translateY(-1px);
  background: rgba(10, 28, 55, 0.7);
  border-color: rgba(70, 211, 255, 0.28);
}
.achv-section .achievement.muted {
  opacity: 0.7;
  text-align: center;
  padding: 18px;
}

/* Avatar */
.achv-section .achievement .lb-avatar {
  width: var(--avatar);
  height: var(--avatar);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25),
    0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Texte */
.achv-section .achievement .achv-body {
  color: var(--txt);
  line-height: 1.35;
}
.achv-section .achievement .achv-body strong {
  font-weight: 800;
}
.achv-section .achievement .achv-body em {
  font-style: italic;
  color: #71d3ff;
}
.achv-section .achievement .achv-body .muted {
  opacity: 0.75;
  margin-left: 0.25rem;
}
.achv-section .achievement .achv-body time {
  opacity: 0.85;
  font-size: 0.92em;
}

/* Carte à droite */
.achv-section .achievement .achv-card {
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  filter: saturate(1.05) brightness(1.02);
}
.achv-section .achievement .achv-card.achv-card--secure::after {
  opacity: 0.1;
}

/* Sentinelle (infinite) */
.achv-section .achievements .achv-sentinel {
  height: 8px;
  opacity: 0;
}
/* Barre centrée qui aligne les boutons sans chevauchement */
#clips-peek-bar {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -60%); /* monte la barre au-dessus de la carte */
  display: flex;
  gap: 8px;
  z-index: 20;
}

/* Les boutons redeviennent "statics" dans la barre (plus d'absolu) */
#clips-peek,
#tiktok-peek {
  position: static !important;
  transform: none !important;
}

/* Petit confort au survol (on remplace le vieux hover qui translatait) */
#clips-peek:hover,
#tiktok-peek:hover {
  transform: translateY(-1px) scale(1.03);
}
#tiktok.docked::before {
  content: "";
  position: absolute;
  inset: 0 8px auto 8px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(145, 70, 255, 0.5),
    transparent
  );
  pointer-events: none;
}
/* ========== TIKTOK — mêmes règles que CLIPS, ratio 9:16 ========== */

/* Base + titre */
#tiktok {
  padding: clamp(12px, 2vw, 20px) 0 8px;
  background: radial-gradient(
      1200px 240px at 10% 0%,
      rgba(145, 70, 255, 0.15),
      transparent 60%
    ),
    var(--clip-bg);
}
#tiktok .section-title {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--clip-text);
}

/* Loader */
#tiktok-loader {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 72px;
}
#tiktok-loader .spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(145, 70, 255, 0.25);
  border-top-color: var(--clip-accent);
  animation: spin 1s linear infinite;
}

/* Grille (fallback si pas en mode .carousel) */
#tiktok-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 680px) {
  #tiktok-list {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Cartes : on réutilise .clip-card existant, mais on force le ratio TikTok */
#tiktok .clip-thumbnail {
  aspect-ratio: 9 / 16;
}
#tiktok .play-icon {
  width: 48px;
  height: 48px;
} /* lisible sur format vertical */

/* Si ton builder génère <video> / <iframe> / blockquote TikTok, on les contraint */
#tiktok-list .clip-thumbnail iframe,
#tiktok-list .clip-thumbnail video,
#tiktok-list .clip-thumbnail blockquote {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border: 0;
  object-fit: cover;
}

/* ---- Carrousel horizontal, miroir de #clips.carousel ---- */
#tiktok.carousel {
  --card-w: 140px;
  --gap: 8px;
}
@media (max-width: 760px) {
  #tiktok.carousel {
    --card-w: 130px;
  }
}

#tiktok.carousel #tiktok-list {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  padding: 2px 34px 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(
    to right,
    transparent 0,
    rgba(0, 0, 0, 0.9) 22px,
    rgba(0, 0, 0, 0.9) calc(100% - 22px),
    transparent 100%
  );
}
#tiktok.carousel #tiktok-list::-webkit-scrollbar {
  display: none;
}

#tiktok.carousel .clip-card {
  flex: 0 0 var(--card-w);
  scroll-snap-align: start;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #0b0b12;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Flèches de nav pour la section TikTok */
#tiktok {
  position: relative;
}
#tiktok .clips-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
  color: #e6e6f0;
  font: 700 16px/1 system-ui;
  z-index: 30;
}
#tiktok .clips-nav:hover {
  background: rgba(16, 16, 28, 0.9);
  transform: translateY(-50%) scale(1.05);
}
#tiktok .clips-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
#tiktok .clips-nav.prev {
  left: 6px;
}
#tiktok .clips-nav.next {
  right: 6px;
}

/* Tiroir ouvert : plus haut pour le ratio 9:16 */
#tiktok.tray.is-open {
  max-height: 330px;
}
@media (max-width: 760px) {
  #tiktok.tray.is-open {
    max-height: 300px;
  }
}

/* Petit liseré lumineux (cohérence avec clips) */
#tiktok.docked::before {
  content: "";
  position: absolute;
  inset: 0 8px auto 8px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(145, 70, 255, 0.5),
    transparent
  );
  pointer-events: none;
}
/* ====== TIKTOK — modes compacts ====== */

/* COMPACT : cartes plus petites, texte sur 1 ligne, gaps réduits */
#tiktok.compact {
  --tt-card-w: 120px; /* largeur carte en carousel */
  --tt-gap: 6px; /* espace entre cartes */
}

/* Grille (quand pas en .carousel) */
#tiktok.compact:not(.carousel) #tiktok-list {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--tt-gap);
}

/* Carousel */
#tiktok.compact.carousel #tiktok-list {
  gap: var(--tt-gap);
  padding: 2px 30px 6px;
}
#tiktok.compact.carousel .clip-card {
  flex: 0 0 var(--tt-card-w);
}

/* Carte + contenu */
#tiktok.compact .clip-card {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
#tiktok.compact .clip-content {
  padding: 6px 6px 7px;
}
#tiktok.compact .clip-title {
  font-size: 11px;
  margin: 0;
  -webkit-line-clamp: 1;
}
#tiktok.compact .clip-info {
  display: none;
} /* on cache la 2e ligne */
#tiktok.compact .section-title {
  font-size: 12px;
  margin: 0 6px 6px;
}

/* Thumbnail + overlays */
#tiktok.compact .clip-thumbnail {
  aspect-ratio: 9/16;
}
#tiktok.compact .play-icon {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
#tiktok.compact .clip-duration {
  right: 4px;
  bottom: 4px;
  padding: 1px 5px;
  font-size: 10px;
}

/* Tiroir plus petit pour le 9:16 compact */
#tiktok.compact.tray.is-open {
  max-height: 260px;
}

/* MICRO : vignettes seules (aucun texte), ultra condensé */
#tiktok.micro {
  --tt-card-w: 100px;
  --tt-gap: 6px;
}

#tiktok.micro:not(.carousel) #tiktok-list {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: var(--tt-gap);
}

#tiktok.micro.carousel #tiktok-list {
  gap: var(--tt-gap);
  padding: 2px 26px 6px;
}
#tiktok.micro.carousel .clip-card {
  flex: 0 0 var(--tt-card-w);
}

#tiktok.micro .clip-card {
  border-radius: 10px;
}
#tiktok.micro .clip-content {
  display: none;
} /* on enlève le texte */
#tiktok.micro .clip-thumbnail {
  aspect-ratio: 9/16;
}
#tiktok.micro .clip-duration {
  right: 4px;
  bottom: 4px;
  padding: 1px 5px;
  font-size: 10px;
}

/* Tiroir micro encore plus court */
#tiktok.micro.tray.is-open {
  max-height: 220px;
}
.clip-modal.tiktok {
  width: min(420px, 92vw);
  height: min(92vh, 800px);
  aspect-ratio: 9/16;
}
/* 1) Ne plus “fixer” le dégradé du body (bug mobile) */
body {
  background: linear-gradient(to bottom, #0d7ea1, #041526, #274660);
}

/* 2) Les étoiles restent un calque fixe, indépendant du scroll */
body::before {
  position: fixed; /* au lieu de absolute */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0); /* force compositing GPU */
  z-index: 0;
}

/* 3) Désactiver le parallax & les animations lourdes sur mobile */
@media (max-width: 900px) {
  html {
    scroll-behavior: auto;
  } /* évite des micro-sauts */
  body.parallax {
    transition: none;
    background-position: center top !important;
  }
  body::before {
    animation: none;
  } /* stoppe starMove sur mobile */
  header {
    backdrop-filter: none;
    background: rgba(0, 0, 30, 0.9);
  } /* blur = cher sur mobile */
}

/* 4) Spécifique iOS Safari : éviter le repaint des “fixed” */
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll;
  } /* garde scrollable côté iOS */
  body::before {
    position: fixed;
  }
}

/* 5) (Optionnel) Stabilise le header sticky au scroll */
header {
  transform: translateZ(0);
  will-change: transform;
}
html,
body {
  touch-action: auto; /* au lieu de pan-y */
  /* garde tes autres props si tu veux */
  /* overscroll-behavior-y: contain; <-- OK si nécessaire */
}

/* 2) Pistes qui scrollent HORIZONTALEMENT */
#clips-list,
#tiktok-list,
.marquee-content {
  touch-action: pan-x pinch-zoom; /* autorise le pinch dans ces zones */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* 3) Listes qui scrollent VERTICALLEMENT */
#vods-list,
.highlight-list {
  touch-action: pan-y pinch-zoom; /* idem, mais vertical */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
/* Rend les drag horizontaux plus “propres” */
#clips.carousel #clips-list,
#tiktok.carousel #tiktok-list {
  scroll-snap-type: x mandatory;
  scroll-behavior: auto; /* pas de smooth dans la piste */
}
/* Le “canvas” vu pendant l’overscroll n'est plus blanc */
html {
  background: #42a5f5; /* prends la couleur du bas de ton dégradé */
  height: 100%;
  overscroll-behavior-y: none; /* bloque la propagation de l’overscroll (Chrome/Android) */
}

/* robustesse viewport modernes */
@supports (height: 100svh) {
  body {
    min-height: 100svh;
  }
}

/* Couleur de secours du canvas si jamais on voyait derrière */
html {
  background: #0d47a1;
} /* prends la couleur du bas de ton dégradé */
/* coupe le rebond chaîne-viewport */
html,
body {
  overscroll-behavior-y: none;
}

/* sur mobile, stoppe les animations 3D/longues pendant la rafale de scroll */
@media (pointer: coarse) {
  .card-3d.rotate,
  .marquee,
  .spotlight,
  .clip-overlay,
  .clip-modal {
    animation-play-state: paused !important;
  }
  /* évite les fixed/backgrounds "lourds" en scroll */
  body.parallax {
    background-attachment: scroll;
  }
  .card-face {
    backface-visibility: hidden;
    transform-style: preserve-3d;
  }
}
/* ===== Sub Streaks — Top 3 highlights ===== */
#sub-streaks {
  --gold-1: #f6d365;
  --gold-2: #fda085;
  --silver-1: #cfd8dc;
  --silver-2: #eceff1;
  --bronze-1: #d1913c;
  --bronze-2: #ffd194;
  --txt-dark: #1a1a1a;
}
#sub-streaks .lb-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#sub-streaks .lb-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
#sub-streaks .lb-item .lb-avatar {
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#sub-streaks .lb-item .lb-rank {
  text-align: center;
  border-radius: 8px;
  font-weight: 800;
  color: #fff;
}

/* ---------- 1er ---------- */
#sub-streaks .lb-item:nth-child(1) {
  box-shadow: 0 12px 26px rgba(253, 160, 133, 0.16),
    inset 0 0 0 1px rgba(253, 160, 133, 0.55);
  background: linear-gradient(
    180deg,
    rgba(253, 160, 133, 0.12),
    rgba(246, 211, 101, 0.08)
  );
}
#sub-streaks .lb-item:nth-child(1)::before {
  content: "👑";
  position: absolute;
  top: -2px;
  font-size: 26px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
#sub-streaks .lb-item:nth-child(1)::after {
  /* glow pulsant doux autour de la carte */
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: conic-gradient(
    from 0deg,
    var(--gold-1),
    var(--gold-2),
    var(--gold-1)
  );
  opacity: 0.18;
  animation: streakSpin 6s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 2px;
  pointer-events: none;
}
#sub-streaks .lb-item:nth-child(1) .lb-rank {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: var(--txt-dark);
  visibility: collapse;
}
#sub-streaks .lb-item:nth-child(1) .lb-avatar {
  box-shadow: 0 0 0 2px var(--gold-1), 0 0 18px rgba(246, 211, 101, 0.45);
  transform: scale(1.06);
}
#sub-streaks .lb-item:nth-child(1) .lb-name {
  background: linear-gradient(92deg, #fff, #fffbe6, #ffe9b3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(246, 211, 101, 0.35);
}

/* badge “Top 1” */
#sub-streaks .lb-item:nth-child(1) .lb-score::after {
  content: "  •  Top 1";
  font-weight: 700;
  color: #ffd76a;
}

/* ---------- 2e ---------- */
#sub-streaks .lb-item:nth-child(2) {
  box-shadow: 0 10px 22px rgba(207, 216, 220, 0.12),
    inset 0 0 0 1px rgba(207, 216, 220, 0.45);
  background: linear-gradient(
    180deg,
    rgba(236, 239, 241, 0.1),
    rgba(207, 216, 220, 0.06)
  );
}
#sub-streaks .lb-item:nth-child(2)::before {
  content: "🥈";
  position: absolute;
  top: -2px;
  font-size: 26px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
#sub-streaks .lb-item:nth-child(2) .lb-rank {
  background: linear-gradient(135deg, var(--silver-1), var(--silver-2));
  color: #111;
  visibility: hidden;
}
#sub-streaks .lb-item:nth-child(2) .lb-avatar {
  box-shadow: 0 0 0 2px var(--silver-1), 0 0 14px rgba(207, 216, 220, 0.35);
  transform: scale(1.04);
}
#sub-streaks .lb-item:nth-child(2) .lb-score::after {
  content: "  •  Top 2";
  color: #d9e2e6;
  font-weight: 700;
}

/* ---------- 3e ---------- */
#sub-streaks .lb-item:nth-child(3) {
  box-shadow: 0 10px 20px rgba(209, 145, 60, 0.12),
    inset 0 0 0 1px rgba(209, 145, 60, 0.45);
  background: linear-gradient(
    180deg,
    rgba(255, 209, 148, 0.1),
    rgba(209, 145, 60, 0.06)
  );
}
#sub-streaks .lb-item:nth-child(3)::before {
  content: "🥉";
  position: absolute;
  top: -2px;
  font-size: 26px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
#sub-streaks .lb-item:nth-child(3) .lb-rank {
  background: linear-gradient(135deg, var(--bronze-1), var(--bronze-2));
  color: #2a1a00;
  visibility: hidden;
}
#sub-streaks .lb-item:nth-child(3) .lb-avatar {
  box-shadow: 0 0 0 2px var(--bronze-1), 0 0 12px rgba(209, 145, 60, 0.35);
  transform: scale(1.03);
}
#sub-streaks .lb-item:nth-child(3) .lb-score::after {
  content: "  •  Top 3";
  color: #ffcf8d;
  font-weight: 700;
}

/* Shimmer doux du 1er sur le texte du pseudo */
#sub-streaks .lb-item:nth-child(1) .lb-name {
  background-size: 200% 100%;
  animation: nameShimmer 3.6s ease-in-out infinite;
}

/* Accessibilité : si l’utilisateur préfère moins d’animations */
@media (prefers-reduced-motion: reduce) {
  #sub-streaks .lb-item:nth-child(1)::after,
  #sub-streaks .lb-item:nth-child(1) .lb-name {
    animation: none;
  }
}

/* Keyframes */
@keyframes streakSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes nameShimmer {
  0% {
    background-position: 0% 0;
  }
  50% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0% 0;
  }
}
.spotlight-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
#spotlight-empty {
  opacity: 0.8;
  text-align: center;
  margin-top: 0.5rem;
}
.spotlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.spotlight-grid.is-single {
  grid-template-columns: 1fr;
}
.spotlight-grid.is-single .spot-col.left {
  grid-column: 1 / -1;
}
.spotlight-grid.is-single .spot-col.right {
  display: none;
}
#go-collection {
  position: relative;
}
.notification-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font: 700 12px/18px system-ui;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.winners-empty {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 12px;
}
/* Section Winners : variantes "no-marquee" et "is-empty" */
#winners {
  position: relative;
}

/* Quand on ne veut pas la grosse bande dégradée */
#winners.no-marquee .marquee {
  background: transparent;
  padding: 0;
  border-radius: 0;
  overflow: visible;
}
#winners.no-marquee .marquee-content {
  animation: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Quand c'est vide ➜ on masque totalement la piste */
#winners.is-empty .marquee {
  display: none;
}

/* Carte d’état vide, sous le titre */
#winners-empty {
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: rgba(12, 12, 20, 0.55);
}
#winners-empty p {
  margin: 0;
  line-height: 1.4;
}

/* Bouton "Voir tous" en haut-droite du bloc Winners */
#winners #winners-exit-focus.btn-ghost {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
}
#winners #winners-exit-focus.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}
.inspector-section {
  --gap: 16px;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  --bg: rgba(18, 18, 20, 0.55);
  --border: 1px solid rgba(255, 255, 255, 0.12);
}
.inspector-section {
  position: relative;
  margin: 0px 0;
  padding: 0;
  padding-top: 0px;
  padding-top: 28px;
  text-align: center;
}
.inspector-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.inspector-header .section-title {
  margin: 0;
}
.inspector-wrap {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 360px 1fr;
  align-items: start;
}
.inspector-card {
  background: var(--bg);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.inspector-left {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.inspector-identity {
  padding: 18px;
}
.inspector-identity .avatar {
  width: 124px;
  height: 124px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.inspector-identity .name {
  font: 700 22px/1.2 system-ui;
  margin-top: 10px;
}
.inspector-identity .rank {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font: 600 12px/1 system-ui;
  opacity: 0.9;
}
.inspector-quick {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.inspector-quick .chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  font: 600 12px;
  cursor: pointer;
}
.inspector-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px;
}
.stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 12px;
}
.stat .label {
  opacity: 0.8;
  font: 600 12px/1 system-ui;
}
.stat .value {
  font: 800 20px/1.2 system-ui;
  margin-top: 6px;
}
.inspector-badges .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font: 600 12px;
}
.inspector-badges .chip .emoji {
  font-size: 16px;
}
/* Bouton pleine largeur, aligné */
.inspector-badges {
  display: block;
}
/* une “ligne” par catégorie : [label] [chips … …] */
.inspector-badges .badge-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}
.inspector-badges .row-label {
  opacity: 0.85;
  font: 600 12px/1 system-ui;
  white-space: nowrap;
}
.inspector-badges .row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* chips */
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font: 600 12px;
}
.badge-chip .emoji {
  font-size: 16px;
}
.inspector-right {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.panel {
  padding: 16px;
}
.panel h3 {
  margin: 0 0 8px;
  font: 700 16px/1.2 system-ui;
}
.games {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 10px;
  align-items: center;
}
.bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0.08)
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}
.bar > span {
  position: absolute;
  inset: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.75);
}
.muted {
  opacity: 0.8;
}
.cards-strip {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 4px;
}
.cards-strip .achv-card {
  width: 64px;
  height: 96px;
  border-radius: 10px;
}
.inspector-controls {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.inspector-controls input {
  min-width: 260px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.inspector-controls .btn {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  font: 600 13px;
  cursor: pointer;
}
.raw {
  max-height: 260px;
  overflow: auto;
  background: #0e0f12;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
}
@media (max-width: 980px) {
  .inspector-wrap {
    grid-template-columns: 1fr;
  }
}
.inspector-badges .badges-toggle {
  margin: 10px 0 0;
}
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font: 600 12px;
}
.badge-chip .emoji {
  font-size: 16px;
}
.badge-chip.locked {
  opacity: 0.55;
  border-style: dashed;
  filter: grayscale(0.25);
}
.badge-chip.locked .emoji::after {
  content: "❓";
  margin-left: 4px;
  opacity: 0.9;
}
.badge-chip {
  position: relative;
}
.badge-chip .label {
  white-space: nowrap;
}
.inspector-badges .btn {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  font: 600 12px system-ui;
  cursor: pointer;
}
.inspector-badges .btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.inspector-header {
  gap: 12px;
  margin-bottom: 16px;
}
.panel h3 {
  margin: 0 0 10px;
}
/* --- Compact/layout guards --- */
.inspector-section {
  max-width: 100%;
  overflow: hidden;
}
.inspector-wrap {
  /* 240px + 1fr, se compacte sans dépasser */
  grid-template-columns: minmax(200px, 363px) minmax(0, 1fr);
  gap: 12px;
}
/* Evite les débordements grid/flex */
.inspector-left,
.inspector-right,
.inspector-card,
.panel,
.v {
  min-width: 0;
}
.v {
  word-break: break-word;
}

/* Coupe tout ce qui déborde verticalement */
.panel {
  padding: 12px;
}
#panel-games .games {
  max-height: 180px;
  overflow: auto;
}

/* Réduction des éléments */
.inspector-section {
  --gap: 12px;
  --radius: 14px;
  padding: 10px;
}
.inspector-identity {
  padding: 14px;
}
.inspector-identity .avatar {
  width: 88px;
  height: 88px;
  border-radius: 16px;
}
.inspector-identity .name {
  font-size: 18px;
}
.inspector-identity .rank {
  font-size: 11px;
  padding: 3px 8px;
}
.inspector-quick .chip {
  padding: 5px 8px;
  font-size: 11px;
}
.inspector-stats {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px;
}
.stat {
  padding: 10px;
  border-radius: 10px;
}
.stat .label {
  font-size: 11px;
}
.stat .value {
  font-size: 16px;
}

.game-row {
  grid-template-columns: minmax(90px, 120px) 1fr auto;
  gap: 8px;
}
.bar {
  height: 8px;
}

/* Mini cartes strip */
.cards-strip .achv-card {
  width: 48px;
  height: 72px;
  border-radius: 8px;
}

/* Masque les contrôles + RAW pour alléger */
.inspector-controls {
  display: none !important;
}
#panel-raw {
  display: none !important;
}

/* Mobile */
@media (max-width: 980px) {
  .inspector-wrap {
    grid-template-columns: 1fr;
  }
  #panel-games .games {
    max-height: 220px;
  }
}

/* (Option) si votre page est en grille 2 colonnes .main-grid :
     force l’inspector à rester dans la colonne de gauche. 
     Dé-commentez si nécessaire.
  */
/* .main-grid > .inspector-section{ grid-column: 1 / 2; } */
#panel-games {
  --games-max-h: 220px;
}
#panel-games .games {
  display: grid;
  gap: 0.5rem;
  max-height: var(--games-max-h);
  overflow: hidden;
  position: relative;
}
#panel-games .games.is-expanded {
  max-height: none;
}
#panel-games .games.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
#panel-games .games-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0.25rem 0 0.5rem;
  font: 500 12px/1.2 system-ui;
  opacity: 0.8;
  justify-content: center;
}
#panel-games .games-meta .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 0.35rem;
}
#panel-games .game-row {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 1.2fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}
#panel-games .game-row:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}
#panel-games .game-row .label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font: 600 13px/1.2 system-ui;
}
#panel-games .game-row .label .swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--c, #8aa);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12) inset;
}
#panel-games .game-row .label .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#panel-games .game-row .bar {
  height: 10px;
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
#panel-games .game-row .bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--c) 88%, white 0%),
    var(--c)
  );
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#panel-games .game-row .count {
  font: 600 12px/1 system-ui;
  opacity: 0.9;
  white-space: nowrap;
}
#panel-games .games-toggle {
  display: flex;
  justify-content: center;
  margin: 18px 0 0;
}
#panel-games .games-toggle button {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: 600 12px/1 system-ui;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
#panel-games .games-toggle button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}
/* ===== Jeux préférés : ouverture/fermeture fluide ===== */
#panel-games {
  --games-collapsed: 500px;
  --games-expanded: 2000px;
}

#panel-games .games {
  overflow: hidden; /* nécessaire pour le max-height */
  max-height: var(--games-collapsed);
  opacity: 0.98;
  transition: max-height 0.35s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.25s ease;
  will-change: max-height, opacity;
}

#panel-games .games.is-expanded {
  max-height: var(--games-expanded);
  opacity: 1;
}

/* Optionnel : petite apparition des lignes à chaque rendu */
#panel-games .game-row {
  opacity: 0;
  transform: translateY(6px);
  animation: game-row-in 0.32s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}
@keyframes game-row-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Respect de l’accessibilité */
@media (prefers-reduced-motion: reduce) {
  #panel-games .games {
    transition: none !important;
  }
  #panel-games .game-row {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
/* =============  PANEL BADGES  ============= */
#user-inspector .inspector-badges.fullwidth-badges .panel {
  position: relative;
  padding: 14px 14px 10px;
  border-radius: 18px;
  background: radial-gradient(
      1200px 400px at 0% 0%,
      rgba(88, 148, 255, 0.08),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.03)
    );
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
#user-inspector #panel-badges h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 2px 0 10px;
  font: 800 16px/1.2 system-ui;
  letter-spacing: 0.2px;
}
#user-inspector #panel-badges h3::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 0.6rem;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.28),
    transparent 40%
  );
  opacity: 0.6;
}
#user-inspector #panel-badges .badge-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font: 600 12px/1.2 system-ui;
  opacity: 0.8;
}
#user-inspector #panel-badges .badge-summary .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #59ffb1;
  box-shadow: 0 0 14px #59ffb1aa;
}

/* =============  LIGNES (earned | goals)  ============= */
#user-inspector .badge-row {
  display: grid;
  grid-template-columns: 110px 1fr minmax(210px, 0.9fr);
  align-items: start;
  gap: 0.5rem 0.8rem;
  padding: 0.35rem 0.2rem;
  border-radius: 12px;
  --row-delay: calc(var(--row, 0) * 120ms);
}
#user-inspector .badge-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
#user-inspector .badge-row .row-label {
  padding: 0 9px;
  font: 700 11px/1.2 system-ui;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  text-align: left;
}
#user-inspector .badge-row .row-chips,
#user-inspector .badge-row .row-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-content: center;
}
#user-inspector .badge-row .row-goals {
  justify-content: flex-end;
  position: relative;
}

/* =============  CHIPS  ============= */
#user-inspector .chip {
  --bg: rgba(255, 255, 255, 0.08);
  --bd: rgba(255, 255, 255, 0.22);
  position: relative;
  display: inline-flex;
  align-items: center;

  gap: 1px;
  padding: 5px 6px;
  border-radius: 999px;
  font: 800 12px/1.05 system-ui;
  letter-spacing: 0.2px;
  color: #fff;
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16),
      rgba(255, 255, 255, 0.06)
    ),
    var(--bg);
  border: 1px solid var(--bd);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: translateZ(0);
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 0.22s;
  animation: chip-pop 0.36s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  animation-delay: calc(var(--row-delay) + var(--i, 0) * 60ms);
}
#user-inspector .chip .chip-icon {
  font-size: 16px;
  line-height: 1;
  transform: translateY(-1.5px);
}
#user-inspector .chip .chip-text {
  white-space: nowrap;
}

/* Hover micro-interaction */
#user-inspector .chip:hover {
  transform: translateY(-1px) scale(1.015);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
#user-inspector .chip:active {
  transform: translateY(0) scale(0.98);
}

/* Earned mise en évidence */
#user-inspector .chip.is-earned {
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.25),
      rgba(255, 255, 255, 0.07)
    ),
    var(--bg);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 0 22px rgba(255, 217, 94, 0.22);
}

/* Thèmes doux par famille */
#user-inspector .chip[data-variant="rank"].is-earned {
  --bg: rgba(255, 217, 94, 0.16);
}
#user-inspector .chip[data-variant="sub"].is-earned {
  --bg: rgba(147, 112, 219, 0.16);
}
#user-inspector .chip[data-variant="uptime"].is-earned {
  --bg: rgba(100, 220, 255, 0.16);
}
#user-inspector .chip[data-variant="wins"].is-earned {
  --bg: rgba(255, 128, 88, 0.16);
}

/* Goals : lock + blur + shimmer */
#user-inspector .chip.is-goal {
  border-style: dashed;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.05);
}
#user-inspector .chip.is-goal::before {
  content: "🔒";
  position: absolute;
  left: -8px;
  top: -8px;
  font-size: 13px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  opacity: 0.8;
}
#user-inspector .chip.is-goal.is-blurred .chip-icon,
#user-inspector .chip.is-goal.is-blurred .chip-text {
  filter: blur(4px);
}
#user-inspector .chip.is-goal.is-blurred::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    transparent 0 45%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 55%
  );
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: shine 2.2s linear infinite;
}

/* Accessibilité : réduit les animations */
@media (prefers-reduced-motion: reduce) {
  #user-inspector .chip {
    animation: none;
    transition: none;
  }
  #user-inspector .chip.is-goal.is-blurred::after {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 860px) {
  #user-inspector .badge-row {
    grid-template-columns: 98px 1fr;
  }
  #user-inspector .badge-row .row-goals {
    grid-column: 2;
    justify-content: flex-start;
    margin-top: 0.25rem;
  }
}

/* Keyframes */
@keyframes chip-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes shine {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}
/* --- Layout de l’inspector (2 colonnes) --- */
.inspector-section .inspector-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* --- Badges = pleine largeur, tout en bas --- */
.inspector-section .inspector-badges.fullwidth-badges {
  grid-column: 1 / -1 !important; /* span les 2 colonnes */
  width: 100%;
}

/* Optionnel, pour éviter un “shrink” de la carte interne */
.inspector-section .inspector-badges.fullwidth-badges .panel {
  width: 100%;
}

/* Responsive : une seule colonne sur petit écran */
@media (max-width: 860px) {
  .inspector-section .inspector-wrap {
    grid-template-columns: 1fr;
  }
  .inspector-section .inspector-badges.fullwidth-badges {
    grid-column: 1;
  }
}
/* Clip l'animation de brillance **dans** la pilule */
.chip {
  position: relative;
  overflow: hidden; /* ← empêche le débordement */
  border-radius: 999px; /* pour bien clipper */
  isolation: isolate; /* évite les mélanges avec l’arrière-plan */
}

/* Si tu as un effet shine via ::before/::after, il restera bien contenu */
.chip::before,
.chip::after {
  pointer-events: none;
}

/* Pas de brillance sur les objectifs floutés */
.chip.is-goal::before,
.chip.is-goal::after {
  display: none !important;
}
/* Disposition des lignes: libellé / badges gagnés / flèche / objectifs */
#panel-badges .badge-row {
  display: grid;
  grid-template-columns: 94px 1fr 15px 1fr; /* label | earned | arrow | goals */
  align-items: center;
  gap: 10px 14px;
}

/* Supprime toute mention "Objectifs" résiduelle éventuelle */
#panel-badges .row-goals::before {
  content: none !important;
}

/* Flèche d'évolution. Pas de texte, juste des chevrons animés. */
#panel-badges .row-arrow {
  height: 18px;
  position: relative;
  opacity: 0.7;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.25));
}
#panel-badges .row-arrow::after {
  content: "›››";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 2px;
  /* animation “coulée” vers la droite */
  animation: arrow-flow 1.2s linear infinite;
}
@keyframes arrow-flow {
  0% {
    transform: translateX(0);
    opacity: 0.25;
  }
  50% {
    transform: translateX(6px);
    opacity: 0.9;
  }
  100% {
    transform: translateX(12px);
    opacity: 0.25;
  }
}

/* Respect des préférences d’accessibilité */
@media (prefers-reduced-motion: reduce) {
  #panel-badges .row-arrow::after {
    animation: none;
    opacity: 0.6;
  }
}

/* Harmonise l'alignement visuel des puces floutées à droite */
#panel-badges .row-goals .chip.is-goal {
  backdrop-filter: blur(2px);
  opacity: 0.75;
}
#panel-badges .badge-row:not(:has(.row-goals > *)) .row-arrow {
  display: none;
}
/* Sinon visible */
#panel-badges .row-arrow {
  visibility: visible !important;
}
/* On cache les tips internes aux boutons (on va utiliser un portail global) */
.chip-tip-host .chip-tip {
  display: none !important;
}

/* ——— Tooltip “chip” style Erwayr ——— */
.chip-tip-pop{
  position:fixed; left:0; top:0;
  transform:translate(-50%,-8px) scale(.98);
  opacity:0;
  /* fond bleu/verre comme tes cards */
  background:
    linear-gradient(180deg, rgba(18,34,52,.92), rgba(18,34,52,.88));
  color:#eaf6ff;
  padding:8px 12px;
  border-radius:12px;

  /* liseré + glow d’accent (reuse var si dispo) */
  --accent: var(--clip-accent, #8bd3ff);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:
    0 10px 28px rgba(0,0,0,.45),
    0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 1px 0 rgba(255,255,255,.08);

  /* lisibilité */
  font: 600 12px/1.2 system-ui, Segoe UI, Roboto, sans-serif;
  letter-spacing:.2px;
  text-shadow:0 1px 1px rgba(0,0,0,.35);
  white-space:nowrap;

  /* effet verre subtil */
  backdrop-filter:saturate(1.05) blur(6px);

  pointer-events:none;
  z-index:999999;

  transition:
    opacity .14s ease,
    transform .18s cubic-bezier(.2,.8,.2,1),
    box-shadow .2s ease;
  will-change:transform,opacity,box-shadow;
}

/* petit caret centré, même “verre” + liseré */
.chip-tip-pop::after{
  content:"";
  position:absolute;
  left:50%; top:100%;
  width:10px; height:10px;
  transform:translateX(-50%) rotate(45deg);
  background:inherit;
  border:inherit;
  border-top:0; border-left:0;
  box-shadow:4px 4px 14px rgba(0,0,0,.35);
  /* évite le double-trait en bas */
  clip-path:polygon(0 0,100% 0,0 100%);
}

.chip-tip-pop.is-visible{
  opacity:1;
  transform:translate(-50%,-12px) scale(1);
}

/* variantes optionnelles (couleurs proches de ton UI) */
.chip-tip-pop.chip--ok{
  --accent:#22d3ee;
  color:#eafffb;
}
.chip-tip-pop.chip--warn{
  --accent:#f59e0b;
  color:#fff7ea;
}
.chip-tip-pop.chip--error{
  --accent:#ef4444;
  color:#ffeeee;
}

/* compact sur mobile + respect accessibilité */
@media (max-width:520px){
  .chip-tip-pop{ font-size:11px; padding:7px 10px; border-radius:10px; }
}
@media (prefers-reduced-motion:reduce){
  .chip-tip-pop{ transition:none; }
}

.chip-tip-pop.show {
  opacity: 1;
  transform: translate(-50%, -12px);
}

/* Ceinture et bretelles : tout overlay décoratif ne doit pas bloquer la souris */
.spotlight-flare {
  pointer-events: none !important;
}
/* === Badges panel layout + arrow === */
#panel-badges {
  --arrow-fg: rgba(255, 255, 255, 0.9);
  --arrow-bg: rgba(255, 255, 255, 0.1);
}
#panel-badges.fullwidth-badges {
  grid-column: 1 / -1;
} /* s'étend sur toute la largeur de l'inspector */
#panel-badges .panel {
  padding: 10px 12px;
}

#panel-badges .badge-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
  font: 600 12px/1.2 system-ui;
  opacity: 0.9;
}
#panel-badges .badge-summary .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--arrow-fg);
  opacity: 0.6;
  display: inline-block;
}

#panel-badges .badge-row {
  display: grid;
  align-items: center;
  gap: 10px 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
#panel-badges .badge-row:last-child {
  border-bottom: 0;
}

#panel-badges .row-label {
  font: 700 12px/1.2 system-ui;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.86);
}
#panel-badges .row-chips,
#panel-badges .row-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}
#panel-badges .row-chips {
  min-width: max-content;
}

/* ——— The arrow ——— */
#panel-badges .row-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

/* Locked/goal look (si tu utilises .is-blurred/.is-locked) */
#panel-badges .chip.is-goal {
  opacity: 0.85;
}
#panel-badges .chip.is-blurred {
  filter: blur(0.2px) saturate(0.9);
  opacity: 0.72;
}

/* Responsive : on garde la flèche, on réduit un peu */
@media (max-width: 700px) {
  #panel-badges .badge-row {
    grid-template-columns: minmax(80px, 120px) 1fr 26px 1fr;
    gap: 8px 10px;
  }
  #panel-badges .row-arrow {
    width: 26px;
    height: 26px;
  }
}
/* — Dernier badge : glow + balayage lumineux — */
#panel-badges .row-chips .chip.is-latest {
  position: relative;
  isolation: isolate; /* assure que les pseudo-éléments restent au-dessus du fond */
  border-radius: 999px;
  outline: 2px solid hsl(48 100% 68% / 0.75); /* doré doux */
  outline-offset: 2px;
  margin-left: 4px;
  box-shadow: 0 0 0 4px hsl(48 100% 50% / 0.08), 0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 18px hsl(48 100% 50% / 0.35);
  transition: box-shadow 0.25s ease, outline-color 0.25s ease,
    transform 0.25s ease;
  animation: latestBreath 2.6s ease-in-out infinite; /* glow respirant */
}

/* Balayage lumineux (surbrillance) */
#panel-badges .row-chips .chip.is-latest::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    transparent 0%,
    hsl(48 100% 85% / 0) 35%,
    hsl(48 100% 85% / 0.55) 50%,
    hsl(48 100% 85% / 0) 65%,
    transparent 100%
  );
  transform: translateX(-140%);
  animation: latestSweep 1.8s cubic-bezier(0.22, 0.68, 0.18, 1) infinite;
  pointer-events: none;
  z-index: -1; /* sous le texte mais au-dessus du fond du chip */
}

/* Petit accent sur le texte */
#panel-badges .row-chips .chip.is-latest .chip-text {
  text-shadow: 0 0 8px hsl(48 100% 70% / 0.6);
}

/* Hover léger */
#panel-badges .row-chips .chip.is-latest:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 6px hsl(48 100% 50% / 0.1), 0 10px 28px rgba(0, 0, 0, 0.4),
    0 0 22px hsl(48 100% 60% / 0.55);
}

/* Animations */
@keyframes latestSweep {
  0% {
    transform: translateX(-140%);
  }
  100% {
    transform: translateX(140%);
  }
}
@keyframes latestBreath {
  0%,
  100% {
    box-shadow: 0 0 0 4px hsl(48 100% 50% / 0.06),
      0 8px 22px rgba(0, 0, 0, 0.32), 0 0 14px hsl(48 100% 50% / 0.25);
  }
  50% {
    box-shadow: 0 0 0 6px hsl(48 100% 50% / 0.1), 0 8px 28px rgba(0, 0, 0, 0.4),
      0 0 24px hsl(48 100% 60% / 0.45);
  }
}

/* Accessibilité & confort */
@media (prefers-reduced-motion: reduce) {
  #panel-badges .row-chips .chip.is-latest {
    animation: none;
  }
  #panel-badges .row-chips .chip.is-latest::before {
    display: none;
  }
}
#panel-badges .row-chips .chip.is-latest:focus-visible {
  outline-width: 3px;
  outline-color: hsl(48 100% 72% / 0.95);
}

/* Si tu avais l’ancien “ping” en ::after, neutralise-le : */
#panel-badges .row-chips .chip.is-latest::after {
  display: none !important;
}
#twcfg {
  --card-bg: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.18);
  --text-dim: rgba(255, 255, 255, 0.75);
}
#twcfg .twcfg-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
#twcfg .btn {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  letter-spacing: 0.2px;
}
#twcfg .btn-primary {
  background: linear-gradient(135deg, #7c5cff, #00e4ff);
  color: #0a0a0a;
}
#twcfg .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ====== Look “abonnés uniquement” ====== */
#twcfg .twcfg-locked {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  #twcfg .twcfg-locked {
    align-items: stretch;
  }
}
#twcfg .locked-hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
/* anneau glow */
#twcfg .locked-hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 180deg, #7c5cff, #00e4ff, #7c5cff);
  filter: blur(12px);
  opacity: 0.18;
  z-index: 0;
}
#twcfg .locked-hero > * {
  position: relative;
  z-index: 1;
}
#twcfg .lock-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: 28px;
  margin-bottom: 12px;
  animation: twpulse 1.8s ease-in-out infinite;
}
#twcfg .locked-hero h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}
#twcfg .locked-hero p {
  margin: 0 0 8px;
  color: var(--text-dim);
}
#twcfg .perk-list {
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
#twcfg .perk-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
}
#twcfg .perk-list li::before {
  content: "✔";
  opacity: 0.9;
}

#twcfg .foot-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

/* Colonne d’aperçus verrouillés */
#twcfg .locked-previews {
  display: grid;
  gap: 14px;
}
#twcfg .preview-card {
  position: relative;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 14px;
  overflow: hidden;
  min-height: 140px;
}
#twcfg .preview-card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border);
}
#twcfg .fake-media {
  height: 100%;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.06) 0 12px,
    transparent 12px 24px
  );
  border: 1px dashed var(--border);
}
#twcfg .fake-media::after {
  content: "🔒 Verrouillé";
  position: absolute;
  inset: auto 0 0 0;
  text-align: center;
  padding: 0.5rem 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65));
  font-weight: 800;
  letter-spacing: 0.3px;
}
#twcfg .fake-media.video {
  aspect-ratio: 16/9;
}
#twcfg .fake-media.audio {
  height: 60px;
}

@keyframes twpulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}
/* === CTA S’abonner — style arcade qui colle au site === */
#twcfg .btn.btn-primary {
  /* palette du site */
  --edge: #0b2b66; /* ombre “rebord” */
  font-family: "Press Start 2P", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;

  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border: 2px solid #ffffff;
  border-radius: 10px;

  /* effet “bloc” + glow */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08) inset, 0 4px 0 var(--edge),
    0 8px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.25s ease;
  will-change: transform, box-shadow, background;
  position: relative;
}

#twcfg .btn.btn-primary::after {
  /* reflet diagonal subtil */
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 8px;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.18),
    transparent 40%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

#twcfg .btn.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #5fb4ff, var(--primary-light));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12) inset, 0 6px 0 var(--edge),
    0 14px 24px rgba(0, 0, 0, 0.5), 0 0 10px var(--primary-light);
}

#twcfg .btn.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12) inset, 0 2px 0 var(--edge),
    0 8px 16px rgba(0, 0, 0, 0.4);
}

#twcfg .btn.btn-primary:focus-visible {
  outline: 2px dashed #ffd700;
  outline-offset: 3px;
}

/* état désactivé si besoin */
#twcfg .btn.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

@media (prefers-reduced-motion: reduce) {
  #twcfg .btn.btn-primary {
    transition: none;
  }
}
