@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=DM+Sans:wght@300;400;500&display=swap');

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background-color: #080808;
  color: white;
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ===== SECTION LOGIN ===== */
.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

/* ===== CARTE FORMULAIRE ===== */
.login-form {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(198, 172, 142, 0.15);
  padding: 52px 44px;
  border-radius: 24px;
  width: 420px;
  max-width: 100%;
  color: #f2f4f3;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 40px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(198,172,142,0.04);
  position: relative;
  overflow: hidden;
}

/* Reflet en haut de la carte */
.login-form::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198,172,142,0.5), transparent);
}

/* ===== TITRE ===== */
.login-form h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 2.4rem;
  letter-spacing: 0.02em;
  text-align: center;
  margin: 0 0 36px;
  color: #f2f4f3;
}

/* ===== LABELS ===== */
.login-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(198, 172, 142, 0.8);
  margin-bottom: 8px;
}

/* ===== INPUTS GLASSMORPHISM ===== */
.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #f2f4f3;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus,
.login-form input[type="text"]:focus {
  border-color: rgba(198, 172, 142, 0.5);
  background: rgba(198, 172, 142, 0.06);
  box-shadow: 0 0 0 3px rgba(198, 172, 142, 0.08), 0 0 20px rgba(198,172,142,0.06) inset;
}

.login-form input::placeholder {
  color: rgba(242, 244, 243, 0.25);
}

/* ===== BOUTON PRINCIPAL ===== */
.login-form button[type="submit"] {
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  background: linear-gradient(135deg, #C6AC8E 0%, #e8d5b8 50%, #C6AC8E 100%);
  background-size: 200% 200%;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #1a1410;
  cursor: pointer;
  transition: background-position 0.4s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(198,172,142,0.25);
}

.login-form button[type="submit"]:hover {
  background-position: 100% 100%;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(198,172,142,0.35);
}

.login-form button[type="submit"]:active {
  transform: translateY(0px);
}

/* ===== SÉPARATEUR ===== */
.separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: rgba(242,244,243,0.3);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.separator::before, .separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.separator::before { margin-right: 14px; }
.separator::after  { margin-left:  14px; }

/* ===== BOUTON GOOGLE ===== */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: #f2f4f3;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  margin-bottom: 20px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.google-btn:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

/* ===== LIEN ===== */
.login-link {
  margin-top: 4px;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(242,244,243,0.45);
}

.login-link a {
  color: #C6AC8E;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.login-link a:hover {
  color: #e8d5b8;
  border-bottom-color: rgba(198,172,142,0.5);
}

/* ===== INPUT 2FA ===== */
#code2fa {
  letter-spacing: 10px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 500;
  color: #C6AC8E;
}


/* ===== MODAL ===== */
.modal.hidden { display: none; }
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 16px; z-index: 10000;
}
.modal-card {
  background: rgba(25,27,27,0.95);
  border: 1px solid rgba(198,172,142,0.15);
  padding: 28px; border-radius: 16px;
  max-width: 420px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  color: #f2f4f3;
}
.modal-card button {
  margin-top: 12px; padding: 10px 16px;
  border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(198,172,142,0.15);
  color: #f2f4f3;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
}
.modal-card button:hover {
  background: rgba(198,172,142,0.25);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .login-form {
    padding: 36px 24px;
    border-radius: 18px;
  }
  .login-form h2 { font-size: 2rem; }
}
/* ===== TOAST NOTIFICATIONS ===== */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03) inset;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: #F2F4F3;
  letter-spacing: 0.02em;
  min-width: 240px;
  max-width: 340px;
  pointer-events: all;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease;
  position: relative;
  overflow: hidden;
}

.toast.show { transform: translateX(0); opacity: 1; }
.toast.hide { transform: translateX(120%); opacity: 0; }

.toast::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 100%;
  transform-origin: left;
  animation: toast-progress 3s linear forwards;
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.toast-text { flex: 1; line-height: 1.45; }
.toast-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 2px; }
.toast-msg   { font-size: 0.8rem; opacity: 0.72; }

.toast.success .toast-icon { background: rgba(134,193,118,0.15); color: #86c176; }
.toast.success::after       { background: linear-gradient(90deg, #86c176, #a8d89a); }
.toast.success              { border-color: rgba(134,193,118,0.18); }

.toast.error .toast-icon { background: rgba(220,80,80,0.15); color: #e07070; }
.toast.error::after       { background: linear-gradient(90deg, #e07070, #f09090); }
.toast.error              { border-color: rgba(220,80,80,0.18); }

.toast.info .toast-icon { background: rgba(198,172,142,0.12); color: #C6AC8E; }
.toast.info::after       { background: linear-gradient(90deg, #C6AC8E, #e8d5b8); }
.toast.info              { border-color: rgba(198,172,142,0.2); }

@media (max-width: 600px) {
  #toast-container { bottom: 16px; right: 12px; left: 12px; }
  .toast { max-width: 100%; min-width: unset; }
}