/* ============================================================
   LA BOUCLE — auth.css
   Styles : pages auth + toasts + slots places + nav auth
   ============================================================ */

/* ── Pages Auth ─────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5e0 0%, #F4EBDD 60%, #f0e2cc 100%);
  padding: 2rem 1rem;
}

.auth-shell {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Fredoka', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1F4D3A;
  text-decoration: none;
}
.auth-logo svg { animation: spin-slow 12s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

.auth-card {
  width: 100%;
  background: white;
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 8px 40px rgba(31,77,58,0.14);
}

.auth-card h1 {
  font-family: 'Fredoka', cursive;
  font-size: 1.8rem;
  color: #1F4D3A;
  margin-bottom: 0.4rem;
}

.auth-sub {
  font-size: 0.9rem;
  color: #7a5a3a;
  margin-bottom: 1.5rem;
  max-width: none;
}

/* Onglets */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border: 2px solid #e8e2d6;
  border-radius: 8px;
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 0.6rem;
  background: white;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #8a6a4a;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active {
  background: #1F4D3A;
  color: #F4EBDD;
}

/* Champs */
.field {
  margin-bottom: 1.1rem;
}
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3A2410;
  margin-bottom: 0.4rem;
}
.field-hint {
  font-weight: 400;
  color: #8a6a4a;
  font-size: 0.8rem;
}
.field input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e8e2d6;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  color: #3A2410;
  background: #faf7f0;
  transition: border-color 0.2s;
}
.field input:focus {
  outline: none;
  border-color: #3E7A57;
  background: white;
}
.field-pwd {
  position: relative;
}
.field-pwd input { padding-right: 3rem; }
.pwd-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #8a6a4a;
}
.pwd-strength {
  font-size: 0.78rem;
  margin-top: 0.3rem;
  min-height: 1.2em;
  font-weight: 600;
}

/* Messages */
.auth-error {
  background: #fdf0f0;
  border: 1.5px solid #D64550;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  color: #a02030;
  margin-bottom: 1rem;
}
.auth-success {
  background: #f0f7ec;
  border: 1.5px solid #3E7A57;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  color: #1F4D3A;
  margin-bottom: 1rem;
}
.auth-hint {
  font-size: 0.8rem;
  color: #8a6a4a;
  margin-top: 0.75rem;
  text-align: center;
  max-width: none;
}

/* Submit */
.auth-submit {
  width: 100%;
  margin-top: 0.25rem;
  border-radius: 8px !important;
}

/* Séparateur */
.auth-sep {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.auth-sep::before, .auth-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8e2d6;
}
.auth-sep span {
  font-size: 0.78rem;
  color: #8a6a4a;
  white-space: nowrap;
}

/* Google SSO */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  background: white;
  border: 2px solid #e8e2d6;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #3A2410;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-google:hover {
  border-color: #4285F4;
  background: #f8f9ff;
  transform: translateY(-1px);
}

/* Footer */
.auth-footer {
  text-align: center;
  font-size: 0.88rem;
  color: #8a6a4a;
  margin-top: 1.25rem;
  max-width: none;
}
.auth-footer a {
  color: #3E7A57;
  font-weight: 700;
  border-bottom: 2px solid currentColor;
}

/* ── Navbar auth links ───────────────────────────────────── */
#navBtnLogin, #navBtnCompte, #navBtnLogout { display: none; }

/* ── Toast notifications ─────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1F4D3A;
  color: #F4EBDD;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(31,77,58,0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 90vw;
  text-align: center;
  white-space: nowrap;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-error  { background: #D64550; }
.toast-info   { background: #3E7A57; }

/* ── Slots créneaux — places dispo ───────────────────────── */
.slot-places {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  font-family: 'Space Mono', monospace;
  color: #3E7A57;
  margin-top: 0.2rem;
}
.slot-complet {
  opacity: 0.45;
  cursor: not-allowed !important;
}
.slot-complet .slot-places { color: #D64550; }

/* ── Cart badge nav ──────────────────────────────────────── */
#cartBadge {
  display: none;
  background: #E8B923;
  color: #3A2410;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  right: -6px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 1.75rem 1.25rem; }
  .toast { font-size: 0.82rem; padding: 0.7rem 1.2rem; }
}
