/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: radial-gradient(circle at 10% 30%, #f0f5fa, #d9e2ec);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== WRAPPER ===== */
.login-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== CARD AVEC EFFET GLASS ===== */
.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 48px;
    box-shadow: 0 30px 60px rgba(0, 20, 30, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    padding: 48px 44px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 40px 70px rgba(0, 30, 50, 0.2);
}

/* ===== LOGO ===== */
.logo-area {
    text-align: center;
    margin-bottom: 24px;
}

.logo-area img {
    max-height: 80px;
    width: auto;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.08));
}

/* ===== TYPOGRAPHIE ===== */
.welcome-message {
    font-size: 28px;
    font-weight: 600;
    color: #1c2e4a;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.instruction {
    font-size: 15px;
    color: #4b5f7a;
    text-align: center;
    margin-bottom: 36px;
    font-weight: 400;
}

/* ===== ALERT ===== */
.alert-message {
    background: #fee9e9;
    border-left: 5px solid #cc3b3b;
    border-radius: 20px;
    padding: 14px 18px;
    margin-bottom: 28px;
    color: #a12b2b;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 6px 14px rgba(200, 50, 50, 0.1);
}

/* ===== GROUPES DE CHAMPS ===== */
.field-group {
    margin-bottom: 26px;
}

.field-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

/* ===== INPUTS AVEC ICÔNES ===== */
.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon .icon {
    position: absolute;
    left: 18px;
    font-size: 18px;
    color: #6f8fbc;
    pointer-events: none;
    z-index: 2;
}

.form-input {
    width: 100%;
    height: 58px;
    background: white;
    border: 2px solid #e2eaf2;
    border-radius: 40px;
    padding: 0 18px 0 52px;
    font-size: 16px;
    color: #1a2b3e;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.form-input:focus {
    border-color: #3f7de0;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(63, 125, 224, 0.15);
}

.form-input::placeholder {
    color: #9fb0cc;
    font-size: 15px;
    font-weight: 400;
}

/* ===== MOT DE PASSE (icône œil) ===== */
.password-wrapper {
    position: relative;
}

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

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(200, 215, 240, 0.2);
    transition: background 0.2s;
}

.password-toggle:hover {
    background: rgba(63, 125, 224, 0.1);
}

.password-toggle img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* ===== CAPTCHA ===== */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.captcha-input {
    flex: 1 1 200px;
}

.captcha-image-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 40px;
    padding: 6px 12px 6px 6px;
    border: 2px solid #e2eaf2;
}

.captcha-image-wrapper img#captcha_image {
    height: 48px;
    border-radius: 30px;
    background: #fff;
}

.reload-icon {
    width: 28px;
    height: 28px;
    cursor: pointer;
    opacity: 0.7;
    transition: transform 0.3s, opacity 0.2s;
}

.reload-icon:hover {
    opacity: 1;
    transform: rotate(180deg);
}

/* ===== BOUTON PRINCIPAL ===== */
.btn-primary {
    width: 100%;
    height: 60px;
    background: linear-gradient(145deg, #1e3a5f, #122b44);
    border: none;
    border-radius: 40px;
    color: white;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 16px 28px -8px rgba(18, 43, 68, 0.4);
    transition: all 0.25s ease;
    margin-top: 12px;
}

.btn-primary:hover {
    background: linear-gradient(145deg, #15324f, #0e2238);
    transform: scale(1.02);
    box-shadow: 0 22px 34px -8px #0e2238;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* ===== SÉPARATEUR ===== */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: #8196b5;
    font-size: 14px;
    margin: 32px 0 24px;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 2px dashed #d0ddeb;
}

.separator span {
    padding: 0 18px;
    font-weight: 600;
}

/* ===== BOUTON SSO ===== */
.btn-sso {
    width: 100%;
    height: 60px;
    border: 2px solid #ccdae9;
    border-radius: 40px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: #1e3a5f;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.btn-sso:hover {
    background: #f6faff;
    border-color: #3f7de0;
    box-shadow: 0 10px 22px -8px #3f7de0;
}

.btn-sso img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.sso-error {
    color: #c9353e;
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
}

/* ===== FOOTER ===== */
.footer-note {
    text-align: center;
    margin-top: 40px;
    color: #7a91b0;
    font-size: 13px;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
    .login-card {
        padding: 32px 24px;
        border-radius: 36px;
    }

    .welcome-message {
        font-size: 24px;
    }

    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }

    .captcha-image-wrapper {
        justify-content: center;
    }
}

/* ===== MASQUER LES ANCIENS ÉLÉMENTS INUTILES ===== */
.login-title {
    display: none;
}
