* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-image: url('../images/fond-login.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    margin: 0;
    padding: 0;
}
.login-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
   background: #163F8A;
    background: linear-gradient(27deg, rgba(22, 63, 138, 1) 0%, rgba(22, 63, 138, 1) 32%, rgba(74, 176, 81, 1) 75%, rgba(74, 176, 81, 1) 100%);
    z-index: -1;
    opacity: 0.7;
}


.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 40px;
    overflow-y: auto;
    max-width: 640px;
    position: relative;
    z-index: 1;
}
.login-left::before {
    content: ""; 
    display: block;
    position:absolute;
    top:0; 
    left:0;
    z-index: -1;
    width:100%;
    height:100%;
    background: rgba(7, 21, 78, 0.85);
    mix-blend-mode: multiply;
}

#login-content {
    width: 340px;
    margin: 0 auto;
}
#login-header img {
    width: 308px;
    height: auto;
    display: block;
    margin: 0 auto 70px auto;
}

#login-header h2 {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    line-height: 20px;
    margin-bottom: 50px;
    color: var(--primary);
}

.login-form {
    width: 100%;
}

.form-group {
    margin-top: 25px;
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 12px;
    color: #999;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
}

.input-icon-right {
    position: absolute;
    right: 12px;
    color: #999;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2;
}

.input-icon-right:hover {
    color: #333;
}

#togglePassword {
    color: #163f8a;
}

.form-control {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #fff;
    font-size: 18px;
    transition: border-color 0.3s;
    color: #585858;
    font-family: 'Inter';
}

.form-control.has-right-icon {
    padding-right: 40px;
}


.form-control:hover,
.form-control:active,
.form-control:focus  {
    outline: none;
    border: 1px solid #96bd0d !important;
    box-shadow: none !important;
    background: #fff !important;
}

.input-wrapper:hover .input-icon-left,
.input-wrapper:focus-within .input-icon-left {
    color: var(--primary) !important;
}

/* Override autofill (Chrome/Edge/Safari) */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #585858 !important;
    caret-color: #585858;
    border: 1px solid #96bd0d !important;

    /* Remplace le fond jaune natif */
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    box-shadow: 0 0 0 1000px transparent inset !important;

    /* Empêche le flash jaune au chargement */
    transition: background-color 9999s ease-out 0s;

}

/* Firefox */
.form-control:-moz-autofill {
    color: #585858 !important;
    box-shadow: 0 0 0 1000px transparent inset !important;
}
.form-control::placeholder {
    color: #585858;
    opacity: 1;
    font-weight: 300;
    font-family: 'Inter';
    font-size: 18px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 30px;
    font-family: 'Inter';
}

.btn-login:hover {
    background-color: var(--primary-dark);
}

.btn-login:active {
    background-color: var(--primary-darker);
}

.forgot-password {
    text-align: right;
    margin-bottom: 20px;
    margin-top: 5px;
}

.forgot-password a {
    color: #b6b6b6;
    font-size: 16px;
    font-weight: 700;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.login-consent {
    margin-top: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.login-consent input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.login-consent label {
    color: #d5d5d5;
    font-size: 13px;
    line-height: 1.35;
    font-family: 'Inter';
    cursor: pointer;
}

.btn.btn-primary,
.btn-primary,
.btn.btn-secondary,
.btn-secondary  {    
    margin-top: 70px;
}

@media (max-width: 1199px) {
    .login-left {
        max-width: 560px;
        padding: 32px;
    }

    #login-content {
        width: 320px;
    }

    #login-header img {
        width: 260px;
        margin-bottom: 48px;
    }

    .btn-login {
        margin-top: 48px;
    }
}

@media (max-width: 991px) {
    .login-container {
        position: relative;
        min-height: 100dvh;
        height: auto;
        width: 100%;
        background-attachment: scroll;
        padding: 20px 16px;
    }

    .login-left {
        width: 100%;
        padding: 24px 20px;
        margin: 0 auto;
    }

    #login-content {
        width: 100%;
        max-width: 420px;
    }

    #login-header img {
        margin-bottom: 32px;
    }

    #login-header h2 {
        margin-bottom: 28px;
    }

    .form-group {
        margin-top: 18px;
    }

    .form-control {
        font-size: 16px;
        min-height: 46px;
    }
    
    .form-control::placeholder {
        font-size: 16px;
    }

    .btn-login {
        min-height: 46px;
        margin-top: 36px;
    }

    .login-consent label {
        font-size: 12.5px;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 18px 20px;
    }

    .forgot-password a {
        font-size: 14px;
    }
}
