/* ═══════════════════════════════════════════════════════════
   auth-page.css — EXT Zone Redesign (Glassmorphism Dark Theme)
   Surcharge ext.esload.css + Bootstrap 3.4.1 pour les pages auth
   ═══════════════════════════════════════════════════════════ */

/* ─── Local Fonts (no Google CDN) ─── */

/* DM Sans — variable font (400-600) */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/resources/fonts/DMSans/DMSans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/resources/fonts/DMSans/DMSans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Dosis — variable font (300-600) */
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/resources/fonts/Dosis/Dosis-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/resources/fonts/Dosis/Dosis-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Outfit — variable font (600-800) */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('/resources/fonts/Outfit/Outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('/resources/fonts/Outfit/Outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono : déclarations retirées le 2026-10-08. Elles pointaient sur
   JetBrainsMono-latin.woff2 et -latin-ext.woff2, deux fichiers variables qui
   n'existent pas (404 mesuré au chargement de la page de connexion). Le même
   défaut avait été corrigé en MONITORING le 2026-10-03.
   La famille est désormais fournie par monitoring-fonts.css, chargé avant ce
   fichier par auth/includes/meta.php, avec les vrais fichiers par graisse. */

/* ─── CSS Variables (Dark = default) ─── */
:root {
  /* Brand */
  --brand-primary: #0ea5e9;
  --brand-primary-light: #38bdf8;
  --brand-primary-dark: #0284c7;
  --brand-glow: rgba(14, 165, 233, 0.15);
  --brand-glow-strong: rgba(14, 165, 233, 0.3);

  /* Surfaces */
  --bg-deep: #0a0e1a;
  --bg-base: #0f1629;
  --bg-elevated: #162037;
  --bg-card: rgba(22, 32, 55, 0.7);
  --bg-input: rgba(15, 22, 41, 0.8);
  --bg-input-focus: rgba(14, 165, 233, 0.06);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(14, 165, 233, 0.5);
  --border-strong: rgba(14, 165, 233, 0.8);

  /* Text */
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.35);
  --text-brand: #38bdf8;

  /* States */
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);

  /* Effects */
  --glass-bg: rgba(22, 32, 55, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 40px rgba(14, 165, 233, 0.08);
  --shadow-input: 0 2px 8px rgba(0, 0, 0, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* Neon Pill palette — login + register only */
body[data-page="authentification"],
body[data-page="inscription"] {
  --neon-violet: #5b3cc4;
  --neon-blue: #4a6cf7;
  --neon-cyan: #3ba8d4;
  --neon-inner-bg: #111a2e;
  --neon-text: #d0d8e8;
  --neon-placeholder: #3e4d65;
  --neon-label: #4a5a78;
  --neon-height: 52px;
}

/* ─── Base Reset & Body ─── */
/* Override ext.esload.css html{background:#fff} + body{height:80vh} */
html:has(body.auth-page) {
  background: #0a0e1a;
}
body.auth-page {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Override ext.esload.css backgrounds */
body.auth-page #content {
  background: none;
}
body.auth-page #content > .content-row {
  background: none;
  padding: 0;
}

/* Hide legacy chrome */
body.auth-page #header,
body.auth-page .content-row-color,
body.auth-page #footer {
  display: none;
}

/* Override ext.esload.css input styles — exclude .wspy-input (neon pill handles its own) */
body.auth-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.wspy-input) {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: 'Dosis', sans-serif;
  letter-spacing: normal;
  padding: 14px 16px;
}
/* Input with icon — padding-left for SVG icon space */
body.auth-page .input-icon-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.wspy-input) {
  padding-left: 44px;
}
body.auth-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.wspy-input):focus {
  border-color: var(--border-focus);
  background-color: var(--bg-input-focus);
  box-shadow: var(--shadow-input), 0 0 0 3px rgba(14, 165, 233, 0.08);
}
body.auth-page input::placeholder {
  color: var(--text-muted);
}

/* ─── FormValidation Overrides ─── */

/* Hide glyphicon feedback icons */
.auth-form .form-control-feedback,
.auth-form .glyphicon {
  display: none !important;
}

/* Error state — red border (exclude .wspy-input, neon pill handles via gradient) */
.auth-form .has-error .form-input,
.auth-form .has-error input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.wspy-input) {
  border-color: var(--danger) !important;
  box-shadow: var(--shadow-input), 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.auth-form .has-error .input-icon {
  color: var(--danger);
}

/* Success state — green border (exclude .wspy-input) */
.auth-form .has-success .form-input,
.auth-form .has-success input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.wspy-input) {
  border-color: var(--success) !important;
  box-shadow: var(--shadow-input), 0 0 0 3px rgba(34, 197, 94, 0.08);
}
.auth-form .has-success .input-icon {
  color: var(--success);
}

/* Error messages — discreet, under input */
.auth-form .help-block {
  display: block;
  font-size: 12px;
  color: var(--danger);
  opacity: 0.8;
  margin: 6px 0 0 2px;
  padding: 0;
  line-height: 1.3;
}

/* ─── Background Effects (dark only) ─── */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-canvas::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(14, 165, 233, 0.06) 0%, transparent 70%);
  animation: drift 20s ease-in-out infinite;
}
.bg-canvas::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -15%;
  width: 60%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
  animation: drift 25s ease-in-out infinite reverse;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.97); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 75%);
}

/* ─── Layout ─── */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}
.auth-container--wide {
  max-width: 520px;
}

/* ─── Logo ─── */
.logo-block {
  text-align: center;
  margin-bottom: 40px;
}
.logo-block img {
  max-width: 440px;
  height: auto;
  display: inline-block;
}
.logo-sub {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 12px;
}

/* ─── Card (Liquid Glass) ─── */
.auth-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 40px;
  overflow: hidden;
  /* No background/backdrop-filter — liquid glass handles refraction via SVG filters */
}

/* Liquid glass shape encoder — white div encoded into LSB via pack-lower */
.glass-shape {
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: inherit;
  filter: url(#round) url(#pack-lower);
  mix-blend-mode: plus-lighter;
  z-index: 0;
  pointer-events: none;
}

/* Content wrapper above pseudo-elements */
.liquid-glass-content {
  position: relative;
  z-index: 3;
}

/* Fallback for browsers without SVG backdrop-filter support */
@supports not (backdrop-filter: url(#liquid-glass-new)) {
  .auth-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card), var(--shadow-glow);
  }
  .glass-shape { display: none; }
  .auth-card::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    inset: auto;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(14, 165, 233, 0.3) 50%, transparent 100%);
  }
  .auth-card::after { display: none; }
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
.card-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ─── Form Elements ─── */
.auth-form .form-group {
  margin-bottom: 20px;
  padding: 0;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.form-input {
  width: 100%;
  height: auto;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: var(--shadow-input);
  box-sizing: border-box;
}
.form-input::placeholder {
  color: var(--text-muted);
}
.form-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: var(--shadow-input), 0 0 0 3px rgba(14, 165, 233, 0.08);
}

/* Input with icon */
.input-icon-wrapper {
  position: relative;
}
.input-icon-wrapper .form-input {
  padding-left: 44px;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.input-icon-wrapper:focus-within .input-icon {
  color: var(--brand-primary);
}

/* Password toggle */
.input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.input-toggle:hover { color: var(--text-secondary); }

/* Form options row */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

/* Custom checkbox */
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
}
.check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-default);
  border-radius: 5px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
/* Native checkbox (sr-only) drives visual state */
.sr-only-check {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only-check:checked + .check-box {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}
.sr-only-check:checked + .check-box svg { opacity: 1; }
.sr-only-check:focus-visible + .check-box {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}
/* Legacy .checked class fallback */
.check-box.checked {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}
.check-box.checked svg { opacity: 1; }
.check-box svg { width: 11px; height: 11px; fill: white; opacity: 0; }

.form-link {
  font-size: 13px;
  color: var(--text-brand);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.form-link:hover { opacity: 0.8; color: var(--text-brand); }

/* ─── Buttons ─── */
.auth-card .btn-primary,
.auth-form .btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
  letter-spacing: 0.2px;
  line-height: 1.4;
  display: block;
  text-align: center;
  text-decoration: none;
}
.auth-card .btn-primary:hover,
.auth-form .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.55);
  color: white;
  text-decoration: none;
}
.auth-card .btn-primary:active,
.auth-form .btn-primary:active {
  transform: translateY(0);
}

.auth-card .btn-outline {
  width: 100%;
  padding: 14px 24px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
}
.auth-card .btn-outline:hover {
  border-color: var(--border-focus);
  color: var(--text-brand);
  background: var(--brand-glow);
  text-decoration: none;
}

/* ─── Divider ─── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* Login error display (ext.esload.js uses .msg-faded) */
.auth-card .msg-faded {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
}
.auth-card .msg-faded:empty {
  display: none;
}

/* Form footer (inside card) */
.form-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(14, 165, 233, 0.12);
}

/* Force checkbox + text side by side (override ext.esload.css label styles) */
body[data-page="authentification"] .form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
}
body[data-page="authentification"] .form-options .check-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-direction: row;
  white-space: nowrap;
}

/* Forgot password link — hidden by default, shown after login error */
.forgot-link {
  display: none !important;
}
.forgot-link.visible {
  display: inline !important;
}
.form-footer span {
  font-size: 15px;
  color: var(--text-muted);
}
.form-footer a {
  color: var(--text-brand);
  text-decoration: none;
  font-weight: 600;
}
.form-footer a:hover { text-decoration: underline; }

/* Auth footer (bottom of page) */
.auth-footer {
  text-align: center;
  padding: 24px 20px 32px;
}
.auth-footer p {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin: 0;
}
.auth-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.auth-footer a:hover { color: var(--text-secondary); }

/* ─── Error display (auth-notice from ext.esload.js) ─── */
.auth-card .auth-notice {
  margin-top: 16px;
}
.auth-card .auth-notice .msg-problem,
.auth-card .auth-notice .auth-notice-text {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.auth-card .auth-notice .msg-problem {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
}
.auth-card .auth-notice .auth-notice-text {
  background: var(--success-bg);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--success);
}

/* ─── 2FA OTP Inputs ─── */
.otp-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 15px;
}
.otp-box {
  width: 52px;
  height: 64px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 600;
  background: var(--bg-input);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-input);
  caret-color: var(--brand-primary);
  padding: 0;
  letter-spacing: 0;
}
.otp-box:focus {
  border-color: var(--brand-primary);
  background: var(--bg-input-focus);
  box-shadow: var(--shadow-input), 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.otp-box.filled {
  border-color: var(--brand-primary-light);
  color: var(--brand-primary-light);
}
.otp-box.error {
  border-color: var(--danger);
  box-shadow: var(--shadow-input), 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ─── 2FA Submit Button ─── */
.btn-submit-2fa {
  display: block;
  width: 100%;
  padding: 14px 24px;
  margin-top: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
  letter-spacing: 0.2px;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
  text-transform: none;
}
.btn-submit-2fa:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.4);
}
.btn-submit-2fa:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.35);
  box-shadow: none;
  transform: none;
  pointer-events: none;
}
.btn-submit-2fa.loading {
  opacity: 0.7;
  filter: grayscale(0.25);
  box-shadow: none;
  cursor: progress;
}

@keyframes btnBounceError {
  0%, 100% { transform: translateX(0); }
  6%, 18%, 30%, 42%, 54%, 66%, 78%, 90% { transform: translateX(-10px); }
  12%, 24%, 36%, 48%, 60%, 72%, 84%, 96% { transform: translateX(10px); }
}
.btn-submit-2fa.shake {
  animation: btnBounceError 1.5s ease-in-out;
  background: var(--danger) !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3) !important;
  opacity: 1 !important;
  filter: none !important;
}
.btn-error-bounce {
  animation: btnBounceError 1.5s ease-in-out;
}

/* ─── Form loading state (all EXT auth forms) ─── */
.form-loading input,
.form-loading select,
.form-loading textarea,
.form-loading .form-check,
.form-loading .input-group-text,
.form-loading .otp-box,
.form-loading .recovery-input,
.form-loading .trust-device {
  opacity: 0.55;
  filter: grayscale(0.35);
  pointer-events: none;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

@keyframes spin2fa {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.btn-submit-2fa .btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin2fa 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

/* ─── QR Code Section ─── */
.qr-section {
  text-align: center;
  margin: 24px 0;
}
.qr-wrapper {
  display: inline-block;
  background: white;
  padding: 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.qr-wrapper svg {
  max-width: 200px;
  height: auto;
  display: block;
}

/* ─── Secret Key ─── */
.secret-key-container {
  margin-top: 16px;
  text-align: center;
}
.secret-key-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.secret-key-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.secret-key-box:hover {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
}
.secret-key-box .secret-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--brand-primary-light);
  background: none;
  padding: 0;
  border: none;
  user-select: all;
}
.btn-copy-secret {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.btn-copy-secret:hover { color: var(--brand-primary); }

/* ─── Recovery Codes ─── */
.recovery-section-display {
  margin: 24px 0;
}
.recovery-section-display h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}
.recovery-section-display .recovery-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: center;
  line-height: 1.5;
}

.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.alert-box.warning {
  background: var(--warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--warning);
}
.alert-box.info {
  background: var(--brand-glow);
  border: 1px solid rgba(14, 165, 233, 0.15);
  color: var(--brand-primary-light);
}
.alert-icon { flex-shrink: 0; font-size: 16px; margin-top: 1px; }

#login-alert { border: none; text-align: center; }

.tooltip.tooltip-copied.show { opacity: 0.65; }

/* AUTH zone override: bouton "Se connecter" en dégradé bleu cohérent (pas le violet #6610f2 du design system global) */
body.zone-auth .btn-liquid.btn-primary {
  background-image: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light), var(--brand-primary-dark), var(--brand-primary));
  box-shadow: 0 8px 26px rgba(14, 165, 233, 0.4), 0 3px 10px rgba(14, 165, 233, 0.25);
}
body.zone-auth .btn-liquid.btn-primary:hover {
  box-shadow: 0 12px 36px rgba(14, 165, 233, 0.55), 0 4px 14px rgba(14, 165, 233, 0.3);
}
body.zone-auth .btn-liquid.btn-primary:active {
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

/* EXT cover: image fills entire left panel */
.zone-auth .auth-cover-bg {
  padding: 0 !important;
}
.zone-auth .auth-cover-bg .auth-illustration {
  width: 100% !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  margin: 0 !important;
}

/* Hide brand text on EXT pages */
.zone-auth .auth-cover-brand {
  display: none !important;
}

/* Force right panel full viewport height */
.authentication-wrapper.authentication-cover .authentication-inner > .authentication-bg {
  min-height: 100vh;
}

.recovery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}
.recovery-code-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.recovery-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn-download-codes {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-download-codes:hover {
  border-color: var(--border-focus);
  color: var(--text-brand);
}

/* ─── Trust Device ─── */
.trust-device {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 20px 0;
  cursor: pointer;
}
.trust-device:hover {
  border-color: var(--border-default);
}
.trust-toggle {
  width: 40px;
  height: 22px;
  border-radius: 100px;
  background: var(--border-default);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.trust-device input:checked ~ .trust-toggle { background: var(--brand-primary); }
.trust-toggle::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}
.trust-device input:checked ~ .trust-toggle::after { transform: translateX(18px); }
.trust-device input:focus-visible ~ .trust-toggle {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}
.trust-info { flex: 1; }
.trust-info strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.trust-info span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Legacy setup view (div.trust-device + JS .on toggle): keep native checkbox hidden */
.trust-device input[type="checkbox"] { display: none; }
/* Verify view (label.trust-device): visually hide but keep focusable — a11y label/for + keyboard tab order */
label.trust-device input[type="checkbox"] {
  display: block;
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

/* Legacy trust-device-row override */
.trust-device-row { display: none; }

/* ─── Steps Bar ─── */
.steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}
.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-default);
  transition: all 0.3s;
}
.step-dot.auth-notice-textive {
  width: 32px;
  border-radius: 100px;
  background: var(--brand-primary);
}
.step-dot.done { background: var(--success); }
.step-line {
  width: 24px;
  height: 1px;
  background: var(--border-subtle);
}

/* ─── Setup / Verify Messages ─── */
.setup-message,
.verify-message {
  display: none;
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}

/* ─── 2FA Verify: Trusted Device Success ─── */
.trusted-success {
  text-align: center;
  padding: 40px 20px;
}
.trusted-icon {
  font-size: 64px;
  color: var(--success);
  margin-bottom: 20px;
  line-height: 1;
}
.trusted-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.trusted-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 30px;
  line-height: 1.5;
}
.trusted-loader {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-default);
  border-top-color: var(--success);
  border-radius: 50%;
  animation: spin2fa 0.8s linear infinite;
}

/* ─── 2FA Verify: Recovery Section ─── */
.recovery-section { display: none; }
.recovery-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  text-align: center;
  letter-spacing: 2px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}
.recovery-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.recovery-input::placeholder {
  color: var(--text-muted);
}

.toggle-recovery {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-brand);
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.2s;
}
.toggle-recovery:hover { opacity: 0.8; color: var(--text-brand); }

/* ─── Utility: Centered card content (2FA, error) ─── */
.auth-card .card-title,
.auth-card .card-subtitle { text-align: center; }

/* Lock icon container (2fa_verify) */
.verify-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--brand-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px solid rgba(14, 165, 233, 0.15);
}

/* Verify page header wrapper */
.verify-header {
  text-align: center;
  margin-bottom: 24px;
}
.verify-header .card-subtitle:last-child { margin-bottom: 0; }

/* OTP prompt text (2fa_setup) */
.otp-prompt {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 24px 0 4px;
  text-align: center;
}

/* Recovery section submit button spacing */
.recovery-section .btn-submit-2fa { margin-top: 20px; }

/* Toggle recovery link wrapper */
.toggle-recovery-wrapper {
  text-align: center;
  margin-top: 20px;
}

/* ─── Error Page ─── */
.error-content {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}
.error-code {
  font-family: 'Outfit', sans-serif;
  font-size: 120px;
  font-weight: 800;
  letter-spacing: -4px;
  background: linear-gradient(135deg, var(--brand-primary), rgba(14, 165, 233, 0.3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}
.error-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.error-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}
.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.error-actions .btn-primary {
  width: auto;
  padding: 12px 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.error-actions .btn-outline {
  width: auto;
  padding: 12px 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   NEON PILL SYSTEM — login + register only
   ═══════════════════════════════════════════════════════════ */

/* ─── Pill container (gradient border + outer glow) ─── */
.wspy-field {
  position: relative;
  border-radius: 9999px;
  padding: 2px;
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-blue), var(--neon-cyan), var(--neon-violet));
  background-size: 300% 300%;
  animation: neonShift 6s ease infinite;
  box-shadow: 0 0 15px rgba(90, 60, 200, 0.2), 0 0 5px rgba(74, 108, 247, 0.1);
  transition: box-shadow 0.4s;
}
.wspy-field:focus-within {
  box-shadow: 0 0 30px rgba(90, 60, 200, 0.5), 0 0 60px rgba(74, 108, 247, 0.25),
              0 0 90px rgba(90, 60, 200, 0.12), 0 0 4px rgba(120, 100, 255, 0.6);
  animation: neonShift 3s ease infinite;
}

@keyframes neonShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ─── Inner surface (inset glow) ─── */
.wspy-inner {
  border-radius: 9999px;
  background: var(--neon-inner-bg);
  position: relative;
  box-shadow: inset 0 0 30px rgba(75, 80, 200, 0.15), inset 0 0 60px rgba(60, 70, 180, 0.06);
  animation: innerGlow 6s ease infinite;
  transition: box-shadow 0.4s;
}
.wspy-field:focus-within .wspy-inner {
  box-shadow: inset 0 0 35px rgba(85, 90, 220, 0.25), inset 0 0 70px rgba(65, 80, 200, 0.1);
  animation: innerGlow 3s ease infinite;
}

@keyframes innerGlow {
  0%, 100% { box-shadow: inset 0 0 30px rgba(75, 80, 200, 0.15), inset 0 0 60px rgba(60, 70, 180, 0.06); }
  33% { box-shadow: inset 0 0 35px rgba(90, 70, 210, 0.18), inset 0 0 50px rgba(50, 100, 200, 0.08); }
  66% { box-shadow: inset 0 0 28px rgba(60, 90, 200, 0.16), inset 0 0 55px rgba(80, 60, 190, 0.07); }
}

/* ─── Input inside pill ─── */
.wspy-input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: var(--neon-height);
  border: none !important;
  outline: none;
  border-radius: 9999px !important;
  background: transparent !important;
  padding: 0 24px;
  font-family: 'Dosis', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #406093;
  letter-spacing: .15rem;
  caret-color: #7b8df7;
  box-sizing: border-box;
  box-shadow: none !important;
}
.wspy-input::placeholder {
  color: var(--neon-placeholder);
  font-weight: 300;
}

/* ─── Icons inside neon pill ─── */
.wspy-field .input-icon-wrapper {
  position: relative;
}
.wspy-field .input-icon-wrapper .wspy-input {
  padding-left: 52px !important;
}
.wspy-field .input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neon-placeholder);
  z-index: 2;
  pointer-events: none;
  transition: color 0.3s;
  display: flex;
  align-items: center;
}
.wspy-field:focus-within .input-icon {
  color: #7b8df7;
}

/* Password toggle inside pill */
.wspy-field .input-toggle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: none;
  color: var(--neon-placeholder);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.3s;
}
.wspy-field:focus-within .input-toggle {
  color: #7b8df7;
}
.wspy-field .input-icon-wrapper:has(.input-toggle) .wspy-input {
  padding-right: 52px;
}

/* ─── FormValidation: error on neon pill ─── */
.has-error .wspy-field {
  background: linear-gradient(135deg, #c43c3c, #f74a4a, #d43b5b, #c43c3c);
  background-size: 300% 300%;
  box-shadow: 0 0 15px rgba(200, 60, 60, 0.3), 0 0 5px rgba(247, 74, 74, 0.15);
}
.has-error .wspy-field:focus-within {
  box-shadow: 0 0 30px rgba(200, 60, 60, 0.5), 0 0 60px rgba(247, 74, 74, 0.25);
}
.has-error .wspy-field .input-icon { color: #f87171; }

/* FormValidation: success on neon pill */
.has-success .wspy-field {
  background: linear-gradient(135deg, #16a34a, #22c55e, #34d399, #16a34a);
  background-size: 300% 300%;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2), 0 0 5px rgba(52, 211, 153, 0.1);
}
.has-success .wspy-field:focus-within {
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.4), 0 0 60px rgba(52, 211, 153, 0.2);
}
.has-success .wspy-field .input-icon { color: #4ade80; }

/* help-block under pill */
.auth-form .form-group .help-block {
  padding-left: 24px;
}

/* ─── Glass button (ice effect from v3 reference) ─── */
.wspy-field--btn {
  background: linear-gradient(160deg, #40e0ff 0%, #7050ff 30%, #c040ff 55%, #7050ff 75%, #40e0ff 100%);
  background-size: 200% 200%;
  animation: btnBorderFlow 4s ease infinite;
  box-shadow: 0 0 18px rgba(64, 224, 255, 0.25), 0 0 40px rgba(112, 80, 255, 0.15), 0 0 60px rgba(192, 64, 255, 0.08);
  transition: box-shadow 0.4s, transform 0.3s;
}
.wspy-field--btn:hover {
  box-shadow: 0 0 25px rgba(64, 224, 255, 0.4), 0 0 50px rgba(112, 80, 255, 0.25),
              0 0 80px rgba(192, 64, 255, 0.12), 0 0 4px rgba(64, 224, 255, 0.5);
  transform: translateY(-2px);
}
.wspy-field--btn:active {
  transform: translateY(0) scale(0.98);
}
@keyframes btnBorderFlow {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* Glass surface */
.wspy-field--btn .wspy-inner {
  background: linear-gradient(155deg, rgba(20, 35, 70, 0.6) 0%, rgba(15, 22, 50, 0.7) 40%, rgba(12, 18, 40, 0.75) 100%);
  overflow: hidden;
  animation: none;
}

/* Ice frost layer */
.wspy-field--btn .glass-ice {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(170deg, rgba(180, 220, 255, 0.07) 0%, rgba(140, 180, 240, 0.03) 30%, transparent 55%, rgba(160, 140, 255, 0.03) 80%, rgba(120, 160, 240, 0.05) 100%);
  box-shadow: inset 0 0 80px rgba(160, 200, 255, 0.04), inset 0 0 30px rgba(120, 160, 240, 0.03);
}

/* Diagonal glare reflection */
.wspy-field--btn .glass-reflection {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.wspy-field--btn .glass-reflection::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(200, 225, 255, 0.15) 0%, rgba(190, 220, 255, 0.08) 18%, rgba(170, 210, 250, 0.04) 32%, transparent 50%);
  animation: btnWashPulse 8s ease-in-out infinite;
}
.wspy-field--btn .glass-reflection::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(135deg, transparent 0%, transparent 38%, rgba(200, 230, 255, 0.06) 40%, rgba(230, 245, 255, 0.16) 42%, rgba(250, 252, 255, 0.3) 43.5%, rgba(255, 255, 255, 0.38) 44.5%, rgba(250, 252, 255, 0.3) 45.5%, rgba(230, 245, 255, 0.16) 47%, rgba(200, 230, 255, 0.06) 49%, transparent 51%, transparent 100%);
  animation: btnGlareDrift 7s ease-in-out infinite;
}
@keyframes btnWashPulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}
@keyframes btnGlareDrift {
  0% { transform: translate(-8%, -8%); opacity: 0.6; }
  50% { transform: translate(8%, 8%); opacity: 1; }
  100% { transform: translate(-8%, -8%); opacity: 0.6; }
}

/* Top edge highlight */
.wspy-field--btn .glass-edge {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  border-radius: 9999px 9999px 0 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(220, 240, 255, 0.4) 30%, rgba(255, 255, 255, 0.5) 50%, rgba(220, 240, 255, 0.4) 70%, transparent);
  box-shadow: 0 0 8px rgba(200, 230, 255, 0.2);
}

/* Button text */
.wspy-btn {
  position: relative;
  z-index: 4;
  width: 100%;
  height: var(--neon-height);
  border: none;
  outline: none;
  border-radius: 9999px;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #e0eaf4;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: color 0.3s, text-shadow 0.3s;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.wspy-btn:hover {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3), 0 1px 8px rgba(0, 0, 0, 0.3);
}
.wspy-btn:disabled,
.wspy-btn[disabled] {
  background: transparent !important;
  color: rgba(224, 234, 244, 0.5);
  cursor: not-allowed;
  opacity: 0.7;
}

/* ─── Labels neon ─── */
.wspy-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--neon-label);
  margin-bottom: 8px;
  padding-left: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Spacing form-group for neon pills */
body[data-page="authentification"] .auth-form .form-group,
body[data-page="inscription"] .auth-form .form-group {
  margin-bottom: 24px;
}

/* ─── EXT cards: dark radial gradient ─── */
body.auth-page .auth-card {
  background: radial-gradient(circle, rgb(5 12 31) 0%, rgb(2 7 78) 100%);
}
body.auth-page .glass-shape {
  display: none;
}

/* ─── Register: civilité pills neon ─── */
body[data-page="inscription"] .genre-label-text {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.7);
  height: var(--neon-height);
  width: 100%;
  padding: 0 20px;
  transition: all 0.3s;
}
body[data-page="inscription"] .genre-choice input:checked + .genre-label-text {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Checkbox neon colors */
body[data-page="authentification"] .sr-only-check:checked + .check-box,
body[data-page="inscription"] .sr-only-check:checked + .check-box {
  background: var(--neon-blue);
  border-color: var(--neon-blue);
}
body[data-page="authentification"] .sr-only-check:focus-visible + .check-box,
body[data-page="inscription"] .sr-only-check:focus-visible + .check-box {
  outline-color: var(--neon-blue);
}

/* ─── Accent line — removed (was conflicting with split-screen re-declaration) ─── */

/* Title + subtitle neon */
body[data-page="authentification"] .card-title,
body[data-page="inscription"] .card-title {
  color: var(--neon-text);
}
body[data-page="authentification"] .card-subtitle,
body[data-page="inscription"] .card-subtitle {
  color: var(--neon-placeholder);
}
/* Register on gradient card: brighter text */
body[data-page="inscription"] .card-title {
  color: #fff;
}
body[data-page="inscription"] .card-subtitle {
  color: rgba(255, 255, 255, 0.65);
}
body[data-page="inscription"] .wspy-label {
  color: rgba(255, 255, 255, 0.55);
}
body[data-page="inscription"] .form-label {
  color: rgba(255, 255, 255, 0.55);
  padding-left: 0;
}
body[data-page="inscription"] .check-label {
  color: rgba(255, 255, 255, 0.8);
}

/* Form footer neon */
body[data-page="authentification"] .form-footer a,
body[data-page="inscription"] .form-footer a {
  color: var(--neon-blue);
}
body[data-page="authentification"] .form-footer,
body[data-page="inscription"] .form-footer {
  border-top-color: rgba(74, 108, 247, 0.12);
}
/* Register on gradient card: footer colors */
body[data-page="inscription"] .form-footer {
  border-top-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
}
body[data-page="inscription"] .form-footer a {
  color: #fff;
}
body[data-page="authentification"] .form-link {
  color: var(--neon-blue);
}

/* ─── Neon responsive ─── */
@media (max-width: 991px) {
  .wspy-field {
    box-shadow: 0 0 10px rgba(90, 60, 200, 0.15);
  }
}
@media (max-width: 480px) {
  .wspy-input { height: 48px; font-size: 14px; }
  .wspy-btn { height: 48px; font-size: 14px; }
  .wspy-label { font-size: 11px; padding-left: 20px; }
}

/* ═══════════════════════════════════════════════════════════
   SPLIT-SCREEN LOGIN (desktop >= 992px)
   ═══════════════════════════════════════════════════════════ */

/* Container split plein ecran */
.auth-split {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* LEFT PANEL — Branding + Three.js */
.auth-branding {
  position: fixed;
  top: 0;
  left: 0;
  width: 62%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
}

/* Image de fond — remplit le panel sans deformation */
.branding-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Canvas liquid overlay — par-dessus l'image */
#liquid-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* RIGHT PANEL — Formulaire */
.auth-form-panel {
  margin-left: 62%;
  width: 38%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #0a0e1a;
  background-image:
    radial-gradient(ellipse 800px 600px at 20% 30%, rgba(64, 100, 255, 0.04), transparent),
    radial-gradient(ellipse 600px 400px at 75% 70%, rgba(120, 50, 200, 0.03), transparent);
  padding: 60px;
  position: relative;
  overflow-y: auto;
}

.auth-form-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* P1: auth-card dans le split — layout sans bordure */
.auth-split .auth-card {
  width: 100%;
  max-width: 420px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: none;
  padding: 40px;
  overflow: hidden;
}
/* Disable liquid glass pseudo-elements in split layout */
.auth-split .auth-card::before,
.auth-split .auth-card::after {
  display: none;
}

/* Split: accent line above title — disabled on neon pages */
/* Split: larger title */
.auth-split .card-title {
  font-size: 26px;
  font-weight: 700;
}

/* Split: centered form — flex fills space, margin-top:0 avoids push-down */
.auth-split .auth-form-inner {
  flex: 1;
  margin-top: 0;
}

/* Split: compact vertical fit — no scroll on login */
.auth-split .auth-form-panel {
  padding: 32px 48px;
}
.auth-split .auth-card {
  padding: 28px 32px;
}
.auth-split .card-subtitle {
  margin-bottom: 20px;
}
.auth-split .auth-form .form-group {
  margin-bottom: 16px;
}
.auth-split .form-footer {
  margin-top: 20px;
  padding-top: 16px;
}

/* Footer copyright dans le split — poussé en bas du panel */
.auth-split .auth-footer {
  text-align: center;
  margin-top: auto;
  padding: 0.75rem 0 0;
}

/* Cacher bg-canvas/bg-grid en desktop (Three.js les remplace) */
@media (min-width: 992px) {
  body[data-page="authentification"] .bg-canvas,
  body[data-page="authentification"] .bg-grid {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE < 992px : retour layout centre
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  .auth-split {
    display: block;
  }

  .auth-branding {
    display: none;
  }

  .auth-form-panel {
    margin-left: 0;
    width: 100%;
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  /* bg-canvas et bg-grid visibles en mobile */
  body[data-page="authentification"] .bg-canvas,
  body[data-page="authentification"] .bg-grid {
    display: block;
  }

  /* Mobile login card — keep gradient, no liquid glass */
  .auth-split .auth-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 40px;
  }
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }
  .otp-container { gap: 6px; }
  .otp-box {
    width: 44px;
    height: 56px;
    font-size: 20px;
  }
  .recovery-grid { grid-template-columns: 1fr; }
  .error-code { font-size: 80px; }
  .logo-block img { max-width: 360px; }
  .error-actions {
    flex-direction: column;
  }
  .error-actions .btn-primary,
  .error-actions .btn-outline { width: 100%; }
  .recovery-actions { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════
   2FA VERIFY — Background image
   ═══════════════════════════════════════════════════════════ */
body[data-page="2fa_verify"] .bg-canvas {
  background: url('/resources/img/auth-2fa-bg.webp') center/cover no-repeat;
}
body[data-page="2fa_verify"] .bg-canvas::before,
body[data-page="2fa_verify"] .bg-canvas::after {
  display: none;
}
body[data-page="2fa_verify"] .bg-grid {
  display: none;
}

/* Container : liquid glass with stronger drop-shadow for 2FA verify */
body[data-page="2fa_verify"] .auth-card::after {
  backdrop-filter: url(#liquid-glass-new) url(#fresnel) drop-shadow(0 0 15px rgba(0,0,0,0.3));
  -webkit-backdrop-filter: url(#liquid-glass-new) url(#fresnel) drop-shadow(0 0 15px rgba(0,0,0,0.3));
}

/* OTP boxes : fond léger, bordure visible, glow cyan focus */
body[data-page="2fa_verify"] .otp-box {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
body[data-page="2fa_verify"] .otp-box:focus {
  border-color: #1e93e8;
  box-shadow: 0 0 0 3px rgba(30, 147, 232, 0.25), 0 0 20px rgba(30, 147, 232, 0.15);
}

/* Titre : text-shadow pour lisibilité */
body[data-page="2fa_verify"] .card-title {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   INSCRIPTION — Register page styles
   ═══════════════════════════════════════════════════════════ */

/* Radio toggle pills (civilité M/Mme) */
.genre-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.genre-choice {
  display: block;
  position: relative;
  cursor: pointer;
}
.genre-choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.genre-label-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
}
.genre-choice input:checked + .genre-label-text {
  border-color: var(--brand-primary);
  background: rgba(14, 165, 233, 0.08);
  color: var(--brand-primary-light);
  box-shadow: 0 0 0 1px var(--brand-primary);
}
.genre-label-text:hover {
  border-color: var(--border-focus);
}
.has-error .genre-label-text {
  border-color: var(--danger);
}

/* Grid 2 colonnes (prénom/nom) */
.form-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) {
  .form-row-inline {
    grid-template-columns: 1fr;
  }
}

/* Hint texte mot de passe */
.form-hint {
  margin: 6px 0 0 2px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Modal CGU dark theme */
body[data-page="inscription"] .modal-content {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}
body[data-page="inscription"] .modal-header {
  border-bottom-color: var(--border-subtle);
}
body[data-page="inscription"] .modal-footer {
  border-top-color: var(--border-subtle);
}
body[data-page="inscription"] .modal-title {
  color: var(--text-primary);
}
body[data-page="inscription"] .btn.btn-default {
  background: var(--bg-input);
  border-color: var(--border-default);
  color: var(--text-secondary);
}
body[data-page="inscription"] .modal-body {
  color: var(--text-secondary);
  line-height: 1.7;
}
body[data-page="inscription"] .modal-body h4 {
  color: var(--text-primary);
  margin-top: 20px;
}
body[data-page="inscription"] .modal-body a {
  color: var(--text-brand);
}

/* Override ext.esload.css .form-row margins for register */
body[data-page="inscription"] .auth-form .form-row:not(:first-child) {
  margin-top: 0;
}

/* Wider container for register if needed */
body[data-page="inscription"] .auth-container--wide {
  max-width: 480px;
}

/* ═══════════════════════════════════════════════════════════
   WIZARD FORM (register multi-step)
   ═══════════════════════════════════════════════════════════ */

/* Step indicators */
.wizard-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 36px;
}
.wizard-dot {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: all 0.4s;
  flex-shrink: 0;
  z-index: 1;
}
.wizard-dot.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.15);
}
.wizard-dot.completed {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}
.wizard-connector {
  width: 48px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.4s;
  flex-shrink: 0;
}
.wizard-connector.completed {
  background: rgba(255, 255, 255, 0.4);
}

/* Step content */
.wizard-step {
  display: none;
}
.wizard-step.wizard-step--active {
  display: block;
  animation: wizardSlideIn 0.35s ease;
}
@keyframes wizardSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
.wizard-step-title {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
  text-align: center;
  letter-spacing: 0.3px;
}

/* Wizard navigation */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 16px;
}
.wizard-nav--end {
  justify-content: flex-end;
}
.wizard-prev-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 12px 28px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}
.wizard-prev-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}
.wizard-next-wrap {
  flex: 1;
}
.wizard-next-wrap .wspy-field--btn {
  margin-top: 0;
}

/* Password hint on gradient card */
body[data-page="inscription"] .form-hint {
  color: rgba(255, 255, 255, 0.45);
  padding-left: 24px;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE — Full-bleed background + Glass card (2026-04)
   ═══════════════════════════════════════════════════════════ */

/* --- a) Full-bleed background image --- */
body.auth-login-bg {
  background-color: #0a0e1a;
  background-image: url('/resources/img/auth/3.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body.auth-login-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.4);
  z-index: 0;
  pointer-events: none;
}
body.auth-login-bg .authentication-wrapper {
  position: relative;
  z-index: 1;
}

/* --- b) Hide Vuexy decorative SVG shapes (clash with photo bg) --- */
body[data-page="authentification"] .authentication-basic .authentication-inner::before,
body[data-page="authentification"] .authentication-basic .authentication-inner::after {
  display: none;
}

/* --- c) Logo above card --- */
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo img {
  width: 280px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
/* Conditional logo: dark card → white, light card → color */
.auth-card--dark-glass .auth-logo--color { display: none; }
.auth-card--dark-glass .auth-logo--white { display: inline; }
.auth-card--light-glass .auth-logo--white { display: none; }
.auth-card--light-glass .auth-logo--color { display: inline; }

/* --- d) Glass card base (shared) --- */
body[data-page="authentification"] .auth-card {
  backdrop-filter: blur(20px) saturate(140%) brightness(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(140%) brightness(1.1);
  border: none;
}
body[data-page="authentification"] .auth-card .form-control {
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

/* ── DARK GLASS (for bright backgrounds) ── */
.auth-card--dark-glass .auth-card {
  background: hsla(220, 40%, 13%, 0.6);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 1.8px 3px 0px -2px rgba(255, 255, 255, 0.2),
    inset -2px -2px 0px -2px rgba(255, 255, 255, 0.15),
    inset -3px -8px 1px -6px rgba(255, 255, 255, 0.1),
    inset -0.3px -1px 4px 0px rgba(0, 0, 0, 0.15),
    inset -1.5px 2.5px 0px -2px rgba(0, 0, 0, 0.2),
    inset 0px 3px 4px -2px rgba(0, 0, 0, 0.2),
    0px 1px 5px rgba(0, 0, 0, 0.15),
    0px 8px 24px rgba(0, 0, 0, 0.2);
}
.auth-card--dark-glass .auth-card:hover { background: hsla(220, 40%, 13%, 0.6); }
.auth-card--dark-glass .auth-card h4,
.auth-card--dark-glass .auth-card p { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.auth-card--dark-glass .auth-card .form-label { color: rgba(255, 255, 255, 0.85); }
.auth-card--dark-glass .auth-card .form-check-label { color: rgba(255, 255, 255, 0.7); }
.auth-card--dark-glass .auth-card .form-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
}
.auth-card--dark-glass .auth-card .form-control::placeholder { color: rgba(255, 255, 255, 0.35); }
.auth-card--dark-glass .auth-card .form-control:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  color: #fff;
}
.auth-card--dark-glass .auth-card .input-group-text {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
}
.auth-card--dark-glass .auth-card a { color: rgba(255, 255, 255, 0.8); }
.auth-card--dark-glass .auth-card a:hover { color: #fff; }
.auth-card--dark-glass .auth-card .divider-text { color: rgba(255, 255, 255, 0.4); }

/* ── LIGHT GLASS (for dark backgrounds) ── */
.auth-card--light-glass .auth-card {
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 1.8px 3px 0px -2px rgba(255, 255, 255, 0.5),
    inset -2px -2px 0px -2px rgba(255, 255, 255, 0.3),
    inset -3px -8px 1px -6px rgba(255, 255, 255, 0.2),
    inset -0.3px -1px 4px 0px rgba(0, 0, 0, 0.06),
    inset -1.5px 2.5px 0px -2px rgba(0, 0, 0, 0.08),
    inset 0px 3px 4px -2px rgba(0, 0, 0, 0.08),
    0px 1px 5px rgba(0, 0, 0, 0.06),
    0px 6px 20px rgba(0, 0, 0, 0.1);
}
.auth-card--light-glass .auth-card:hover { background: rgba(255, 255, 255, 0.22); }
.auth-card--light-glass .auth-card h4,
.auth-card--light-glass .auth-card p { color: #1a1a2e; text-shadow: none; }
.auth-card--light-glass .auth-card .form-label { color: #2d2d44; }
.auth-card--light-glass .auth-card .form-check-label { color: #4a4a6a; }
.auth-card--light-glass .auth-card .form-control {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}
.auth-card--light-glass .auth-card .form-control::placeholder { color: rgba(0, 0, 0, 0.35); }
.auth-card--light-glass .auth-card .form-control:focus {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  color: #111;
}
.auth-card--light-glass .auth-card .input-group-text {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #4a4a6a;
}
.auth-card--light-glass .auth-card a { color: #2d2d44; }
.auth-card--light-glass .auth-card a:hover { color: #0ea5e9; }
.auth-card--light-glass .auth-card .divider-text { color: rgba(0, 0, 0, 0.4); }

/* --- e) Responsive mobile --- */
@media (max-width: 575px) {
  body.auth-login-bg {
    background-attachment: scroll;
  }
  body[data-page="authentification"] .authentication-basic .authentication-inner {
    margin-inline: 1rem;
  }
}

[data-bs-theme="dark"] .btn-liquid:not(.btn-glass):not([class*="btn-outline"]) {
  letter-spacing: .2em;
  font-size: 1.25em;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  margin-bottom: 1em;
}
[data-bs-theme="dark"] .btn-liquid:not(.btn-glass):not([class*="btn-outline"]):hover {
  color: rgba(255, 255, 255, 0.7);
}
body[data-page="authentification"] .divider {
  margin-block: 0;
}