/* Flash messages */
.flash-container {
  position: fixed;
  top: 107px;       /* hauteur du header si présent */
  left: 20px;      /* décalage du bord gauche */

  z-index: 9999;

  display: flex;
  flex-direction: column;
  gap: 10px;

  width: min(320px, 90vw);
}

.flash {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  opacity: 0.97;
  animation: fadein 0.3s ease;
}

.flash-success { background: #27ae60; }
.flash-error   { background: #e74c3c; }
.flash-warning { background: #f39c12; }
.flash-info    { background: #3498db; }

@keyframes fadein {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 0.97; transform: translateY(0); }
}

@keyframes fadeout {
  to { opacity: 0; transform: translateY(-8px); }
}

.flash.hide {
  animation: fadeout 0.3s forwards;
}