<?php /* Page de connexion — incluse par index.php quand non authentifié. */ ?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Accès — Régie</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=IBM+Plex+Sans:wght@400;500&family=IBM+Plex+Mono:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/app.css?v=6">
<style>
  body{display:flex;align-items:center;justify-content:center;padding:20px}
  .gate{width:min(380px,100%);background:linear-gradient(180deg,var(--panel),var(--ink-2));
    border:1px solid var(--line);border-radius:18px;padding:32px 28px;text-align:center;
    box-shadow:0 30px 80px -30px #000;position:relative;z-index:2}
  .gate .led{margin:0 auto 18px;width:13px;height:13px}
  .gate h1{font-family:var(--font-d);letter-spacing:.22em;font-size:24px;margin:0}
  .gate p{color:var(--muted);font-size:13px;margin:6px 0 24px}
  .gate input{margin-bottom:14px;text-align:center;font-family:var(--font-m);letter-spacing:.1em}
  .gate .err{color:var(--rose);font-size:13px;margin:0 0 14px}
</style>
</head>
<body>
<div class="scanline" aria-hidden="true"></div>
<form class="gate" method="post" action="index.php">
  <span class="led ok"></span>
  <h1>RÉGIE</h1>
  <p>Studio de messages téléphoniques — accès protégé</p>
  <?php if (!empty($loginError)): ?>
    <p class="err"><?= htmlspecialchars($loginError) ?></p>
  <?php endif; ?>
  <input type="password" name="app_pw" class="inp" placeholder="Mot de passe" autofocus required>
  <button type="submit" class="btn signal block">Entrer</button>
</form>
</body>
</html>
