/**
 * AUTH MINIMAL CSS
 * Styles minimalistes pour les pages d'authentification
 * 
 * RÈGLES UX:
 * - Interface totalement épurée
 * - Formulaire centré
 * - Aucun branding décoratif
 * - Focus sur la fonctionnalité
 */

/* ===== Variables ===== */
:root {
  --auth-bg: #f8f9fa;
  --auth-card-bg: #ffffff;
  --auth-text: #212529;
  --auth-text-muted: #6c757d;
  --auth-border: #dee2e6;
  --auth-primary: #0d6efd;
  --auth-primary-hover: #0b5ed7;
  --auth-danger: #dc3545;
  --auth-success: #198754;
  --auth-warning: #ffc107;
  --auth-info: #0dcaf0;
  --auth-radius: 8px;
  --auth-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ===== Body ===== */
.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--auth-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--auth-text);
  padding: 1rem;
  margin: 0;
}

/* ===== Messages ===== */
.auth-messages {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-message {
  padding: 0.75rem 1rem;
  border-radius: var(--auth-radius);
  font-size: 0.875rem;
  text-align: center;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-message--info {
  background: #cfe2ff;
  color: #084298;
  border: 1px solid #b6d4fe;
}

.auth-message--success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.auth-message--warning {
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffecb5;
}

.auth-message--error,
.auth-message--danger {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

/* ===== Main Container ===== */
.auth-main {
  width: 100%;
  max-width: 420px;
}

/* ===== Card ===== */
.auth-card {
  background: var(--auth-card-bg);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  padding: 2rem;
}

/* ===== Typography ===== */
.auth-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: var(--auth-text);
}

.auth-subtitle {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: var(--auth-text-muted);
  text-align: center;
}

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

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

.auth-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--auth-text);
}

.auth-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  background: var(--auth-card-bg);
  color: var(--auth-text);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.auth-input::placeholder {
  color: var(--auth-text-muted);
}

.auth-input--code {
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.5rem;
  font-family: monospace;
}

.auth-hint {
  font-size: 0.75rem;
  color: var(--auth-text-muted);
}

.auth-error {
  font-size: 0.75rem;
  color: var(--auth-danger);
}

/* ===== Buttons ===== */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: var(--auth-radius);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.auth-btn--primary {
  background: var(--auth-primary);
  color: white;
}

.auth-btn--primary:hover {
  background: var(--auth-primary-hover);
}

.auth-btn--secondary {
  background: transparent;
  color: var(--auth-text-muted);
  border: 1px solid var(--auth-border);
}

.auth-btn--secondary:hover {
  background: var(--auth-bg);
  color: var(--auth-text);
}

.auth-btn--danger {
  background: var(--auth-danger);
  color: white;
}

.auth-btn--danger:hover {
  background: #bb2d3b;
}

.auth-btn--full {
  width: 100%;
}

.auth-btn--sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

/* ===== Actions ===== */
.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.auth-actions--row {
  flex-direction: row;
  justify-content: space-between;
}

/* ===== Links ===== */
.auth-link {
  font-size: 0.875rem;
  color: var(--auth-primary);
  text-decoration: none;
}

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

/* ===== Meta (checkbox + link row) ===== */
.auth-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* ===== Alerts (inline) ===== */
.auth-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--auth-radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.auth-alert--info {
  background: #cfe2ff;
  color: #084298;
  border: 1px solid #b6d4fe;
}

.auth-alert--success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.auth-alert--warning {
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffecb5;
}

.auth-alert--error,
.auth-alert--danger {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

/* ===== Divider ===== */
.auth-divider {
  height: 1px;
  background: var(--auth-border);
  margin: 1.5rem 0;
}

/* ===== QR Code ===== */
.auth-qr {
  text-align: center;
  margin: 1.5rem 0;
}

.auth-qr img {
  max-width: 180px;
  padding: 0.5rem;
  background: white;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
}

/* ===== Secret Key ===== */
.auth-secret {
  padding: 0.75rem;
  background: var(--auth-bg);
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  font-family: monospace;
  font-size: 0.875rem;
  word-break: break-all;
  text-align: center;
  margin: 1rem 0;
}

/* ===== Icon States ===== */
.auth-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.auth-icon i {
  font-size: 3rem;
}

.auth-icon--success i {
  color: var(--auth-success);
}

.auth-icon--danger i {
  color: var(--auth-danger);
}

.auth-icon--warning i {
  color: var(--auth-warning);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .auth-body {
    padding: 0.5rem;
  }
  
  .auth-card {
    padding: 1.5rem;
  }
  
  .auth-meta {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}
