/* ============================================================
   vetcarnet — Styles de base
   Palette : bleu #5b8fb9 + orange #ff8a65 + rouge #e63946 + vert #10b981
   ============================================================ */

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

:root {
  --bleu: #5b8fb9;
  --bleu-fonce: #2c5578;
  --bleu-tres-clair: #eef4fa;
  --orange: #ff8a65;
  --orange-fonce: #ff6b3d;
  --orange-clair: #fff1eb;
  --rouge: #e63946;
  --rouge-clair: #fef2f2;
  --vert: #10b981;
  --vert-clair: #d1fae5;
  --jaune: #f59e0b;
  --jaune-clair: #fef3c7;
  --violet: #8b5cf6;
  --violet-clair: #f3e8ff;
  --gris-clair: #f1f5f9;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --text-mut: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--bleu-fonce); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ Auth pages (login, reset password) ============ */

.auth-page {
  background: linear-gradient(135deg, #eef4fa 0%, #fff1eb 60%, #fef2f2 100%);
  min-height: 100dvh;
}

.auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  gap: 16px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 40px 32px;
  border: 1px solid var(--border);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 0 6px;
  margin-bottom: 22px;
  text-decoration: none;
}
.auth-logo:hover { text-decoration: none; }
.auth-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--bleu-fonce);
}
.auth-name b { color: var(--orange); }

.auth-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-align: center;
  margin-bottom: 6px;
}
.auth-sub {
  text-align: center;
  color: var(--text-mut);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
  outline: none;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--text);
}
.field input:focus {
  border-color: var(--bleu);
  background: white;
  box-shadow: 0 0 0 3px rgba(91,143,185,0.15);
}
.field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.field-pwd {
  position: relative;
}
.field-pwd input {
  padding-right: 44px;
}
.pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-mut);
  display: inline-flex;
  align-items: center;
}
.pwd-toggle:hover { color: var(--bleu-fonce); background: var(--bleu-tres-clair); }

.auth-error {
  background: var(--rouge-clair);
  color: var(--rouge);
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
}
.auth-success {
  background: var(--vert-clair);
  color: #065f46;
  border: 1px solid #86efac;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--bleu), var(--bleu-fonce));
  color: white;
  border: none;
  padding: 13px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(91,143,185,0.35);
  transition: all 0.15s;
  min-height: 46px;
  width: 100%;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(91,143,185,0.45); }
.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 12px rgba(91,143,185,0.35);
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-links {
  text-align: center;
  font-size: 13px;
  margin-top: 4px;
}
.auth-links a { color: var(--orange-fonce); font-weight: 600; }

.auth-hint {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-mut);
  text-align: center;
  line-height: 1.5;
}

.auth-footer {
  font-size: 12px;
  color: var(--text-mut);
  text-align: center;
}
.auth-footer a { color: var(--text-mut); }

@media (max-width: 500px) {
  .auth-card { padding: 32px 22px; }
  .auth-title { font-size: 20px; }
}
