
/* Ecurem CLM Auth UX Cleanup v1.2.2
   Presentation-only: compact authentication pages and wider registration. */

.ecurem-login-optimized,
.ecurem-reset-optimized,
.ecurem-register-optimized {
  width: 100%;
}

.ecurem-register-optimized .two-factor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.ecurem-register-optimized .two-factor-form > button,
.ecurem-register-optimized .two-factor-form > .w-100,
.ecurem-register-optimized .two-factor-error {
  grid-column: 1 / -1;
}

.ecurem-register-optimized .two-factor-input-group {
  margin: 0;
  min-width: 0;
}

.ecurem-register-optimized .two-factor-input-group input,
.ecurem-register-optimized .two-factor-input-group select,
.ecurem-register-optimized .two-factor-input-group textarea {
  width: 100%;
}

.ecurem-register-optimized .two-factor-help {
  display: none !important;
}

.ecurem-register-optimized .two-factor-header {
  margin-bottom: 10px;
}

.ecurem-register-optimized .two-factor-btn {
  margin-top: 4px;
}

.ecurem-reset-optimized .two-factor-header,
.ecurem-login-optimized .two-factor-header {
  margin-top: 0;
}

/* Hide duplicated inner brand only inside auth content.
   The global topbar is intentionally untouched. */
.secure-auth-main .secure-auth-brand,
.secure-auth-main .auth-brand,
.secure-auth-main .login-brand,
.secure-auth-content .secure-auth-brand,
.secure-auth-content .auth-brand,
.secure-auth-content .login-brand,
.two-factor-content .secure-auth-brand,
.two-factor-content .auth-brand,
.two-factor-content .login-brand {
  display: none !important;
}

@media (max-width: 900px) {
  .ecurem-register-optimized .two-factor-form {
    grid-template-columns: 1fr;
  }

  .ecurem-register-optimized .two-factor-form > * {
    grid-column: 1 !important;
  }
}

/* =========================================================
   ECUREM CLM AUTH UX FINAL
   ========================================================= */

/*
 * Le branding principal existe déjà dans la topbar.
 * Aucun second logo dans la colonne narrative.
 */
.secure-auth-story > .secure-auth-brand {
    display: none !important;
}

/*
 * Suppression de l'espace anciennement réservé au logo.
 */
.secure-auth-story {
    padding-top: 10px !important;
}

/*
 * REGISTER :
 * utilisation plus rationnelle de la largeur disponible.
 */
.ecurem-register-grid-layout form.two-factor-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 2px;
}

.ecurem-register-grid-layout .two-factor-input-group {
    min-width: 0;
    margin-bottom: 10px;
}

.ecurem-register-grid-layout .two-factor-input-group input,
.ecurem-register-grid-layout .two-factor-input-group select {
    width: 100%;
}

/*
 * Le bouton de création occupe toute la largeur.
 */
.ecurem-register-grid-layout form.two-factor-form > button {
    grid-column: 1 / -1;
    margin-top: 8px;
}

/*
 * Les erreurs restent attachées à leur champ.
 */
.ecurem-register-grid-layout .two-factor-error {
    margin-top: 4px;
}

/*
 * Aucune aide de mot de passe affichée sur register.
 * Les champs et validations Django restent intacts.
 */
.ecurem-register-grid-layout .helptext,
.ecurem-register-grid-layout .two-factor-help,
.ecurem-register-grid-layout ul.helptext {
    display: none !important;
}

/*
 * Mobile : retour à une seule colonne.
 */
@media (max-width: 700px) {
    .ecurem-register-grid-layout form.two-factor-form {
        grid-template-columns: 1fr;
    }

    .ecurem-register-grid-layout form.two-factor-form > button {
        grid-column: 1;
    }
}

/* Ecurem CLM consolidated UI v1.3.1 */
.secure-auth-story{padding-top:10px!important}

.secure-auth-shell:has(.ecurem-register-optimized){
  width:min(1380px,96%)!important;
  grid-template-columns:minmax(280px,.68fr) minmax(620px,1.32fr)!important;
  gap:28px!important
}
.secure-auth-shell:has(.ecurem-register-optimized) .secure-auth-card{padding:26px!important}
.ecurem-register-optimized .two-factor-form{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:18px!important;
  row-gap:10px!important
}
.ecurem-register-optimized .two-factor-input-group{min-width:0!important;margin-bottom:0!important}
.ecurem-register-optimized .two-factor-input-group input,
.ecurem-register-optimized .two-factor-input-group select,
.ecurem-register-optimized .two-factor-input-group textarea{width:100%!important}
.ecurem-register-optimized .two-factor-form>button{grid-column:1/-1!important;margin-top:4px!important}
.ecurem-register-optimized .two-factor-help,
.ecurem-register-optimized .helptext,
.ecurem-register-optimized ul.helptext{display:none!important}
@media(max-width:900px){
  .secure-auth-shell:has(.ecurem-register-optimized){width:100%!important;grid-template-columns:1fr!important}
  .ecurem-register-optimized .two-factor-form{grid-template-columns:1fr!important}
  .ecurem-register-optimized .two-factor-form>button{grid-column:1!important}
}

/* Ecurem CLM Auth Centered Layout v1.3.2
   Requested final auth presentation:
   - no large marketing/story panel on login/register/password-reset
   - authentication/form card centered and allowed to use the page
   - existing fields, validation, 2FA and auth logic untouched
*/

/* Shared auth shell: remove the large left narrative entirely. */
.secure-auth-story {
  display: none !important;
}

/* Center the form/card on the available page. */
.secure-auth-shell {
  width: min(760px, calc(100% - 32px)) !important;
  max-width: 760px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
  margin: 0 auto !important;
  align-items: start !important;
  justify-content: center !important;
}

/* Give the card a comfortable width without making it excessively tall. */
.secure-auth-card {
  width: 100% !important;
  max-width: 760px !important;
  margin: 28px auto 0 !important;
}

/* Registration can use a little more width and two columns on desktop. */
.secure-auth-shell:has(.ecurem-register-optimized) {
  width: min(1040px, calc(100% - 32px)) !important;
  max-width: 1040px !important;
}

.secure-auth-shell:has(.ecurem-register-optimized) .secure-auth-card {
  max-width: 1040px !important;
}

.ecurem-register-optimized .two-factor-form {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 18px !important;
  row-gap: 10px !important;
}

.ecurem-register-optimized .two-factor-input-group {
  min-width: 0 !important;
  margin-bottom: 0 !important;
}

.ecurem-register-optimized .two-factor-form > button {
  grid-column: 1 / -1 !important;
}

.ecurem-register-optimized .two-factor-help,
.ecurem-register-optimized .helptext,
.ecurem-register-optimized ul.helptext {
  display: none !important;
}

/* Keep login/reset visually compact. */
.ecurem-login-optimized .two-factor-header,
.ecurem-reset-optimized .two-factor-header {
  margin-top: 0 !important;
}

@media (max-width: 760px) {
  .secure-auth-shell,
  .secure-auth-shell:has(.ecurem-register-optimized) {
    width: calc(100% - 20px) !important;
    max-width: none !important;
  }

  .secure-auth-card {
    margin-top: 16px !important;
  }

  .ecurem-register-optimized .two-factor-form {
    grid-template-columns: 1fr !important;
  }

  .ecurem-register-optimized .two-factor-form > button {
    grid-column: 1 !important;
  }
}
