/* MainApp login.css, with native identity accessibility and layout additions below. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

#ZoneHeader {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
}

    #ZoneHeader svg {
        width: 150px;
    }

body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    margin: 0;
    user-select: none;
}

input, textarea {
    font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}

.ctn_title {
    position: relative;
    align-content: center;
    background: url(./logo-a-blurred.png) center center no-repeat;
    background-size: 100%;
}

h1 {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    color: white;
}

.txt_gradient {
    color: transparent;
    background-image: linear-gradient(60deg, #105685, #15afb7);
    background-clip: text;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

h2 {
    font-size: 32px;
    font-weight: 700;
    color: #0E1B2B;
    margin-bottom: 40px;
}

p {
    line-height: 140%;
}

.phishing_warning {
    margin: -18px 0 24px;
    padding: 14px 16px;
    border: 1px solid #f0c36d;
    border-left: 5px solid #f0a500;
    border-radius: 8px;
    background-color: #fff8e6;
    color: #573a00;
    font-size: 14px;
}

    .phishing_warning strong {
        display: block;
        margin-bottom: 6px;
        color: #3d2a00;
        font-size: 15px;
    }

    .phishing_warning p {
        margin: 0;
    }

.btn {
    z-index: 0;
    position: relative;
    overflow: hidden;
    font-size: 16px;
    line-height: 120%;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 100vh;
    border: none;
    padding: 6px 6px 6px 25px;
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    text-align: center;
    cursor: pointer;
    min-height: 38px;
    text-decoration: none;
    color: white;
}

    .btn::after,
    .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        transition: opacity 500ms;
    }

    .btn::before {
        height: 100%;
        background-image: linear-gradient(90deg, #105685, #15afb7, #a370c7);
        background-size: 200% 100%;
        background-position: 0% 0%;
        transition: background-position 0.6s cubic-bezier(0.4,0,0.2,1);
    }

    .btn:hover::before {
        background-position: 100% 0%;
    }

    .btn::after {
        aspect-ratio: 1;
        transform: scale(1.5) rotate(30deg);
        background-image: linear-gradient(90deg, #105685, #15afb7, #105685, #15afb7);
        background-size: 300%;
        opacity: 0;
        animation: gradient 4s linear infinite;
    }

.btn_content {
    z-index: 1;
    flex-grow: 1;
}

.btn_round {
    margin-left: 15px;
    z-index: 1;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
    z-index: 0;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 20px;
    transition: background-color 500ms;
    flex-shrink: 0;
}

    .btn_round.ico_arrow_inline::before {
        grid-area: 1 / 1;
    }

.ico_arrow_inline {
    z-index: 1;
    justify-self: center;
    stroke: #000;
    transition: stroke 500ms;
}

.btn_round::before {
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background-image: linear-gradient(90deg, #105685, #15afb7, #105685, #15afb7);
    transform: rotate(30deg);
    background-size: 300%;
    opacity: 0;
    animation: gradient 4s linear infinite;
    transition: opacity 500ms;
}

img {
    position: absolute;
}

#ZoneMain {
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.blocLeft {
    position: relative;
    overflow: hidden;
    background-color: #0D1B2A;
    height: 100vh;
    padding: 40px;
    display: grid;
    grid-template-rows: 1fr auto;
    justify-content: center;
}

.blocLeft > *:not(#blocLeftScene) {
    position: relative;
    z-index: 1;
}

#blocLeftScene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.blocRight {
    height: 100vh;
    padding: 40px;
    display: grid;
    overflow: hidden;
}

.siteWeb {
    text-align: center;
}

.motsClef {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.siteWeb.desktop .motsClef {
    color: white;
}

.siteWeb.mobile .motsClef {
    color: #0D1B2A;
}

#ZoneContent {
    max-width: 460px;
    width: 100%;
    justify-self: center;
    display: grid;
    align-items: center;
    grid-template-rows: 1fr auto;
    gap: 30px;
}

    #ZoneContent .champ {
        margin-bottom: 20px;
    }

    #ZoneContent label {
        font-size: 16px;
        color: #292828;
        display: block;
        margin-bottom: 6px;
    }

    #ZoneContent input {
        width: calc(100% - 4px);
        display: block;
        border-radius: 8px;
        border: 1px solid #B2B2B2;
        height: 40px;
        padding: 5px 8px;
        margin: 0 2px;
    }

/* Conteneur pour le champ mot de passe avec icône */
.password-wrapper {
    position: relative;
    display: block;
}

    .password-wrapper input {
        padding-right: 40px;
    }

    .password-wrapper .IconPasswordReveal {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        width: 20px;
        height: 20px;
        display: none;
    }

.ForgottenPasswordButton {
    font-size: 14px;
    text-decoration: underline;
    color: #A5A5A5;
    text-align: right;
    display: block;
}

.btn_submit {
    width: 100%;
}

.link {
    display: inline-block;
    text-decoration: inherit;
    border-bottom: 1px solid #15afb7;
    line-height: 120%;
    color: #15afb7;
}

.bloc_contact {
    text-align: center;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px #d5d5d5;
    color: #0E1B2B;
    align-self: end;
}

.contact {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.horaires, .email {
    font-size: 15px;
    text-decoration: none;
    line-height: 150%;
}

.email {
    display: block;
    margin-top: 10px;
    color: #0E1B2B;
}

.mobile {
    display: none;
}


/* Ajout pour la transition */

#LicenceConnect {
    height: 100%;
    min-height: 462px;
    display: flex;
    align-items: center;
    position: relative;
}

.block_login {
    transition: opacity 0.4s ease, transform 0.4s ease-in-out, min-width 0.4s ease;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
    z-index: 1;
    min-width: 100%;
    position: absolute;
}

    .block_login.hide {
        pointer-events: none;
        transform: translateX(-100%);
        opacity: 0;
    }

.block_forgotten_pwd {
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease-in-out;
    overflow: hidden;
    visibility: hidden;
    transform: translateX(100%);
    z-index: 2;
    min-width: 100%;
    position: absolute;
}

    .block_forgotten_pwd.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
    }

/* Styles pour les erreurs */
.field_error {
    border-color: #dc3545 !important;
}

.error_message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

    .error_message.show {
        display: block;
    }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading .btn_round {
    overflow: visible;
}

    .loading .btn_round svg.ico_arrow_inline {
        opacity: 0;
    }

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

@media screen and (max-width: 1600px) {
    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 26px;
    }
}

@media screen and (max-width: 1200px) {
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }

    #ZoneContent {
        max-width: 380px;
    }

    #ZoneHeader svg {
        width: 130px;
    }
}

@media screen and (max-width: 820px) {
    #ZoneMain {
        grid-template-columns: 1fr;
    }

    .blocLeft {
        height: 40vh;
        padding: 30px;
    }

    h1 {
        font-size: 30px;
    }

    h2 {
        font-size: 22px;
    }

    #ZoneHeader {
        top: 20px;
        left: 20px;
    }

        #ZoneHeader svg {
            width: 110px;
        }

    .btn_round {
        width: 34px;
        height: 34px;
    }

    .btn {
        font-size: 15px;
    }

    .desktop {
        display: none;
    }

    .mobile {
        display: none;
        /*display: block;*/
        padding-bottom: 40px;
    }

    .blocRight {
        height: unset;
        min-height: 512px;
        padding-top: 0;
        padding-bottom: 0;
    }

    #ZoneContent {
        gap: 50px;
    }
}

@media screen and (max-width: 600px) {
    .blocLeft {
        height: unset;
        padding: unset;
        min-height: 200px;
    }

    h1 {
        font-size: 22px;
    }

    #ZoneHeader svg {
        width: 90px;
    }

    h2 {
        font-size: 18px;
        margin-bottom: 30px;
    }

    #ZoneContent label {
        font-size: 15px;
        margin-bottom: 4px;
    }

    #LicenceConnect {
        min-height: 410px;
    }
}

/* Native identity forms retain MainApp's visual structure without its legacy
   AJAX/animation scripts. Content remains readable when JavaScript is absent. */
body { user-select: text; }
#ZoneMain { height: auto; min-height: 100vh; min-height: 100svh; }
.blocLeft { height: auto; min-height: 100vh; min-height: 100svh; padding-top: 110px; }
.blocRight { height: auto; min-height: 100vh; min-height: 100svh; overflow: visible; align-content: center; }
#ZoneContent { display: block; min-width: 0; }
#LicenceConnect { height: auto; min-height: 0; display: block; }
.block_login { position: static; min-width: 0; transform: none; }
#ZoneHeader .Logo { display: block; }
#ZoneHeader .Logo img { position: static; display: block; width: 150px; height: auto; }
h1, h2, p, .error_message { overflow-wrap: anywhere; }
#ZoneContent input { width: 100%; height: 48px; margin: 0; font-size: 16px; }
.account-context { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: #105685; font-size: 14px; font-weight: 600; }
.account-context img { width: 30px; height: 30px; position: static; }
.account-introduction { color: #526078; font-size: 14px; margin: -20px 0 28px; }
.phishing_warning { margin: 0 0 24px; }
.form-error { display: block; padding: 12px 14px; border: 1px solid #c0392b; border-radius: 8px; background: #fff3f1; color: #912d23; margin: 0 0 20px; }
.password-wrapper input { padding-right: 50px !important; }
.password-reveal { position: absolute; right: 5px; top: 5px; height: 38px; width: 38px; display: grid; place-items: center; padding: 0; background: transparent; border: 0; border-radius: 5px; color: #35556b; cursor: pointer; }
.password-reveal[hidden] { display: none; }
.password-reveal svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.agency-choice { margin: 0 0 20px; color: #35556b; font-size: 14px; }
.agency-choice summary { cursor: pointer; width: fit-content; padding: 6px 0; }
.agency-choice .champ { margin-top: 12px; margin-bottom: 0 !important; }
.field-note { font-size: 13px; color: #526078; margin: 7px 0 0; }
.password-help { font-size: 14px; color: #526078; margin-top: 18px; }
.password-help summary { cursor: pointer; color: #35556b; text-align: right; text-decoration: underline; }
.password-help p { margin: 12px 0 0; padding: 12px; background: #f4f7fb; border-radius: 7px; }
.btn_submit { min-height: 52px; margin-top: 2px; }
.btn_round { align-items: center; }
.skip-link { position: absolute; top: -70px; left: 12px; z-index: 20; padding: 12px 16px; background: white; color: #105685; border-radius: 5px; }
.skip-link:focus { top: 12px; }
.blocLeft .txt_gradient { background-image: linear-gradient(90deg, #66c6f0, #4dd9ca); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid #8a4d00; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media screen and (max-width: 1200px) {
    #ZoneHeader .Logo img { width: 130px; }
}
@media screen and (max-width: 820px) {
    .blocLeft { min-height: 280px; padding: 100px 30px 35px; }
    .blocRight { min-height: 0; padding: 32px 24px 44px; }
    #ZoneHeader .Logo img { width: 110px; }
    h1 { margin: 0; }
    h2 { margin-top: 0; }
}
@media screen and (max-width: 600px) {
    .blocLeft { min-height: 220px; padding: 100px 22px 28px; }
    .blocRight { padding: 30px 22px 40px; }
    #ZoneHeader .Logo img { width: 100px; }
    h2 { font-size: 24px; margin-bottom: 30px; }
    .account-introduction { margin-top: -15px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
