/* Global Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 2px solid #e0e0e0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
}

.divider {
    width: 1px;
    height: 35px;
    background-color: #cccccc;
    margin: 0 15px;
}

.compte-ameli {
    font-size: 16px;
    font-weight: 600;
    color: #0055a4;
}

/* Main Layout Containers */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 50px 20px 80px;
}

.login-container,
.info-container {
    width: 100%;
    max-width: 440px;
    text-align: center;
}

.login-title,
.info-title {
    font-size: 28px;
    font-weight: 400;
    color: #333333;
    margin-bottom: 10px;
}

.login-title {
    margin-bottom: 30px;
}

.info-subtitle-text {
    font-size: 14px;
    color: #666666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.required-fields {
    font-size: 13px;
    font-style: italic;
    color: #333333;
    margin-bottom: 20px;
    text-align: left;
    padding-left: 5px;
}

/* Form Groups and Inputs */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #0055a4;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #0055a4;
    padding-bottom: 8px;
}

.input-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: #666666;
    flex-shrink: 0;
}

.form-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #333333;
    background: transparent;
    padding: 5px 0;
}

.form-input::placeholder {
    color: #888888;
    font-weight: 400;
}

.toggle-password {
    width: 22px;
    height: 22px;
    cursor: pointer;
    color: #666666;
    flex-shrink: 0;
}

.help-link {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #0055a4;
    text-decoration: none;
    padding-left: 32px;
}

.help-link:hover {
    text-decoration: underline;
}

/* Select Dropdown Styling */
.select-wrapper {
    position: relative;
    border-bottom: 1px solid #0055a4;
    padding-bottom: 5px;
}

.form-input-select {
    width: 100%;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #333333;
    background: transparent;
    padding: 5px 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.select-wrapper::after {
    content: '▼';
    font-size: 10px;
    color: #0055a4;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Buttons (Active & Disabled) */
.login-btn,
.submit-btn {
    width: 100%;
    max-width: 220px;
    padding: 14px 30px;
    background-color: #dfdfdf; /* Grisé par défaut */
    color: #a0a0a0; /* Texte grisé */
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: not-allowed;
    margin: 30px 0;
    transition: background-color 0.3s, color 0.3s;
}

.submit-btn {
    margin: 30px 0 10px;
}

.login-btn:not(:disabled),
.submit-btn:not(:disabled) {
    background-color: #0055a4; /* Couleur active ameli */
    color: #ffffff;
    cursor: pointer;
}

.login-btn:not(:disabled):hover,
.submit-btn:not(:disabled):hover {
    background-color: #003b71;
}

/* Divider OU */
.or-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #999999;
}

.or-text {
    padding: 0 15px;
    font-size: 20px;
    font-weight: 500;
    color: #333333;
}

/* FranceConnect Section */
.franceconnect-section {
    margin-top: 20px;
}

.franceconnect-desc {
    font-size: 13px;
    color: #333333;
    margin-bottom: 15px;
    line-height: 1.5;
}

.franceconnect-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background-color: #000091;
    color: #ffffff;
    padding: 10px 22px;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 12px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.franceconnect-btn:hover {
    background-color: #000074;
}

.fc-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.fc-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
}

.fc-text-top {
    font-size: 13px;
    font-weight: 400;
    color: #ffffff;
}

.fc-text-bottom {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.fc-link {
    font-size: 13px;
    color: #0055a4;
    text-decoration: none;
}

.fc-link:hover {
    text-decoration: underline;
}

/* Create Account link */
.create-account {
    margin-top: 40px;
    font-size: 14px;
    color: #333333;
}

.create-account a {
    color: #0055a4;
    text-decoration: underline;
}

/* File Upload Boxes (cni.php) */
.upload-box {
    border: 2px dashed #0055a4;
    border-radius: 4px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.upload-box:hover {
    background-color: #f0f5fa;
}

.upload-box.has-file {
    border-style: solid;
    background-color: #f7fafc;
    border-color: #2b6cb0;
}

.upload-icon {
    width: 32px;
    height: 32px;
    color: #0055a4;
}

.upload-title {
    font-size: 15px;
    font-weight: 500;
    color: #333333;
}

.upload-subtitle {
    font-size: 12px;
    color: #777777;
}

.file-name {
    font-size: 13px;
    font-weight: 600;
    color: #0055a4;
    background-color: #e2f0fd;
    padding: 4px 10px;
    border-radius: 3px;
    word-break: break-all;
    display: none;
    margin-top: 5px;
}

.upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Instruction Box (rio.php) */
.instruction-box {
    background-color: #f0f5fa;
    border-left: 4px solid #0055a4;
    padding: 15px;
    text-align: left;
    font-size: 13px;
    color: #333333;
    margin-bottom: 25px;
    border-radius: 0 4px 4px 0;
    line-height: 1.5;
}

.instruction-box strong {
    color: #0055a4;
}

/* Footer Section */
.footer {
    background-color: #3a4a5c;
    color: #ffffff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-divider {
    color: #ffffff;
    font-size: 12px;
}

/* Error Alert Box */
.error-alert {
    display: none;
    align-items: flex-start;
    gap: 8px;
    color: #c81e1e;
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    padding-left: 32px;
    text-align: left;
    line-height: 1.4;
}

.error-alert-icon {
    width: 16px;
    height: 16px;
    color: #c81e1e;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Help Card Box */
.help-card {
    background-color: #f6f6f6;
    padding: 18px 15px;
    margin-top: 12px;
    border-radius: 4px;
    text-align: left;
    position: relative;
}

.help-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-right: 25px;
}

.help-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #333333;
    line-height: 1.3;
}

.help-card-close-svg {
    color: #666666;
    cursor: pointer;
    position: absolute;
    top: 14px;
    right: 14px;
    transition: color 0.2s;
}

.help-card-close-svg:hover {
    color: #333333;
}

.help-card-content {
    font-size: 13px;
    color: #333333;
    line-height: 1.5;
}

/* Loading Page Styles */
.loading-container {
    width: 100%;
    max-width: 440px;
    text-align: center;
    padding: 60px 20px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-spinner-wrapper {
    position: relative;
    width: 65px;
    height: 65px;
    margin-bottom: 30px;
}

.loader-spinner {
    width: 100%;
    height: 100%;
    border: 4px solid #eaeaea;
    border-top: 4px solid #0055a4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-size: 19px;
    font-weight: 600;
    color: #0055a4;
    margin-bottom: 12px;
}

.loader-subtext {
    font-size: 13.5px;
    color: #666666;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

/* Linear progress bar style */
.loader-progress-bar-container {
    width: 100%;
    max-width: 280px;
    height: 6px;
    background-color: #eaeaea;
    border-radius: 10px;
    margin-top: 25px;
    overflow: hidden;
}

.loader-progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #0055a4;
    border-radius: 10px;
    transition: width 3s linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-links {
        gap: 15px;
    }
}

