/* =========================================================================
   toastr.css
   Styles autonomes du composant toastr (notifications popup) façon MDBootstrap.
   Aucune dépendance : à charger seul. Reproduit les classes toastr d'origine
   pour rester 100% compatible avec ton code existant.
   ========================================================================= */

.toast-title {
  font-weight: 700;
  color: #ffffff !important;
}
.toast-message {
  word-wrap: break-word;
  color: #ffffff !important;
}
/* Texte du toast en blanc, quel que soit le CSS du framework (Bootstrap .toast) */
#toast-container > div,
#toast-container > div .toast-title,
#toast-container > div .toast-message {
  color: #ffffff !important;
}
.toast-message a,
.toast-message label {
  color: #ffffff;
}
.toast-message a:hover {
  color: #cccccc;
  text-decoration: none;
}

.toast-close-button {
  position: relative;
  right: -0.3em;
  top: -0.3em;
  float: right;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 0 #ffffff;
  opacity: 0.8;
  line-height: 1;
}
.toast-close-button:hover,
.toast-close-button:focus {
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.4;
}
button.toast-close-button {
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
[dir="rtl"] .toast-close-button,
.rtl .toast-close-button {
  left: -0.3em;
  right: auto;
  float: left;
}

/* ---- Positions du conteneur -------------------------------------------- */
.toast-top-center {
  top: 0;
  right: 0;
  width: 100%;
}
.toast-bottom-center {
  bottom: 0;
  right: 0;
  width: 100%;
}
.toast-top-full-width {
  top: 0;
  right: 0;
  width: 100%;
}
.toast-bottom-full-width {
  bottom: 0;
  right: 0;
  width: 100%;
}
.toast-top-left {
  top: 12px;
  left: 12px;
}
.toast-top-right {
  top: 12px;
  right: 12px;
}
.toast-bottom-right {
  right: 12px;
  bottom: 12px;
}
.toast-bottom-left {
  bottom: 12px;
  left: 12px;
}

/* ---- Conteneur --------------------------------------------------------- */
#toast-container {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
}
#toast-container * {
  box-sizing: border-box;
}
#toast-container > div {
  /* display + visibility forcés : neutralisent un éventuel
     .toast:not(.show){display:none} / .toast{opacity:0} du framework hôte
     (Bootstrap 5, MDB 5, etc.) qui masquerait le toast. */
  display: block !important;
  visibility: visible !important;
  position: relative;
  pointer-events: auto;
  overflow: hidden;
  margin: 0 0 6px;
  padding: 15px 15px 15px 50px;
  width: 300px;
  min-height: 0;
  border-radius: 3px;
  background-position: 15px center;
  background-repeat: no-repeat;
  box-shadow: 0 0 12px #999999;
  color: #ffffff !important;
  opacity: 0.9;
  transform: none !important;
  transition: opacity 0.3s linear;
}
#toast-container > div.toast-no-icon {
  padding: 15px;
  background-image: none !important;
}
#toast-container > div:hover {
  box-shadow: 0 0 12px #000000;
  opacity: 1;
  cursor: pointer;
}
#toast-container > .toast-progress {
  opacity: 1;
}

/* Variantes pleine largeur / centrées : largeur du toast */
#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
  width: 300px;
  margin-left: auto;
  margin-right: auto;
}
#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
  width: 96%;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Couleurs Material (MDBootstrap) + icônes -------------------------- */
#toast-container > .toast-info {
  background-color: #33b5e5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23fff' d='M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 15h2v-6h-2v6z'/></svg>");
}
#toast-container > .toast-success {
  background-color: #00c851;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23fff' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
}
#toast-container > .toast-warning {
  background-color: #ffbb33;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23fff' d='M1 21h22L12 2 1 21m12-3h-2v-2h2m0-2h-2v-4h2v4z'/></svg>");
}
#toast-container > .toast-error {
  background-color: #ff3547;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23fff' d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>");
}

/* ---- Barre de progression ---------------------------------------------- */
.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  background-color: #000000;
  opacity: 0.4;
}

/* ---- Responsive -------------------------------------------------------- */
@media all and (max-width: 240px) {
  #toast-container > div {
    padding: 8px 8px 8px 50px;
    width: 11em;
  }
}
@media all and (min-width: 241px) and (max-width: 480px) {
  #toast-container > div {
    padding: 8px 8px 8px 50px;
    width: 18em;
  }
}
@media all and (min-width: 481px) and (max-width: 768px) {
  #toast-container > div {
    padding: 15px 15px 15px 50px;
    width: 25em;
  }
}
