/* ==========================================================
   reset.css — style pour la page de réinitialisation
   Assorti à la page login
   ========================================================== */

/* ---- 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);
  --ok: #47d147;
  --err: #ff6b6b;

  --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 (comme login) */
.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;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* ---- Carte ---- */
.auth-center-inner {
  width: 100%;
  max-width: 520px;
  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 & layout interne ---- */
.grid {
  display: grid;
  gap: 14px;
}

/* Header centré (logo + titre) */
.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 */
.field {
  display: flex;
  flex-direction: column;
}

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::placeholder {
  color: #9aa3ab;
}

input:hover {
  border-color: #4b4b4b;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-600), 0 0 0 4px var(--ring);
  outline: none;
}

/* ---- Messages & blocs ---- */
.reset-text {
  font-size: 13px;
  line-height: 1.5;
}

.reset-block {
  padding: 4px 0;
}

/* Statut (message sous le formulaire) */
.status {
  display: block;
  min-height: 1.2em;
  margin-top: 6px;
  font-size: 13px;
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: var(--err);
}

/* ---- 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;
  font-weight: 600;
}

.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;
}

/* ---- Actions & footer (centrés comme login) ---- */
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.auth-actions {
  margin-top: 4px;
}

.auth-link {
  font-size: 13px;
  color: var(--accent);
}

.auth-link:hover {
  text-decoration: underline;
}

/* Bas de carte */
.auth-footer {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

/* ---- Erreurs sur champs (utilisé par reset.js) ---- */
#container-reset input:invalid {
  box-shadow: none;
}

#container-reset [aria-invalid="true"] {
  border-color: var(--err) !important;
  box-shadow: 0 0 0 3px rgba(255,107,107,.25);
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .card {
    padding: 18px 14px;
  }
}
