:root {
  --navy-1: #0d1836;
  --navy-2: #0a1128;
  --navy-3: #081022;
  --accent: #5aaaf2;
  --hero-text: #ffffff;
  --hero-muted: #8d9cbc;
  --hero-line: #3a4664;

  --bg: #f7f9fc;
  --text: #0f1b33;
  --muted: #5d6b84;
  --input-bg: #eff3f9;
  --input-focus: #dfe8f5;
  --btn: #0f1b33;
  --btn-text: #ffffff;
  --error: #c0392b;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --text: #e8edf6;
  --muted: #94a3bd;
  --input-bg: #1a2540;
  --input-focus: #22304f;
  --btn: #e8edf6;
  --btn-text: #0f1b33;
  --error: #ff7b6b;
}

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

html, body { height: 100%; }

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.layout {
  display: grid;
  grid-template-columns: 53fr 47fr;
  min-height: 100vh;
}

/* ================= HERO ================= */
.hero {
  background: radial-gradient(120% 80% at 0% 0%, var(--navy-1) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  color: var(--hero-text);
  padding: 4vh 3.4vw 3vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.logo-card {
  width: clamp(200px, 15vw, 290px);
  height: clamp(90px, 12.5vh, 136px);
  background: #fff;
  border-radius: 20px;
  display: grid;
  place-items: center;
  padding: 18px 26px;
}
.logo-card img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-fallback {
  display: none;
  font: 800 52px/1 "IBM Plex Sans", sans-serif;
  color: #d33a2c;
  letter-spacing: 1px;
}
.logo-card.no-img img { display: none; }
.logo-card.no-img .logo-fallback { display: block; }

.date {
  margin-top: 5vh;
  font-size: 24px;
  font-weight: 300;
  color: var(--hero-muted);
  letter-spacing: .2px;
}
.date::first-letter { text-transform: uppercase; }

.clock {
  display: flex;
  align-items: flex-start;
  margin-top: 3vh;
  font-weight: 200;
  font-size: clamp(90px, min(10.5vw, 18vh), 196px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
}
.clock .colon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .42em;
  height: 1em;
  padding: 0 .12em;
}
.clock .colon i {
  width: .1em; height: .1em;
  border-radius: 50%;
  background: #8b97ad;
  animation: blink 1s steps(1) infinite;
}
.clock sup {
  font-size: .27em;
  font-weight: 300;
  color: var(--accent);
  margin-left: .15em;
  margin-top: -.02em;
  letter-spacing: 0;
}
@keyframes blink { 50% { opacity: .35; } }

/* --- Frise horaire --- */
.timeline {
  position: relative;
  width: min(100%, 960px);
  height: 92px;
  margin-top: 3vh;
}
.tl-line {
  position: absolute; left: 0; right: 0; top: 36px;
  height: 1px; background: var(--hero-line);
}
.tl-ticks { position: absolute; inset: 0; }
.tl-tick {
  position: absolute; top: 31px;
  width: 1px; height: 11px;
  background: var(--hero-line);
  transform: translateX(-.5px);
}
.tl-tick.major { top: 27px; height: 19px; background: #56617d; }

.tl-window {
  position: absolute; top: 34px; height: 5px;
  border-radius: 3px;
  background: var(--accent);
}
.tl-window span {
  position: absolute; bottom: 14px; left: 0;
  font-size: 18px; color: var(--accent);
  white-space: nowrap;
}

.tl-now {
  position: absolute; top: 0; height: 56px;
  width: 2px; background: #fff;
  transform: translateX(-1px);
  transition: left 1s linear;
}
.tl-dot {
  position: absolute; top: 31px; left: 50%;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 0 5px rgba(255,255,255,.12);
}

.tl-labels { position: absolute; inset: 0; }
.tl-label {
  position: absolute; top: 62px;
  font-size: 17px; color: var(--hero-muted);
  transform: translateX(-50%);
}

.hero-title {
  margin-top: 4vh;
  font-weight: 300;
  font-size: clamp(22px, 1.75vw, 34px);
  letter-spacing: -.2px;
}
.hero-sub {
  margin-top: 1.8vh;
  font-size: clamp(15px, .95vw, 20px);
  font-weight: 300;
  color: var(--hero-muted);
  margin-bottom: 3vh;
}

.methods {
  margin-top: auto;
  padding-top: 3.5vh;
  border-top: 1px solid #1e2944;
  width: min(100%, 960px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.method svg { height: clamp(64px, 9vh, 126px); width: auto; color: #c9d4e6; margin-bottom: 2.6vh; }
/* Ligne de scan animée (reconnaissance faciale) */
.scan-line {
  transform-box: view-box;
  animation: auth-scan 3.6s cubic-bezier(.45,0,.55,1) infinite alternate;
}
@keyframes auth-scan {
  from { transform: translateY(0); }
  to   { transform: translateY(52px); }
}
@media (prefers-reduced-motion: reduce) {
  .scan-line { animation: none; transform: translateY(26px); }
}

.method svg .acc { color: var(--accent); stroke: var(--accent); }
.method h3 { font-size: clamp(17px, 1.15vw, 22px); font-weight: 500; }
.method p { margin-top: 6px; font-size: clamp(15px, 1vw, 19px); font-weight: 300; color: var(--hero-muted); line-height: 1.5; }

/* ================= AUTH ================= */
.auth {
  display: flex;
  flex-direction: column;
  padding: 3vh 4vw 4vh;
  background: var(--bg);
  transition: background .3s, color .3s;
}
.auth-inner {
  width: 100%;
  max-width: 590px;
  margin: auto;
  padding-top: 4vh;
}
.greeting {
  font-size: clamp(40px, 3.1vw, 58px);
  font-weight: 400;
  letter-spacing: -1px;
}
.auth-sub {
  margin-top: 18px;
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
}

form { margin-top: 5vh; }

.field-label {
  display: block;
  font-size: 21px;
  font-weight: 500;
  margin-bottom: 14px;
}
.label-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 3.5vh;
}
.link {
  font-size: 20px;
  color: var(--muted);
  text-decoration: none;
}
.link:hover { color: var(--text); text-decoration: underline; }

.input {
  width: 100%;
  height: 78px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--input-bg);
  padding: 0 26px;
  font: 400 22px "IBM Plex Sans", sans-serif;
  color: var(--text);
  outline: none;
  transition: background .15s, border-color .15s;
}
.input::placeholder { color: #8a96ab; }
.input:focus { background: var(--input-focus); border-color: #9fb5d6; }
.input.invalid { border-color: var(--error); }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 130px; }
.toggle-pw {
  position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%);
  border: 0; background: none; cursor: pointer;
  font: 500 20px "IBM Plex Sans", sans-serif;
  color: var(--muted);
}
.toggle-pw:hover { color: var(--text); }

.form-msg {
  min-height: 22px;
  margin: 12px 0 8px;
  font-size: 16px;
  color: var(--error);
}
.form-msg.ok { color: #1f8a4c; }

.btn {
  width: 100%;
  height: 78px;
  border: 0;
  border-radius: 12px;
  background: var(--btn);
  color: var(--btn-text);
  font: 500 23px "IBM Plex Sans", sans-serif;
  cursor: pointer;
  transition: transform .1s, opacity .2s;
}
.btn:hover { opacity: .92; }
.btn:active { transform: scale(.995); }
.btn:disabled { opacity: .6; cursor: wait; }

.notice {
  display: flex; gap: 22px;
  margin-top: 5vh;
  color: var(--muted);
}
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice p { font-size: 19px; line-height: 1.65; }

.auth-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 0 0 4vw;
  margin-top: 4vh;
}
.vendor { display: flex; align-items: center; height: 50px; }
.vendor img { height: 50px; width: auto; filter: brightness(0) opacity(.72); transition: filter .3s; }
[data-theme="dark"] .vendor img { filter: none; }
.vendor-fallback { display: none; font: 700 26px "IBM Plex Sans", sans-serif; letter-spacing: -.5px; color: #3a4252; }
.vendor-fallback small { display: block; font-size: 6px; letter-spacing: 1px; font-weight: 600; }
[data-theme="dark"] .vendor-fallback { color: #cfd7e6; }
.vendor.no-img img { display: none; }
.vendor.no-img .vendor-fallback { display: block; }

.footer-right { display: flex; align-items: center; gap: 34px; font-size: 22px; color: var(--muted); }
.theme-btn {
  border: 0; background: none; cursor: pointer;
  color: var(--muted); display: grid; place-items: center;
}
.theme-btn:hover { color: var(--text); }

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .hero { padding: 32px 28px; }
  .date { margin-top: 40px; }
  .methods { margin-top: 48px; }
  .auth-inner { padding-top: 40px; }
  .auth-footer { padding: 0; }
}
@media (max-width: 640px) {
  .logo-card { width: 200px; height: 94px; }
  .tl-label { font-size: 12px; }
  .tl-window span { font-size: 13px; }
  .methods { grid-template-columns: 1fr; }
  .method svg { height: 80px; margin-bottom: 14px; }
  .auth-sub, .field-label, .link, .input, .btn { font-size: 17px; }
  .input, .btn { height: 60px; }
}
