/* ==========================================================================
 * Boutons partages, notifications, auth, profil
 *
 * Partiel de style.css. Charge dans l'ordre numerique par les templates :
 * l'ordre est significatif, ne pas permuter les <link>.
 * ========================================================================== */

/* Boutons partagés, notifications, authentification, profil */

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.btn-nav {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border-soft);
  color: var(--muted);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--glass-border);
  background: rgba(255, 255, 255, 0.1);
}

.nav-user-label {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-notifications {
  position: relative;
}

.nav-notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border-soft);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-notif-btn:hover,
.nav-notif-btn[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--accent);
}

.nav-notif-badge {
  position: absolute;
  top: -0.3rem;
  right: -0.3rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
}

.nav-notif-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 26rem);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02) 45%),
    var(--glass-bg-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  z-index: 80;
  overflow: hidden;
}

.nav-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.nav-notif-head strong {
  font-size: 0.95rem;
}

.nav-notif-mark {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}

.nav-notif-mark:hover {
  color: var(--accent-hover);
}

.nav-notif-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.nav-notif-empty {
  margin: 0;
  padding: 1.25rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.nav-notif-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: var(--space-3);
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.nav-notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.nav-notif-item.unread {
  background: rgba(232, 195, 154, 0.08);
}

.nav-notif-poster {
  width: 42px;
  height: 62px;
  border-radius: var(--radius-xs);
  background: var(--bg) center/cover no-repeat;
  border: 1px solid var(--border);
}

.nav-notif-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.nav-notif-body strong {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-notif-body span {
  font-size: 0.8rem;
  color: var(--muted);
}

.nav-notif-body small {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.85;
}

.auth-modal-content {
  max-width: 420px;
  padding: 1.75rem;
}

.auth-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.auth-subtitle {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-field input {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-control);
  padding: 0.65rem 0.85rem;
  font: inherit;
}

.auth-field input:focus:not(:focus-visible) {
  outline: none;
}

.auth-field input:focus {
  border-color: var(--accent);
}

.auth-submit {
  width: 100%;
  margin-top: var(--space-1);
}

.auth-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0;
}

.auth-switch {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.auth-link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

.profile-page {
  max-width: 900px;
}

.watch-personal-wrap {
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.watch-personal-wrap .ps-rail-section:first-child {
  margin-top: 0;
}

.watch-personal-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.5rem 0 1rem;
}

.profile-guest {
  background: var(--surface);
  border: 1px solid var(--border);
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.profile-avatar {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--ink);
  background: linear-gradient(160deg, var(--accent-hover), var(--accent-dark));
  box-shadow: 0 10px 24px var(--accent-glow);
  flex-shrink: 0;
}

.profile-hero-name {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.profile-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}

.profile-stats li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
}

.profile-stats strong {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

.profile-stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 420px;
}

.profile-notif-prefs {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.profile-notif-prefs legend {
  padding: 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.profile-check input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.profile-success {
  color: var(--success);
  font-size: 0.85rem;
  margin: 0;
}

.continue-card {
  position: relative;
}

.continue-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 2;
}

.continue-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}


