/* Header profil public — template zic-profile.jsx / zic-profile-mobile.jsx */

.zh-pph {
  --zh-pph-bg: #0b0419;
  --zh-pph-bg-mobile: rgba(11, 4, 25, 0.88);
  --zh-pph-border: rgba(168, 85, 247, 0.18);
  --zh-pph-border-strong: rgba(168, 85, 247, 0.4);
  --zh-pph-text: #fafafb;
  --zh-pph-text-muted: rgba(250, 250, 251, 0.62);
  --zh-pph-orange: #f97316;
  --zh-pph-purple: #a855f7;
  --zh-pph-purple-dk: #7b3ff2;
  --zh-pph-red: #ef4444;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  flex-shrink: 0;
  background: var(--zh-pph-bg);
  border-bottom: 1px solid var(--zh-pph-border);
}

.zh-pph-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  min-height: 52px;
}

.zh-pph-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.zh-pph-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}

.zh-pph-artist {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--zh-pph-border);
}

.zh-pph-artist-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--zh-pph-purple), var(--zh-pph-purple-dk));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
  overflow: hidden;
}

.zh-pph-artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.zh-pph-artist-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--zh-pph-text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zh-pph-artist-domain {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--zh-pph-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.zh-pph-spacer {
  flex: 1;
  min-width: 8px;
}

.zh-pph-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.zh-pph-follow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--zh-pph-text);
  border: none;
  color: var(--zh-pph-bg);
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.zh-pph-follow:hover {
  filter: brightness(1.05);
}

.zh-pph-follow.is-following {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--zh-pph-text);
}

.zh-pph-follow-icon {
  font-weight: 700;
  line-height: 1;
}

.zh-pph-lang {
  position: relative;
}

.zh-pph-lang-btn {
  list-style: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--zh-pph-text);
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  user-select: none;
}

.zh-pph-lang-btn::-webkit-details-marker {
  display: none;
}

.zh-pph-lang[open] .zh-pph-lang-btn {
  background: rgba(255, 255, 255, 0.1);
}

.zh-pph-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  background: rgba(20, 9, 36, 0.96);
  border: 1px solid var(--zh-pph-border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  padding: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.zh-pph-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--zh-pph-text);
}

.zh-pph-lang-option:hover,
.zh-pph-lang-option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.zh-pph-lang-option.is-active {
  background: rgba(168, 85, 247, 0.18);
  color: var(--zh-pph-purple);
  font-weight: 700;
}

.zh-pph-account {
  position: relative;
  flex-shrink: 0;
}

.zh-pph-account-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, var(--zh-pph-orange));
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.zh-pph-account-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.zh-pph-account-btn--guest {
  font-size: 15px;
}

.zh-pph-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  width: 220px;
  background: rgba(20, 9, 36, 0.96);
  border: 1px solid var(--zh-pph-border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  padding: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.zh-pph-account-menu[hidden] {
  display: none;
}

.zh-pph-account-menu-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--zh-pph-border);
  margin-bottom: 4px;
}

.zh-pph-account-menu-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--zh-pph-text);
  letter-spacing: -0.02em;
}

.zh-pph-account-menu-handle {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  color: var(--zh-pph-text-muted);
  margin-top: 2px;
}

.zh-pph-account-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--zh-pph-text);
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
}

.zh-pph-account-item:hover,
.zh-pph-account-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.zh-pph-account-item--danger {
  color: var(--zh-pph-red);
}

.zh-pph-account-item--danger .zh-pph-account-item-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--zh-pph-red);
}

.zh-pph-account-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.18);
  color: var(--zh-pph-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.zh-pph-account-item-body {
  flex: 1;
  min-width: 0;
}

.zh-pph-account-item-label {
  display: block;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.2;
}

.zh-pph-account-item-sub {
  display: block;
  font-size: 10px;
  color: var(--zh-pph-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Mobile / tablette étroite ─────────────────────────────────── */

@media (max-width: 768px) {
  .zh-pph {
    background: var(--zh-pph-bg-mobile);
  }

  .zh-pph-inner {
    padding: 12px 16px;
    gap: 10px;
    min-height: 48px;
  }

  .zh-pph-logo-img {
    height: 24px;
  }

  .zh-pph-artist {
    display: none;
  }

  .zh-pph-follow {
    padding: 7px 12px;
    font-size: 11.5px;
  }

  .zh-pph-lang-btn {
    padding: 7px 10px;
    font-size: 11.5px;
  }

  .zh-pph-account-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .zh-pph-inner {
    padding: 10px 12px;
    gap: 8px;
  }

  .zh-pph-actions {
    gap: 8px;
  }

  .zh-pph-follow {
    padding: 7px 10px;
  }
}

/* ─── Toasts follow (header profil public) ─────────────────────────── */

.zh-pph-toasts {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}

.zh-pph-toast {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: 999px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fafafb;
  background: rgba(11, 4, 25, 0.94);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: zh-pph-toast-in 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.zh-pph-toast.is-success {
  border-color: rgba(34, 197, 94, 0.45);
}

.zh-pph-toast.is-error {
  border-color: rgba(239, 68, 68, 0.5);
}

.zh-pph-toast.is-leaving {
  animation: zh-pph-toast-out 180ms ease forwards;
}

@keyframes zh-pph-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes zh-pph-toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

.zh-pph-follow.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

@media (max-width: 768px) {
  .zh-pph-toasts {
    top: 64px;
  }
}
