html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    background: #0f121d; /* Fallback background, adjust as needed */
    color: #e6e6fa; /* Default text color for body */
}

/* Hide the original canvas portal */
#portal-center-container {
    display: none;
}

main.connect-page-container { /* Was .connect-page-container, now applied to main */
    flex-grow: 1; /* Takes available space between header (if any) and footer */
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0; /* Override Bootstrap .container padding if it was there */
    /* margin-bottom: 32px; */ /* Removed, footer handles its own spacing or body flex manages */
    overflow: hidden; /* Prevents internal content from causing page scroll */
    position: relative; /* For absolute positioned children like alerts if needed */
}

.connect-slider-outer {
    position: relative;
    flex-grow: 1; 
    width: 100%;
    overflow: hidden; 
    background-color: #0c0e16; /* Solid background for the slider area */
    box-shadow: 0 0 16px #7fd8ff33; 
    color: #e6e6fa;
    display: flex; 
}

.connect-slider-wrapper {
    display: flex;
    width: 200%; 
    height: 100%; /* Ensure wrapper takes full height of outer */
    transition: transform 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
}

.connect-view {
    width: 50%; 
    height: 100%; 
    display: flex;
    align-items: stretch; 
    box-sizing: border-box;
}

.form-section-half { 
    flex: 1; 
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow-y: auto; 
    background-color: rgba(20, 25, 40, 0.92); 
}

.image-section-half {
    flex: 1;
    padding: 0; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; /* Changed to flex-end to push button to the bottom */
    align-items: center; 
    box-sizing: border-box;
    position: relative; 
    height: 100%; 
    overflow: hidden; /* Ensures image doesn't overflow if object-fit is 'contain' */
}

.image-section-half .panel-image {
    display: block; /* Make image a block element */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, cropping if necessary */
    position: absolute; /* Take image out of flow to allow button to overlay */
    top: 0;
    left: 0;
    z-index: 0; /* Behind the button */
}

.slide-toggle-btn {
    font-family: 'EB Garamond', serif;
    border: 1.5px solid #ffe082aa !important;
    color: #ffe082 !important;
    background: rgba(20, 35, 60, 0.7);
    border-radius: 7px;
    font-weight: 500;
    padding: 10px 20px;
    box-shadow: 0 0 8px #ffe08233;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    cursor: pointer;
    margin-top: 15px;
}

.slide-toggle-btn:hover {
    background: #ffe082;
    color: rgba(30, 50, 80, 1) !important;
    box-shadow: 0 0 12px #ffe08277;
}

.image-section-half .slide-toggle-btn { 
    position: relative; 
    z-index: 1; 
    margin-bottom: 28px; 
}

/* Adjusted connect-form-wrapper */
.connect-form-wrapper {
    width: 100%;
    max-width: 400px; 
}

.connect-form-wrapper h2 {
    color: #b2eaff;
    text-shadow: 0 0 6px #7fd8ff;
    margin-bottom: 18px;
    font-size: 2rem;
}

.connect-form label {
    color: #ffe082;
    font-weight: 500;
}

.connect-form .form-control {
    background: rgba(20, 35, 60, 0.93);
    border: 1.5px solid #7fd8ff55;
    color: #e6e6fa;
    border-radius: 7px;
    font-family: 'EB Garamond', serif;
}

.connect-form .form-control:focus {
    border-color: #b2eaff;
    box-shadow: 0 0 8px #b2eaff55;
    background: rgba(30, 50, 80, 1);
    color: #fffbe7;
}

.connect-form .btn-primary {
    background: linear-gradient(90deg, #7be9c7 60%, #a084e8 100%);
    border: none;
    color: #23213a;
    font-weight: bold;
    border-radius: 7px;
    box-shadow: 0 0 8px #7fd8ff55;
    transition: background 0.2s, box-shadow 0.2s;
}
.connect-form .btn-primary:hover {
    background: linear-gradient(90deg, #b2eaff 60%, #a084e8 100%);
    box-shadow: 0 0 16px #b2eaff77;
    color: #23213a;
}

.connect-alert {
    background: rgba(30, 50, 80, 0.98);
    color: #ffe082;
    border: 1.5px solid #ffe08255;
    border-radius: 10px;
    font-family: 'EB Garamond', serif;
    box-shadow: 0 0 8px #ffe08233;
    /* Centering the alert if it's not full-width */
    margin-left: auto;
    margin-right: auto;
    max-width: 90%; /* Or a fixed max-width like 600px */
    width: fit-content; /* Shrink to content size */
    /* mb-3 is a bootstrap class, ensure it's applied or add margin-bottom here */
}

.connect-action-footer { /* Styles for the div wrapping the "Retour à l'Accueil" button */
    padding: 10px 0; /* Add some padding */
    background: rgba(20, 25, 40, 0.90); /* Optional: slight background to distinguish */
}

.retour-accueil-btn {
    font-family: 'EB Garamond', serif;
    border-color: #7fd8ff !important;
    color: #b2eaff !important;
    background: rgba(20, 35, 60, 0.85);
    border-radius: 7px;
    font-weight: bold;
    box-shadow: 0 0 8px #7fd8ff33;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    margin-top: 10px;
}
.retour-accueil-btn:hover {
    background: rgba(40, 65, 100, 1);
    color: #ffe082 !important;
    box-shadow: 0 0 16px #b2eaff77;
}

.connect-footer { /* This is the main site footer */
    background: rgba(20, 25, 40, 0.98) !important;
    color: #b2eaff !important;
    border-top: 1.5px solid #7fd8ff33;
    font-family: 'EB Garamond', serif;
    /* mt-auto is a bootstrap class, should push it down if body is flex column */
    /* Explicitly ensure it's not taking unnecessary space if body is not tall enough */
    flex-shrink: 0; 
}
