/* =============================================
   ESPACE MEMBRE — Crêperie du Bout du Monde
   DA : arrière-salle chaleureuse, cohérente
   avec creperie.css
   ============================================= */

:root {
  --cream: #F5EFE0;
  --cream-dark: #EDE3CC;
  --brown: #5C3D2E;
  --brown-light: #8B5E3C;
  --brown-dark: #3A2218;
  --ochre: #C8892A;
  --ochre-light: #E8A84A;
  --text: #2C1F14;
  --text-muted: #7A6050;
  --white: #FFFDF7;
  --radius: 4px;
  --shadow: 0 8px 40px rgba(30,12,4,0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Lora', Georgia, serif;
  background-color: var(--brown-dark);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(200,137,42,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(92,61,46,0.3) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text);
}

/* ===== RETOUR ACCUEIL ===== */
.back-home {
  position: fixed;
  top: 1.2rem;
  left: 1.5rem;
  font-family: 'Lora', serif;
  font-size: 0.82rem;
  color: rgba(245,239,224,0.45);
  text-decoration: none;
  transition: color 0.2s;
  z-index: 10;
}
.back-home:hover { color: var(--ochre); }

/* ===== WRAPPER & CARD ===== */
.auth-wrapper {
  width: 100%;
  max-width: 420px;
  animation: cardIn 0.7s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-top: 3px solid var(--ochre);
  border-radius: 6px;
  padding: 2.5rem 2.2rem;
  box-shadow: var(--shadow);
}

.auth-card-banned {
  border-top-color: #b94040;
  text-align: center;
}

/* ===== BRAND ===== */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.2rem;
}
.auth-logo-icon {
  font-size: 1.6rem;
  color: var(--ochre);
}
.auth-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  color: var(--brown-dark);
  display: block;
  line-height: 1.1;
}
.auth-brand em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.8rem;
  color: var(--ochre);
}

/* ===== DIVIDER ===== */
.auth-divider {
  border: none;
  border-top: 1px solid var(--cream-dark);
  margin: 1.4rem 0;
}

/* ===== TYPOGRAPHY ===== */
h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 0.3rem;
}
.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}
.auth-subtitle strong { color: var(--brown); }
.auth-muted {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* ===== FORM ===== */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.auth-field { display: flex; flex-direction: column; gap: 0.3rem; }

.auth-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--brown);
  letter-spacing: 0.03em;
}

.auth-field input {
  padding: 0.7rem 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  background: var(--cream);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}
.auth-field input::placeholder { color: rgba(122,96,80,0.5); }
.auth-field input:focus {
  border-color: var(--ochre);
  box-shadow: 0 0 0 3px rgba(200,137,42,0.12);
}

/* ===== BUTTONS ===== */
.auth-btn-primary {
  width: 100%;
  padding: 0.85rem;
  background: var(--ochre);
  color: var(--brown-dark);
  border: none;
  border-radius: var(--radius);
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.4rem;
  display: block;
  text-align: center;
  text-decoration: none;
}
.auth-btn-primary:hover:not(:disabled) {
  background: var(--ochre-light);
  transform: translateY(-1px);
}
.auth-btn-primary:disabled {
  background: var(--cream-dark);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.auth-btn-secondary {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: var(--brown);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  display: block;
  text-align: center;
  text-decoration: none;
}
.auth-btn-secondary:hover {
  border-color: var(--ochre);
  color: var(--ochre);
}

/* Bouton open (landing) */
.auth-btn-open { margin-top: 0; }

/* ===== REGISTER LINK ===== */
.auth-register-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.6rem;
}

/* ===== ERROR ===== */
.auth-error {
  background: #fdf0f0;
  border: 1px solid #e8b4b4;
  color: #8b2a2a;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  text-align: center;
}

/* ===== STATUS (landing) ===== */
.auth-status {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  min-height: 2.8rem;
}

.auth-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--cream-dark);
  border-top-color: var(--ochre);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== BANNED ===== */
.auth-banned-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.8rem;
}
.auth-banned-duration {
  color: #8b2a2a;
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  body { padding: 1rem; align-items: flex-start; padding-top: 3rem; }
  .auth-card { padding: 2rem 1.4rem; }
}
