/* Easyjam — Notifications (cloche header + centre dashboard) */

.notifications-unread-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #dc3545;
  border: 2px solid rgba(18, 14, 14, 0.95);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.45);
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.notifications-unread-badge--hiding {
  opacity: 0;
  transform: scale(0.55);
}

.dashboard-nav .notifications-unread-badge {
  position: static;
  border-width: 0;
  box-shadow: none;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.6875rem;
}

/* —— Cloche header —— */

.notifications-bell {
  position: relative;
}

.notifications-bell__trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(139, 0, 0, 0.35);
  background: linear-gradient(135deg, rgba(75, 0, 0, 0.22) 0%, rgba(20, 16, 16, 0.85) 100%);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.notifications-bell__trigger:hover,
.notifications-bell__trigger:focus-visible {
  border-color: rgba(212, 175, 55, 0.45);
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.28) 0%, rgba(28, 18, 18, 0.92) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 175, 55, 0.08);
  outline: none;
}

.notifications-bell--open .notifications-bell__trigger {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.notifications-bell__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
}

.notifications-bell__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(400px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  background: rgba(18, 14, 14, 0.98);
  border: 1px solid rgba(139, 0, 0, 0.35);
  border-radius: var(--radius-lg);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 32px rgba(139, 0, 0, 0.12);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.22s;
  overflow: hidden;
}

.notifications-bell--open .notifications-bell__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notifications-bell__dropdown[hidden] {
  display: none;
}

.notifications-bell__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notifications-bell__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
}

.notifications-bell__mark-all-form {
  margin: 0;
}

.notifications-bell__mark-all {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notifications-bell__mark-all:hover,
.notifications-bell__mark-all:focus-visible {
  color: #fff;
  outline: none;
}

.notifications-bell__list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.notifications-bell__item + .notifications-bell__item {
  margin-top: 4px;
}

.notifications-bell__empty {
  padding: 24px 20px;
  text-align: center;
}

.notifications-bell__empty-title {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.notifications-bell__empty-text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.notifications-bell__footer {
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.notifications-bell__view-all {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-secondary);
  text-decoration: none;
}

.notifications-bell__view-all:hover,
.notifications-bell__view-all:focus-visible {
  color: #fff;
  text-decoration: underline;
  outline: none;
}

/* —— Item (dropdown + partagé) —— */

.notification-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.notification-item--unread {
  position: relative;
  overflow: hidden;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.notification-item--unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.95) 0%, rgba(168, 132, 36, 0.8) 100%);
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

.notification-item--read {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  opacity: 0.82;
}

.notification-item:hover,
.notification-item:focus-visible {
  background: rgba(139, 0, 0, 0.14);
  border-color: rgba(212, 175, 55, 0.25);
  outline: none;
}

.notification-item__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-item__icon--info { color: #6cb2eb; }
.notification-item__icon--success { color: #51cf66; }
.notification-item__icon--danger { color: #ff6b6b; }
.notification-item__icon--primary { color: var(--color-secondary); }
.notification-item__icon--neutral { color: var(--color-text-muted); }

.notification-item__content {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-item__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.notification-item__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.notification-item__date {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.notification-item__message {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.notification-item__read-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  opacity: 0.75;
}

.notification-item__unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-secondary);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* —— Page centre notifications —— */

.dashboard-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notifications-page__mark-all-form {
  margin: 0;
  align-self: center;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-card {
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition);
}

.notification-card--unread {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(28, 20, 20, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.notification-card--unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.95) 0%, rgba(168, 132, 36, 0.8) 100%);
  border-radius: 0 2px 2px 0;
  pointer-events: none;
  z-index: 1;
}

.notification-card--read {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0.88;
}

.notification-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.notification-card__link {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
}

.notification-card__link:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
  border-radius: var(--radius-lg);
}

.notification-card__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-card__icon--info { color: #6cb2eb; }
.notification-card__icon--success { color: #51cf66; }
.notification-card__icon--danger { color: #ff6b6b; }
.notification-card__icon--primary { color: var(--color-secondary); }
.notification-card__icon--neutral { color: var(--color-text-muted); }

.notification-card__body {
  min-width: 0;
  flex: 1;
}

.notification-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 6px;
}

.notification-card__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
}

.notification-card__date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.notification-card__message {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.notification-card__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notification-card__read-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  opacity: 0.7;
}

.notification-card__unread-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
}

.notifications-empty__illustration {
  color: var(--color-secondary);
  opacity: 0.55;
  margin-bottom: 8px;
}

.notifications-empty__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

.notifications-empty__text {
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .notifications-bell__trigger {
    width: 38px;
    height: 38px;
  }

  .notifications-bell__dropdown {
    position: fixed;
    top: calc(var(--header-height, 72px) + 8px);
    right: 16px;
    left: 16px;
    width: auto;
    max-width: 400px;
    margin-left: auto;
  }

  .notification-card__link {
    padding: 16px;
    gap: 12px;
  }

  .notification-card__icon {
    width: 40px;
    height: 40px;
  }

  .notification-card__title {
    font-size: 1rem;
  }
}

/* —— Page publique /notifications —— */

.page-notifications {
  background: var(--color-bg);
}

.notifications-page {
  padding: calc(var(--header-height) + 32px) 0 64px;
}

.notifications-page__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.notifications-page__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
}

.notifications-page__subtitle {
  margin: 0;
  color: var(--color-text-muted);
  max-width: 52ch;
}

.notifications-list--page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}

.notifications-page__empty {
  max-width: 480px;
  margin: 48px auto 0;
  padding: 40px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-card);
}

.notifications-page__empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.notifications-page__empty-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

.notifications-page__empty-text {
  margin: 0;
  color: var(--color-text-muted);
}
