/*
  Adaptation du css pour affichage SSO
*/

#id {
  padding-bottom: 1em;
}

.btn {
  text-align: center;
  vertical-align: middle;
  user-select: none;
  line-height: 1.5;
  font-family: barlowregular, sans-serif;
  font-size: 1em;
  font-weight: 400;
  padding: .15em 1.7em;
  max-height: 28px;
  line-height: inherit;
}

span.tooltip {
  display: none; /* Etat initial */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 19.2px;
}

.message-content {
  padding: 12px 20px 12px 20px;
}

.submit {
  text-align: center;
  vertical-align: middle;
  user-select: none;
  line-height: 1.5;
  font-family: barlowregular, sans-serif;
  line-height: inherit;
  font-size: 1em;
  font-weight: 400;
  padding: .15em 1.7em;
  max-height: 28px;
  line-height: inherit;
}

.js-validate-error-label {
  color: #dc3545 !important;
  margin-top: 0.25rem;
  font-size: 80%;
  font-weight: 400;
}

#kc-social-providers {
  margin-top: 30px;
  text-align: center;
}

.franceConnect {
  width: 209px;
  height: 56px;
  display: block;
  background-image: url('../img/franceconnect-btn-principal.svg');
  margin: 0em auto;
}

#kc-social-providers {
  margin-top: 0;
}

.franceConnect:hover {
  background-image: url('../img/franceconnect-btn-principal-hover.svg');
}

.franceConnectInfo {
  margin-top: 12px;
}

.franceConnectIntro {
  color: #777;
  font-size: 14px;
  line-height: 1.25;
  max-width: 370px;
  display: block;
  margin: 1em auto;
  text-align: center;
}

.franceConnectInfo a {
  color: #0b6ba8;
  text-decoration: none;
}

.franceConnectInfo a:hover {
  text-decoration: underline;
}

.error-message p {
  margin-bottom: 10px;
}

.error-message .btn-zone {
  margin-top: 20px;
}

.separator {
  height: 1px;
  margin: 32px 0 8px 0;
  background-color: #ccc;
}

.separator-text-container {
  text-align: center;
  margin-top: -16px;
  margin-bottom: 20px;
}

.separator-text {
  width: 35px;
  background-color: #ffffff;
  display: inline-block;
}

.expired-password {
  border-radius: 10px;
  padding: 1rem;
  color: #009c9e;
  border: solid 1px currentColor;
  margin-bottom: 2rem;
}

#wrapper {
  position: fixed;
  margin-left:auto;
  margin-right:auto;
  height:auto;
  width:auto;
  z-index: 10;
  pointer-events: none;
}
#banner {
  float:left;
}

#navbar {
  clear: left;
}
#navbar>img {
  width: 100%;
}

.navbar {
  width: 100%;
}

.banner {
  width: 100%;
  background-color: orange;
  color: #fff;
  text-align: center;
  padding: 6.5px;
  font-size: medium;
  display: block;
}

.otp-container {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

input[type="text"].otp-box {
    height: 2.25rem;
    width: 2.5rem;
    border: 1.5px solid #d9D9D9;
    text-align: center;
    font-size: 1.5rem;
    padding: 0 !important;
    line-height: 2.5rem !important;
}

input[type="text"].otp-box:focus {
    border-color: #0055A4;
    box-shadow: 0 0 0 2px rgba(0, 85, 164, 0.2);
    outline: none;
}

@media (max-width: 480px) {
    .otp-container {
        gap: 0.375rem;
    }
    input[type="text"].otp-box {
        width: 2.375rem;
        height: 3rem;
        line-height: 3rem !important;
    }
}

.success {
  border-radius: 10px;
  padding: 1rem;
  color: #009c9e;
  border: solid 1px currentColor;
  margin-bottom: 2rem;
}

.action-resend {
  background-color: transparent !important;
  border: none !important;
  color: #6D6D6D !important;
  font-size: 1em !important;
  padding: 0.7em 2em !important;
  cursor: pointer;
}

.action-resend:hover, .action-resend:focus {
  color: #d73f3c !important;
}

.mfa-page-header h2 {
    text-transform: none;
    text-align: left;
    color: #3A001E;
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    padding: 0 0 1rem;
}

.mfa-instruction {
    text-align: left;
    margin-bottom: 2em;
    margin-top: 1em;
    color: #3A001E;
    position: relative;
}

.mfa-code-label {
    text-align: left;
    color: #3A001E;
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    padding-left: 2.5rem;
}

.otp-container.mfa-spaced {
    margin-bottom: 1rem;
}

.mfa-checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mfa-checkbox {
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
    accent-color: #d73f3c;
    margin: 0;
}

.mfa-checkbox-label {
    cursor: pointer;
    margin: 0;
    padding: 0;
    padding-top: 0.15rem;
    font-size: 0.95em;
}

#login,
#mfa-form {
    width: 100%;
}

.mfa-btn-zone {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: column !important;
    gap: 1.5rem;
}

/* Message d'erreur et succès stylisés */
.message-content {
    box-sizing: border-box;
    color: #3A001E;
    display: flex;
    align-items: center;
    max-width: 100% !important;
    border-radius: 0.5rem;
    padding: 0.5rem !important;
    gap: 0.375rem;
    width: 100% !important;
    font-size: 14px !important;
}

.message-content.error {
    background-color: #FFFFFF;
    border: 1px solid #E43C2F;
}

.message-content.success {
    background-color: #F0FDF4;
    border: 1px solid #15803D;
    color: #15803D;
}

.mfa-btn-submit {
    height: 3.44rem !important;
    width: 100% !important;
    margin: 0.1rem 0.1rem !important;
    background-color: #FC8A76 !important;
    color: #3A001E !important;
    border-radius: 50px !important;
    padding: 0.8rem 1rem !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    border: none !important;
    max-height: none !important;
    transition: background-color 0.2s;
    margin-top: 1rem !important;
}

.mfa-btn-resend {
    background-color: #fff !important;
    border: none !important;
    text-decoration: underline !important;
    color: #3A001E !important;
    padding: 0 !important;
}

.mfa-btn-resend:hover, .mfa-btn-resend:focus {
    color: #3b0018 !important;
}

.mfa-restart-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.mfa-restart-link {
    height: 2.75rem;
    width: 100%;
    background-color: #F9F9F9 !important;
    color: #3A001E !important;
    border: 1px solid #FC8A76 !important;
    border-radius: 50px !important;
    padding: 0.8rem 1rem !important;
    font-size: 1.1rem !important;
    text-decoration: none !important;
    text-align: center;
    transition: all 0.2s;
}

.mfa-restart-link:hover, .mfa-restart-link:focus {
    border: #D9D9D9
}

@media (max-width: 480px) {
    .mfa-btn-zone {
        flex-direction: column !important;
        gap: 0.5rem;
    }
    .mfa-btn-submit, .mfa-btn-resend {
        width: 100% !important;
    }
}

@media (max-width: 500px) {
    #navbar>img {
        object-fit: cover;
        height: 550px;
        object-position: left;
    }
    .login.new-design-login {
        height: auto !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .login.new-design-login > .box {
        margin-top: 20px;
    }
    .login.new-design-login > div:last-child {
        margin-top: auto !important;
        width: 100%;
    }
    .login.new-design-login footer {
        position: static !important;
        margin-top: 2rem !important;
        border-radius: 0 !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* =========================================
   STYLES DE LA POPIN "CODE NON REÇU"
   ========================================= */

/* Fond grisé (Overlay) */
.mfa-popin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4); /* Gris semi-transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* État actif */
.mfa-popin-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* La boîte blanche */
.mfa-popin-container {
    background-color: #ffffff;
    border-radius: 0.5rem; /* 8px */
    width: 90%;
    max-width: 40.625rem; /* ~650px */
    padding: 1.5rem; /* 24px */
    box-shadow: 0 0 0.125rem rgba(0, 0, 0, 0.15); /* 2px blur */
    transform: translateY(1.25rem); /* 20px */
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* 24px */
}

.mfa-popin-overlay.active .mfa-popin-container {
    transform: translateY(0);
}

/* En-tête (Titre + Croix) */
.mfa-popin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mfa-popin-header h3 {
    text-transform: none !important;
    color: #3A001E;
    background: none;
    font-size: 1rem; /* 16px */
    font-weight: bold;
    margin: 0;
}

.mfa-popin-close {
    background: none;
    border: none;
    font-size: 1.5rem; /* 24px */
    color: #3A001E;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 1.5rem; /* 24px */
    height: 1.5rem; /* 24px */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenu textuel */
.mfa-popin-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* 24px */
}

.mfa-popin-text {
    color: #3A001E;
    font-size: 1rem; /* 16px */
    margin: 0;
}

/* Bouton principal de la popin */
.mfa-popin-btn-submit {
    background-color: #FC8A76;
    color: #3A001E;
    border: none;
    border-radius: 2rem; /* 32px */
    padding: 1rem; /* 16px */
    font-size: 1.125rem; /* 18px */
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0.125rem 0.125rem 0.3125rem #D9D9D9; /* 2px 2px 5px */
    transition: background-color 0.2s;
    width: auto;
    min-width: 11.5rem; /* ~184px */
}

/* Bouton désactivé (grisé) - D'après la maquette */
.mfa-popin-btn-submit:disabled, .mfa-btn-submit:disabled {
    background-color: #C7AFAB !important;
    color: #695B62 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

/* Zone de message de retour dans la popin */
.mfa-popin-container .message-content {
    margin-bottom: 0 !important;
}

/* Taille de l'icône dans la popin (annule le margin par défaut pour utiliser le gap) */
.mfa-popin-container .mfa-success-icon,
.mfa-popin-container .mfa-error-icon {
    width: 1.5rem; /* 24px */
    height: 1.5rem; /* 24px */
    margin: 0;
    object-fit: contain;
}

.mfa-popin-container .mfa-close-icon {
    width: 12px;
    height: 12px;
    margin: 0;
    object-fit: contain;
}

.mfa-popin-container .mfa-message-text {
    margin: 0;
}
