/* ====================================================
   Arms — Système de notifications (toasts empilés)
   ====================================================
   Adapté du CSS fourni : variables génériques (--white, --black2-40,
   --global-main-color...) remplacées par les vraies variables du design
   system (tokens.css). Position conservée en bas à gauche, comme dans
   le fichier d'origine. Ajout : couleurs par type (success/error/
   warning/info) et bouton de fermeture manuelle.
   ==================================================== */

.notif-app {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

.notif-container,
.notif-container * {
  -webkit-user-drag: none;
  user-select: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.notif-container *:not(i) {
  font-family: var(--f-body);
}

@keyframes notif-bounce-in {
  0% { opacity: 0; max-height: 0; transform: translateX(-125%); }
  40% { opacity: 0; max-height: 500px; }
  41% { transform: translateX(-125%); opacity: 1; }
  to { max-height: 500px; }
}

@keyframes notif-byebye {
  to { transform: translateX(-125%); }
}

.notif-container {
  position: absolute;
  left: 20px;
  bottom: 24px;
  width: 280px;
  transition: left .2s ease, bottom .2s ease, width .2s ease, opacity .2s ease;
  font-family: var(--f-body);
  color: var(--c-text);
  pointer-events: none;
}

.notif-container .notif-list {
  width: 100%;
}

.notif-container .notif-list .notif {
  animation: notif-bounce-in .5s ease-in-out;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 10px;
  text-align: left;
  margin-bottom: 10px;
  background-color: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
  pointer-events: auto;
}

/* ---------- Couleurs par type ---------- */
.notif-container .notif-list .notif.notif-success { border-left: 3px solid var(--c-green-live); }
.notif-container .notif-list .notif.notif-error { border-left: 3px solid var(--c-red); }
.notif-container .notif-list .notif.notif-warning { border-left: 3px solid #f5a623; }
.notif-container .notif-list .notif.notif-info { border-left: 3px solid #4d9fff; }

.notif-container .notif-list .notif.notif-success .icon-container i.icon { color: var(--c-green-live); }
.notif-container .notif-list .notif.notif-error .icon-container i.icon { color: var(--c-red-glow); }
.notif-container .notif-list .notif.notif-warning .icon-container i.icon { color: #f5a623; }
.notif-container .notif-list .notif.notif-info .icon-container i.icon { color: #4d9fff; }

.notif-container .notif-list .notif .header-container {
  width: 100%;
  height: 80px;
}

.notif-container .notif-list .notif .header-container .header {
  opacity: .6;
  object-fit: cover;
  width: 100%;
  height: 100%;
  background-color: var(--c-surface-2);
}

/* ---------- Bouton de fermeture ---------- */
.notif-container .notif-list .notif .notif-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--c-text-dim);
  font-size: 16px;
  line-height: 1;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.notif-container .notif-list .notif .notif-close:hover {
  background: rgba(255,255,255,0.08);
  color: var(--c-text);
}

.notif-container .notif-list .notif .notif-bottom {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 12px 14px;
  padding-right: 26px;
}

.notif-container .notif-list .notif .notif-bottom .notif-titles {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.notif-container .notif-list .notif .notif-bottom .notif-titles .icon-container {
  height: 32px;
  width: 32px;
  margin-right: 10px;
  flex-shrink: 0;
}

.notif-container .notif-list .notif .notif-bottom .notif-titles .icon-container .icon {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  background-color: transparent;
}

.notif-container .notif-list .notif .notif-bottom .notif-titles .icon-container img.icon {
  object-fit: contain;
  border-radius: 7px;
  background-color: var(--c-surface-2);
}

.notif-container .notif-list .notif .notif-bottom .notif-titles .icon-container i.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

.notif-container .notif-list .notif .notif-bottom .notif-titles .info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.notif-container .notif-list .notif .notif-bottom .notif-titles .info .title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}

.notif-container .notif-list .notif .notif-bottom .notif-titles .info .subtitle {
  font-size: 12px;
  color: var(--c-text-dim);
  line-height: 1.3;
}

.notif-container .notif-list .notif .notif-bottom .notif-content {
  font-size: 12.5px;
  color: var(--c-text-muted);
  line-height: 1.4;
  word-break: break-word;
}

.notif-container .notif-list .notif .progress-back {
  display: flex;
  align-items: center;
  background-color: var(--c-border);
  width: 100%;
  height: 3px;
  overflow: hidden;
}

.notif-container .notif-list .notif.is-sticky .progress-back {
  display: none;
}

.notif-container .notif-list .notif .progress-back .progress-bar {
  background: var(--c-red);
  height: 100%;
  width: 100%;
}
.notif-container .notif-list .notif.notif-success .progress-back .progress-bar { background: var(--c-green-live); }
.notif-container .notif-list .notif.notif-warning .progress-back .progress-bar { background: #f5a623; }
.notif-container .notif-list .notif.notif-info .progress-back .progress-bar { background: #4d9fff; }

.notif-container .notif-list .byebyenotif {
  animation: notif-byebye .4s ease-in-out forwards;
}

.notif-container .notif-list .notif .notif-bottom .notif-link {
  color: var(--c-red-glow);
  text-decoration: underline;
  pointer-events: auto;
}

@media (max-width: 480px) {
  .notif-container { left: 12px; width: calc(100vw - 24px); max-width: 280px; }
}
