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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f5f7;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a2e;
}

.wrapper {
  width: 100%;
  padding: 1rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: 2rem;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -.02em;
}

/* Heading */
.title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.subtitle {
  font-size: .875rem;
  color: #6b7280;
  margin-bottom: 1.75rem;
}

/* Alert */
.alert {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .875rem;
  margin-bottom: 1.25rem;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

label {
  font-size: .8125rem;
  font-weight: 500;
  color: #374151;
}

input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: .625rem .875rem;
  font-size: .9375rem;
  color: #1a1a2e;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
}

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

input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* Password wrapper + toggle */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  padding-right: 2.75rem;
}

.toggle-password {
  position: absolute;
  right: .75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color .15s;
}

.toggle-password:hover { color: #4b5563; }

/* État caché (défaut) : œil visible, œil-barré masqué */
.toggle-password .icon-eye     { display: block; }
.toggle-password .icon-eye-off { display: none; }

/* État visible : œil masqué, œil-barré visible */
.toggle-password[data-visible="true"] .icon-eye     { display: none; }
.toggle-password[data-visible="true"] .icon-eye-off { display: block; }

/* Submit */
.btn-submit {
  margin-top: .5rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .75rem;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background .15s, transform .1s;
}

.btn-submit:hover  { background: #1d4ed8; }
.btn-submit:active { transform: scale(.98); }
