/* =====================================================
   WAVESTONE CR MASTER – LOGIN UI REDESIGN v2
   Design : Split-screen (branding gauche / form droite)
   Palette : Deep Navy #001233 / Blue #002D72 / Accent #E8007D
   ===================================================== */

/* ─────────────────────────────────────────────
   RESET ÉCRAN
───────────────────────────────────────────── */
#loginScreen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: stretch;
  z-index: 9999;
  overflow: hidden;
  background: #000e2c;
}
#loginScreen::before,
#loginScreen::after { display: none; }

/* ─────────────────────────────────────────────
   COLONNE GAUCHE – BRANDING
───────────────────────────────────────────── */
.auth-left {
  flex: 0 0 45%;
  min-width: 380px;
  background: linear-gradient(160deg, #000e2c 0%, #002060 50%, #003399 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  gap: 0;
}

/* Fond décoratif orbes */
.auth-left::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,100,255,.35) 0%, transparent 65%);
  top: -150px; left: -150px;
  pointer-events: none;
  animation: authOrbFloat 9s ease-in-out infinite alternate;
}
.auth-left::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232,0,125,.18) 0%, transparent 65%);
  bottom: -100px; right: -80px;
  pointer-events: none;
  animation: authOrbFloat 11s ease-in-out infinite alternate-reverse;
}
@keyframes authOrbFloat {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(30px,-40px) scale(1.06); }
  100% { transform: translate(-20px,25px) scale(.95); }
}

/* Grille de points subtile */
.auth-left-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.auth-left-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.auth-brand-logo {
  width: auto;
  height: 48px;
  max-width: 200px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 4px 16px rgba(0,0,0,.4));
}

.auth-brand-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #E8007D, transparent);
  border-radius: 2px;
  margin: 0 auto;
}

.auth-brand-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
  line-height: 1.15;
  text-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.auth-brand-title span {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand-desc {
  font-size: .9rem;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
  max-width: 300px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 300px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  color: rgba(255,255,255,.8);
  font-size: .82rem;
  font-weight: 500;
  transition: background .2s, border-color .2s;
  backdrop-filter: blur(8px);
}
.auth-feature:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
}
.auth-feature-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, rgba(0,100,255,.5), rgba(232,0,125,.3));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  color: #fff;
  flex-shrink: 0;
}

.auth-left-footer {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  text-align: center;
  font-size: .68rem;
  color: rgba(255,255,255,.25);
  letter-spacing: .5px;
  z-index: 1;
}

/* ─────────────────────────────────────────────
   COLONNE DROITE – FORMULAIRE
───────────────────────────────────────────── */
.auth-right {
  flex: 1;
  background: #f5f7fc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  overflow-y: auto;
}

.auth-form-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0,45,114,.1),
    0 1px 0 rgba(255,255,255,.8);
  overflow: hidden;
  animation: authCardIn .35s cubic-bezier(.16,1,.3,1);
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────────
   EN-TÊTE CARTE
───────────────────────────────────────────── */
.auth-card-header {
  background: linear-gradient(160deg, #001233 0%, #002D72 60%, #0050C8 100%);
  padding: 20px 24px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: visible;
  border-bottom: 3px solid rgba(255,255,255,.08);
}
.auth-card-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(255,255,255,.08) 0%, transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(0,100,255,.2) 0%, transparent 40%);
  pointer-events: none;
  border-radius: inherit;
}
}
.auth-card-header::after { display: none; }

.auth-card-logo {
  width: auto;
  height: 32px;
  max-width: 140px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  position: relative;
  z-index: 2;
}

.auth-card-titles {
  position: relative;
  z-index: 2;
}
.auth-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .4px;
}
.auth-card-sub {
  font-size: .74rem;
  color: rgba(255,255,255,.75);
  margin-top: 2px;
  position: relative;
  z-index: 2;
}

/* ─────────────────────────────────────────────
   ONGLETS
───────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid #eef0f6;
  background: #fafbfe;
}
.auth-tab {
  flex: 1;
  padding: 13px 16px;
  background: none;
  border: none;
  font-size: .85rem;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  transition: all .2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font, 'Inter', sans-serif);
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.auth-tab.active {
  color: #002D72;
  border-bottom-color: #002D72;
  font-weight: 700;
  background: rgba(0,45,114,.03);
}
.auth-tab:hover:not(.active) {
  color: #475569;
  background: rgba(0,0,0,.02);
}

/* ─────────────────────────────────────────────
   BADGE 2FA
───────────────────────────────────────────── */
.auth-mfa-badge {
  margin: 14px 20px 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(0,45,114,.05) 0%, rgba(0,100,200,.04) 100%);
  border: 1.5px solid rgba(0,45,114,.14);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.auth-mfa-badge-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
}
.auth-mfa-badge-shield {
  font-size: 1.2rem;
  color: #002D72;
  flex-shrink: 0;
  background: rgba(0,45,114,.1);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-mfa-badge-text strong {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: #002D72;
}
.auth-mfa-badge-text span {
  font-size: .68rem;
  color: #6b7ea8;
}
.auth-mfa-apps-row {
  display: flex;
  gap: 7px;
  align-items: center;
}
.auth-mfa-app-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 4px;
  border-radius: 20px;
  background: #fff;
  border: 1.5px solid #e4e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.auth-mfa-app-chip-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: .62rem;
}
.auth-mfa-app-chip span {
  font-size: .65rem;
  font-weight: 600;
  color: #4a5568;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────
   CORPS DU FORMULAIRE
───────────────────────────────────────────── */
.auth-form-body {
  padding: 18px 24px 20px;
  background: #fff;
}
.auth-form-body form {
  margin: 0;
  padding: 0;
}

.auth-field {
  margin-bottom: 14px;
}
.auth-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: .2px;
}
.auth-field label i {
  color: #002D72;
  font-size: .8rem;
  width: 14px;
  text-align: center;
}
.auth-field label .auth-label-hint {
  font-weight: 400;
  color: #9ca3af;
  font-size: .7rem;
  margin-left: 2px;
}

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: .88rem;
  color: #1a2540;
  background: #f9fafc;
  font-family: var(--font, 'Inter', sans-serif);
  transition: border-color .2s, box-shadow .2s, background .2s;
  box-sizing: border-box;
}
.auth-input:focus {
  outline: none;
  border-color: #002D72;
  box-shadow: 0 0 0 3.5px rgba(0,45,114,.11);
  background: #fff;
}
.auth-input::placeholder { color: #c0cad8; }

.auth-input-wrap {
  position: relative;
}
.auth-input-wrap .auth-input {
  padding-right: 40px;
}
.auth-toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: .82rem;
  padding: 4px;
  transition: color .15s;
}
.auth-toggle-pass:hover { color: #002D72; }

.auth-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: .88rem;
  color: #1a2540;
  background: #f9fafc;
  font-family: var(--font, 'Inter', sans-serif);
  transition: border-color .2s, box-shadow .2s;
  cursor: pointer;
  appearance: auto;
  box-sizing: border-box;
}
.auth-select:focus {
  outline: none;
  border-color: #002D72;
  box-shadow: 0 0 0 3.5px rgba(0,45,114,.11);
  background: #fff;
}

.auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-error {
  font-size: .78rem;
  color: #dc2626;
  min-height: 16px;
  margin: -6px 0 10px;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}
.auth-error:not(:empty)::before {
  content: '\f06a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-top: 1px;
  flex-shrink: 0;
}

.auth-forgot-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .76rem;
  color: #002D72;
  cursor: pointer;
  margin-bottom: 14px;
  margin-top: -4px;
  transition: color .15s;
  font-weight: 500;
}
.auth-forgot-link:hover { color: #E8007D; text-decoration: underline; }

/* ─────────────────────────────────────────────
   BOUTON PRINCIPAL
───────────────────────────────────────────── */
.auth-btn-primary {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #001B4E 0%, #002D72 40%, #0050C8 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font, 'Inter', sans-serif);
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: .3px;
  box-shadow: 0 6px 20px rgba(0,45,114,.3);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}
.auth-btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.14) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .2s;
}
.auth-btn-primary:hover {
  background: linear-gradient(135deg, #000d26 0%, #001B4E 40%, #003B99 100%);
  box-shadow: 0 8px 26px rgba(0,45,114,.42);
  transform: translateY(-1px);
}
.auth-btn-primary:hover::before { opacity: 1; }
.auth-btn-primary:active {
  transform: scale(.98) translateY(0);
  box-shadow: 0 4px 12px rgba(0,45,114,.28);
}
.auth-btn-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ─────────────────────────────────────────────
   PIED DE CARTE
───────────────────────────────────────────── */
.auth-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(0,45,114,.03), rgba(0,80,200,.02));
  border-top: 1px solid #eef0f6;
  font-size: .72rem;
  color: #94a3b8;
  line-height: 1.5;
}
.auth-card-footer i { color: #002D72; flex-shrink: 0; }

/* ─────────────────────────────────────────────
   MOT DE PASSE OUBLIÉ
───────────────────────────────────────────── */
.auth-forgot-panel {
  padding: 0 24px 20px;
  background: #fff;
}
.auth-forgot-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font, 'Inter', sans-serif);
  padding: 0;
  margin-bottom: 14px;
  transition: color .15s;
}
.auth-forgot-back:hover { color: #002D72; }

.auth-forgot-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a2540;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-forgot-title i { color: #002D72; }

.auth-step {
  display: none;
}
.auth-step.active {
  display: block;
  animation: authStepIn .25s ease;
}
@keyframes authStepIn {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: none; }
}

.auth-step-desc {
  font-size: .8rem;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border-left: 3px solid #002D72;
  border-radius: 0 8px 8px 0;
}

.auth-security-question {
  font-size: .85rem;
  font-weight: 600;
  color: #002D72;
  padding: 10px 14px;
  background: rgba(0,45,114,.05);
  border: 1.5px solid rgba(0,45,114,.15);
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.auth-security-question::before {
  content: '\f059';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-top: 1px;
  flex-shrink: 0;
  color: #002D72;
}

.auth-success-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(5,150,105,.07);
  border: 1.5px solid rgba(5,150,105,.25);
  border-radius: 12px;
  color: #065f46;
  font-size: .82rem;
  line-height: 1.55;
  margin-bottom: 14px;
}
.auth-success-box i { font-size: 1.3rem; color: #059669; flex-shrink: 0; margin-top: 1px; }

/* ─────────────────────────────────────────────
   RESPONSIVE – Mobile
───────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Split screen → stacked */
  #loginScreen {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Colonne gauche : bandeau horizontal compact */
  .auth-left {
    flex: 0 0 auto;
    min-width: unset;
    width: 100%;
    padding: 14px 20px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
  }
  .auth-left-grid { display: none; }
  .auth-left-content {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
    flex: 1;
    flex-wrap: wrap;
  }
  .auth-brand-logo   { height: 30px; flex-shrink: 0; }
  .auth-brand-divider { display: none; }
  .auth-brand-title  { font-size: 1.1rem; white-space: nowrap; }
  .auth-brand-title span { -webkit-text-fill-color: unset; color: #93c5fd; background: none; }
  .auth-brand-desc   { display: none; }
  .auth-features     { display: none; }
  .auth-left-footer  { display: none; }
  .auth-left::before,
  .auth-left::after  { display: none; }

  /* Colonne droite : plein écran scrollable */
  .auth-right {
    flex: 1;
    padding: 14px 12px 24px;
    background: #f5f7fc;
    overflow-y: auto;
  }
  .auth-form-card    { max-width: 100%; border-radius: 16px; }

  /* Badge 2FA compact */
  .auth-mfa-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 14px 0;
    padding: 9px 12px;
  }
  .auth-mfa-apps-row { align-self: flex-start; }

  /* Formulaire plus compact */
  .auth-form-body { padding: 12px 14px 14px; }
  .auth-field     { margin-bottom: 11px; }

  /* MFA screens */
  .auth-mfa-card   { margin: 8px; border-radius: 16px; }
  .auth-setup-card { margin: 8px; border-radius: 16px; }
  .auth-mfa-header { padding: 18px 16px 14px; }
  .auth-mfa-body   { padding: 14px 16px 16px; }
  .auth-setup-body { padding: 0 12px 14px; }
  .auth-setup-mandatory-banner { margin: 12px 12px 0; }
  .auth-setup-step { padding: 12px 12px; }

  /* Steps row : empilés */
  .auth-steps-row { grid-template-columns: 1fr; gap: 10px; }
}

/* ─────────────────────────────────────────────
   ÉCRANS MFA & SETUP – REDESIGN
───────────────────────────────────────────── */

/* Wrapper plein écran (MFA login + MFA setup) */
.auth-mfa-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #000e2c 0%, #001B4E 50%, #002D72 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
}
.auth-mfa-screen::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.auth-mfa-screen::after {
  content: '';
  position: fixed;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,100,255,.3) 0%, transparent 65%);
  top: -100px; right: -100px;
  pointer-events: none;
  animation: authOrbFloat 10s ease-in-out infinite alternate;
}

/* Carte MFA vérification login */
.auth-mfa-card {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 32px 80px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.1);
  overflow: hidden;
  animation: authCardIn .35s cubic-bezier(.16,1,.3,1);
  position: relative;
  z-index: 1;
  margin: auto;
}

/* Header MFA */
.auth-mfa-header {
  background: linear-gradient(160deg, #001233 0%, #002D72 60%, #0050C8 100%);
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.auth-mfa-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.08) 0%, transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(0,100,255,.18) 0%, transparent 40%);
  pointer-events: none;
}
.auth-mfa-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 28px;
  background: linear-gradient(to bottom right, transparent 49%, #fff 50%);
}

.auth-mfa-logo {
  height: 28px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

/* Icône bouclier animée */
.auth-mfa-icon-wrap {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}
.auth-mfa-icon {
  width: 58px; height: 58px;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  margin: 0 auto;
  animation: mfaShieldPulse 2.5s ease-in-out infinite;
  backdrop-filter: blur(8px);
}
@keyframes mfaShieldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.15), 0 0 0 0 rgba(0,80,200,.2); }
  50%       { box-shadow: 0 0 0 8px rgba(255,255,255,.0), 0 0 0 16px rgba(0,80,200,.0); }
}

.auth-mfa-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
  letter-spacing: .3px;
}
.auth-mfa-subheading {
  font-size: .74rem;
  color: rgba(255,255,255,.6);
  position: relative;
  z-index: 1;
  margin-top: 3px;
}

/* Corps MFA */
.auth-mfa-body {
  padding: 20px 24px 22px;
  text-align: center;
}

/* Utilisateur connecté */
.auth-mfa-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: #f0f4ff;
  border: 1.5px solid #d0dbf5;
  border-radius: 24px;
  font-size: .8rem;
  font-weight: 600;
  color: #002D72;
  margin-bottom: 16px;
}
.auth-mfa-user-avatar {
  width: 26px; height: 26px;
  background: #002D72;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: .7rem;
}

/* Pills apps compatibles */
.auth-mfa-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.auth-mfa-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  color: #475569;
  transition: border-color .15s, box-shadow .15s;
  cursor: default;
}
.auth-mfa-pill:hover {
  border-color: #002D72;
  box-shadow: 0 1px 4px rgba(0,45,114,.1);
}
.auth-mfa-pill-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: .62rem;
  flex-shrink: 0;
}

/* Zone saisie code */
.auth-mfa-code-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.auth-code-input {
  width: 100%;
  max-width: 220px;
  padding: 12px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .35em;
  text-align: center;
  color: #1a2540;
  background: #f9fafc;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  margin: 0 auto;
  display: block;
}
.auth-code-input:focus {
  outline: none;
  border-color: #002D72;
  box-shadow: 0 0 0 4px rgba(0,45,114,.12);
  background: #fff;
}
.auth-code-input::placeholder {
  color: #d0dae8;
  letter-spacing: .15em;
}

.auth-mfa-countdown {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 2px;
}

.auth-mfa-error {
  font-size: .78rem;
  color: #dc2626;
  min-height: 20px;
  margin: 4px 0 10px;
  line-height: 1.45;
}

/* Bouton vérification */
.auth-mfa-verify-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #001B4E 0%, #002D72 40%, #0050C8 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font, 'Inter', sans-serif);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(0,45,114,.3);
  transition: all .2s;
  margin-top: 8px;
}
.auth-mfa-verify-btn:hover {
  background: linear-gradient(135deg, #000d26 0%, #001B4E 40%, #003B99 100%);
  box-shadow: 0 8px 26px rgba(0,45,114,.42);
  transform: translateY(-1px);
}
.auth-mfa-verify-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-mfa-cancel-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: .78rem;
  cursor: pointer;
  font-family: var(--font, 'Inter', sans-serif);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.auth-mfa-cancel-btn:hover {
  color: #475569;
  background: #f1f5f9;
}

/* Lien "Problème d'accès" */
.auth-mfa-trouble {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
  text-align: center;
}
.auth-mfa-trouble-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: .73rem;
  cursor: pointer;
  font-family: var(--font, 'Inter', sans-serif);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.auth-mfa-trouble-btn:hover {
  color: #dc2626;
  background: rgba(220,38,38,.06);
}

/* ─────────────────────────────────────────────
   SETUP MFA OBLIGATOIRE – PLEIN ÉCRAN
───────────────────────────────────────────── */
.auth-setup-card {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 32px 80px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.1);
  overflow: hidden;
  animation: authCardIn .35s cubic-bezier(.16,1,.3,1);
  position: relative;
  z-index: 1;
  margin: auto;
}

.auth-setup-mandatory-banner {
  margin: 14px 20px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(232,0,125,.06), rgba(200,0,100,.04));
  border: 1.5px solid rgba(232,0,125,.2);
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.auth-setup-mandatory-banner i {
  color: #E8007D;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.auth-setup-mandatory-banner strong {
  display: block;
  font-size: .8rem;
  color: #1a2540;
  font-weight: 700;
}
.auth-setup-mandatory-banner p {
  font-size: .72rem;
  color: #64748b;
  margin: 2px 0 0;
  line-height: 1.45;
}

.auth-setup-body {
  padding: 0 20px 20px;
}

/* Étape */
.auth-setup-step {
  background: #f8fafc;
  border: 1.5px solid #e8eef8;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.auth-setup-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.auth-step-num {
  width: 28px; height: 28px;
  background: #002D72;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.auth-setup-step-title {
  font-size: .9rem;
  font-weight: 700;
  color: #1a2540;
}
.auth-setup-step-sub {
  font-size: .74rem;
  color: #64748b;
  margin-top: 1px;
}

/* Grille 3 apps */
.auth-apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 480px) {
  .auth-apps-grid { grid-template-columns: 1fr; }
}

.auth-app-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: border-color .15s, box-shadow .15s;
}
.auth-app-card:hover {
  border-color: #002D72;
  box-shadow: 0 2px 10px rgba(0,45,114,.12);
}

.auth-app-card-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: .82rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

.auth-app-card-info {
  flex: 1;
  min-width: 0;
}
.auth-app-card-info strong {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: #1a2540;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-app-card-links {
  display: flex;
  gap: 4px;
  margin-top: 3px;
}
.auth-app-card-links a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: .64rem;
  font-weight: 600;
  color: #002D72;
  text-decoration: none;
  padding: 2px 5px;
  border: 1px solid rgba(0,45,114,.2);
  border-radius: 4px;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.auth-app-card-links a:hover {
  background: #002D72;
  color: #fff;
  border-color: #002D72;
}

/* Steps row (QR + code côte à côte) */
.auth-steps-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 500px) {
  .auth-steps-row { grid-template-columns: 1fr; }
}

/* QR Code */
.auth-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  margin: 0 auto 8px;
  width: fit-content;
}
.auth-qr-img {
  width: 130px;
  height: 130px;
  border-radius: 6px;
  display: block;
}

.auth-qr-fallback {
  width: 130px; height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  font-size: .7rem;
  text-align: center;
  padding: 10px;
}
.auth-qr-fallback i { font-size: 1.6rem; }

.auth-regen-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 4px auto 0;
  padding: 4px 12px;
  background: none;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  font-family: var(--font, 'Inter', sans-serif);
  transition: border-color .15s, color .15s;
}
.auth-regen-btn:hover {
  border-color: #002D72;
  color: #002D72;
}

/* Secret manuel */
.auth-manual-details {
  font-size: .74rem;
  color: #64748b;
  cursor: pointer;
  margin-top: 6px;
}
.auth-manual-details summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  font-weight: 600;
  user-select: none;
  transition: color .15s;
}
.auth-manual-details summary:hover { color: #002D72; }
.auth-manual-details summary::-webkit-details-marker { display: none; }

.auth-secret-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.auth-secret-code {
  flex: 1;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .75rem;
  background: #f0f4ff;
  border: 1.5px solid #d0dbf5;
  border-radius: 7px;
  padding: 6px 10px;
  color: #002D72;
  word-break: break-all;
  letter-spacing: .07em;
  line-height: 1.5;
}

.auth-btn-icon-sm {
  width: 28px; height: 28px;
  background: none;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  color: #64748b;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  transition: border-color .15s, color .15s, background .15s;
  flex-shrink: 0;
}
.auth-btn-icon-sm:hover {
  border-color: #002D72;
  color: #002D72;
  background: rgba(0,45,114,.05);
}

.auth-secret-hint {
  font-size: .66rem;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.4;
}

/* Footer setup */
.auth-setup-footer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: .72rem;
  color: #64748b;
  line-height: 1.5;
}
.auth-setup-footer i { color: #002D72; flex-shrink: 0; margin-top: 1px; }

/* ─────────────────────────────────────────────
   COUNTDOWN TOTP (réutilisé)
───────────────────────────────────────────── */
.totp-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 500;
}
.totp-countdown strong { font-weight: 700; }

/* ─────────────────────────────────────────────
   TOGGLE LANGUE SUR L'ÉCRAN DE CONNEXION
───────────────────────────────────────────── */
.auth-lang-toggle {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 10010;
}

.auth-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  color: #fff;
  font-family: 'Inter', Arial, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  letter-spacing: .3px;
}
.auth-lang-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-1px);
}
.auth-lang-btn:active { transform: translateY(0); }
.auth-lang-btn .lang-flag { font-size: 1rem; line-height: 1; }

/* Sur mobile : positionnement adapté */
@media (max-width: 768px) {
  .auth-lang-toggle {
    top: 10px;
    right: 12px;
  }
  .auth-lang-btn {
    padding: 5px 10px 5px 8px;
    font-size: .72rem;
  }
}
