/* =========================================================
   AUTH — login.html (sign in / sign up / forgot)
   ========================================================= */
.page-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

/* Fond : noir + lueur olive/rouge discrète en bas à droite */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 45% at 100% 100%, rgba(124, 138, 58, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 40% at 90% 80%, rgba(179, 18, 28, 0.18), transparent 70%),
    var(--black);
}

/* ---------- Barre ---------- */
.auth-bar {
  display: grid;
  grid-template-columns: 44px 1fr 44px; /* colonne droite vide : logo centré */
  align-items: center;
  padding: 18px var(--header-side);
}

.auth-back,
.auth-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  color: var(--white);
  transition: color 0.2s, background 0.2s;
}

.auth-back:hover,
.auth-lang:hover {
  color: var(--green);
  background: rgba(255, 255, 255, 0.05);
}

.auth-logo {
  justify-self: center;
}

.auth-logo img {
  height: 40px;
  width: auto;
}

/* ---------- Vue ---------- */
.auth {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px var(--header-side) 60px;
}

.auth-view {
  width: min(440px, 100%);
  animation: authIn 0.45s var(--ease);
}

.auth-view[hidden] {
  display: none;
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 12px;
}

.auth-sub {
  text-align: center;
  font-size: 14px;
  color: var(--grey);
  margin-bottom: 32px;
}

.auth-sub a,
.auth-hint a,
.auth-link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-sub a:hover,
.auth-hint a:hover,
.auth-link:hover {
  color: var(--green);
}

/* ---------- Formulaire ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span:first-child {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  background: rgba(18, 16, 18, 0.9);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

.field input:focus {
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(124, 138, 58, 0.2);
}

.field input.invalid {
  border-color: var(--red);
}

.pw-wrap {
  position: relative;
  display: block;
}

.pw-wrap input {
  padding-right: 46px;
}

.pw-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  color: var(--grey);
  background: center / 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9b3b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  transition: background-color 0.2s;
}

.pw-eye:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.pw-eye.on {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a4e024' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M4 4l16 16'/%3E%3C/svg%3E");
}

.auth-link.right {
  align-self: flex-end;
  font-size: 13px;
  margin-top: -4px;
}

.auth-hint {
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
  color: var(--grey);
}

.auth-error,
.auth-success {
  min-height: 0;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--red);
}

.auth-success {
  color: var(--green);
}

.auth-error:empty,
.auth-success:empty {
  display: none;
}

.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 4px;
}

/* ---------- Séparateur + social ---------- */
.auth-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 18px;
  font-size: 13px;
  color: var(--grey);
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--white);
  color: #0a0a0a;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.social:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .auth-bar {
    padding: 14px 16px;
  }

  .auth {
    padding: 24px 20px 48px;
  }

  .auth-sub {
    margin-bottom: 26px;
  }
}

@media (max-width: 420px) {
  .auth-social {
    grid-template-columns: 1fr;
  }
}
