/* Euridium — pages d'authentification (connexion, réinitialisation).
   Un seul fichier pour que les deux pages restent identiques. */
:root {
  --bg: var(--eu-bg-base, #080B12);
  --panel: rgba(13, 18, 30, 0.78);
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --field: rgba(255, 255, 255, 0.035);
  --text: var(--eu-text-primary, #EEF2FA);
  --text2: var(--eu-text-muted, #9AA6BC);
  --text3: var(--eu-text-subtle, #6F7C93);
  --accent: var(--eu-accent, #3B7BF6);
  --accent2: #5B93FF;
  --red: var(--eu-critical, #E5566B);
  --green: var(--eu-success, #33BC86);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 14px; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* ---------- Fond : grille, lueur, anneau de 12 étoiles ---------- */
.bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(91, 147, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 147, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 46%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 46%, #000 20%, transparent 75%);
}
.bg-glow {
  position: absolute; left: 50%; top: 46%; width: 900px; height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(59, 123, 246, 0.17) 0%, rgba(59, 123, 246, 0.05) 36%, transparent 66%);
  animation: breathe 14s ease-in-out infinite;
}
.bg-ring {
  position: absolute; left: 50%; top: 46%;
  width: min(720px, 130vw); height: min(720px, 130vw);
  transform: translate(-50%, -50%);
  opacity: 0; animation: ring-in 1.6s ease-out 0.2s forwards, spin 240s linear infinite;
  filter: drop-shadow(0 0 4px rgba(160, 190, 255, 0.8));
}
.bg-ring .st { fill: #D9E4FF; animation: twinkle 6s ease-in-out infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes ring-in { to { opacity: 0.6; } }
@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}
@keyframes twinkle { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ---------- Carte ---------- */
.stage {
  position: relative; z-index: 1; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px 32px;
}
.card {
  width: 100%; max-width: 400px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 36px 32px 26px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.card.wide { max-width: 520px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .name { font-weight: 700; letter-spacing: 0.18em; font-size: 13px; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.lead { margin-top: 6px; color: var(--text2); font-size: 13px; line-height: 1.5; }

form { margin-top: 24px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
.field label .opt { color: var(--text3); font-weight: 400; }
.input {
  width: 100%; height: 42px; padding: 0 12px;
  background: var(--field); border: 1px solid var(--line2); border-radius: 9px;
  color: var(--text); font: inherit; font-size: 14px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input::placeholder { color: var(--text3); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 123, 246, 0.22); background: rgba(255, 255, 255, 0.05); }
select.input { appearance: none; -webkit-appearance: none; cursor: pointer; }
select.input option { background: #0D121E; color: var(--text); }
input[type="date"].input { color-scheme: dark; }
.control { position: relative; }
.control .input { padding-right: 64px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: 30px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text2); font: inherit; font-size: 12px; cursor: pointer;
}
.pw-toggle:hover { color: var(--text); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 2px 0 18px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text2); line-height: 1.45; margin-bottom: 10px; }
.row .check { margin-bottom: 0; align-items: center; }
.check input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.check a { color: var(--accent2); }
.link { background: none; border: 0; padding: 0; color: var(--accent2); font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.hint { font-size: 12px; color: var(--text3); margin: -4px 0 14px; }
.hint.good { color: var(--green); }
.hint.bad { color: var(--red); }

.btn {
  width: 100%; height: 44px; border: 0; border-radius: 9px;
  background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 24px -10px rgba(59, 123, 246, 0.8);
  transition: background 0.15s, box-shadow 0.2s, transform 0.05s;
}
.btn:hover { background: var(--accent2); box-shadow: 0 10px 28px -10px rgba(91, 147, 255, 0.9); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: rot 0.7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.msg { margin-top: 14px; padding: 10px 12px; border-radius: 9px; font-size: 13px; line-height: 1.5; display: none; }
.msg.show { display: block; animation: fade 0.25s ease both; }
.msg.error { background: rgba(229, 86, 107, 0.1); border: 1px solid rgba(229, 86, 107, 0.3); color: #F2A0AC; }
.msg.success { background: rgba(51, 188, 134, 0.1); border: 1px solid rgba(51, 188, 134, 0.3); color: #8FE0BE; }
.msg.info { background: rgba(59, 123, 246, 0.08); border: 1px solid rgba(59, 123, 246, 0.28); color: #A9C4FF; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.access { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text2); line-height: 1.5; text-align: center; }
.access a { color: var(--accent2); text-decoration: none; }
.access a:hover { text-decoration: underline; }

.foot { margin-top: 26px; display: flex; gap: 16px; font-size: 12px; color: var(--text3); animation: fade 0.8s ease 0.3s both; }
.foot a { color: var(--text3); text-decoration: none; }
.foot a:hover { color: var(--text2); }

@media (max-width: 480px) {
  .card { padding: 28px 22px 22px; border-radius: 14px; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bg-ring { opacity: 0.6; }
}
