*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #f8fafc;
  min-height: 100vh;
}

/* ── Layout split-screen ─────────────────────────────────── */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Panneau héro ────────────────────────────────────────── */
.auth-hero {
  background: linear-gradient(150deg, #013a6b 0%, #0163b8 55%, #018ffa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(254,176,25,0.18) 0%, transparent 55%);
  pointer-events: none;
}

.auth-hero::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.auth-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.auth-hero-logo {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.auth-hero-sub {
  color: rgba(255,255,255,0.82);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 36px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: rgba(255,255,255,0.92);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-feature-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-guest-btn {
  display: inline-block;
  margin-top: 32px;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.auth-guest-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}

/* ── Panneau formulaire ──────────────────────────────────── */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #fff;
}

.auth-box {
  width: 100%;
  max-width: 390px;
}

.auth-box-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.auth-box-sub {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 26px;
}

/* ── Flash messages ──────────────────────────────────────── */
.flash-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 14px;
}
.flash-message.success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.flash-message.error   { background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626; }
.flash-message.warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }

/* ── Message d'erreur inline ─────────────────────────────── */
.auth-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: none;
}

/* ── Bouton Google ───────────────────────────────────────── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.2s, background 0.2s;
  margin-bottom: 20px;
}
.btn-google:hover { background: #f8fafc; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.btn-google img { width: 20px; height: 20px; }

/* ── Séparateur ──────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* ── Formulaire ──────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #111827;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: #018ffa;
  box-shadow: 0 0 0 3px rgba(1,143,250,0.12);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 0.85rem;
  gap: 8px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}
.remember-label input[type="checkbox"] { accent-color: #018ffa; }

.forgot-link {
  color: #018ffa;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.forgot-link:hover { text-decoration: underline; }

/* ── Bouton principal ────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #018ffa;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover  { background: #0075d1; }
.btn-primary:active { background: #005fa8; transform: scale(0.99); }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal confirmation ──────────────────────────────────── */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.confirm-overlay.show { display: flex; }

.confirm-box {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}
.confirm-box p {
  color: #374151;
  line-height: 1.6;
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-outline {
  padding: 11px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  color: #374151;
  transition: background 0.2s;
}
.btn-outline:hover { background: #f3f4f6; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero  { display: none; }
  .auth-form-panel { padding: 32px 20px; min-height: 100vh; }
}
