/* ============================================
   MODAL LOGIN
   Authentication modal for "Mettre en situation"
   Z-index: 11000-11001 (above modal-situation)
   ============================================ */

/* === BACKDROP === */
.modal-login-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 11000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-login-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* === MODAL CONTAINER === */
.modal-login {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 420px;
  background: var(--bg-card, #1e1e1e);
  border: 1px solid var(--border-color, #333);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  z-index: 11001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.modal-login-backdrop.active .modal-login,
.modal-login.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* === MODAL HEADER === */
.modal-login__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color, #333);
  background: var(--bg-surface, #181818);
}

.modal-login__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-yellow, #ffeb4a);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-login__title svg {
  width: 20px;
  height: 20px;
}

.modal-login__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg-card, #1e1e1e);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary, #a0a0a0);
}

.modal-login__close:hover {
  background: #333;
  color: var(--primary-yellow, #ffeb4a);
}

.modal-login__close svg {
  width: 18px;
  height: 18px;
}

/* === MODAL BODY === */
.modal-login__body {
  padding: 24px;
}

.modal-login__description {
  color: var(--text-secondary, #a0a0a0);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

/* === FORM === */
.modal-login__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-login__form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-login__form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.modal-login__form-group label .required {
  color: var(--primary-yellow, #ffeb4a);
}

.modal-login__form-group input {
  background: var(--bg-dark, #121212);
  border: 1px solid var(--border-color, #333);
  color: var(--text-primary, #f0f0f0);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.modal-login__form-group input:focus {
  outline: none;
  border-color: var(--primary-yellow, #ffeb4a);
  box-shadow: 0 0 0 3px rgba(255, 235, 74, 0.1);
}

.modal-login__form-group input::placeholder {
  color: var(--text-muted, #666);
}

/* === SUBMIT BUTTON === */
.modal-login__submit {
  background: var(--primary-yellow, #ffeb4a);
  color: #121212;
  border: none;
  border-radius: var(--radius-md, 12px);
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
  margin-top: 8px;
}

.modal-login__submit:hover {
  background: var(--primary-yellow-hover, #ffe100);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 235, 74, 0.35);
}

.modal-login__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.modal-login__submit svg {
  width: 18px;
  height: 18px;
}

.modal-login__submit.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.modal-login__submit.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #121212;
  border-top-color: transparent;
  border-radius: 50%;
  animation: modal-login-spin 0.8s linear infinite;
}

@keyframes modal-login-spin {
  to { transform: rotate(360deg); }
}

/* === MESSAGE === */
.modal-login__message {
  padding: 12px 14px;
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
  font-weight: 600;
  display: none;
  text-align: center;
}

.modal-login__message.success {
  display: block;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.modal-login__message.error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
  .modal-login {
    max-width: 94%;
    border-radius: var(--radius-lg, 16px);
  }

  .modal-login__header {
    padding: 14px 18px;
  }

  .modal-login__body {
    padding: 18px;
  }

  .modal-login__submit {
    padding: 12px 24px;
  }
}
