@import url('/css/variables.css?v=bw1');
/* ================================
   Login — style pro PingSL
================================ */

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

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background:
    linear-gradient(rgba(0, 0, 0, .58), rgba(0, 0, 0, .58)),
    url("/image/havelange.jpg") center / cover no-repeat fixed,
    linear-gradient(135deg, #000000, #2b2b2b);
  color: var(--text);
}

/* Layout */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
}

/* Partie visuelle */

.login-visual {
  position: relative;
  display: grid;
  place-items: center;
  padding: 48px;
  overflow: hidden;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(227, 0, 15, .22), transparent 36%),
    radial-gradient(circle at bottom left, rgba(29, 123, 233, .18), transparent 40%),
    linear-gradient(135deg, rgba(0, 0, 0, .86), rgba(30, 30, 30, .78));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.visual-overlay {
  position: relative;
  z-index: 1;
  max-width: 520px;
  color: #fff;
  text-align: center;
}

.visual-logo {
  width: min(210px, 42vw);
  height: auto;
  margin-bottom: 20px;
  padding: 10px;
  border-radius: 28px;
  background: #fff;                 /* le logo a un fond blanc : on l'encadre */
  box-shadow: 0 18px 40px rgba(0, 0, 0, .40);
}

.visual-overlay h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.visual-overlay p {
  margin: 18px auto 0;
  max-width: 440px;
  color: #d4d4d4;
  font-size: 18px;
  font-weight: 700;
}

/* Partie formulaire */

.login-panel {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(100%, 430px);
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .55);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  width: 92px;
  height: auto;
  margin-bottom: 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .10);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 900;
}

.login-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

/* Message erreur */

.error-message {
  margin-bottom: 16px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger-text);
  font-weight: 800;
  font-size: 14px;
}

/* Formulaire */

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  color: #2b2b2b;
  font-size: 14px;
  font-weight: 900;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 0 14px;
  color: #111111;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder {
  color: #9a9a9a;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, .12);
}

/* Mot de passe */

.password-container {
  position: relative;
}

.password-container input {
  padding-right: 48px;
}

.icon-btn {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s ease, color .15s ease;
}

.icon-btn:hover {
  background: #f1f1f1;
  color: var(--primary);
}

/* Bouton connexion */

.btn-login {
  min-height: 48px;
  width: 100%;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .28);
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}

.btn-login:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .34);
}

.btn-login:active {
  transform: translateY(0);
}

/* Accessibilité */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Responsive */

@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
  }
}

@media (max-width: 540px) {
  body {
    background:
      linear-gradient(rgba(0, 0, 0, .64), rgba(0, 0, 0, .64)),
      url("/image/havelange.jpg") center / cover no-repeat fixed,
      linear-gradient(135deg, #000000, #2b2b2b);
  }

  .login-panel {
    padding: 18px;
  }

  .login-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .login-logo {
    width: 78px;
  }

  .login-header h2 {
    font-size: 30px;
  }
}

/* Focus visible — accessibilité clavier */

.btn-login:focus-visible,
.icon-btn:focus-visible {
  outline: 3px solid rgba(17, 17, 17, .7);
  outline-offset: 2px;
}

/* Mouvement réduit */

@media (prefers-reduced-motion: reduce) {
  input[type="text"],
  input[type="password"],
  .icon-btn,
  .btn-login {
    transition: none !important;
    animation: none !important;
  }
}