/* Resets and Variables replaced with hardcoded values for robustness */
:root {
    /* Keeping variables for reference but using hardcoded values in rules */
    --main-color: #00915a;
}

* {
    box-sizing: border-box;
}

body {
    background-color: #ede0e0;
    font-family: 'Open Sans', Arial, sans-serif;
    margin: 0;
    color: #212121;
    display: flex;
    /* Ensure centering works */
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    min-height: 100vh;
}

/* Skip Link - Force Hide */
.cas__skip-link {
    display: none !important;
}

/* Header - Logo Area */
.cas__header-container {
    background-color: #ffffff;
    padding: 24px 20px;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 417px;
    /* Match container width */
}

.logo {
    height: 30px;
    display: block;
}

/* Main Layout */
.cas__main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Green Login Section */
.cas__ident-container {
    background-color: #00915a;
    /* Hardcoded Green */
    color: #ffffff;
    width: 100%;
    max-width: 417px;
    padding: 30px 20px 40px;
    margin-bottom: 0;
}

.cas__ident h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 2rem;
    color: white;
}

/* Form Controls */
.cas__fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.form-control {
    position: relative;
    background: #fff;
    border-radius: 4px;
    height: 48px;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.form-control input {
    flex: 1;
    /* Take remaining space */
    width: auto;
    height: 100%;
    border: none;
    padding: 0 15px;
    font-size: 1rem;
    outline: none;
    border-radius: 4px;
    color: #333;
}

#clearUserId {
    background: transparent;
    border: none;
    padding: 0 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 100%;
    color: #767676;
}

/* Checkbox Row */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.form-check {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    color: white;
}

.form-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background-color: #fff;
    border-radius: 4px;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    border: none;
    flex-shrink: 0;
}

.form-check input[type="checkbox"]:checked {
    background-color: #fff;
}

.form-check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 8px;
    height: 14px;
    border: solid #00915a;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.cas__btn--info {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

/* Continue Button */
.cas__btn {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    background-color: #2dc3a9;
    /* Btn color */
    color: #191919;
}

.cas__btn:disabled {
    background-color: #2dc3a9;
    opacity: 0.8;
}

.cas__btn--inverted {
    background-color: #2dc3a9;
    color: #191919;
}

/* Footer Links in Ident */
footer {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.cas__link {
    background: none;
    border: none;
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0;
    cursor: pointer;
}

/* Security Section (Aside) */
.cas__aside-container {
    width: 100%;
    max-width: 417px;
    background-color: #ffffff;
    /* padding: 24px 20px; Removed padding from container to let inner div handle it if needed */
    color: #212121;
}

.cas__security-section {
    padding: 24px 20px;
}

.cas__security-section h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.cas__security-section p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 1rem 0;
}

.security-url-box {
    background-color: #eef2f1;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #212121;
}

.security-link {
    color: #00915a;
    font-weight: 700;
    text-decoration: underline;
    font-size: 0.9rem;
}

/* Utilities */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

.hidden {
    display: none !important;
}

/* Password Step Keypad Styles (Added) */
.cas__fieldset--title {
    color: white;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 25px;
    /* More space */
    text-align: center;
    font-size: 1rem;
}

.cas__pwd-visualisation {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
    position: relative;
    /* For positioning backspace if needed */
}

.cas__pwd-indicators {
    display: flex;
    gap: 15px;
    /* Wider gap */
}

.cas__pwd-indicators span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #79c8ad;
    /* Light green/grey for empty state */
    display: block;
    transition: background-color 0.2s;
}

.cas__pwd-indicators span.active {
    background-color: #ffffff;
}

.cas__btn--backspace {
    background: #ffffff;
    border: none;
    color: #00915a;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-left: 10px;
}

.cas__btn--backspace svg {
    width: 20px;
    height: 20px;
}

.cas__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 30px;
    max-width: 350px;
    /* Constrain width to look like separate buttons */
    margin-left: auto;
    margin-right: auto;
}

.cas__btn--key {
    background-color: #ffffff;
    color: #191919;
    border: none;
    border-radius: 4px;
    /* Slight rounding */
    height: 48px;
    /* Slightly taller to match input height often */
    font-size: 1.3rem;
    /* Larger font */
    font-weight: 700;
    /* Bold */
    font-family: 'Open Sans', Arial, sans-serif;
    /* Explicitly set font */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Removed shadow for flatter look if target is flat, or keep subtle if needed. 
       Usually BNP has a very subtle shadow or none. Let's keep it clean. */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cas__btn--key:active {
    background-color: #e6e6e6;
    transform: none;
    /* Remove bounce for more native feel */
}

/* Specific styling for the Accéder button when disabled/enabled */
#validLastStep {
    background-color: #79c8ad;
    /* Lighter green when disabled/default */
    color: #1e1e1e;
    text-transform: none;
    /* Ensure no uppercase enforcement */
}

#validLastStep:enabled {
    background-color: #2dc3a9;
    /* Active color */
    cursor: pointer;
}

#validLastStep:disabled {
    background-color: #79c8ad;
    cursor: default;
    opacity: 1;
    /* Remove default disabled opacity */
}