@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600&display=swap');

:root {
  --aubergine: #3D2E5A;
  --lavande: #8A7CA8;
  --lavande-pale: #B0A4C4;
  --fond: #FAF7F2;
  --fond-card: #FFFFFF;
  --fond-input: #FAF7F2;
  --vert-sauge: #C9D4B5;
  --corail: #F2B5A7;
  --bleu-poudre: #B5C6D4;
  --beige-paille: #E8DCC4;
  --lavande-bg: #D6CFE5;
  --rose-pale: #F0D4D9;
  --rouge-retard: #C45A48;
  --border: rgba(61, 46, 90, 0.1);
  --border-soft: rgba(61, 46, 90, 0.06);
  --shadow: 0 6px 18px rgba(61, 46, 90, 0.08);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--fond);
  color: var(--aubergine);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; }

/* === LOGIN === */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--fond-card);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  border: 0.5px solid var(--border);
  box-shadow: var(--shadow);
  animation: rise 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 32px;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  color: var(--aubergine);
}

.login-sub {
  font-size: 14px;
  color: var(--lavande);
  margin-bottom: 32px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--lavande);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.field input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--aubergine);
  background: var(--fond-input);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
  border-color: var(--aubergine);
  box-shadow: 0 0 0 3px rgba(61, 46, 90, 0.1);
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn-primary {
  flex: 1;
  min-width: 140px;
  padding: 12px 20px;
  background: var(--aubergine);
  color: white;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

.btn-primary:hover { background: #4d3b6e; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  flex: 1;
  min-width: 140px;
  padding: 12px 20px;
  background: transparent;
  color: var(--aubergine);
  border: 0.5px solid var(--border);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.2s;
}

.btn-secondary:hover { background: var(--fond); }

.error-msg {
  background: var(--corail);
  color: #6B2820;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 18px;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* === MODALE === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 46, 90, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fade-in 0.25s ease;
}

.modal-overlay.show { display: flex; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--fond-card);
  border-radius: 20px;
  padding: 32px 36px;
  max-width: 440px;
  width: 90%;
  animation: rise 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.modal-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 24px;
  margin-bottom: 14px;
  color: var(--aubergine);
}

.modal-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--lavande);
  margin-bottom: 24px;
}

.modal-text strong { color: var(--aubergine); font-weight: 500; }