/* ======================================================
   Luminix — Account CSS
   File: /_account/css/account.css
   CSP-safe (no external assets, no @import)
   ====================================================== */

/* -------------------- Variables -------------------- */
:root{
  --bg: #0b0e14;
  --bg-soft: #101522;
  --panel: #121826;
  --panel-2: #192234;
  --surface: #0f1524;
  --text: #e7edf7;
  --muted: #a9b3c7;
  --link: #89b4ff;
  --ok: #1fc17d;
  --err: #ff6b6b;
  --brand: #7c5cff;
  --brand-2: #4cc9f0;
  --ring: #94a3b8;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --radius-lg: 22px;
  --gap: 20px;
  --transition: 180ms ease;
  --focus: 0 0 0 3px rgb(255 255 255 / 18%), 0 0 0 6px rgb(255 255 255 / 0%);
}

/* Light scheme fallback if user en force clair */
@media (prefers-color-scheme: light){
  :root{
    --bg: #f5f7fb;
    --bg-soft: #eef2fb;
    --panel: #ffffff;
    --panel-2: #f4f6fb;
    --surface: #ffffff;
    --text: #0d1424;
    --muted: #475569;
    --link: #4c6cff;
    --ok: #10b981;
    --err: #ef4444;
    --ring: #64748b;
    --shadow: 0 8px 24px rgba(0,0,0,.08);
  }
}

/* -------------------- Base -------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body{
  margin: 0;
  font: 15px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: #000
}

/* Accessibility */
:focus{ outline: none; }
:focus-visible{
  box-shadow: var(--focus);
  border-radius: 10px;
}

/* Links */
a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* Utilities */
.hidden{ display: none !important; }
.row{ display: flex; gap: 12px; align-items: center; }
.row.between{ justify-content: space-between; }
.row.end{ justify-content: flex-end; }

/* -------------------- Layout -------------------- */
.split{
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100dvh;
  background-color: transparent;
}

.left{
  position: relative;
  display: none; /* hidden on mobile, shown on >=900px */
  background-color: transparent;
  overflow: hidden;
}

.right{
  display: grid;
  place-items: center;
  padding: 28px 18px 40px;
  background-color: transparent;
  margin-right: 100px;
}

.right-reset {
  display: grid;
  place-items: center;
  padding: 28px 18px 40px;
  background-color: transparent;
}

@media (min-width: 900px){
  .split{ grid-template-columns: 1.2fr 1fr; }
  .left{ display: block; }
}

@media (max-width: 900px){
    .right {
    padding: 0px!important;
  }

  .right {
    margin-right: 0;
  }

  .field {
    margin-bottom: -10px!important;
  }

  .modal-card {
    margin-top: -150px!important;
  }

  .modal-card input {
    margin-bottom: 15px;
  }

  .check {
    margin-top: 20px!important;
    margin-bottom: 20px!important;
  }

  #loginForm #loginForm-input input {
    margin-bottom: 15px;
  }

  #loginCard .field button {
    margin-top: 15px!important;
  }

  #registerModal .field button {
    margin-top: 6px!important;
  }

  #verifyCard input[name="code"] {
    margin-bottom: 20px!important;
  }

  .forgotOpen-class {
    top: 136px!important;
  }

  .alt {
    top: 221px!important;
  }

  #forgotForm input {
    margin-bottom: 20px;
  }

  #resetForm input {
    margin-bottom: 24px;
  }

  #resetForm .field button {
    margin-top: 2px!important;
  }


}

@media (max-width: 415px){
  .footer-links {
    font-size: 9px;
  }
}

@media (max-width: 610px){
  .forgotOpen-class {
    position: relative!important;
    top: 0!important;
    left: 0!important;
  }

  .alt {
    position: relative!important;
    top: 0!important;
    left: 0!important;
  }

  #loginCard .field button {
    margin-top: 14px!important;
  }
}

@media (max-width: 522px){
  .card-reset .row.end .btn {
    font-size: 12px;
  }
}

/* -------------------- Left / Hero -------------------- */
.hero{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6vw;
}

.hero-title{
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  text-align: center;
  user-select: none;
  margin-top: -150px;
}

.hero-title span{
  position: relative;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 15px;
}

.hero-title strong{
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: .02em;
  background: linear-gradient(270deg, #5d5d5d 0%, #ffffff94 40%, #ffffff 70%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* floating orb */
.hero-orb{
  position: absolute;
  width: 38vw;
  max-width: 520px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  filter: blur(30px) saturate(130%);
  background:
    radial-gradient(closest-side, rgb(255, 255, 255), transparent 70%),
    radial-gradient(closest-side at 70% 30%, rgb(255, 255, 255), transparent 65%),
    radial-gradient(closest-side at 35% 70%, rgba(255,255,255,.35), transparent 60%);
  opacity: .55;
  animation: float 8s ease-in-out infinite;
}
@keyframes float{
  0%,100%{ transform: translate3d(0,0,0); }
  50%{ transform: translate3d(0,-40px,0); }
}

/* -------------------- Header -------------------- */
.header{
  margin-bottom: -200px;
  text-align: center;
}

.brand{
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.brand h1{
  margin: 0;
  font-size: 28px;
  letter-spacing: .02em;
  font-weight: 700;
}

.orb{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(closest-side, var(--brand), transparent 70%),
              radial-gradient(closest-side at 60% 30%, var(--brand-2), transparent 65%);
  box-shadow: 0 0 0 4px rgba(124,92,255,.15), 0 8px 30px rgba(124,92,255,.35);
}

.subtitle{
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

/* -------------------- Cards -------------------- */
.card{
  position: relative;
  width: min(560px, 92vw);
  padding: 22px clamp(16px, 4vw, 28px);
  margin: 14px auto;
  top: -160px;
}

.card h2{
  margin: 0 0 10px;
  font-size: 20px;
}

.card-reset {
  position: relative;
  width: min(560px, 92vw);
  padding: 22px clamp(16px, 4vw, 28px);
  margin: 14px auto;
  top: 240px;
}

/* helper text */
.helper{
  color: var(--muted);
  margin-top: -4px;
  margin-bottom: 14px;
}

/* -------------------- Forms -------------------- */
form{ width: 100%; }

.field{
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field.compact{ grid-template-columns: 1fr; }

.field.full{ grid-column: 1 / -1; }

label{
  font-size: 13px;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"]{
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.28);
  background: #000;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

input[type="file"]{
  height: auto;
  padding: 10px;
}

input::placeholder{ color: rgba(168,181,203,.65); }

input:focus{
  border-color: transparent;
  background: #000;
  box-shadow: 0 0 0 1px rgb(255, 255, 255);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  border-color: rgba(148, 163, 184, .28);
  -webkit-box-shadow: 0 0 0 1000px #000 inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  transition: background-color 5000s ease-in-out 0s;
}

.check{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

/* on cache le vrai checkbox */
.check input[type="checkbox"]{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* le faux switch */
.check .switch{
  width: 42px;
  height: 24px;
  border-radius: 999px;
  position: relative;
  transition: background 0.3s ease;
  border: 1px solid rgba(148, 163, 184, .25);
}

.check .switch::after{
  content: "";
  position: absolute;
  top: 1px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  transition: transform 0.3s ease;
}

.check input:checked + .switch{
  box-shadow: 0 0 0 1px rgb(255, 255, 255);
}
.check input:checked + .switch::after{
  transform: translateX(18px);
}

small.error{
  position: absolute;
  right: 5px;
  bottom: -1.2em;
  color: var(--err);
  font-size: 0.85em;
  white-space: nowrap;
  top: 0;
}

/* -------------------- Buttons -------------------- */
.btn{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #000;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.btn:hover{ color: #1a1a1a;}
.btn:active{ transform: translateY(0); filter: saturate(1.05); }

.btn[disabled], .btn:disabled{
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.btn-secondary{
  background: #000;
  color: var(--text);
  border: 1px solid rgba(148,163,184,.25);
  transition: none;
}
.btn.btn-secondary:hover{
  box-shadow: 0 0 0 0.7px rgb(255, 255, 255);
}

/* row actions spacing in cards */
#loginCard .row,
#verifyCard .row{
  margin-top: 10px;
}

/* -------------------- Modal -------------------- */
.modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
}

.modal.open{ display: grid; place-items: center; }

.modal-card{
  position: relative;
  width: min(720px, 94vw);
  padding: 18px clamp(16px, 4vw, 28px) 22px;
  z-index: 41;
}

.modal-close{
    position: absolute;
    top: 38px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50px;
    cursor: pointer;
    background: #000;
    color: #fff;
    border: 1px solid rgba(148, 163, 184, .25);
    font-weight: 600;
}
.modal-close:hover{  box-shadow: 0 0 0 0.7px rgb(255, 255, 255); }

.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgb(0, 0, 0);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 40;
}

/* -------------------- Grid (register form) -------------------- */
.grid{
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 680px){
  .grid{
    grid-template-columns: 1fr 1fr;
  }
}

/* Avatar uploader */
.avatar-uploader{
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
}

.avatar-preview{
    width: 92px;
    height: 92px;
    border-radius: 50px;
    border: 1px dashed rgba(148, 163, 184, .35);
}

/* Hints */
.hint{
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

/* -------------------- Notices -------------------- */
.notice{
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(10px);
  width: min(640px, 92vw);
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .25);
  background: #000;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 45;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}

.notice.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.notice.ok{ border-color: rgba(16,185,129,.5); background-color: rgba(16, 185, 129, 0.040); }
.notice.err{ border-color: rgba(239,68,68,.5); background-color: rgba(239,68,68, 0.040); }

/* -------------------- Loader -------------------- */
.loader{
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(1px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 60;
}
.loader.show{ opacity: 1; pointer-events: auto; }

.spinner{
  width: 52px; height: 52px;
  border-radius: 999px;
  border: 4px solid rgba(255,255,255,.12);
  border-top-color: #fff;
  animation: spin 0.5s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* -------------------- Verify view tweaks -------------------- */
#verifyCard input[name="code"]{
  letter-spacing: .2em;
  font-weight: 700;
  text-align: center;
}

/* -------------------- Small tweaks -------------------- */
header, section, .modal-card{ outline: none; }
button, input{ font-family: inherit; }

/* Ensure Font Awesome icon font (if used) does not break CSP: the link tag must be self-hosted.
   If you keep CDN, adjust CSP: style-src 'self' https://cdnjs.cloudflare.com *. */
.fa, .fas, .far, .fal, .fab { font-family: inherit; } /* fallback if FA blocked by CSP */

/* Motion safety */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* -------------------- Print (just in case) -------------------- */
@media print{
  .left, .modal, .loader, .notice{ display: none !important; }
  .card{ box-shadow: none; border: 1px solid #ccc; background: #fff; color: #000; }
  body{ background: #000; }
}

.alt {
    position: absolute;
    float: right;
    left: 280px;
    top: 229px;
}

@media (max-height: 870px){
    header {
      display: none;
    }
    .card {
      margin-top: 200px;
    }
}

.brand-logo{
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

@media (max-width: 1370px){
  .hero-title strong{ font-size: 35px; }
}

@media (max-width: 1080px){
  .hero-title { display: none; }
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted, #aaa);
  z-index: 1000;
}

.footer-links {
  margin-bottom: 6px;
}

.footer-links a {
  color: var(--muted, #aaa);
  margin: 0 10px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text, #fff);
}

.footer-copy {
  font-size: 12px;
  opacity: 0.7;
}

#forgotOpen {
  color: var(--muted);
  font-size: 13px;
}

#forgotOpen:hover { color: #fff; text-decoration: none;}

.forgotOpen-class {
    position: absolute;
    left: 403px;
    top: 145px;
}

.check:hover {
  color: #fff;
}

.field {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  outline-offset: 4px;
  z-index: 40;
}

.toggle-password:focus-visible {
  outline: 2px solid currentColor;
}

.toggle-password .icon-eye-off { display: none; }
.toggle-password.is-visible .icon-eye { display: none; }
.toggle-password.is-visible .icon-eye-off { display: inline; }

input.revealing {
  animation: pwdBlur 180ms ease-out, pwdSweep 800ms ease-out;
  background-image: linear-gradient(120deg, transparent 0%, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 200% 100%;
}

@keyframes pwdBlur {
  0% { filter: blur(3px); }
  100% { filter: blur(0); }
}

@keyframes pwdSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}

/* Icônes œil en blanc */
.toggle-password svg {
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  width: 20px;
  height: 20px;
}

#loginCard .field button {
  margin-top: 13px;
}

#registerModal .field button {
  margin-top: 13px;
}

#resetForm .field button {
  margin-top: 14px;
}

.card-reset .row.end .btn:hover {
  text-decoration: none;
}

.reset-header img {
  max-width: 28px;
  max-height: 28px;
  min-height: 28px;
  min-width: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: -5px;
}

.user-preview {
  position: absolute;
  background-color: #000;
  padding: 3px 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  top: 42px;
  left: 340px;
}

.reset-header {
  display:flex;align-items:center;gap:12px;margin-bottom:0px;
}

@media (max-width: 455px){

  .reset-header {
    margin-bottom: 25px;
  }
    
  .user-preview {
    top: 77px;
    left: 15px;
  }
}

@media (max-width: 357px) {
  .reset-header {
    margin-bottom:-10px;
  }
    
  .user-preview {
    top: 73px;
    left: 75px;
  }
}