/* ---- Thème & variables ---- */
:root {
  --bg: #1e1e1e;
  --bg-grad:
    radial-gradient(1200px 800px at 10% -10%, #0e1a1f 0%, transparent 50%),
    radial-gradient(1600px 900px at 110% 20%, #1a0f1d 0%, transparent 60%);
  --surface: #2b2b2b;
  --surface-2: #262626;
  --text: #e8e8e8;
  --muted: #bdbdbd;
  --accent: #00bcd4;
  --accent-600: #0097a7;
  --border: #393939;
  --ring: rgba(0,188,212,.25);
  --shadow-soft: 0 18px 45px rgba(0,0,0,.6);
  --radius-lg: 20px;
  --radius-md: 10px;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---- Base ---- */
body.auth {
  min-height: 100vh;
  background-color: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
}

/* Centrage plein écran */
.auth-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Carte ---- */
.auth-center-inner {
  width: 100%;
  max-width: 480px;
  padding: 16px;
}

.card {
  background: radial-gradient(circle at 0 0, rgba(255,255,255,.05), transparent 55%),
              var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 22px 22px 20px;
}

.auth-card {
  margin: 0;
}

/* ---- Formulaire ---- */
.grid {
  display: grid;
  gap: 14px;
}

/* Header centré */
.auth-header-centered {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-logo-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 22px;
  /* tu peux garder ou enlever le background suivant suivant l'effet désiré */
  background:
    radial-gradient(circle at 30% 0, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(135deg, rgba(0,0,0,.6), rgba(0,0,0,1));
  overflow: hidden;            /* important pour que le logo suive le rond */
}

.auth-logo {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;      /* le SVG suit la forme arrondie */
  object-fit: cover;           /* remplit bien tout le wrapper */
}

.auth-title {
  margin: 0;
  font-size: 22px;
}

.auth-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Champs */
label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 11px;
  font-size: 14px;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background-color .15s ease;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
  color: #888;
}

input[type="email"]:hover,
input[type="password"]:hover,
input[type="text"]:hover {
  border-color: #4b4b4b;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-600), 0 0 0 4px var(--ring);
  outline: none;
}

/* ---- Champ mot de passe avec œil ---- */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* œil "ouvert" */
.password-toggle .eye {
  width: 18px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid #9aa0ae;
  position: relative;
}

.password-toggle .eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9aa0ae;
  transform: translate(-50%, -50%);
}

/* état visible : petit slash sur l'œil */
.password-toggle.is-visible .eye::before {
  content: "";
  position: absolute;
  left: 10%;
  top: 50%;
  width: 80%;
  height: 2px;
  background: #9aa0ae;
  transform: translateY(-50%) rotate(-20deg);
}

/* Liens & actions */
.auth-form {
  gap: 14px;
}

/* Mot de passe oublié centré */
.auth-extra {
  display: flex;
  justify-content: center;
}

.auth-link {
  font-size: 13px;
  color: var(--accent);
}

.auth-link:hover {
  text-decoration: underline;
}

/* Bouton Se connecter centré */
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.auth-actions {
  margin-top: 4px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* Boutons */
.btn {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  padding: 7px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition:
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .08s ease;
}

.btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-600));
  color: #061018;
  border-color: var(--accent);
}

.btn.primary:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
}

.btn[disabled] {
  opacity: .6;
  cursor: progress;
}

/* Bas de carte */
.auth-footer {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .card {
    padding: 18px 14px;
  }
}
