/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip link pour accessibilité */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only - visible pour lecteurs d'écran seulement */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: 'Desjardins Sans', 'Roboto', Arial, Helvetica, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 1.6rem; /* 16px */
}

/* Header Styles */
.main-header {
    background-color: #3d3d3d;
    color: white;
    padding: 8px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.text-size-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 5px 15px;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
    margin-right: 5px;
}

.text-size-btn:hover {
    background-color: #555;
}

.aa-icon {
    font-weight: bold;
}

.header-link {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    padding: 5px 0;
    transition: opacity 0.3s;
}

.header-link:hover {
    opacity: 0.8;
}

/* Logo Section */
.logo-container {
    background-color: white;
    padding: 20px 40px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.desjardins-logo {
    height: 32px;
    width: auto;
}

.acces-logos {
    display: flex;
    gap: 20px;
    align-items: center;
}

.accesd-logo-img,
.accesd-affaires-logo-img {
    height: 32px;
    width: auto;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Login Section */
.login-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background-color: white;
    margin: 40px auto;
    max-width: 1100px;
    box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Login Form Container */
.login-form-container {
    padding: 45px 60px 50px 60px;
}

.login-title {
    color: #00884e;
    font-size: 3.2rem;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Security Notice */
.security-notice {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 20px 25px;
    margin-bottom: 30px;
    border-radius: 0;
}

.notice-icon {
    display: none;
}

.notice-content {
    text-align: left;
}

.notice-content strong {
    display: block;
    color: #212529;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.notice-content p {
    color: #495057;
    font-size: 1.4rem;
    line-height: 1.6;
    margin: 0;
}

/* Form Styles */
.login-form {
    max-width: 400px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.help-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

.help-icon:hover {
    color: #00884e;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1.4rem;
    transition: border-color 0.3s;
    line-height: 1.42857;
}

.form-input:focus {
    outline: none;
    border-color: #00884e;
    box-shadow: 0 0 0 2px rgba(0, 136, 78, 0.1);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.help-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 1.2rem;
}

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

/* Password Input */
.password-input-wrapper {
    position: relative;
}

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

.show-password-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    display: flex;
    align-items: center;
}

.show-password-btn:hover {
    color: #00884e;
}

/* Warning Message */
.warning-message {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 15px;
    border-radius: 3px;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* Forgot Password */
.forgot-password {
    margin-bottom: 25px;
}

.forgot-password a {
    color: #0066cc;
    text-decoration: none;
    font-size: 1.3rem;
}

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

/* Submit Button */
.submit-btn {
    width: 100%;
    background-color: #00884e;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #007944;
}

/* Links Section */
.links-section {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.links-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.links-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.primary-link {
    color: #00884e;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
}

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

.secondary-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 1.3rem;
}

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

.security-guarantee {
    color: #0066cc;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.3rem;
}

.security-guarantee:hover {
    text-decoration: underline;
}

.lock-icon {
    flex-shrink: 0;
}

/* Image Container */
.image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer Styles */
.main-footer {
    background-color: #3d3d3d;
    color: white;
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a,
.cookie-btn {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.cookie-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
    font-family: inherit;
}

.cookie-btn:hover {
    opacity: 0.8;
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    font-size: 1.2rem;
    color: #ccc;
}

/* Loader Overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-overlay.show {
    display: flex;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-size: 1.8rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 900px) {
    .login-section {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 100%;
    }
    
    .image-container {
        min-height: 180px;
        max-height: 220px;
        order: -1;
    }
    
    .image-container img {
        object-fit: cover;
        object-position: center;
    }
    
    .header-right {
        gap: 10px;
        font-size: 1.2rem;
    }
    
    .login-title {
        font-size: 2.4rem;
    }
    
    .login-form-container {
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 58%;
    }
    
    .container {
        padding: 1rem;
    }
    
    .header-container {
        padding: 1rem;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .acces-logos {
        flex-direction: row;
        gap: 1rem;
    }
    
    .acces-logos img {
        max-height: 35px;
    }
    
    .login-section {
        padding: 2rem 1.5rem;
    }
    
    .login-form-container {
        padding: 2rem 1.5rem;
    }
    
    .login-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    
    .form-group {
        margin-bottom: 2rem;
    }
    
    .form-input {
        padding: 1.2rem;
        font-size: 1.6rem;
    }
    
    .btn-submit {
        padding: 1.4rem;
        font-size: 1.7rem;
    }
    
    .footer-nav {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section h2 {
        font-size: 1.6rem;
    }
    
    .footer-links {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 55%;
    }
    
    .header-top {
        padding: 0.8rem 1rem;
    }
    
    .header-right {
        gap: 0.8rem;
        font-size: 1.1rem;
    }
    
    .text-size-btn,
    .lang-toggle {
        padding: 0.6rem 0.8rem;
        font-size: 1.3rem;
    }
    
    .logo img {
        max-height: 30px;
    }
    
    .acces-logos img {
        max-height: 28px;
    }
    
    .login-section {
        padding: 1.5rem 1rem;
    }
    
    .login-form-container {
        padding: 2rem 1.2rem;
    }
    
    .login-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .form-label {
        font-size: 1.4rem;
        margin-bottom: 0.6rem;
    }
    
    .form-input {
        padding: 1.1rem;
        font-size: 1.5rem;
    }
    
    .btn-submit {
        padding: 1.3rem;
        font-size: 1.6rem;
    }
    
    .image-container {
        min-height: 150px;
    }
    
    .footer-container {
        padding: 2rem 1rem;
    }
    
    .footer-copyright {
        font-size: 1.1rem;
    }
}

