/**
 * Moto — centre de notifications (v1.0.0-notifs).
 * Chargé côté passager (le chauffeur a ses propres règles dans
 * driver.css). Surfaces et encres 100 % pilotées par les tokens :
 * lisible en thème clair comme en thème sombre.
 */

.notifs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.notifs-filters {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.notifs-filters::-webkit-scrollbar {
  display: none;
}

.notifs-filter {
  flex: none;
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--gray-border, rgba(45, 27, 78, 0.13));
  border-radius: 999px;
  background: var(--white, #fff);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--ink-soft, #615073);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background 0.16s ease, color 0.16s ease;
}

.notifs-filter:active {
  transform: scale(0.97);
}

.notifs-filter.is-active {
  border-color: transparent;
  background: var(--moto-gradient, linear-gradient(90deg, #ff5f4d, #e8327a, #7b39b7));
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 50, 122, 0.26);
}

.notifs-clear {
  flex: none;
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--gray-border, rgba(45, 27, 78, 0.13));
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--ink-soft, #615073);
}

.notifs-clear[hidden] {
  display: none;
}

.notifs-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notifs-group {
  margin: 0.6rem 0 0.1rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft, #615073);
}

.notifs-group:first-child {
  margin-top: 0;
}

.notif-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: var(--white, #fff);
  border: 1px solid var(--gray-border, rgba(45, 27, 78, 0.13));
  box-shadow: var(--moto-shadow-card, 0 2px 16px rgba(45, 27, 78, 0.06));
}

/* Non lue : liseré de marque à gauche + point d'accent, sans criard. */
.notif-card--unseen {
  border-color: rgba(232, 50, 122, 0.3);
  box-shadow: inset 3px 0 0 0 var(--moto-secondary, #e8327a),
    var(--moto-shadow-card, 0 2px 16px rgba(45, 27, 78, 0.06));
}

.notif-card__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--gray-bg, #fff8f6);
  border: 1px solid var(--gray-border, rgba(45, 27, 78, 0.13));
  color: var(--moto-accent, #7b39b7);
}

.notif-card__icon svg {
  width: 19px;
  height: 19px;
}

.notif-card--alert .notif-card__icon {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.22);
  color: var(--moto-danger, #dc2626);
}

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

.notif-card__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink, #2d1b4e);
}

.notif-card__text {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft, #615073);
  overflow-wrap: anywhere;
}

.notif-card__text:empty {
  display: none;
}

.notif-card__side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.notif-card__time {
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--gray-text, #6d5d80);
}

.notif-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moto-secondary, #e8327a);
  opacity: 0;
}

.notif-card--unseen .notif-card__dot {
  opacity: 1;
}

/* ===== État vide ===== */
.notifs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.75rem 1.25rem 1.5rem;
  text-align: center;
}

.notifs-empty[hidden] {
  display: none;
}

.notifs-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 0.9rem;
  border-radius: 20px;
  background: var(--gray-bg, #fff8f6);
  border: 1px solid var(--gray-border, rgba(45, 27, 78, 0.13));
  color: var(--moto-accent, #7b39b7);
}

.notifs-empty__icon svg {
  width: 26px;
  height: 26px;
}

.notifs-empty__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink, #2d1b4e);
}

.notifs-empty__sub {
  margin: 0.35rem 0 0;
  max-width: 18rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft, #615073);
}

/* ===== Compteur dans le menu latéral ===== */
.drawer-nav-badge {
  margin-left: auto;
  min-width: 22px;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--moto-gradient, linear-gradient(90deg, #ff5f4d, #e8327a, #7b39b7));
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.5;
}

.drawer-nav-badge[hidden] {
  display: none;
}

/* Pastille sur le bouton ☰ : signale des notifications non lues sans
   ajouter un bouton de plus sur la carte. */
.moto-menu-btn__unread {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--moto-secondary, #e8327a);
  border: 2px solid var(--white, #fff);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s ease, transform 0.22s var(--moto-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

.moto-menu-btn.has-unread .moto-menu-btn__unread {
  opacity: 1;
  transform: none;
}

html[data-theme="dark"] .notif-card {
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .notif-card__icon,
html[data-theme="dark"] .notifs-empty__icon {
  background: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .notifs-filter {
  background: rgba(255, 255, 255, 0.06);
}
