/* ===== Event create modal — no internal scroll ===== */
.event-card {
  width: min(560px, calc(100% - 28px)) !important;
  max-height: none;
  padding: 0 !important;
  overflow: visible;
  display: flex;
  flex-direction: column;
  -webkit-app-region: no-drag;
}

.event-modal-head {
  flex-shrink: 0;
  padding: 12px 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.event-modal-head h3 {
  margin: 0 0 6px !important;
}

.event-creator-hint {
  margin: 0 !important;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.8rem !important;
  font-weight: 600;
}

.event-form {
  display: flex !important;
  flex-direction: column;
  gap: 0 !important;
  overflow: visible;
  -webkit-app-region: no-drag;
}

.event-form-body {
  overflow: visible !important;
  max-height: none !important;
  padding: 10px 14px;
  display: grid;
  gap: 7px;
  -webkit-app-region: no-drag;
}

.event-form-body .field {
  gap: 3px;
  -webkit-app-region: no-drag;
}

.event-form-body .field > span {
  font-size: 0.78rem;
}

.event-form-body .field-grid {
  gap: 8px;
}

.event-form-body input,
.event-form-body textarea,
.event-form-body select {
  pointer-events: auto !important;
  -webkit-app-region: no-drag;
  position: relative;
  z-index: 2;
}

.event-form-body textarea {
  min-height: 42px;
  height: 42px;
  resize: none;
  max-height: 42px;
}

.event-form-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 8, 10, 0.98);
  -webkit-app-region: no-drag;
}

.icon-picker {
  max-height: none !important;
  overflow: visible !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  gap: 4px;
  padding: 5px !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  -webkit-app-region: no-drag;
}

.icon-opt {
  width: 30px !important;
  height: 30px !important;
  border-radius: 7px !important;
  -webkit-app-region: no-drag;
}

.icon-opt .evt-ico {
  width: 14px;
  height: 14px;
  color: #f2f3f5;
  pointer-events: none;
}

/* ===== STAFF Aide ===== */
.staff-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.aide-shell {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.aide-scroll {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 2px 6px 8px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  -webkit-app-region: no-drag;
}

.aide-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(242, 63, 67, 0.55);
  background: color-mix(in srgb, #f23f43 16%, rgba(0, 0, 0, 0.55));
  box-shadow: 0 0 0 1px rgba(242, 63, 67, 0.12);
}

.aide-alert-ico {
  width: 22px;
  height: 22px;
  color: #ff6b6e;
  flex-shrink: 0;
  margin-top: 2px;
}

.aide-alert strong {
  display: block;
  color: #ff6b6e;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.aide-alert p {
  margin: 0 !important;
  color: #ffd0d1 !important;
  font-size: 0.92rem !important;
  line-height: 1.45;
}

.aide-alert em {
  font-style: normal;
  font-weight: 800;
  color: #fff;
}

.aide-alert-mandatory {
  border-color: rgba(240, 178, 50, 0.55);
  background: color-mix(in srgb, #f0b232 14%, rgba(0, 0, 0, 0.55));
  box-shadow: 0 0 0 1px rgba(240, 178, 50, 0.12);
}

.aide-alert-mandatory .aide-alert-ico {
  color: #ffd56a;
}

.aide-alert-mandatory > div > strong {
  color: #ffe08a;
}

.aide-procedure-list {
  margin: 10px 0 8px;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #e8e4d4;
  font-size: 0.9rem;
  line-height: 1.4;
}

.aide-procedure-list li strong {
  color: #ffe08a;
}

.aide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.aide-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.aide-card {
  border-radius: 14px;
  border: 1px solid rgba(224, 177, 35, 0.28);
  background:
    radial-gradient(circle at 12% 0%, rgba(224, 177, 35, 0.12), transparent 45%),
    rgba(0, 0, 0, 0.28);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.aide-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.aide-card-ico {
  width: 28px;
  height: 28px;
  color: #ffe9a8;
  flex-shrink: 0;
}

.aide-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  margin: 0 0 2px;
}

.aide-tag {
  margin: 0 !important;
  color: #ffe9a8 !important;
  font-size: 0.78rem !important;
  font-weight: 700;
}

.aide-text {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 0.95rem !important;
  line-height: 1.45;
  flex: 1;
}

.aide-forbid {
  color: #ff6b6e;
  font-weight: 800;
}

.aide-link {
  width: fit-content;
  text-decoration: none;
}

.aide-rule {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
}

.aide-rule-ico {
  width: 20px;
  height: 20px;
  color: #ffe9a8;
  flex-shrink: 0;
  margin-top: 2px;
}

.aide-rule h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 800;
}

.aide-rule p {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 0.9rem !important;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .aide-grid,
  .aide-rules {
    grid-template-columns: 1fr;
  }
}

/* ===== STAFF Hiérarchie ===== */
.hierarchie-shell {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hierarchie-scroll {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 4px 6px 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 177, 35, 0.55) rgba(255, 255, 255, 0.06);
  -webkit-app-region: no-drag;
  pointer-events: auto;
}

.hierarchie-scroll::-webkit-scrollbar {
  width: 8px;
}
.hierarchie-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}
.hierarchie-scroll::-webkit-scrollbar-thumb {
  background: rgba(224, 177, 35, 0.55);
  border-radius: 999px;
}

.hierarchie-intro {
  margin: 0 0 12px !important;
  color: var(--muted) !important;
  font-size: 0.95rem !important;
}

.hierarchie-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  counter-reset: hierarchie;
}

.hierarchie-list li {
  counter-increment: hierarchie;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(224, 177, 35, 0.22);
  background: rgba(0, 0, 0, 0.28);
}

.hierarchie-list li::before {
  content: counter(hierarchie);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.82rem;
  color: #111;
  background: linear-gradient(135deg, #ffe9a8, #e0b123);
}

.hierarchie-ico {
  width: 18px;
  height: 18px;
  color: #ffe9a8;
  flex-shrink: 0;
}

.hierarchie-rank {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 0.98rem;
}

.hierarchie-list em {
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffe9a8;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(224, 177, 35, 0.35);
  background: rgba(224, 177, 35, 0.12);
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* ===== Toast notifications (style cours) ===== */
.toast-stack {
  position: fixed;
  top: 48px;
  right: 16px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(340px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  pointer-events: none;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 12, 14, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  padding: 11px 12px 13px;
  animation: toastIn 0.22s ease both;
}

.toast.is-leaving {
  animation: toastOut 0.2s ease both;
}

.toast-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.toast-ico-wrap {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.toast-ico {
  width: 16px;
  height: 16px;
  display: inline-block;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.toast-body {
  min-width: 0;
  flex: 1;
}

.toast-kind {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.toast-body p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.35;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.toast-progress > i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  animation-name: toastProgress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.toast-success {
  border-color: color-mix(in srgb, #23a559 55%, transparent);
  background: color-mix(in srgb, #23a559 18%, rgba(0, 0, 0, 0.72));
}
.toast-success .toast-ico-wrap {
  background: rgba(35, 165, 89, 0.28);
  color: #3dd68c;
}
.toast-success .toast-kind { color: #3dd68c; }
.toast-success .toast-progress > i { background: #23a559; }
.toast-success .toast-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}

.toast-error {
  border-color: color-mix(in srgb, #f23f43 55%, transparent);
  background: color-mix(in srgb, #f23f43 18%, rgba(0, 0, 0, 0.72));
}
.toast-error .toast-ico-wrap {
  background: rgba(242, 63, 67, 0.28);
  color: #ff6b6e;
}
.toast-error .toast-kind { color: #ff6b6e; }
.toast-error .toast-progress > i { background: #f23f43; }
.toast-error .toast-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}

.toast-info {
  border-color: color-mix(in srgb, #ffffff 40%, transparent);
  background: color-mix(in srgb, #ffffff 12%, rgba(0, 0, 0, 0.72));
}
.toast-info .toast-ico-wrap {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.toast-info .toast-kind { color: #fff; }
.toast-info .toast-progress > i { background: #fff; }
.toast-info .toast-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(16px); }
}

@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
