/* ==========================================================================
   Page de connexion SGI — même apparence que le reste de l'application (thème « Teams » indigo :
   public/assets/css/sgi-theme.css). Chargé APRÈS login-app.min.css (Bootstrap 5, gabarit « auth-fluid »).
   Palette : primaire #5b5fc7 · texte #252642 · discret #7b7f93 · bordures de champ #aeb3cc · fond #f7f8fc.
   ========================================================================== */
:root {
    --lg-primary: #5b5fc7;
    --lg-primary-hover: #4f52b2;
    --lg-primary-soft: #e8e9f9;
    --lg-ring: rgba(91, 95, 199, .18);
    --lg-text: #252642;
    --lg-muted: #7b7f93;
    --lg-field: #aeb3cc;
    --lg-field-hover: #7f85ad;
    --lg-danger: #d64550;
    --lg-success: #2e9f6b;
}

body.auth-fluid-pages {
    color: var(--lg-text);
    font-family: "Segoe UI", "Source Sans Pro", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif !important;
}

/* ---- Diaporama du fond (images actives) : fondu enchaîné ---- */
.auth-fluid {
    overflow: hidden;
}

.sgi-diaporama {
    inset: 0;
    position: absolute;
    z-index: 0;
}

.sgi-slide {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    inset: 0;
    opacity: 0;
    position: absolute;
    transition: opacity 1.4s ease-in-out;
}

.sgi-slide.is-active {
    opacity: 1;
}

.auth-fluid .auth-fluid-right {
    position: relative;
    z-index: 1;
}

.sgi-slide-points {
    align-items: center;
    bottom: 1.1rem;
    display: flex;
    gap: .5rem;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 480px;
    z-index: 3;
}

.sgi-slide-point {
    background: rgba(255, 255, 255, .55);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
    cursor: pointer;
    height: 8px;
    padding: 0;
    transition: width .25s ease, background-color .25s ease;
    width: 8px;
}

.sgi-slide-point:hover {
    background: rgba(255, 255, 255, .85);
}

.sgi-slide-point.is-active {
    background: #fff;
    width: 26px;
}

.sgi-slide-point:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    .sgi-slide-points {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgi-slide {
        transition: none;
    }
}

/* ---- Colonne image : voile indigo et texte de présentation ---- */
/* Aucun voile ni ombre sur l'image : elle s'affiche telle quelle. */
.auth-fluid .auth-fluid-right {
    background: transparent;
}

.auth-fluid .auth-user-testimonial {
    padding: 0 3rem;
}

.auth-fluid .auth-user-testimonial::before {
    background: #fff;
    border-radius: 3px;
    content: "";
    display: block;
    height: 4px;
    margin-bottom: 1.25rem;
    opacity: .85;
    width: 56px;
}

.auth-fluid .auth-user-testimonial h3,
.auth-fluid .auth-user-testimonial p.lead {
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6), 0 0 14px rgba(0, 0, 0, .45);
}

.auth-fluid .auth-user-testimonial h3 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.25;
}

.auth-fluid .auth-user-testimonial p.lead {
    color: rgba(255, 255, 255, .9);
    font-size: 1rem;
    line-height: 1.6;
}

/* ---- Colonne formulaire ---- */
.auth-fluid .auth-fluid-form-box {
    background: #fff;
    box-shadow: none;
    max-width: 480px;
    padding: 2.5rem 2.25rem;
}

.sgi-login-entete {
    margin-bottom: 1.75rem;
    text-align: center;
}

.sgi-login-logo {
    height: auto;
    margin-bottom: 1.1rem;
    max-height: 84px;
    max-width: 100%;
}

.sgi-login-entete h1 {
    color: var(--lg-text);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0 0 .3rem;
}

.sgi-login-entete p {
    color: var(--lg-muted);
    font-size: .88rem;
    margin: 0;
}

/* Champs : bordure bien visible, même rendu que les formulaires de l'application */
.auth-fluid .form-label {
    color: #464775;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: .4rem;
}

.auth-fluid .form-control {
    background: #fff;
    border: 1px solid var(--lg-field);
    border-radius: .55rem;
    color: var(--lg-text);
    font-size: .92rem;
    height: 2.75rem;
    padding: .5rem .9rem;
    transition: border-color .15s, box-shadow .15s;
}

.auth-fluid .form-control::placeholder {
    color: #a3a6b8;
}

.auth-fluid .form-control:hover {
    border-color: var(--lg-field-hover);
}

.auth-fluid .form-control:focus {
    border-color: var(--lg-primary);
    box-shadow: 0 0 0 3px var(--lg-ring);
    outline: 0;
}

.sgi-login-champ-mdp {
    position: relative;
}

.sgi-login-champ-mdp .form-control {
    padding-right: 2.9rem;
}

.sgi-login-oeil {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: .45rem;
    bottom: .3rem;
    color: var(--lg-muted);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    position: absolute;
    right: .35rem;
    top: .3rem;
    width: 2.2rem;
}

.sgi-login-oeil:hover,
.sgi-login-oeil:focus {
    background: var(--lg-primary-soft);
    color: var(--lg-primary);
    outline: 0;
}

.sgi-login-lien {
    color: var(--lg-primary);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
}

.sgi-login-lien:hover {
    color: var(--lg-primary-hover);
    text-decoration: underline;
}

.auth-fluid .form-check-input {
    border-color: var(--lg-field);
    cursor: pointer;
    height: 1.1rem;
    width: 1.1rem;
}

.auth-fluid .form-check-input:checked {
    background-color: var(--lg-primary);
    border-color: var(--lg-primary);
}

.auth-fluid .form-check-input:focus {
    border-color: var(--lg-primary);
    box-shadow: 0 0 0 3px var(--lg-ring);
}

.auth-fluid .form-check-label {
    color: #464775;
    cursor: pointer;
    font-size: .86rem;
}

/* ---- Boutons ---- */
.auth-fluid .btn {
    border-radius: .55rem;
    font-weight: 700;
}

.auth-fluid .btn-primary,
.modal .btn-primary {
    background: var(--lg-primary);
    border-color: var(--lg-primary);
    box-shadow: 0 2px 6px rgba(91, 95, 199, .28);
    color: #fff;
}

.auth-fluid .btn-primary:hover,
.auth-fluid .btn-primary:focus,
.modal .btn-primary:hover,
.modal .btn-primary:focus {
    background: var(--lg-primary-hover);
    border-color: var(--lg-primary-hover);
    color: #fff;
}

.auth-fluid .btn-primary:focus,
.modal .btn-primary:focus {
    box-shadow: 0 0 0 3px var(--lg-ring);
}

.sgi-login-valider {
    align-items: center;
    display: flex;
    font-size: .95rem;
    gap: .55rem;
    justify-content: center;
    padding: .7rem 1rem;
    width: 100%;
}

.sgi-login-valider .sgi-login-attente,
.sgi-login-valider.is-busy .sgi-login-repos {
    display: none;
}

.sgi-login-valider.is-busy .sgi-login-attente {
    display: inline-flex;
    gap: .5rem;
}

.modal .btn-secondary {
    background: #fff;
    border: 1px solid var(--lg-field);
    color: #464775;
}

.modal .btn-secondary:hover {
    background: var(--lg-primary-soft);
    border-color: var(--lg-primary);
    color: #3f43a8;
}

.modal .btn-link {
    color: var(--lg-primary);
    font-size: .82rem;
    font-weight: 600;
}

/* ---- Alertes ---- */
.auth-fluid .alert {
    border: 1px solid transparent;
    border-radius: .55rem;
    font-size: .86rem;
}

.auth-fluid .alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-fluid .alert-danger,
.modal .alert-danger {
    background: #fdeaea;
    border-color: #f4c4c7;
    color: #9b2f38;
}

.auth-fluid .alert-success,
.modal .alert-success {
    background: #e3f5ec;
    border-color: #b6e5cc;
    color: #1f7a50;
}

/* ---- Fenêtres (mot de passe oublié, réinitialisation) ---- */
.modal-content {
    border: 0;
    border-radius: .9rem;
    box-shadow: 0 22px 60px rgba(37, 38, 66, .25);
    overflow: hidden;
}

.modal-header {
    align-items: center;
    background: linear-gradient(135deg, #f5f5fc, #eceefa);
    border-bottom: 1px solid #e6e7ef;
    padding: 1.05rem 1.35rem;
}

.modal-title {
    color: var(--lg-text);
    font-size: 1.02rem;
    font-weight: 700;
}

.modal-body {
    padding: 1.35rem;
}

.modal-body .form-control {
    background: #fff;
    border: 1px solid var(--lg-field);
    border-radius: .55rem;
    height: 2.65rem;
}

.modal-body .form-control:focus {
    border-color: var(--lg-primary);
    box-shadow: 0 0 0 3px var(--lg-ring);
}

.modal-body .form-label {
    color: #464775;
    font-size: .82rem;
    font-weight: 600;
}

.modal-footer {
    background: #f7f8fc;
    border-top: 1px solid #e6e7ef;
    padding: .85rem 1.35rem;
}

.sgi-login-pied {
    color: #a3a6b8;
    font-size: .75rem;
    margin-top: 1.75rem;
    text-align: center;
}

@media (max-width: 767.98px) {
    .auth-fluid .auth-fluid-form-box {
        box-shadow: none;
        padding: 2rem 1.25rem;
    }
}
