/* Authentification — écran VIP, indépendant du thème sombre du tableau de bord. */

:root {
  --auth-ink: #12263a;
  --auth-muted: #6b7c8f;
  --auth-border: #e6eaf0;
  --auth-bg: #f4f6f8;
  --auth-accent: #e26d5a;
  --auth-accent-dark: #c95544;
  --auth-radius: 14px;
  --auth-font: "Montserrat", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body.auth-page {
  font-family: var(--auth-font);
  color: var(--auth-ink);
  background: var(--auth-bg);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.auth-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  background: #0b1c2c;
  min-height: 0;
  height: 100%;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 28, 44, 0.15) 30%, rgba(11, 28, 44, 0.72) 100%);
}

.auth-visual-caption {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 40px;
  z-index: 1;
  color: #fff;
}

.auth-brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
  text-transform: uppercase;
  margin: 0 0 10px;
  opacity: 0.92;
}

.auth-visual-caption p {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  max-width: 16em;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  background: #fff;
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-lede {
  margin: 0 0 20px;
  color: var(--auth-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--auth-ink);
}

.auth-field input,
.auth-field select,
.auth-field .form-control {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--auth-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(226, 109, 90, 0.18);
}

.auth-submit {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--auth-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.auth-submit:hover {
  background: var(--auth-accent-dark);
}

.auth-submit:active {
  transform: translateY(1px);
}

a.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-submit-ghost {
  background: #fff;
  color: var(--auth-ink);
  border: 1px solid var(--auth-border);
}

.auth-submit-ghost:hover {
  background: #f8fafc;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.auth-links {
  margin-top: 16px;
  text-align: center;
}

.auth-links a,
.auth-links button.auth-link {
  display: block;
  color: var(--auth-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  padding: 0;
}

.auth-links a:hover,
.auth-links button.auth-link:hover {
  color: var(--auth-ink);
}

.auth-alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.auth-alert-danger {
  background: #fdecea;
  color: #8a2c22;
}

.auth-alert-success,
.auth-alert-info {
  background: #e9f6ee;
  color: #1e6b3e;
}

@media (max-width: 880px) {
  html, body,
  body.auth-page {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: auto;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .auth-visual {
    min-height: 220px;
    height: 32vh;
    max-height: 32vh;
  }

  .auth-visual-caption {
    left: 24px;
    right: 24px;
    bottom: 20px;
  }

  .auth-visual-caption p {
    font-size: 1.05rem;
  }

  .auth-panel {
    padding: 28px 20px 40px;
  }
}
