/* ===== Notifications push : invitation « Activer / Plus tard » et messages (public/style/js/push.js) =====
   Carte blanche arrondie en bas de l'écran, pastille d'icône, titre + texte, comme les autres cartes du site ;
   liseré coloré à gauche selon le type (succès vert, erreur rouge, info bleu). Thème sombre pris en compte. */

.np-carte {
  align-items: flex-start;
  animation: np-apparition .25s ease-out;
  background: var(--fond-carte, #fff);
  border: 1px solid var(--bordure, #e6ecf3);
  border-left: 5px solid #1e5fa8;
  border-radius: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 10px 30px rgba(11, 42, 85, .22);
  box-sizing: border-box;
  color: var(--texte, #0b2a55);
  display: flex;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  gap: 12px;
  left: 50%;
  max-width: 420px;
  padding: 14px 16px;
  position: fixed;
  text-align: left;
  transform: translateX(-50%);
  transition: opacity .35s ease, transform .35s ease;
  width: calc(100% - 24px);
  z-index: 9999;
}
.np-carte--succes {
  border-left-color: #16a34a;
}
.np-carte--erreur {
  border-left-color: #dc2626;
}
.np-carte--sortie {
  opacity: 0;
  transform: translate(-50%, 12px);
}
@keyframes np-apparition {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.np-icone {
  align-items: center;
  background: var(--fond-accent, #e8eef7);
  border-radius: 50%;
  color: #1e5fa8;
  display: flex;
  flex: 0 0 40px;
  font-size: 18px;
  height: 40px;
  justify-content: center;
}
.np-carte--succes .np-icone {
  background: #e3f6ea;
  color: #16a34a;
}
.np-carte--erreur .np-icone {
  background: #fde8e8;
  color: #dc2626;
}

.np-textes {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.np-titre {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}
.np-texte {
  color: var(--texte-2, #334866);
  font-size: 13.5px;
  line-height: 1.4;
}

/* Boutons de l'invitation (neutralise les styles génériques des boutons des anciennes feuilles) */
.np-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.np-carte button.np-bouton,
.np-carte button.np-bouton:hover,
.np-carte button.np-bouton:focus {
  background: #1e5fa8;
  border: 1px solid #1e5fa8;
  border-radius: 999px;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  padding: 7px 18px;
}
.np-carte button.np-bouton--secondaire,
.np-carte button.np-bouton--secondaire:hover,
.np-carte button.np-bouton--secondaire:focus {
  background: transparent;
  border-color: var(--bordure-2, #d6e0ec);
  color: var(--texte, #0b2a55);
}
.np-carte button.np-bouton:focus-visible {
  outline: 2px solid #1e5fa8;
  outline-offset: 2px;
}

/* Thème sombre */
[data-theme="dark"] .np-carte {
  border-color: var(--bordure-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
[data-theme="dark"] .np-carte--succes {
  border-left-color: #22c55e;
}
[data-theme="dark"] .np-carte--erreur {
  border-left-color: #f87171;
}
[data-theme="dark"] .np-carte:not(.np-carte--succes):not(.np-carte--erreur) {
  border-left-color: #4c9be8;
}
[data-theme="dark"] .np-icone {
  background: var(--fond-accent);
  color: #7db8f0;
}
[data-theme="dark"] .np-carte--succes .np-icone {
  background: rgba(34, 197, 94, .18);
  color: #4ade80;
}
[data-theme="dark"] .np-carte--erreur .np-icone {
  background: rgba(220, 38, 38, .2);
  color: #f87171;
}

@media (prefers-reduced-motion: reduce) {
  .np-carte {
    animation: none;
    transition: none;
  }
}
