/* ═══════════════════════════════════════════════════════
 *  Lorewarden — Connexion (extrait de login.php)
 *  100% tokens (css/tokens.css + thèmes). Flippe Obsidian ↔ Vélin
 *  via data-theme posé par le bootstrap inline de login.php.
 *  Alias locaux purgés (L1) → vocabulaire commun.
 * ═══════════════════════════════════════════════════════ */

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

  body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
  }

  body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 0%, var(--red-glow) 0%, transparent 60%);
    opacity: 0.5;
    pointer-events: none;
  }

  .login-wrap {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
  }

  .forge-title {
    text-align: center;
    margin-bottom: 2.2rem;
  }

  /* (.forge-logo-c retiré : le sceau raster est remplacé par le lockup SVG — voir brand-lockup.php) */

  /* Ligne décorative sous le logo */
  .forge-title-divider {
    display: flex; align-items: center; gap: 0.7rem;
    margin: 0 auto 0.8rem;
    width: 200px;
  }
  .forge-title-divider-line {
    flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  }
  .forge-title-divider-diamond {
    width: 5px; height: 5px; background: var(--gold);
    transform: rotate(45deg); flex-shrink: 0;
  }

  .forge-title .sword { display: none; } /* legacy : plus d'épées emoji */
  /* Le lockup de marque (brand-lockup.php) EST le h1 → centré via text-align du parent. */
  .forge-title h1 { margin: 0 auto 0; }
  .forge-title p {
    font-family: var(--font-ui);
    font-size: 0.63rem;
    color: var(--text-dim);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-top: 0.3rem;
    opacity: 0.7;
  }

  .card {
    position: relative;            /* ancre le filet ::before du thème Vélin (sinon il flotte sur .login-wrap) */
    background: var(--bg-card);
    border: 1px solid var(--line-strong);
    border-top: 3px solid var(--red);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    padding: 2rem;
  }

  .tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line-strong);
  }
  .tab-btn {
    flex: 1;
    padding: 0.7rem;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
  }
  .tab-btn:hover { color: var(--text); }
  .tab-btn.active { color: var(--red-light); border-bottom-color: var(--red); }

  .form-group { margin-bottom: 1rem; }
  label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.35rem;
  }
  input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-ui);
    font-size: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
  }
  input:focus { border-color: var(--red); }

  .btn-submit {
    width: 100%;
    padding: 0.8rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--red);
    color: #fff;                 /* blanc sur CTA rouge — correct/AA dans les 2 thèmes */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 0.6rem;
    transition: background 0.2s, box-shadow 0.2s;
  }
  .btn-submit:hover { background: var(--red-light); box-shadow: 0 4px 20px var(--red-glow); }

  .msg {
    padding: 0.7rem 1rem;
    border-radius: 5px;
    font-size: 0.92rem;
    margin-bottom: 1rem;
  }
  .msg-error   { background: color-mix(in srgb, var(--red) 12%, transparent);   border: 1px solid var(--red);   color: var(--red-light); }
  .msg-success { background: color-mix(in srgb, var(--green) 12%, transparent); border: 1px solid var(--green); color: var(--green-light); }

  .switch-mode {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-dim);
  }
  .switch-mode a {
    color: var(--red-light);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.78rem;
  }
  .switch-mode a:hover { text-decoration: underline; }

  /* Lien public « À propos » (sous le sélecteur de mode) */
  .login-about { text-align: center; margin-top: 0.85rem; }
  .login-about a { color: var(--text-dim); text-decoration: none; font-family: var(--font-ui); font-size: 0.8rem; transition: color 0.15s ease; }
  .login-about a:hover { color: var(--gold); }

  /* ── Google SSO — ÎLOT de marque assumé ──
     Le bouton « Continuer avec Google » suit les guidelines de marque Google
     (fond blanc, encre #3c4043, bord #dadce0, police Roboto, logo multicolore).
     Il NE flippe PAS avec le thème : un bouton Google est blanc partout. */
  .sso-divider {
    display: flex; align-items: center; gap: .75rem;
    margin: 1.4rem 0 1.1rem;
  }
  .sso-divider-line { flex: 1; height: 1px; background: var(--line-strong); }
  .sso-divider-text {
    font-family: var(--font-ui); font-size: .55rem;
    letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim);
    white-space: nowrap;
  }

  .btn-google {
    display: flex; align-items: center; justify-content: center; gap: .75rem;
    width: 100%; padding: .7rem 1rem;
    background: #fff; color: #3c4043;
    border: 1px solid #dadce0; border-radius: 5px;
    font-family: 'Roboto', var(--font-ui);
    font-size: .93rem; font-weight: 500;
    cursor: pointer; text-decoration: none;
    transition: background .18s, box-shadow .18s;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
  }
  .btn-google:hover {
    background: #f8f8f8;
    box-shadow: 0 2px 8px rgba(0,0,0,.45);
  }
  .btn-google svg { flex-shrink: 0; }

  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
