/* Zone de notification. Couleurs de la charte, avec repli si le thème local ne les définit pas. */

.notif {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bouton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(22, 58, 92, 0.14));
  background: var(--paper, #fff);
  color: var(--ink, #163a5c);
  cursor: pointer;
}

.notif-bouton:hover {
  background: var(--mist, #f2f7fb);
}

.notif-bouton[aria-expanded="true"] {
  border-color: var(--brand, #3d8fc4);
  color: var(--brand-deep, #2a6fa0);
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.notif-panneau {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(360px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  overflow: auto;
  background: var(--paper, #fff);
  color: var(--ink, #163a5c);
  border: 1px solid var(--line, rgba(22, 58, 92, 0.14));
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(22, 58, 92, 0.16);
  text-align: left;
}

.notif-panneau__titre {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft, rgba(22, 58, 92, 0.65));
  border-bottom: 1px solid var(--line, rgba(22, 58, 92, 0.14));
}

.notif-liste {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.notif-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
}

.notif-item:hover {
  background: var(--mist, #f2f7fb);
}

.notif-item__titre {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.notif-item__extrait,
.notif-item__date {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft, rgba(22, 58, 92, 0.65));
}

.notif-item__date {
  margin-top: 4px;
}

.notif-vide {
  margin: 0;
  padding: 16px 14px 18px;
  color: var(--ink-soft, rgba(22, 58, 92, 0.65));
}

.notif-message {
  width: min(560px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  border: 1px solid var(--line, rgba(22, 58, 92, 0.14));
  border-radius: 12px;
  padding: 0;
  color: var(--ink, #163a5c);
  background: var(--paper, #fff);
}

.notif-message::backdrop {
  background: rgba(22, 58, 92, 0.45);
}

.notif-message__entete {
  padding: 18px 20px 8px;
}

.notif-message__entete h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.notif-message__date {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft, rgba(22, 58, 92, 0.65));
}

.notif-message__corps {
  white-space: pre-wrap;
  margin: 0;
  padding: 8px 20px 8px;
  max-height: 50vh;
  overflow: auto;
}

.notif-message__etat {
  margin: 0;
  padding: 0 20px;
  color: #b42318;
}

.notif-message__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
}

.notif-action {
  border-radius: 8px;
  border: 1px solid var(--line, rgba(22, 58, 92, 0.14));
  background: var(--paper, #fff);
  color: var(--ink, #163a5c);
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
}

.notif-action--principal {
  border-color: transparent;
  background: #3d8fc4;
  color: #fff;
}

.notif-action--principal:hover {
  background: #2a6fa0;
}

.notif-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notif-lien {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: #2a6fa0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.notif-lien:hover {
  color: #163a5c;
}
