/* Easyjam — Profil artiste (édition & affichage public) */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Édition */
.artist-profile-edit-page .artist-profile-edit__header {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.artist-profile-edit__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.artist-profile-edit__subtitle {
  color: var(--color-text-muted);
  max-width: 640px;
}

.artist-profile-edit__layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  min-width: 0;
  width: 100%;
}

.artist-profile-edit__form {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.profile-summary-card {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
  padding: 28px 24px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.profile-summary-card__avatar--logo,
.profile-header__avatar--logo {
  border-radius: var(--radius-md);
}

.profile-summary-card__avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto 20px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(139, 0, 0, 0.45), rgba(20, 16, 16, 0.95));
  border: 2px solid rgba(212, 175, 55, 0.25);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-secondary);
}

.profile-summary-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.profile-summary-card__meta {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.profile-summary-card__meta li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.profile-progress {
  margin-bottom: 20px;
  text-align: left;
}

.profile-progress__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-progress__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-progress__value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.profile-progress__track {
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
}

.profile-progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-scene-red), var(--color-primary), var(--color-secondary));
  box-shadow: 0 0 16px rgba(230, 57, 70, 0.35);
  transition: width 0.4s ease;
}

.profile-summary-card__preview {
  margin-top: 8px;
}

.artist-profile-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--color-card);
  margin: 0;
  min-width: 0;
  display: flow-root;
}

.form-section__legend {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.form-section__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-section .form-group:last-child {
  margin-bottom: 0;
}

.form-group--genre-chips {
  margin-top: 4px;
}

.genre-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-chip-list__help {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.genre-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
  user-select: none;
}

.genre-chip:hover {
  border-color: rgba(212, 175, 55, 0.45);
  transform: translateY(-1px);
}

.genre-chip__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.genre-chip__text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.genre-chip:has(.genre-chip__input:focus-visible) {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.genre-chip:has(.genre-chip__input:checked) {
  background: var(--color-scene-red);
  border-color: var(--color-secondary);
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.35);
}

.genre-chip:has(.genre-chip__input:checked) .genre-chip__text {
  color: #fff;
}

.artist-profile-form__actions {
  display: flex;
  justify-content: flex-end;
}

.flash-alert {
  margin-bottom: 24px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
}

.flash-alert--success {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.35);
  color: #9be7b5;
}

.flash-alert--error {
  background: rgba(230, 57, 70, 0.12);
  border: 1px solid rgba(230, 57, 70, 0.35);
  color: #f5a5ad;
}

.image-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.image-upload {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.image-upload__field {
  margin-top: auto;
}

.image-upload__preview {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.03);
}

.image-upload__preview--square {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-upload__preview--logo {
  border-radius: var(--radius-md);
}

.image-upload__preview--banner {
  width: 100%;
  aspect-ratio: 16 / 6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-upload__preview--placeholder {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.75)),
    radial-gradient(circle at center, rgba(255, 90, 0, 0.20) 0%, rgba(139, 0, 0, 0.20) 50%, #0A0A0A 100%);
}

.image-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-upload__preview--banner img {
  object-fit: contain;
}

.image-upload__placeholder {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-secondary);
}

.image-upload__placeholder--banner {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.image-upload__hint {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.form-group__input--file {
  padding: 10px 0;
}

.profile-summary-card__avatar--image {
  padding: 0;
  overflow: hidden;
}

.profile-summary-card__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-banner--image {
  background-color: var(--color-bg);
  background-image: var(--profile-banner-image);
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
}

/* Affichage public */
.profile-banner {
  position: relative;
  height: 400px;
  margin-top: var(--header-height);
  overflow: hidden;
}

.profile-banner--placeholder {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.75)),
    radial-gradient(circle at center, rgba(255, 90, 0, 0.30) 0%, rgba(139, 0, 0, 0.25) 35%, rgba(75, 0, 0, 0.60) 70%, #0A0A0A 100%),
    url('/images/hero/concert.jpg') center / cover no-repeat;
}

.profile-banner__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0A0A0A 0%, rgba(75, 0, 0, 0.2) 40%, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
}

.profile-section {
  margin-bottom: 48px;
}

.profile-section__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-links__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: all var(--transition);
}

.profile-links__item:hover {
  border-color: rgba(230, 57, 70, 0.45);
  background: rgba(139, 0, 0, 0.12);
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  .artist-profile-edit__layout {
    grid-template-columns: 1fr;
  }

  .profile-summary-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .image-upload-grid {
    grid-template-columns: 1fr;
  }

  .profile-banner {
    height: 260px;
  }

  .artist-profile-form__actions .btn {
    width: 100%;
  }
}

/* Affichage public — page profil artiste */
.artist-profile-show-page {
  background: var(--color-bg);
}

.artist-profile-show {
  padding-bottom: 64px;
}

.artist-profile-show__content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 24px;
}

.artist-profile-hero {
  position: relative;
}

.artist-profile-hero__body {
  position: relative;
  margin-top: -80px;
  z-index: 10;
  padding-bottom: 48px;
}

.artist-profile-hero__profile {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.artist-profile-hero__avatar-wrap {
  flex-shrink: 0;
}

.artist-profile-hero__avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  background: var(--color-card);
}

.artist-profile-hero__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-secondary);
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.18), rgba(212, 175, 55, 0.14));
}

.artist-profile-hero__avatar--logo {
  border-radius: var(--radius-md);
  object-fit: contain;
  background: var(--color-card);
  padding: 8px;
}

.artist-profile-hero__info {
  flex: 1;
  min-width: min(100%, 280px);
  padding-bottom: 8px;
}

.artist-profile-hero__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.artist-profile-hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.artist-profile-hero__badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.artist-profile-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.artist-profile-hero__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.artist-profile-hero__summary .artist-profile-hero__genres {
  margin-bottom: 0;
}

.artist-profile-hero__practices,
.artist-profile-hero__location {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.artist-profile-hero__practices {
  color: var(--color-text);
  font-weight: 500;
}

.artist-profile-hero__follow-stats {
  display: flex;
  align-items: center;
}

.artist-profile-hero__follow-stats .follow-stats {
  gap: 16px 24px;
}

.artist-profile-hero__follow-stats .follow-stats__item {
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  min-width: auto;
}

.artist-profile-hero__follow-stats .follow-stats__value {
  font-family: var(--font-body, inherit);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--color-text);
}

.artist-profile-hero__follow-stats .follow-stats__label {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.artist-profile-hero__sep {
  opacity: 0.6;
}

.artist-profile-hero__genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.profile-hero-social .artist-profile-hero__actions {
  margin-bottom: 0;
}

.artist-profile-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.artist-profile-hero__actions .follow-action__guest-hint {
  width: 100%;
}

.artist-profile-hero__actions .btn.artist-profile-hero__action,
.artist-profile-hero__actions .follow-btn.artist-profile-hero__action {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  padding-block: 0;
  padding-inline: 22px;
  line-height: 1;
  border: 2px solid transparent;
}

.artist-profile-hero__actions .follow-btn.btn--primary {
  border-color: transparent;
}

.artist-profile-hero__actions .follow-btn.btn--secondary,
.artist-profile-hero__actions .follow-btn.follow-btn--active {
  border-color: rgba(212, 175, 55, 0.45);
}

.artist-profile-hero__actions .btn.btn--secondary.artist-profile-hero__action:not(.follow-btn) {
  border-color: rgba(139, 0, 0, 0.6);
}

.artist-profile-hero__action-form {
  margin: 0;
}

.artist-profile-hero__action[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.artist-profile-hero__favorite-btn {
  min-height: 44px;
}

.artist-profile-section {
  padding: 28px;
  background: var(--color-card);
  border: var(--dashboard-surface-border, 1px solid var(--color-border));
  border-radius: var(--dashboard-surface-radius, var(--radius-lg));
  box-shadow: var(--dashboard-surface-shadow, 0 8px 22px rgba(0, 0, 0, 0.2));
}

.artist-profile-section__header {
  margin-bottom: 20px;
}

.artist-profile-section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.artist-profile-section__subtitle {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.artist-profile-section--pinned {
  border-color: rgba(212, 175, 55, 0.28);
}

.artist-profile-section--placeholder {
  opacity: 0.92;
}

.artist-profile-section--videos .profile-section.profile-videos {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.artist-profile-section--videos .profile-section__title {
  display: none;
}

/* —— Galerie photos (Activities) —— */
.profile-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-gallery__item {
  margin: 0;
}

.profile-gallery__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-gallery__thumb:hover,
.profile-gallery__thumb:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.profile-gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.profile-gallery-lightbox-open {
  overflow: hidden;
}

.profile-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.profile-gallery-lightbox[hidden] {
  display: none !important;
}

.profile-gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  border: 0;
  cursor: pointer;
}

.profile-gallery-lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(100%, 960px);
  max-height: calc(100vh - 48px);
}

.profile-gallery-lightbox__close {
  position: absolute;
  top: -8px;
  right: -4px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.85);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.profile-gallery-lightbox__close:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.profile-gallery-lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-gallery-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.profile-gallery-lightbox__actions {
  margin: 0;
}

.profile-gallery-lightbox__link {
  color: #fff;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-gallery-lightbox__link:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .profile-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .profile-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .profile-gallery-lightbox__close {
    top: 0;
    right: 0;
  }
}

.artist-profile-about__bio {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text);
}

.artist-profile-about__bio p {
  margin: 0;
}

.artist-profile-about__links {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.artist-profile-about__links-title {
  margin: 0 0 12px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
}

.artist-profile-announcements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.artist-profile-empty,
.artist-profile-placeholder {
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.08);
}

.artist-profile-empty__text,
.artist-profile-placeholder__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .artist-profile-hero__body {
    margin-top: -56px;
    padding-bottom: 32px;
  }

  .artist-profile-hero__profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .artist-profile-hero__avatar,
  .artist-profile-hero__avatar--placeholder {
    width: 96px;
    height: 96px;
  }

  .artist-profile-hero__actions {
    width: 100%;
  }

  .artist-profile-hero__action,
  .artist-profile-hero__favorite-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .artist-profile-show__content {
    gap: 24px;
    padding-top: 24px;
  }

  .artist-profile-section {
    padding: 20px 16px;
  }
}
