/* Styles de la section /app/ — pages utilisateur (activation, connexion, compte) */
/* Complement de main.css, ne pas inclure sans main.css. */

/* ─── Variables supplementaires ─────────────────────────────────────────────── */
:root {
  --color-accent:       #3b82f6;
  --color-accent-hover: #2563eb;
  --color-error:        #f87171;
  --color-success:      #4ade80;
  --color-input-bg:     rgba(15, 23, 42, 0.55);
  --color-input-border: rgba(148, 163, 184, 0.3);
  --color-input-focus:  #60a5fa;
}

/* ─── Corps de page ──────────────────────────────────────────────────────────── */
body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(180deg, #0b1220 0%, #09101d 100%);
  min-height: 100vh;
}

/* ─── Card de formulaire (override largeur pour les petits formulaires) ──────── */
.form-card {
  width: min(440px, 100%);
}

/* ─── Logo / entete page ─────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.app-header img {
  width: 40px;
  height: 40px;
}

.app-header .app-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-base);
}

.app-header .app-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-muted-base);
}

/* ─── Formulaires ────────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted-base);
  letter-spacing: 0.02em;
}

.form-input {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1px solid var(--color-input-border);
  border-radius: 8px;
  background: var(--color-input-bg);
  color: var(--color-text-base);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.form-input::placeholder {
  color: rgba(148, 163, 184, 0.45);
}

.form-input:focus {
  border-color: var(--color-input-focus);
}

.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Boutons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.625rem 1.125rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--color-muted-base);
  border: 1px solid var(--color-input-border);
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--color-muted-base);
  color: var(--color-text-base);
}

/* ─── Messages d'etat ────────────────────────────────────────────────────────── */
.alert {
  padding: 0.65rem 0.875rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-error {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--color-error);
}

.alert-success {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.35);
  color: var(--color-success);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

/* ─── Etat de chargement ─────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Liens secondaires / navigation entre pages ─────────────────────────────── */
.form-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-muted-base);
}

.form-footer a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-footer a:hover {
  color: var(--color-text-base);
}

/* ─── Bloc d'infos compte ────────────────────────────────────────────────────── */
.account-info {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.account-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.account-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted-base);
}

.account-value {
  font-size: 0.9375rem;
  color: var(--color-text-base);
  word-break: break-word;
}

.badge {
  display: inline-block;
  padding: 0.15em 0.55em;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-user    { background: rgba(59,130,246,0.2);  color: #93c5fd; }
.badge-admin   { background: rgba(251,191,36,0.2);  color: #fcd34d; }
.badge-active  { background: rgba(74,222,128,0.2);  color: #4ade80; }
.badge-pending { background: rgba(148,163,184,0.2); color: #94a3b8; }

/* ─── Separateur ─────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  margin: 1.25rem 0;
}

/* ─── Sections de la page compte ─────────────────────────────────────────────── */
.account-section {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.account-section-title {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted-base);
}

.account-mono {
  font-family: "Consolas", "SF Mono", "Fira Code", monospace;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
}
