.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* background: #fff; */
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 32px 28px;
  z-index: 1001;
  min-width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  border: none;
  font-family: 'Segoe UI', Arial, sans-serif;
  animation: modal-fade-in 0.3s cubic-bezier(.4,0,.2,1);

  background: rgba(0, 0, 0, 0.56);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.71);
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.modal input,
.modal select {
  display: block;
  margin-bottom: 15px;
  width: -webkit-fill-available;
  padding: 10px 12px;
  /* border: 1px solid #e0e0e0a9; */
  border: 1px solid #393d40a8;
  border-radius: 8px;
  /* background: #fafbfc3f; */
  background: #1a1c1e40;
  font-size: 1rem;
  transition: border-color 0.2s;
  margin-top: 0;
  color: rgb(232, 230, 227);
}

.modal select option {
  background-color: rgb(54, 55, 59);
  color: #ffffff;
  padding: 10px;
}

.modal input.position-input {
  margin-bottom: 8px;
}

.modal .modal input.agent-input {
  margin-bottom: 0;
}

.event-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.event-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-label {
  margin-bottom: 4px;
  font-size: 0.9rem;
  color: #b8d4e3;
  font-weight: 500;
}

.event-row input {
  flex: 1;
  margin-bottom: 0;
}

.event-row button.remove-event {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.event-row button.remove-event:hover {
  background: #c82333;
}

input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(100%);
  cursor: pointer;
}

.modal button.add-event {
  display: block;
  margin-bottom: 18px;
  width: auto;
}

.modal input:focus,
.modal select:focus {
  border-color: #0078d4;
  outline: none;
  /* background: #ffffff88; */
}

.modal-header {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 18px;
  /* color: #222; */
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.modal button {
  padding: 9px 22px;
  border: none;
  border-radius: 8px;
  background: #0078d4;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.modal button.confirm {
  background: #44a044;
  color: #ffffff;
  }
.modal button.confirm:hover {
  background: #218d2f;
}

.modal button.cancel {
  background: #b93333;
  color: #ffffff;
  }
.modal button.cancel:hover {
  background: #8d2121;
}

.modal button.secondary {
  background: #e0e0e0;
  color: #222;
}

.modal button:hover {
  background: #005fa3;
}

.modal button.secondary:hover {
  background: #cacaca;
}

.modal .buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.modal label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  /* color: #333; */
}

.modal label + input,
.modal label + select {
  margin-top: 2px;
}

html {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom, #1D1C1C, #000000);
  background-repeat: no-repeat;
  color: #e4f5ff;
  min-height: 100%;
  /* height: fit-content; */
}

body {
  margin: 0;
}

.tagGuild {
  background-color: #2c2c39;
  color: #cddfea;
  border-radius: 4px;
  padding: 2px 4px;
  font-weight: 500;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 12px;
  z-index: 200;
}

.btn-addUnit {
  position: absolute;
  z-index: 1000;
  margin: 10px;

  border-radius: 6px;
  padding: 5px 8px;
  /* border: none; */
  /* background-color: #32302e; */
  color: white;

  /* Glassmorphisme*/
  background: rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s;
}

.btn-addUnit:hover {
  /* Effet au survol : éclaircir le fond et ajouter une légère ombre */
  background: rgba(255, 255, 255, 0.5);
  color: #1d2036;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s;
}

.profileContainer {
  display: flex;
  position: relative;
  width: fit-content;
  height: fit-content;
}

.profileContainer:hover {
  background-color: #00000033;
}

.profileInfo {
  display: flex;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
  padding: 0.5rem;
  align-items: center;
}

.profileVideoBackground {
  /* width: 213px; */
  /* height: 40px; */
  border-radius: 5px;
  z-index: 0;
  position: absolute;
  top: 0;
  right: 0;
  /* width: 100%; */
  height: 100%;
  object-fit: cover;
}

/* Profile Popup */
.profile-popup {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: rgb(24 23 23);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  min-width: 160px;
  z-index: 1000;
  animation: popup-fade-in 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popup-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-popup::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: rgb(24 23 23);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-right: none;
  transform: rotate(45deg);
}

.logout-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  width: 100%;
  transition: background-color 0.2s;
}

.logout-button:hover {
  background-color: #c82333;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #4169E1;
    border-radius: 5px;
    transition: background-color 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: #5179f1;
}
