/* ============================
   MXBZH - MODALES
   ============================ */

/* ============================
   BASE MODAL
   ============================ */

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  perspective: 1000px;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
  animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.70);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-backdrop {
  opacity: 1;
}

.modal-content {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  width: min(480px, 92vw);
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transform: translateY(40px) scale(0.92) rotateX(8deg);
  opacity: 0;
  filter: blur(10px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: none;
  -ms-overflow-style: none;
  transform-origin: center center;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

/* Override pour modal profil - BLEU NUIT */
#profileModal .modal-content,
#profileModal.modal .modal-content,
.modal#profileModal .modal-content {
  background: linear-gradient(145deg,
      rgba(15, 23, 42, 0.98) 0%,
      rgba(20, 30, 50, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0) !important;
  width: 360px !important;
  max-width: 360px !important;
  min-width: 360px !important;
  padding: 1.25rem 1.5rem !important;
}

.modal-content::-webkit-scrollbar {
  display: none;
}

.modal.active .modal-content {
  transform: translateY(0) scale(1) rotateX(0deg);
  opacity: 1;
  filter: blur(0px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Override shadow pour modal profil */
#profileModal.active .modal-content {
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 10px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.modal-close {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  color: #1d1d1f;
  font-size: 1.1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.28, 0.11, 0.32, 1);
  font-weight: 300;
  opacity: 0;
  transform: scale(0.8) rotate(-90deg);
  animation: fadeInRotate 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
  z-index: 10;
  pointer-events: auto;
  line-height: 1;
  padding: 0;
  user-select: none;
}

@keyframes fadeInRotate {
  from {
    opacity: 0;
    transform: scale(0.8) rotate(-90deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(1.1) rotate(90deg);
}

.modal-close:active {
  transform: scale(0.9) rotate(90deg);
}

/* ============================
   MODAL AUTH (Login/Register)
   ============================ */

.auth-card-modal h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: #1d1d1f;
  text-align: center;
}

.auth-card-modal .auth-subtitle {
  font-size: 14px;
  color: #86868b;
  margin: 0 0 24px;
  line-height: 1.4;
  text-align: center;
}

.auth-card-modal .auth-form {
  display: grid;
  gap: 12px;
}

.modal.active .auth-card-modal h2 {
  animation: slideInContent 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.modal.active .auth-card-modal .auth-subtitle {
  animation: slideInContent 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.modal.active .auth-card-modal .auth-form {
  animation: slideInContent 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes slideInContent {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card-modal .auth-form label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1f;
}

.auth-card-modal .auth-form input {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: 'Sora', sans-serif;
  transition: all 0.2s cubic-bezier(0.28, 0.11, 0.32, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.auth-card-modal .auth-form input:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

.auth-card-modal .auth-form input:focus {
  outline: none;
  border-color: #0071e3;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-card-modal .auth-form input::placeholder {
  color: #86868b;
  opacity: 1;
}

.auth-card-modal .btn-primary {
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 500;
  margin-top: 4px;
  background: #0071e3;
  border: none;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.28, 0.11, 0.32, 1);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

.auth-card-modal .btn-primary:hover {
  background: #0077ed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
}

.auth-card-modal .auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: rgba(13, 17, 23, 0.6);
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.auth-card-modal .link-btn {
  color: #0071e3;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.28, 0.11, 0.32, 1);
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
}

.auth-card-modal .link-btn:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.auth-card-modal .form-status {
  text-align: center;
  font-size: 14px;
  margin-top: 12px;
  min-height: 20px;
  animation: fadeInStatus 0.3s ease;
  padding: 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
  transition: all 0.3s ease;
}

.auth-card-modal .form-status:empty {
  display: none;
  padding: 0;
  min-height: 0;
}

.auth-card-modal .form-status.success {
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid rgba(16, 185, 129, 0.4);
  color: #059669;
}

@keyframes fadeInStatus {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================
   MODAL PROFIL - BLEU NUIT
   ============================ */

.modal-profile {
  max-width: 360px !important;
  width: 360px !important;
  max-height: 436px !important;
  padding: 1.5rem 1.75rem !important;
  background: linear-gradient(145deg,
      rgba(15, 23, 42, 0.98) 0%,
      rgba(20, 30, 50, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 10px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.profile-modal-content {
  text-align: center;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 36px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.profile-avatar svg {
  width: 44px;
  height: 44px;
  color: white;
}

.profile-modal-content h2 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #ffffff !important;
  text-align: center !important;
}

.profile-email {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  color: #ffffff !important;
  opacity: 0.7;
  margin: 0 0 1.5rem;
  text-align: center !important;
  word-break: break-word;
}

.profile-avatar {
  margin: 0 auto 1rem !important;
  display: block !important;
}

.profile-main-section {
  display: flex;
  flex-direction: column;
  align-items: center !important;
}

.profile-menu-title {
  font-family: 'Sora', sans-serif;
  color: #ffffff !important;
  font-weight: 600;
}

.profile-menu-subtitle {
  font-family: 'Sora', sans-serif;
  color: #94a3b8 !important;
}

.profile-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1) !important;
  margin: 0 0 1.5rem;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 8px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(30, 41, 59, 0.4) !important;
  border: 2px solid rgba(59, 130, 246, 0.3) !important;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: 'Sora', sans-serif;
  position: relative;
  overflow: hidden;
}

/* Carte bleue pour Mon Compte */
.profile-menu-item:has(.profile-menu-icon.blue) {
  background: rgba(59, 130, 246, 0.08) !important;
  border: 2px solid rgba(59, 130, 246, 0.4) !important;
}

.profile-menu-item:has(.profile-menu-icon.blue):hover {
  background: rgba(59, 130, 246, 0.12) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

/* Carte orange pour Dashboard */
.profile-menu-item:has(.profile-menu-icon.orange) {
  background: rgba(249, 115, 22, 0.08) !important;
  border: 2px solid rgba(249, 115, 22, 0.4) !important;
}

.profile-menu-item:has(.profile-menu-icon.orange):hover {
  background: rgba(249, 115, 22, 0.12) !important;
  border-color: rgba(249, 115, 22, 0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.2);
}

/* Carte rouge pour Déconnexion */
.profile-menu-item:has(.profile-menu-icon.red) {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 2px solid rgba(239, 68, 68, 0.4) !important;
}

.profile-menu-item:has(.profile-menu-icon.red):hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

/* Carte verte pour Admin (si présent) */
.profile-menu-item:has(.profile-menu-icon.green) {
  background: rgba(16, 185, 129, 0.08) !important;
  border: 2px solid rgba(16, 185, 129, 0.4) !important;
}

.profile-menu-item:has(.profile-menu-icon.green):hover {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

/* Carte violette pour Admin avec style inline */
.profile-menu-item:has(.profile-menu-icon[style*="7c3aed"]) {
  background: rgba(124, 58, 237, 0.08) !important;
  border: 2px solid rgba(124, 58, 237, 0.4) !important;
}

.profile-menu-item:has(.profile-menu-icon[style*="7c3aed"]):hover {
  background: rgba(124, 58, 237, 0.12) !important;
  border-color: rgba(124, 58, 237, 0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
}

.profile-menu-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: all 0.3s ease;
}

.profile-menu-icon svg {
  width: 24px;
  height: 24px;
  color: white;
  position: relative;
  z-index: 1;
}

.profile-menu-icon.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  box-shadow:
    0 4px 16px rgba(59, 130, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-menu-item:hover .profile-menu-icon.blue {
  box-shadow:
    0 6px 20px rgba(59, 130, 246, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.profile-menu-icon.orange {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  box-shadow:
    0 4px 16px rgba(249, 115, 22, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-menu-item:hover .profile-menu-icon.orange {
  box-shadow:
    0 6px 20px rgba(249, 115, 22, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.profile-menu-icon.red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow:
    0 4px 16px rgba(239, 68, 68, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-menu-item:hover .profile-menu-icon.red {
  box-shadow:
    0 6px 20px rgba(239, 68, 68, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.profile-menu-icon.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow:
    0 4px 16px rgba(16, 185, 129, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-menu-item:hover .profile-menu-icon.green {
  box-shadow:
    0 6px 20px rgba(16, 185, 129, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.profile-menu-text {
  flex: 1;
}

.profile-menu-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff !important;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.profile-menu-subtitle {
  font-size: 13px;
  color: #94a3b8 !important;
  margin: 0;
  line-height: 1.4;
}

/* Sous-modal modifier compte */
.profile-edit-section {
  display: none;
}

.profile-edit-section.active {
  display: block;
}

.profile-main-section.hidden {
  display: none;
}

.profile-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #3b82f6 !important;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.5rem;
}

.profile-back-btn:hover {
  opacity: 0.7;
}

.profile-back-btn svg {
  width: 18px;
  height: 18px;
  color: #3b82f6 !important;
}

.profile-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.profile-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0 !important;
}

.profile-form input {
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: 'Sora', sans-serif;
  transition: all 0.2s ease;
  color: #f1f5f9 !important;
}

.profile-form input::placeholder {
  color: #64748b !important;
}

.profile-form input:hover {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: rgba(30, 41, 59, 0.8) !important;
}

.profile-form input:focus {
  outline: none;
  border-color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.1) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.profile-form .btn-primary {
  margin-top: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.profile-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Close button pour modal profil */
#profileModal .modal-close {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#profileModal .modal-close:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
}

/* Animations switch login/register */
@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* ============================
   AUTH TOGGLE SWITCHER - LIQUID GLASS APPLE STYLE
   ============================ */

.auth-toggle-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 5px;
  margin-bottom: 28px;
  width: fit-content;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 10;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-toggle-btn {
  font-family: 'Sora', sans-serif;
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 11;
  overflow: hidden;
}

.auth-toggle-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.auth-toggle-btn:hover:not(.active)::before {
  opacity: 1;
}

.auth-toggle-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.9);
}

.auth-toggle-btn.active {
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.85) 100%);
  color: #0f172a;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

/* ============================
   MODAL AUTH - BLEU NUIT TRANSPARENT
   Style premium comme l'image de référence
   ============================ */

.auth-card-dark {
  background: linear-gradient(145deg,
      rgba(15, 23, 42, 0.98) 0%,
      rgba(25, 35, 55, 0.97) 50%,
      rgba(15, 23, 42, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  padding: 28px 24px !important;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 10px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Effet de brillance animé subtil */
.auth-card-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.03) 50%,
      transparent 100%);
  animation: shimmer 10s infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }

  50% {
    left: 100%;
  }

  100% {
    left: 100%;
  }
}

/* Effet de lueur subtile en haut */
.auth-card-dark::after {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 100px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card-dark h2 {
  font-family: 'Sora', sans-serif;
  color: #ffffff !important;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: left;
  position: relative;
  z-index: 1;
}

.auth-card-dark .auth-subtitle {
  font-family: 'Sora', sans-serif;
  color: #94a3b8 !important;
  font-size: 0.9rem;
  margin-bottom: 24px;
  text-align: left;
  position: relative;
  z-index: 1;
}

/* Formulaire */
.auth-form-dark {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

/* Toggle switcher doit être au-dessus */
.auth-card-dark .auth-toggle-switcher {
  position: relative;
  z-index: 5;
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-field label .required {
  color: #f87171;
  font-size: 0.9em;
}

.auth-field input,
.auth-field select {
  font-family: 'Sora', sans-serif;
  width: 100%;
  padding: 12px 14px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 0.9rem;
  color: #f1f5f9;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.auth-field input::placeholder {
  color: #64748b;
}

.auth-field input:hover,
.auth-field select:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.8);
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Select custom */
.auth-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

.auth-field select option {
  background: #1e293b;
  color: #f1f5f9;
  padding: 12px;
}

/* Footer avec boutons */
.auth-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-auth-cancel {
  padding: 12px 24px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Sora', sans-serif;
}

.btn-auth-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
}

/* ============================
   BOUTON SUBMIT - LIQUID GLASS APPLE STYLE
   ============================ */

.btn-auth-submit {
  font-family: 'Sora', sans-serif;
  padding: 16px 32px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.80) 50%,
      rgba(255, 255, 255, 0.90) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  width: 100%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(255, 255, 255, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* Effet de brillance liquide */
.btn-auth-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.4) 50%,
      transparent 100%);
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: skewX(-20deg);
}

.btn-auth-submit:hover::before {
  left: 150%;
}

/* Reflet en haut du bouton */
.btn-auth-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 50%;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.8) 0%,
      rgba(255, 255, 255, 0) 100%);
  border-radius: 16px 16px 50% 50%;
  pointer-events: none;
  opacity: 0.5;
}

.btn-auth-submit:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 40px rgba(255, 255, 255, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.btn-auth-submit:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow:
    0 4px 16px rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

.btn-auth-submit svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
  position: relative;
  z-index: 1;
}

.btn-auth-submit span {
  position: relative;
  z-index: 1;
}

/* Status message */
.auth-card-dark .form-status {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  transition: all 0.3s ease;
}

.auth-card-dark .form-status:empty {
  display: none;
}

.auth-card-dark .form-status.success {
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

/* Modal compte - reset pour permettre le style dark */
.modal-content.modal-compte {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
}

/* Close button pour modal compte dark */
.modal-compte .modal-close {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
}

.modal-compte .modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

/* Register card dark - style sombre */
.modal-compte .auth-card-dark {
  width: min(480px, 92vw);
  max-width: 480px;
}

.auth-card-dark {
  max-width: 480px;
  margin: 0 auto;
}

/* ============================
   RESPONSIVE - MODAL AUTH
   ============================ */

@media (max-width: 600px) {
  .auth-form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .auth-card-dark {
    padding: 24px 20px !important;
    border-radius: 20px !important;
    margin: 0 8px;
  }

  .auth-card-dark h2 {
    font-size: 1.4rem;
  }

  .auth-card-dark .auth-subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .auth-toggle-switcher {
    width: 100%;
    justify-content: center;
    padding: 4px;
    border-radius: 14px;
    margin-bottom: 20px;
  }

  .auth-toggle-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9rem;
    text-align: center;
    border-radius: 10px;
  }

  .auth-form-dark {
    gap: 16px;
  }

  .auth-field input,
  .auth-field select {
    padding: 12px 14px;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .auth-field label {
    font-size: 0.8rem;
  }

  .btn-auth-submit {
    padding: 14px 24px;
    font-size: 0.95rem;
    border-radius: 14px;
  }

  .auth-form-footer {
    flex-direction: column;
  }

  .btn-auth-cancel,
  .btn-auth-submit {
    width: 100%;
    justify-content: center;
  }

  .modal-compte .auth-card-dark {
    width: calc(100vw - 24px);
    max-width: 100%;
  }

  .modal-compte .modal-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
}

@media (max-width: 400px) {
  .auth-card-dark {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }

  .auth-card-dark h2 {
    font-size: 1.25rem;
  }

  .auth-toggle-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .auth-field input,
  .auth-field select {
    padding: 11px 12px;
    font-size: 0.85rem;
  }

  .btn-auth-submit {
    padding: 12px 20px;
    font-size: 0.9rem;
    border-radius: 12px;
  }
}


/* ============================
   MODAL PROFIL - DESKTOP ONLY
   Force les dimensions sur desktop
   ============================ */
@media (min-width: 769px) {
  #profileModal .modal-content,
  #profileModal.modal .modal-content,
  .modal#profileModal .modal-content,
  #profileModal .modal-content.modal-profile {
    width: 360px !important;
    max-width: 360px !important;
    min-width: 360px !important;
    padding: 1.25rem 1.5rem !important;
  }
}


/* ============================
   MODAL PROFIL INDEX - DESKTOP
   Mêmes dimensions que dashboard
   ============================ */
@media (min-width: 769px) {
  /* Avatar - plus petit */
  #profileModal .profile-avatar {
    width: 70px !important;
    height: 70px !important;
    margin: 0 auto 0.75rem !important;
    font-size: 28px !important;
  }

  #profileModal .profile-avatar svg {
    width: 35px !important;
    height: 35px !important;
  }

  /* Titre (nom d'utilisateur) - plus petit */
  #profileModal .profile-modal-content h2,
  #profileModal h2 {
    font-size: 18px !important;
    margin: 0 0 4px !important;
  }

  /* Email - plus petit */
  #profileModal .profile-email {
    font-size: 12px !important;
    margin: 0 0 1rem !important;
  }

  /* Divider - moins d'espace */
  #profileModal .profile-divider {
    margin: 0 0 1rem !important;
  }

  /* Menu - moins d'espace entre les boutons */
  #profileModal .profile-menu {
    gap: 8px !important;
  }

  /* Menu items - garder horizontal avec largeur fixe */
  #profileModal .profile-menu-item {
    padding: 10px 18px !important;
    flex-direction: row !important;
    gap: 12px !important;
    width: 260.8px !important;
    max-width: 260.8px !important;
    min-width: 260.8px !important;
    box-sizing: border-box !important;
  }

  /* Titres des boutons - plus petits */
  #profileModal .profile-menu-title {
    font-size: 14px !important;
  }

  /* Sous-titres des boutons - plus petits */
  #profileModal .profile-menu-subtitle {
    font-size: 11px !important;
  }
}
