@import url('/assets/vendor/google-fonts/fonts.css');

:root {
  --bg-dark: #020617;
  --bg-card: rgba(15, 23, 42, .65);
  --border-card: rgba(255, 255, 255, .08);
  --border-card-hover: rgba(251, 191, 36, .32);
  --accent: #38bdf8;
  --accent-hover: #f59e0b;
  --accent-blue: #2563eb;
  --accent-teal: #0f766e;
  --accent-glow: rgba(56, 189, 248, .24);
  --accent-warm-glow: rgba(245, 158, 11, .26);
  --logo-indigo: #00849d;
  --logo-indigo-dark: #006f85;
  --logo-indigo-deep: #055565;
  --logo-indigo-light: #12a4b8;
  --logo-indigo-glow: rgba(0, 132, 157, .32);
  --logo-amber-glow: rgba(245, 158, 11, .34);
  --text-main: #f8fafc;
  --text-muted: #64748b;
  --input-bg: rgba(15, 23, 42, .5);
  --input-border: rgba(255, 255, 255, .1);
  --danger: #fecaca;
  --danger-bg: rgba(127, 29, 29, .45);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, .5);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 18%, rgba(245, 158, 11, .14), transparent 18rem),
    radial-gradient(circle at 85% 14%, rgba(56, 189, 248, .16), transparent 18rem),
    var(--bg-dark);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.login-page::before {
  content: "";
  position: fixed;
  width: 150vw;
  height: 150vh;
  top: -25%;
  left: -25%;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 24%, rgba(245, 158, 11, .18) 0%, transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, .15) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(15, 118, 110, .12) 0%, transparent 50%);
  animation: rotateGlow 20s linear infinite;
  pointer-events: none;
}

body.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/assets/tech1.webp") center / cover no-repeat fixed;
  opacity: .12;
  mix-blend-mode: overlay;
  pointer-events: none;
}

@keyframes rotateGlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

.login-shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(.45rem, 1.6vh, 1rem);
  overflow: hidden;
}

.login-card {
  position: relative;
  width: min(100%, 450px);
  max-height: calc(100dvh - clamp(.9rem, 3.2vh, 2rem));
  padding: clamp(.8rem, 2.4vh, 1.25rem);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, .12), transparent 16rem),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, .1), transparent 14rem),
    var(--bg-card);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  transition: border-color .3s ease;
}

.login-card:hover {
  border-color: var(--border-card-hover);
}

.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(.45rem, 1.2vh, .75rem);
}

.logo {
  display: block;
  width: min(210px, 68%);
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #020617;
  padding: 4px;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, .45),
    0 0 0 1px rgba(148, 163, 184, .18),
    0 18px 34px var(--accent-warm-glow);
}

.login-copy {
  text-align: center;
  margin-bottom: clamp(.65rem, 1.7vh, .95rem);
}

.login-kicker {
  margin: 0 0 .25rem;
  color: #fbbf24;
  font-size: .68rem;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-copy h1 {
  max-width: 22ch;
  margin: 0 auto .38rem;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(1.35rem, 4.6vw, 1.78rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: 0;
  text-wrap: balance;
  background: linear-gradient(90deg, #fff 0%, #fbbf24 44%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-copy p {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: .875rem;
}

.error {
  margin: 0 0 .65rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(254, 202, 202, .32);
  border-radius: 8px;
  color: var(--danger);
  background: var(--danger-bg);
  font-size: .92rem;
  font-weight: 650;
}

.login-form {
  display: grid;
  gap: .55rem;
}

.login-form label {
  display: grid;
  gap: .25rem;
  color: var(--text-main);
  font-size: .82rem;
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  min-height: 39px;
  padding: .55rem .72rem;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text-main);
  background: var(--input-bg);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.login-form input::placeholder {
  color: rgba(148, 163, 184, .55);
}

.login-form input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-glow),
    0 0 24px var(--accent-warm-glow);
  background: rgba(15, 23, 42, .8);
}

.form-links {
  display: flex;
  justify-content: flex-end;
  margin-top: -.12rem;
  font-size: .8rem;
  font-weight: 500;
}

.form-links a,
.demande-compte-link,
.login-footer a {
  color: var(--accent);
  transition: color .2s ease;
}

.form-links a:hover,
.demande-compte-link:hover,
.login-footer a:hover {
  color: var(--accent-hover);
}

.login-submit {
  width: 100%;
  min-height: 42px;
  margin-top: .05rem;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
  box-shadow:
    0 10px 22px rgba(37, 99, 235, .34),
    0 16px 30px var(--accent-warm-glow);
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: 0;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #2563eb 0%, #0f766e 58%, #f59e0b 100%);
  box-shadow:
    0 14px 28px rgba(37, 99, 235, .38),
    0 18px 34px rgba(245, 158, 11, .34);
}

.login-submit:active {
  transform: translateY(0);
}

.login-submit:focus-visible,
.store-badge:focus-visible,
.form-links a:focus-visible,
.demande-compte-link:focus-visible,
.login-footer a:focus-visible,
.close-ios-banner:focus-visible {
  outline: 3px solid rgba(245, 158, 11, .55);
  outline-offset: 3px;
}

.trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: .65rem 0 0;
  padding: .48rem .62rem;
  border: 1px solid rgba(245, 158, 11, .18);
  border-radius: 8px;
  color: #cbd5e1;
  background: linear-gradient(135deg, rgba(56, 189, 248, .1), rgba(245, 158, 11, .08));
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
}

.trust-badge svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: #fbbf24;
}

.links-section {
  display: grid;
  gap: .38rem;
  margin-top: .62rem;
  text-align: center;
  font-size: .82rem;
  font-weight: 500;
}

.demande-compte-link {
  justify-self: center;
  padding: .1rem 0;
}

.install-section {
  display: grid;
  gap: .42rem;
  margin-top: .05rem;
}

#pcDownloadWrap {
  display: grid;
  gap: .36rem;
  justify-items: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-width: min(100%, 244px);
  min-height: 42px;
  padding: .45rem .78rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  color: var(--text-main);
  background: rgba(2, 6, 23, .88);
  box-shadow:
    0 14px 30px rgba(2, 6, 23, .38),
    0 0 24px rgba(245, 158, 11, .14);
  cursor: pointer;
  text-align: left;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.store-badge:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 158, 11, .45);
  background: rgba(15, 23, 42, .95);
  box-shadow:
    0 17px 36px rgba(2, 6, 23, .46),
    0 0 28px rgba(245, 158, 11, .22);
}

.store-badge svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
}

.store-badge-text {
  display: grid;
  gap: .05rem;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1.1;
}

.store-badge-text small {
  color: rgba(248, 250, 252, .68);
  font-size: .58rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#iosInstallBanner {
  position: relative;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .55rem 2.15rem .55rem .7rem;
  border: 1px solid rgba(56, 189, 248, .2);
  border-radius: 8px;
  color: var(--text-main);
  background: rgba(15, 23, 42, .9);
  box-shadow: 0 12px 28px rgba(2, 6, 23, .38);
  text-align: left;
}

#iosInstallBanner .store-badge-text {
  color: var(--text-main);
}

#iosInstallBanner .store-badge-text small {
  color: var(--accent-hover);
}

.ios-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.ios-install-help {
  margin-top: .15rem;
  color: var(--text-muted);
  font-size: .74rem;
  font-weight: 600;
}

.close-ios-banner {
  position: absolute;
  top: .45rem;
  right: .45rem;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.close-ios-banner:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, .08);
}

.login-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem .8rem;
  margin-top: .6rem;
  padding-top: .52rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--text-muted);
  font-size: .7rem;
}

@media (max-width: 520px) {
  .login-shell {
    padding: .45rem;
  }

  .login-card {
    width: 100%;
    min-height: auto;
    max-height: calc(100dvh - .9rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .logo {
    width: min(188px, 68%);
  }

  .trust-badge {
    align-items: flex-start;
    text-align: left;
  }

  .store-badge {
    width: 100%;
  }
}

@media (max-height: 760px) {
  .login-card {
    width: min(100%, 430px);
    padding: .7rem .95rem;
  }

  .logo {
    width: min(178px, 62%);
    padding: 3px;
  }

  .login-brand {
    margin-bottom: .38rem;
  }

  .login-copy {
    margin-bottom: .55rem;
  }

  .login-copy h1 {
    font-size: clamp(1.22rem, 4.2vw, 1.55rem);
    margin-bottom: .25rem;
  }

  .login-copy p {
    font-size: .78rem;
    line-height: 1.35;
  }

  .login-form input[type="email"],
  .login-form input[type="password"] {
    min-height: 36px;
    padding: .48rem .65rem;
  }

  .login-submit {
    min-height: 38px;
  }

  .trust-badge {
    margin-top: .5rem;
    padding: .42rem .55rem;
  }

  .store-badge {
    min-height: 38px;
  }

  .login-footer {
    margin-top: .45rem;
    padding-top: .42rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
