/* ========================================
   CREATORS - Creator profiles & carousel
   Creator cards, carousel, creator page
   ======================================== */

/* ========== CREATORS SECTION ========== */
.creators-section {
  margin-bottom: 16px;
  /* bleed → shared.css */
}

/* Titre de section avec padding pour rester aligné avec le reste du contenu */
.creators-section > div:first-child {
  padding-left: clamp(20px, 5vw, 50px);
  padding-right: clamp(20px, 5vw, 50px);
}
/* Base carousel → shared.css */
.creators-carousel {
  padding: 12px clamp(20px, 5vw, 50px) 40px clamp(20px, 5vw, 50px);
  scroll-padding: clamp(20px, 5vw, 50px);
  will-change: scroll-position;
}

/* Creators sur Browse home — bandeau aligné packs / playlists */
.browse-creators-section {
  margin-bottom: clamp(40px, 5vw, 52px);
  /* bleed → shared.css — les +20px bas de page sont sur .content.browse-active (240px) */
  padding-bottom: clamp(96px, 16vh, 160px);
}

.browse-creators-section > .browse-hero {
  padding-left: 0;
  padding-right: 0;
}

.browse-creators-carousel.creators-carousel {
  gap: 12px;
  padding: 14px clamp(20px, 5vw, 50px) 28px;
}

.browse-hero .browse-creators-carousel.creators-carousel {
  padding-left: var(--browse-pad-x);
  padding-right: var(--browse-pad-x);
  scroll-padding-inline: var(--browse-pad-x);
}

/* ========== CREATOR CARD — base commune (Browse + page Creators) ========== */
.creator-card {
  --creator-ring-hover: #2d9cf8;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 8px 4px;
  position: relative;
  will-change: transform;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .creator-card {
  --creator-ring-hover: #7dd9ff;
}

.creator-card:hover {
  transform: translateY(-3px);
}

.creator-card-visual {
  position: relative;
  width: fit-content;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Photo — cercle avec ring au hover */
.creator-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.creator-card:hover .creator-photo {
  border-color: var(--creator-ring-hover);
}

.creator-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.creator-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: var(--text-secondary);
}

.creator-placeholder::before {
  content: "";
  width: 40px;
  height: 40px;
  background: currentColor;
  mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21"/><path d="M12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z"/></svg>');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.creator-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.creator-info h4 {
  font-family: 'Satoshi-Regular', 'Satoshi', sans-serif;
  font-size: 14px;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.25;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.creator-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ========== BROWSE CAROUSEL — taille fixe + pas d’étirement (aligné au début) ========== */
.browse-creators-carousel .creator-card {
  flex: 0 0 auto;
  min-width: 108px;
  max-width: 118px;
  padding: 0 4px 4px;
}

.browse-creators-carousel .creator-photo {
  width: clamp(84px, 14vw, 96px);
  height: clamp(84px, 14vw, 96px);
}

.browse-creators-carousel .creator-info h4 {
  font-size: 13px;
}

.browse-creators-carousel .creator-info p {
  font-size: 11px;
}

.browse-creators-carousel .creator-card-follow-btn {
  margin-top: 2px;
  min-height: 0;
  padding: 0;
  font-size: 11px;
}

/* ========== PAGE CREATORS — grille compacte, alignée à gauche (évite colonnes 1fr trop larges) ========== */
.creators-grid .creator-card {
  flex: 0 0 auto;
  width: 118px;
  min-width: 108px;
  max-width: 118px;
}

.creators-grid .creator-photo {
  width: clamp(80px, 12vw, 120px);
  height: clamp(80px, 12vw, 120px);
}

.creators-grid .creator-info h4 {
  font-size: 15px;
}

.creators-grid .creator-info p {
  font-size: 13px;
}

/* Follow — texte lié au bloc info (pas de capsule) */
.creator-card-follow-btn {
  position: static;
  align-self: center;
  width: auto;
  max-width: 100%;
  margin-top: 4px;
  box-sizing: border-box;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text-muted, rgba(40, 40, 40, 0.5));
  font-family: 'Satoshi-Regular', 'Satoshi', sans-serif;
  font-size: 13px;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease, opacity 0.15s ease;
}

.creator-card-follow-btn:hover {
  color: var(--text-primary, #282828);
  text-decoration-color: currentColor;
}

.creator-card-follow-btn:active {
  opacity: 0.8;
}

.creator-card-follow-btn.active {
  background: transparent;
  color: var(--text-primary, #282828);
  font-weight: 500;
  text-decoration: none;
}

.creator-card-follow-btn.active:hover {
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.creator-card-follow-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: none;
}

[data-theme="dark"] .creator-card-follow-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, rgba(255, 255, 255, 0.42));
}

[data-theme="dark"] .creator-card-follow-btn:hover {
  color: var(--text-primary, #e8e8e8);
  text-decoration-color: currentColor;
}

[data-theme="dark"] .creator-card-follow-btn.active {
  background: transparent;
  color: var(--text-primary, #f0f0f0);
}

[data-theme="dark"] .creator-card-follow-btn.active:hover {
  text-decoration-color: currentColor;
}

.creator-photo-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid #f0f0f0;
  flex-shrink: 0;
  transition: border-color 0.3s ease;
}

/* Dark mode pour creator photo large border */
[data-theme="dark"] .creator-photo-large {
  border-color: var(--border-color-dark);
}

.creator-photo-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.creator-placeholder-large {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: var(--text-secondary);
}

.creator-placeholder-large::before {
  content: "";
  width: 56px;
  height: 56px;
  background: currentColor;
  mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21"/><path d="M12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z"/></svg>');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

/* .creator-view → shared.css */

.creator-view .packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* Creator sub-section row (label + action button) */
.creator-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.creator-subview-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--creator-subview-link, #282828);
  padding: 4px 0;
  transition: color 0.15s;
  white-space: nowrap;
}

.creator-subview-btn:hover {
  color: var(--text-primary);
}

/* Creator sub-sections — même bleed que .packs-section (Recent) pour ombres / coussin latéral */
.creator-view .creator-sub-section {
  margin-left: calc(-1 * clamp(20px, 5vw, 50px));
  margin-right: calc(-1 * clamp(20px, 5vw, 50px));
  overflow: visible;
  margin-bottom: 8px;
}

.creator-sub-section .browse-section-header {
  padding-left: clamp(20px, 5vw, 50px);
  padding-right: clamp(20px, 5vw, 50px);
  margin-bottom: 0;
  align-items: baseline;
  justify-content: space-between;
}

/* Titre de section : plus petit que le hero Browse mais plus imposant que library-block__title */
.creator-sub-section .browse-hero-title {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  padding-left: 0;
  padding-right: 0;
  width: auto;
  pointer-events: none;
}

.creator-sub-section .browse-hero-body {
  margin-top: 10px;
}

/* Carousel : identique .browse-hero .packs-carousel (Browse Recent) — évite de tronquer le box-shadow */
.creator-sub-section #creatorPacksCarousel.packs-carousel {
  padding-left: var(--browse-pad-x);
  padding-right: var(--browse-pad-x);
  scroll-padding-inline: var(--browse-pad-x);
}

/* Dans la section bleedée (creator-sub-section), le wrapper compense le bleed */
.creator-sub-section .charts-browse-list-wrap {
  padding-left: clamp(20px, 5vw, 50px);
  padding-right: clamp(20px, 5vw, 50px);
}

/* Dans les sub-views (pas de bleed), annuler le padding base de packs.css */
#creatorAllLoopsView .charts-browse-list-wrap {
  padding-left: 0;
  padding-right: 0;
}

.creator-subview-pagination {
  margin-top: clamp(20px, 3vw, 32px);
  padding-bottom: 8px;
}

.creators-grid {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
}

/* Quick Access specific styles */
#quick-access-creators .creators-grid {
  margin-top: 24px;
}
