/* ════════════════════════════════
   Toasts / notifications transitoires.
   Style flat minimal aligné sur le ton éditorial du site (cookie banner,
   modale guide des tailles) : fond blanc, équerres carrées, bordures fines,
   Urbanist lowercase. Indicateur de type = barre verticale colorée 2px,
   pas de fond tinté ni de glassmorphisme.
════════════════════════════════ */

#toast-container {
  position: fixed;
  top: 90px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
  width: 360px;
}

/* ── Toast ── */
.toast {
  width: 100%;
  pointer-events: all;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding: 14px 16px 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  overflow: hidden;
  font-family: 'Urbanist', sans-serif;
  color: #000;
  animation: toastIn .26s cubic-bezier(.22,.68,0,1.05) both;
}

.toast.removing { animation: toastOut .22s ease-in forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); max-height: 140px; }
  to   { opacity: 0; transform: translateX(20px); max-height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; margin-bottom: -10px; }
}

/* Indicateur de type — barre verticale fine à gauche */
.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
}
.toast.t-success::before { background: var(--green); }
.toast.t-error::before   { background: var(--red); }
.toast.t-warning::before { background: var(--orange); }
.toast.t-info::before    { background: #000; }

/* Icône — petit SVG inline, pas de fond tinté */
.toast-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.toast-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toast.t-success .toast-icon svg { stroke: var(--green); }
.toast.t-error   .toast-icon svg { stroke: var(--red); }
.toast.t-warning .toast-icon svg { stroke: var(--orange); }
.toast.t-info    .toast-icon svg { stroke: #000; }

/* Texte */
.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #000;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  margin-bottom: 3px;
}
.toast-msg {
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: #4a5565;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* Bouton fermer — bouton outline carré, façon cookie banner close */
.toast-close {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color .18s;
}
.toast-close:hover { border-color: #000; }
.toast-close svg {
  width: 9px;
  height: 9px;
  stroke: #000;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* Barre de progression auto-dismiss — fine, neutre */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1.5px;
  background: rgba(0, 0, 0, 0.4);
  animation: toastProgress linear forwards;
}
.toast.t-success .toast-progress { background: var(--green); }
.toast.t-error   .toast-progress { background: var(--red); }
.toast.t-warning .toast-progress { background: var(--orange); }
.toast.t-info    .toast-progress { background: rgba(0, 0, 0, 0.4); }

@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

/* Responsive */
@media (max-width: 600px) {
  #toast-container {
    top: 84px;
    right: 12px;
    left: 12px;
    width: auto;
  }
  .toast { padding: 12px 14px 12px 16px; }
}
