/* KikuSekai — comptes : connexion, inscription, vérifications, mot de passe, double authentification */

/* ── Base des pages de compte (ex-authPageCss) ── */
  .auth { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 110px 5vw 64px; }
  .auth-card {
    width: 100%; max-width: 440px;
    background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 34px 30px 30px;
  }
  .auth-card.wide { max-width: 640px; }
  /* Connexion / inscription : carte centrée à l'écran (horizontalement et verticalement), quelle que soit la taille.
     min-height + align-items:center : si l'écran est trop petit, la page s'allonge et défile normalement. */
  .auth--center {
    align-items: center;
    min-height: 100vh; min-height: 100dvh;
    padding-top: 96px; padding-bottom: 96px;
  }
  .auth--center .auth-card { margin: 0 auto; }
  .auth-card h1 { font-family: 'Bebas Neue', sans-serif; font-weight: normal; font-size: 40px; letter-spacing: 1px; line-height: 1; }
  .auth-card h1 span { color: var(--red); }
  .auth-sub { color: var(--text2); font-size: 14px; margin-top: 10px; }
  .auth-card h2 { font-family: 'Bebas Neue', sans-serif; font-weight: normal; font-size: 24px; letter-spacing: 0.5px; margin: 34px 0 14px; padding-top: 26px; border-top: 1px solid var(--border); }
  .auth-form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
  .auth-card h2 + .auth-form { margin-top: 0; }
  .field label { display: block; font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
  .field input[type="text"], .field input[type="email"], .field input[type="password"] {
    width: 100%; background: var(--bg); color: var(--text);
    border: 1px solid var(--border2); border-radius: var(--radius-sm);
    padding: 12px 13px; font-size: 16px; font-family: inherit;   /* 16px : évite le zoom automatique d'iOS */
    transition: border-color 0.15s;
  }
  .field input:focus { outline: none; border-color: var(--red); }
  .field .hint { font-size: 11.5px; color: var(--text3); margin-top: 5px; }
  .check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text2); line-height: 1.5; }
  .check input { margin-top: 3px; accent-color: var(--red); flex-shrink: 0; }
  .check a { color: var(--text); border-bottom: 1px solid var(--border2); }
  .btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--red); color: #fff; border: 0; border-radius: var(--radius-sm);
    padding: 13px 20px; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
    transition: filter 0.15s;
  }
  .btn:hover { filter: brightness(1.08); }
  .btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border2); }
  .btn-ghost:hover { filter: none; border-color: var(--red); color: var(--red); }
  .btn-danger { background: rgba(255,95,95,0.12); color: #ff6b6b; border: 1px solid rgba(255,95,95,0.35); }
  .btn-danger:hover { filter: none; background: rgba(255,95,95,0.2); }
  .auth-alt { margin-top: 22px; font-size: 13.5px; color: var(--text2); text-align: center; }
  .auth-alt a { color: var(--text); border-bottom: 1px solid var(--border2); }
  .auth-alt a:hover { color: var(--red); border-color: var(--red); }
  .alert { border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13.5px; margin-top: 20px; line-height: 1.5; }
  .alert-error { background: rgba(255,95,95,0.1); border: 1px solid rgba(255,95,95,0.35); color: #ff8a8a; }
  .alert-ok { background: rgba(80,200,120,0.1); border: 1px solid rgba(80,200,120,0.35); color: #7fd99b; }
  .btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none;
    background: var(--bg); color: var(--text); border: 1px solid var(--border2); font-weight: 600; }
  .btn-google:hover { filter: none; border-color: var(--text2); }
  .btn-google svg { flex: none; }
  .auth-sep { display: flex; align-items: center; gap: 12px; margin-top: 22px; margin-bottom: 16px; color: var(--text3); font-size: 12.5px; }
  .auth-sep::before, .auth-sep::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .profile-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .profile-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
  .profile-row span:first-child { color: var(--text2); }
  .profile-row span:last-child { color: var(--text); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
  .btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
  .btn-row form { display: inline; }
  .danger-title { color: #ff8a8a; }
  @media (max-width: 480px) {
    .auth-card { padding: 28px 20px 24px; }
    .auth--center { padding-top: 84px; padding-bottom: 40px; }
  }
  /* Bouton afficher / masquer le mot de passe */
  .pw-wrap { position: relative; }
  .auth-card .pw-wrap input.pw-input { padding-right: 46px; }
  .pw-toggle {
    position: absolute; top: 0; right: 0; width: 44px; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 0; padding: 0; cursor: pointer; color: var(--text2);
  }
  .pw-toggle:hover { color: var(--text); }
  .pw-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; border-radius: var(--radius-sm); }
  .pw-toggle svg { width: 20px; height: 20px; }

/* ── Double authentification et codes (ex-authMfaCss) ── */
  .code-input { text-align: center; letter-spacing: 4px; font-size: 22px !important; }
  .alert-info { background: rgba(120,160,255,0.1); border: 1px solid rgba(120,160,255,0.35); color: #a9c0ff; }
  .backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; }
  .backup-codes span { background: var(--bg); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 8px 10px; text-align: center; }
  .qr-box { background: #fff; padding: 10px; border-radius: 8px; display: inline-block; margin: 8px 0; }
  .secret-key { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; color: var(--text); }
  .mfa-status { font-size: 14px; color: var(--text2); margin-bottom: 14px; }
  .mfa-status strong { color: var(--text); }
  .mfa-block { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
  .mfa-block h3 { font-size: 15px; margin-bottom: 6px; }
  .mfa-block p { font-size: 13px; color: var(--text2); margin-bottom: 12px; line-height: 1.5; }

/* ── Mentions sous les formulaires (ex-<style> en ligne de connexion et inscription) ── */
.auth-legal { margin-top: 16px; font-size: 12px; line-height: 1.55; color: var(--text3); text-align: center; }
.auth-legal a { color: var(--text2); border-bottom: 1px solid var(--border2); }
.auth-legal a:hover { color: var(--red); border-color: var(--red); }

/* ── Liens « mot de passe oublié » (ex-<style> en ligne de connexion) ── */
.auth-forgot { margin-top: 7px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.auth-forgot a { color: var(--text2); border-bottom: 1px solid var(--border2); }
.auth-forgot a:hover { color: var(--red); border-color: var(--red); }

/* ── Formulaire « Renvoyer un code » (remplace un style="" en ligne) ── */
.auth-resend { margin-top: 14px; text-align: center; }
