/* ========================================
   CATEGORIES - Custom Styles
   ======================================== */

.categories-hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  font-size: 40vw;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

.hero-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--primary);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero-main-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 900;
  text-transform: uppercase;
  font-style: italic;
  line-height: 0.85;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Ajustement de la liste pour ne pas être collée */
#categories-container {
  padding-bottom: 100px;
}

.categories-search {
  background: transparent;
}

.categories-search-icon {
  z-index: 2;
}


.categories-scroll-progress {
  position: fixed;
  z-index: 10001;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .cat-track.can-drag {
    cursor: grab;
  }

  .cat-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
  }

  .cat-track.is-dragging,
  .cat-track.is-dragging * {
    user-select: none;
  }
}

.cat-track:not(.can-drag) {
  justify-content: center;
}

.cat-heading-row .cat-num {
  font-weight: 500;
  transform: translate(8px, -6px);
}

.cat-section .nominee-info {
  height: auto;
}

.cat-section .nominee-name-label {
  line-height: 1.1;
  text-wrap: balance;
}

.cat-section .nominee-sub-label {
  max-width: 100%;
  margin-inline: auto;
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.cat-section .nominee-sub-label:empty {
  display: none;
}

#categories-container > .cat-section {
  position: relative;
  background:
    var(--category-light-trail, none),
    radial-gradient(
      ellipse 460px 300px at var(--category-light-x, 50%) var(--category-light-y, 42%),
      rgba(255, 51, 0, var(--category-light-strength, 0)),
      transparent 76%
    ),
    radial-gradient(ellipse at 50% 42%, rgba(255, 51, 0, 0.025), transparent 68%),
    radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, 0.018), transparent 72%);
}

.cat-scroll .cat-viewport {
  margin: 0;
}

.cat-scroll {
  position: relative;
}

#categories-container > .cat-section::before,
#categories-container > .cat-section::after {
  content: '';
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: clamp(40px, 5vw, 72px);
  opacity: 0;
  pointer-events: none;
  filter: blur(18px);
  transition: opacity 750ms var(--sika-motion-ease, cubic-bezier(0.4, 0, 0.2, 1));
  transition-delay: 80ms;
  will-change: opacity;
}

#categories-container > .cat-section::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 51, 0, 0.95), rgba(255, 51, 0, 0.42) 48%, transparent);
  box-shadow: 0 0 18px 6px rgba(255, 51, 0, 0.62), 0 0 46px 16px rgba(255, 51, 0, 0.38);
}

#categories-container > .cat-section::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 51, 0, 0.95), rgba(255, 51, 0, 0.42) 48%, transparent);
  box-shadow: 0 0 18px 6px rgba(255, 51, 0, 0.62), 0 0 46px 16px rgba(255, 51, 0, 0.38);
}

#categories-container > .cat-section:has(> .cat-scroll.edge-glow-start)::before,
#categories-container > .cat-section:has(> .cat-scroll.edge-glow-end)::after {
  opacity: var(--edge-glow-strength, 0);
  transition-delay: 0ms;
}

.cat-scroll .cat-arrow {
  display: none;
}

.footer-partners {
  padding: 10px 0 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-partners > .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

.footer-partners-marquee {
  position: relative;
  width: 100%;
  height: 52px;
  margin: 0 auto;
  overflow: hidden;
}

.footer-partners-marquee::before,
.footer-partners-marquee::after {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: clamp(72px, 12vw, 150px);
  content: '';
  pointer-events: none;
}

.footer-partners-marquee::before {
  left: 0;
  background: linear-gradient(to right, #050505 0%, rgba(5, 5, 5, 0.94) 24%, rgba(5, 5, 5, 0.68) 52%, rgba(5, 5, 5, 0.28) 78%, transparent 100%);
}

.footer-partners-marquee::after {
  right: 0;
  background: linear-gradient(to left, #050505 0%, rgba(5, 5, 5, 0.94) 24%, rgba(5, 5, 5, 0.68) 52%, rgba(5, 5, 5, 0.28) 78%, transparent 100%);
}

.footer-partners-track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
  animation: footer-partners-scroll 36s linear infinite;
}

.footer-partners-grid {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
  width: max-content;
  height: 42px;
  margin: 0;
  padding-right: 18px;
}

.footer-partners-grid img {
  flex: 0 0 56px;
  width: 56px;
  max-width: 100%;
  height: 32px;
  max-height: 32px;
  object-fit: contain;
  filter: grayscale(100%);
  transform: scale(1);
  transform-origin: center;
  transition: filter 0.3s ease, transform 0.3s ease;
}

@keyframes footer-partners-scroll {
  to {
    transform: translateX(-50%);
  }
}

@media (hover: hover) and (pointer: fine) {
  .footer-partners-grid img:hover {
    position: relative;
    z-index: 2;
    filter: grayscale(0%) saturate(1.2) brightness(1.1);
    transform: scale(1.3);
  }
}

@media (max-width: 768px) {
  .cat-section .cat-collapse {
    position: absolute;
    top: 8px;
    left: 8px;
    margin: 0;
    border: 0;
  }

  .cat-collapse::after {
    position: absolute;
    inset: -8px;
    content: '';
  }

  .cat-heading-row .cat-num {
    transform: none;
  }

  .cat-section .nominee-info {
    min-width: 0;
    line-height: 1.2;
  }

  .cat-section .nominee-project-label,
  .cat-section .nominee-name-label,
  .cat-section .nominee-sub-label {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .cat-section .nominee-project-label {
    line-height: 1.2;
    letter-spacing: 0.04em;
  }

  .footer-partners-marquee {
    height: 46px;
  }

  .footer-partners-grid {
    gap: 14px;
    padding-right: 14px;
  }

  .footer-partners-grid img {
    flex-basis: 48px;
    width: 48px;
    max-height: 28px;
  }
}

@media (max-width: 480px) {
  .footer-partners-marquee {
    height: 42px;
  }

  .footer-partners-grid {
    gap: 10px;
    padding-right: 10px;
  }

  .footer-partners-grid img {
    flex-basis: 40px;
    width: 40px;
    max-height: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-partners-marquee {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .footer-partners-track {
    animation: none;
  }
}

.cat-section.cat-voted .cat-header-link,
.cat-section.cat-voted .cat-header-vote-link,
.cat-section.vote-status-pending .cat-header-link,
.cat-section.vote-status-pending .cat-header-vote-link {
  cursor: default;
  pointer-events: none;
}

/* Pas de « VOTER » affiché puis remplacé : le bouton apparaît avec son état final. */
#categories-container:not(.vote-window-known) .cat-header-vote-link,
.cat-section.vote-status-pending .cat-header-vote-link {
  visibility: hidden;
}

.cat-section.cat-vote-unavailable .cat-header-vote-link {
  cursor: default;
  pointer-events: none;
  color: var(--text-muted) !important;
}

.cat-section.cat-voted .cat-num,
.cat-section.cat-voted .cat-header-link .cat-title,
.cat-section.cat-voted .cat-header-vote-link,
.cat-section.cat-voted .cat-partner-logo {
  color: var(--text-muted) !important;
}

.cat-section.cat-voted .cat-partner-logo {
  filter: grayscale(100%);
  opacity: 0.65;
}

.cat-section:not(.cat-voted) .cat-header-link .cat-title:hover {
  color: var(--primary);
}

.cat-header-vote-link.vote-arrow-nudge .icon-arrow svg {
  animation: vote-arrow-nudge 520ms var(--sika-motion-ease, cubic-bezier(0.4, 0, 0.2, 1)) both;
}

@keyframes vote-arrow-nudge {
  45% {
    transform: translateX(5px);
  }
}

.cat-heading-row-partner {
  align-items: center;
}

/* Titre + logo partenaire sur la même ligne, juste après « BY » (retour à la ligne si trop long). */
.cat-title-partner {
  display: flex;
  min-width: 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
  line-height: 1.15;
}

.cat-title-copy {
  display: block;
}

.cat-partner-logo {
  display: block;
  height: 0.80em;
  width: auto;
  max-width: 150px;
  margin: 0;
  object-fit: contain;
  object-position: left center;
}

/* Logo Rap Contenders au milieu du titre (catégorie Battle MC).
   Réglage : height = hauteur du logo, en multiple de la taille du titre (1.4em ≈ 31 px). */
.cat-rc-logo {
  display: inline-block;
  height: 1.4em;
  width: auto;
  vertical-align: middle;
  /* Marges gauche / droite. L'image a déjà du vide noir à droite, d'où 0 à droite. */
  margin: 0 0 0 4px;
}

@media (max-width: 768px) {
  .cat-title-partner {
    font-size: 1rem;
  }

  .cat-partner-logo { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cat-header-vote-link.vote-arrow-nudge .icon-arrow svg {
    animation: none;
  }

  #categories-container > .cat-section::before,
  #categories-container > .cat-section::after {
    transition: none;
  }
}
