﻿/* Page d'authentification (Authentification.aspx + Auth.Master).
   Reprend les styles du prototype « extrn-connexion-2027_7.html ».
   La mise en page Bootstrap de la page ne change pas : seul le contenu des sections est restylé.
   Les classes sont prefixees « auth- » pour ne pas entrer en conflit avec Bootstrap / DevExpress.
   Attention : html { font-size: 10px } dans Auth.Master, on utilise donc des px. */

:root {
    --auth-brand: #1E88E5;
    --auth-brand-600: #1570C9;
    --auth-brand-50: #EAF3FD;
    --auth-ink: #1F2A37;
    --auth-title: #3A3F47;
    --auth-muted: #5E6A7D;
    --auth-line: #E2E7EF;
    --auth-field: #F7F9FC;
    --auth-grey: #E4E6EA;
    --auth-bar: #3A3A3A;
    --auth-link: #2F6FB0;
}

/* ----- Fond de la page ----- */
/* Sans image de fond : le dégradé couvre toute la page (sur le gris #f2f2f2 de Auth.Master). Avec une image, Auth.Master
   la pose en style direct : elle remplace ce dégradé, et rien n'est superposé à l'image (elle garde ses couleurs). */
#topHeader {
    background-image: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 38%, rgba(0,0,0,0) 70%, rgba(0,0,0,.35) 100%);
}

/* ----- Zone photo (gauche) : slogan ----- */
.auth-photo {
    position: relative;
}

.auth-tagline {
    position: relative;
    display: inline-block;
    margin-top: 88px;
    background: rgba(20, 24, 34, .55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 0 14px 14px 0;
    padding: 22px 40px 22px 30px;
}

.auth-tagline h1 {
    margin: 0;
    color: #fff;
    font-size: 34px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -.01em;
}

.auth-tagline h1 span {
    color: #6FB8FF;
}

.auth-tagline p {
    margin: 10px 0 0;
    color: #D5DDEA;
    font-size: 15px;
}

/* ----- Panneau de droite : en-tete (logo + langue) ----- */
.auth-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 40px;
}

.auth-head .auth-logo {
    display: block;
    text-decoration: none;
}

.auth-head .auth-logo img {
    height: 58px;
    width: auto;
    display: block;
}

.auth-lang {
    border: 1px solid var(--auth-line);
    background: #fff;
    color: var(--auth-muted);
    border-radius: 20px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.auth-lang:hover {
    color: var(--auth-ink);
    border-color: var(--auth-muted);
}

.auth-lang:focus-visible {
    outline: 3px solid rgba(30, 136, 229, .4);
    outline-offset: 2px;
}

/* « Bienvenue sur votre espace Extrn » */
.auth-eyebrow {
    font-size: 15px;
    font-weight: 600;
    color: #4B5563;
    margin: 0 0 14px;
}

/* ----- Liens d'aide ----- */
.auth-help {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    padding: 18px 45px 18px 80px;
    background: #fff;
    border-top: 1px solid var(--auth-line);
}

.auth-help a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-link);
    text-decoration: none;
}

.auth-help a:hover {
    color: var(--auth-brand);
}

.auth-help a svg {
    flex: none;
}

/* ----- Bloc gris « Pas encore client ? » ----- */
.auth-new {
    background: var(--auth-grey);
    padding: 26px 45px 26px 80px;
}

.auth-new strong {
    display: block;
    font-size: 17px;
    color: var(--auth-title);
    margin-bottom: 6px;
}

.auth-new p {
    margin: 0;
    font-size: 14px;
    color: #4B5563;
}

.auth-new a {
    color: var(--auth-brand);
    font-weight: 600;
    text-decoration: none;
}

/* ----- Barre du bas ----- */
.auth-legal {
    background: var(--auth-bar);
    color: #E5E7EB;
    font-size: 12.5px;
    text-align: right;
    padding: 8px 16px;
    width: 100%;
}

.auth-legal a {
    color: #fff;
}

/* ----- Contenu du formulaire (titres, champs, bouton, messages) ----- */
.auth-title {
    font-size: 30px;
    line-height: 1.15;
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--auth-title);
    letter-spacing: -.01em;
}

.auth-lead {
    color: var(--auth-muted);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 0 24px;
}

.auth-lbl {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--auth-ink);
}

.auth-field-gap {
    margin-top: 14px;
}

/* Courriel masqué en lecture seule avec le bouton « Changer » dans le champ */
.auth-field {
    position: relative;
}

.auth-input[readonly] {
    padding-right: 96px;
    font-weight: 500;
    cursor: default;
}

.auth-input[readonly]:focus {
    box-shadow: none;
    border-color: var(--auth-line);
    background: var(--auth-field);
}

.auth-change {
    position: absolute;
    right: 6px;
    top: 6px;
    height: 36px;
    border: 0;
    background: #fff;
    color: var(--auth-brand);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    padding: 0 12px;
    cursor: pointer;
    box-shadow: 0 0 0 1px var(--auth-line);
}

.auth-change:hover {
    box-shadow: 0 0 0 1px var(--auth-brand);
}

/* Icône ronde au-dessus du titre (lien expiré) */
.auth-ic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
}

.auth-ic-warn {
    background: #FFF6E5;
    color: #8A5A00;
}

.auth-input {
    display: block;
    width: 100%;
    height: 48px;
    border: 1.5px solid var(--auth-line);
    background: var(--auth-field);
    color: var(--auth-ink);
    border-radius: 10px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: .15s;
}

.auth-input:focus {
    border-color: var(--auth-brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, .14);
}

.auth-input.bad {
    border-color: #C62828;
    background: #fff;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    margin-top: 10px;
    border: 0;
    border-radius: 10px;
    background: var(--auth-brand);
    color: #fff;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: .15s;
}

.auth-btn:hover {
    background: var(--auth-brand-600);
}

.auth-btn:focus-visible {
    outline: 3px solid rgba(30, 136, 229, .4);
    outline-offset: 2px;
}

.auth-btn:disabled {
    opacity: .5;
    cursor: default;
}

.auth-btn:disabled:hover {
    background: var(--auth-brand);
}

.auth-note {
    font-size: 12.5px;
    color: var(--auth-muted);
    line-height: 1.5;
    margin: 18px 0 0;
}

/* ----- Écran « Vérifiez vos courriels » (ConfirmationCode, StyleAuth) ----- */
.auth-sentto {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--auth-field);
    border: 1px solid var(--auth-line);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-ink);
    margin: -8px 0 6px;
}

.auth-linkbtn {
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    color: var(--auth-brand);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-linkbtn:hover {
    text-decoration: underline;
}

.auth-other {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--auth-line);
    font-size: 14px;
    color: var(--auth-muted);
}

.auth-other .auth-linkbtn {
    margin-top: 6px;
}

.auth-codebox {
    margin-top: 14px;
}

.auth-otp {
    display: flex;
    gap: 7px;
    justify-content: space-between;
}

.auth-otp-input {
    width: 100%;
    max-width: 48px;
    height: 54px;
    padding: 0;
    text-align: center;
    font-family: inherit;
    font-size: 22px;
    font-weight: 600;
    border: 1.5px solid var(--auth-line);
    background: var(--auth-field);
    color: var(--auth-ink);
    border-radius: 10px;
    outline: none;
    transition: .15s;
}

.auth-otp-input:focus {
    border-color: var(--auth-brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, .14);
}

.auth-otp-sep {
    align-self: center;
    color: #C5CCD6;
    font-weight: 700;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--auth-ink);
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-brand);
}

.auth-meta {
    margin-top: 18px;
}

.auth-histo {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--auth-muted);
    line-height: 1.5;
}

/* ----- Écran de fin du code (#authFin) : connecté dans un autre onglet / « Quitter cette page » ----- */
#authFin {
    display: none;
}

.auth-fin-actif > *:not(#authFin) {
    display: none !important;
}

.auth-fin-actif #authFin {
    display: block;
}

#authFin[data-mode="autre"] .fin-quitter,
#authFin[data-mode="quitter"] .fin-autre {
    display: none;
}

.auth-ic-ok {
    background: #E6F5EE;
    color: #0E8A5F;
}

.auth-btn-ghost {
    background: #fff;
    color: var(--auth-ink);
    border: 1.5px solid var(--auth-line);
}

.auth-btn-ghost:hover {
    background: #fff;
    border-color: var(--auth-muted);
}

/* ----- Écran « Reprendre la session » ----- */
.auth-session {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid #BFE3D2;
    background: #E6F5EE;
    border-radius: 14px;
    padding: 16px 18px;
}

.auth-avatar {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--auth-brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 19px;
}

.auth-name {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-mail {
    font-size: 13.5px;
    color: var(--auth-muted);
    margin-top: 2px;
}

.auth-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #0E8A5F;
    background: #fff;
    border-radius: 20px;
    padding: 2px 9px;
}

.auth-live i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0E8A5F;
    box-shadow: 0 0 0 3px rgba(14, 138, 95, .18);
}

.auth-reason {
    font-size: 12.5px;
    color: var(--auth-muted);
    margin: 10px 0 18px 2px;
}

.auth-btn-big {
    height: 54px;
    font-size: 16px;
}

.auth-switch {
    font-size: 13px;
    color: var(--auth-muted);
    margin: 16px 0 0;
    text-align: center;
}

.auth-switch .auth-linkbtn {
    font-size: 13px;
}

/* Petit écran : la zone blanche perd son grand remplissage de gauche (80 px) pour laisser de la place au contenu
   (cases du code, champs). Au-dessus de 768 px, la photo est affichée et la mise en page ne change pas. */
@media (max-width: 767.98px) {
    /* Le slogan reste affiché au-dessus du panneau blanc, en plus petit et sans la ligne des secteurs (prototype) */
    .auth-photo {
        padding-bottom: 24px;
    }

    .auth-tagline {
        margin-top: 56px;
        padding: 16px 20px;
    }

    .auth-tagline h1 {
        font-size: 24px;
    }

    .auth-tagline p {
        display: none;
    }

    .zone-white {
        padding: 32px 24px 0 24px !important;
    }

    .auth-help,
    .auth-new {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Messages : trois niveaux (info = bleu, warn = jaune, error = rouge). */
.auth-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.45;
    margin: 14px 0 0;
}

.auth-msg svg {
    flex: none;
    margin-top: 1px;
}

.auth-msg-top {
    margin: 0 0 22px;
}

.auth-msg-info {
    background: var(--auth-brand-50);
    color: #174A7C;
}

.auth-msg-warn {
    background: #FFF6E5;
    color: #8A5A00;
}

.auth-msg-error {
    background: #FDECEC;
    color: #C62828;
}
