/* =========================================================
   AURELIA CRÉDIT — PAGE CONNEXION
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --purple: #7041a5;
    --purple-dark: #542d80;
    --purple-light: #f1eafa;
    --purple-soft: #f7f3fa;

    --text: #292331;
    --text-light: #77717f;

    --border: #e8e3ed;
    --background: #f5f3f8;
    --white: #ffffff;

    --success: #16834b;
    --danger: #c63b4a;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Poppins", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(112, 65, 165, 0.10), transparent 32%),
        linear-gradient(180deg, #faf9fc 0%, var(--background) 100%);
    color: var(--text);
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 3px 18px rgba(50, 35, 65, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header .container {
    width: 100%;
    max-width: 1180px;
    min-height: 76px;
    margin: 0 auto;
    padding: 0 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


/* =========================================================
   LOGO
   ========================================================= */

.logo {
    display: flex;
    align-items: center;
    gap: 11px;

    color: var(--purple-dark);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.logo span {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: linear-gradient(
        135deg,
        var(--purple),
        var(--purple-dark)
    );

    color: #ffffff;
    font-size: 20px;
    font-weight: 800;

    box-shadow:
        0 7px 18px rgba(112, 65, 165, 0.25);
}


/* =========================================================
   RETOUR ACCUEIL
   ========================================================= */

.back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 0 18px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: #ffffff;

    color: var(--purple-dark);
    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.back-home:hover {
    background: var(--purple-soft);
    border-color: #d9cbe5;
    color: var(--purple);
    box-shadow: 0 5px 14px rgba(80, 45, 120, 0.08);
}

.back-home:active {
    transform: scale(0.97);
}


/* =========================================================
   PAGE CONNEXION
   ========================================================= */

.login-page {
    width: 100%;
    padding: 55px 20px 70px;
}

.login-page > .container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}


/* =========================================================
   CARTE DE CONNEXION
   ========================================================= */

.login-card {
    position: relative;

    width: 100%;
    padding: 38px;

    background: rgba(255, 255, 255, 0.97);

    border: 1px solid var(--border);
    border-radius: 22px;

    box-shadow:
        0 20px 55px rgba(50, 32, 70, 0.10),
        0 4px 12px rgba(50, 32, 70, 0.04);

    overflow: hidden;
}

.login-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background: linear-gradient(
        90deg,
        var(--purple-dark),
        var(--purple),
        #8c5bc0
    );
}


/* =========================================================
   EN-TÊTE
   ========================================================= */

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 13px;

    border-radius: 50px;

    background: var(--purple-light);
    color: var(--purple-dark);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;

    margin-bottom: 15px;
}

.section-header h1 {
    color: var(--text);

    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.7px;

    margin-bottom: 12px;
}

.section-header p {
    max-width: 410px;
    margin: 0 auto;

    color: var(--text-light);

    font-size: 13px;
    line-height: 1.75;
    font-weight: 400;
}


/* =========================================================
   FORMULAIRE
   ========================================================= */

#loginForm {
    width: 100%;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;

    margin-bottom: 8px;

    color: #403849;

    font-size: 13px;
    font-weight: 700;
}

.form-field input {
    width: 100%;
    height: 52px;

    padding: 0 15px;

    border: 1px solid #ddd7e4;
    border-radius: 12px;

    background: #fbfafc;

    color: var(--text);

    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 500;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.form-field input::placeholder {
    color: #aaa4b0;
    font-weight: 400;
}

.form-field input:hover {
    border-color: #cfc4d9;
}

.form-field input:focus {
    background: #ffffff;
    border-color: var(--purple);

    box-shadow:
        0 0 0 4px rgba(112, 65, 165, 0.10);
}


/* =========================================================
   MESSAGE DE CONNEXION
   ========================================================= */

.login-message {
    display: none;

    width: 100%;

    margin: 4px 0 16px;
    padding: 12px 14px;

    border-radius: 11px;

    font-size: 12px;
    line-height: 1.5;
    font-weight: 600;
}


/* =========================================================
   BOUTON CONNEXION
   ========================================================= */

.btn-primary {
    width: 100%;
    height: 53px;

    border: none;
    border-radius: 12px;

    background: linear-gradient(
        135deg,
        var(--purple),
        var(--purple-dark)
    );

    color: #ffffff;

    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 9px 22px rgba(112, 65, 165, 0.24);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.btn-primary:hover {
    filter: brightness(1.04);

    transform: translateY(-1px);

    box-shadow:
        0 12px 27px rgba(112, 65, 165, 0.30);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.99);

    box-shadow:
        0 5px 14px rgba(112, 65, 165, 0.20);
}


/* =========================================================
   BOÎTE INFORMATION
   ========================================================= */

.info-box {
    margin-top: 25px;
    padding: 17px 18px;

    border: 1px solid #e4dced;
    border-radius: 13px;

    background: var(--purple-soft);
}

.info-box strong {
    display: block;

    margin-bottom: 6px;

    color: var(--purple-dark);

    font-size: 12px;
    font-weight: 800;
}

.info-box p {
    color: #706979;

    font-size: 11px;
    line-height: 1.65;
    font-weight: 400;
}


/* =========================================================
   INSCRIPTION
   ========================================================= */

.register-link {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 5px;

    margin-top: 25px;
    padding-top: 22px;

    border-top: 1px solid #eeeaf1;

    text-align: center;
}

.register-link span {
    color: #817b87;

    font-size: 12px;
    font-weight: 400;
}

.register-link a {
    color: var(--purple);

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.register-link a:hover {
    color: var(--purple-dark);
    opacity: 0.85;
}


/* =========================================================
   RESPONSIVE TABLETTE
   ========================================================= */

@media (max-width: 700px) {

    .header .container {
        min-height: 70px;
        padding: 0 18px;
    }

    .logo {
        font-size: 18px;
    }

    .logo span {
        width: 35px;
        height: 35px;
        border-radius: 10px;
        font-size: 18px;
    }

    .back-home {
        min-height: 40px;
        padding: 0 14px;
        font-size: 12px;
    }

    .login-page {
        padding: 35px 15px 50px;
    }

    .login-card {
        padding: 30px 24px;
        border-radius: 19px;
    }

    .section-header h1 {
        font-size: 25px;
    }
}


/* =========================================================
   RESPONSIVE MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .header .container {
        min-height: 66px;
        padding: 0 14px;
    }

    .logo {
        gap: 8px;
        font-size: 16px;
    }

    .logo span {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        font-size: 16px;
    }

    .back-home {
        min-height: 37px;
        padding: 0 11px;

        border-radius: 9px;

        font-size: 10px;
    }

    .login-page {
        padding: 25px 12px 40px;
    }

    .login-card {
        padding: 27px 19px;

        border-radius: 17px;

        box-shadow:
            0 14px 35px rgba(50, 32, 70, 0.09);
    }

    .section-header {
        margin-bottom: 27px;
    }

    .badge {
        padding: 6px 11px;
        font-size: 10px;
        margin-bottom: 12px;
    }

    .section-header h1 {
        font-size: 22px;
        letter-spacing: -0.4px;
    }

    .section-header p {
        font-size: 11px;
        line-height: 1.65;
    }

    .form-field {
        margin-bottom: 17px;
    }

    .form-field label {
        font-size: 12px;
        margin-bottom: 7px;
    }

    .form-field input {
        height: 49px;
        padding: 0 13px;
        border-radius: 10px;
        font-size: 13px;
    }

    .btn-primary {
        height: 50px;
        border-radius: 10px;
        font-size: 13px;
    }

    .info-box {
        margin-top: 21px;
        padding: 14px;
        border-radius: 11px;
    }

    .info-box strong {
        font-size: 11px;
    }

    .info-box p {
        font-size: 10px;
    }

    .register-link {
        margin-top: 21px;
        padding-top: 19px;
    }

    .register-link span {
        font-size: 10px;
    }

    .register-link a {
        font-size: 12px;
    }
}


/* =========================================================
   TRÈS PETITS ÉCRANS
   ========================================================= */

@media (max-width: 350px) {

    .logo {
        font-size: 14px;
    }

    .logo span {
        width: 29px;
        height: 29px;
        font-size: 15px;
    }

    .back-home {
        padding: 0 9px;
        font-size: 9px;
    }

    .login-card {
        padding: 24px 15px;
    }

    .section-header h1 {
        font-size: 20px;
    }
}



.reset-pin-link {
    margin-top: 16px;
    text-align: center;
}

.reset-pin-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 10px 15px;
    border: 1px solid #7041a5;
    border-radius: 10px;
    color: #7041a5;
    background: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s ease;
}

.reset-pin-link a:hover {
    background: #7041a5;
    color: #fff;
}