/* Modale d'Authentification & Profil (auth-gate.css) */
body.auth-gate-locked #app-sidebar,
body.auth-gate-locked #app-main-content {
  display: none !important;
}

.modal-shell.auth-gate-shell--standalone {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.modal-shell.auth-gate-shell--standalone > .modal-shell__body {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

.auth-gate-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px;
  margin: 0 auto;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 2px solid rgba(0, 240, 255, 0.22);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 229, 255, 0.16), 0 0 60px rgba(217, 70, 239, 0.1);
  padding: 28px 24px;
  color: var(--text-main, #f1f5f9);
  position: relative;
}

.auth-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 4px;
}

.auth-brand-logo {
  filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.45));
}

.auth-brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.auth-brand-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
  max-width: 380px;
}

.auth-gate-error-banner {
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  animation: authFadeIn 0.2s ease-out;
}

.auth-gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-gate-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-gate-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #94a3b8);
  padding-left: 6px;
}

.auth-forgot-link {
  align-self: flex-end;
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.15s ease;
}

.auth-forgot-link:hover {
  color: #00f0ff;
}

.input-normal-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 10px;
  transition: all 0.2s ease;
}

.input-normal-wrapper:focus-within,
.input-normal-wrapper--focused {
  border-color: #00f0ff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
  background: rgba(30, 41, 59, 0.95);
}

.input-normal-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.25s ease;
}

.input-normal-icon--active {
  background: linear-gradient(135deg, #00f0ff, #0284c7);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.input-normal-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 13px;
  font-family: inherit;
  padding: 0 4px;
}

.input-normal-field::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.auth-promo-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: center;
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: #ec4899;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 9999px;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.auth-promo-toggle-btn:hover {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
}

.auth-promo-toggle-btn svg {
  color: #ec4899;
}

.auth-promo-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-promo-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-promo-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auth-promo-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 240, 255, 0.4);
  color: #00f0ff;
}

.auth-gate-promo-msg {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-gate-promo-msg--valid {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-gate-promo-msg--invalid {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-gate-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  padding: 4px 6px;
}

.auth-gate-checkbox-row input[type="checkbox"] {
  accent-color: #00f0ff;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.bouton-normal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #d946ef 0%, #8b5cf6 50%, #00e5ff 100%);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
  margin-top: 4px;
}

.bouton-normal:hover:not(:disabled) {
  transform: scale(1.02);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.45);
}

.bouton-normal:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.separator-line {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 6px 0;
  position: relative;
}

.separator-line::before,
.separator-line::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.separator-line span {
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #0f172a;
  border-radius: 9999px;
}

.bouton-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bouton-oauth:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.auth-footer-link {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  transition: color 0.15s ease;
  margin-top: 4px;
}

.auth-footer-link strong {
  color: #00f0ff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 4px;
  transition: color 0.15s ease;
}

.auth-footer-link:hover strong {
  text-decoration: underline;
  color: #38bdf8;
}

.auth-gate-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: authSpinner 0.7s linear infinite;
}

.auth-gate-logged-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-gate-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: #334155;
  color: #cbd5e1;
}

.auth-gate-badge--negative {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

@keyframes authSpinner {
  to { transform: rotate(360deg); }
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
