/* Centered Minimal Auth Design - Shared for Login & Register */
body {
    padding-top: 0;
}

.body-content {
    margin-top: 0 !important;
}

.auth-container {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem 0;
    box-sizing: border-box;
}

.login-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(5, 150, 105, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(5, 150, 105, 0.04) 0%, transparent 50%);
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease;
}

.floating-elements.animate {
    opacity: 1;
}

.floating-circle {
    position: absolute;
    background: rgba(5, 150, 105, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 50px;
}

.circle-1 {
    width: 70px;
    height: 30px;
    top: 20%;
    left: 15%;
    border-radius: 35px;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.05));
    animation: float1 6s ease-in-out infinite;
    transform: rotate(15deg);
}

.circle-2 {
    width: 90px;
    height: 40px;
    top: 60%;
    right: 20%;
    border-radius: 45px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.07), rgba(22, 163, 74, 0.04));
    animation: float2 8s ease-in-out infinite;
    transform: rotate(-20deg);
}

.circle-3 {
    width: 50px;
    height: 20px;
    bottom: 30%;
    left: 70%;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(147, 51, 234, 0.03));
    animation: float3 7s ease-in-out infinite;
    transform: rotate(45deg);
}

.circle-4 {
    width: 65px;
    height: 28px;
    top: 35%;
    right: 10%;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05), rgba(219, 39, 119, 0.02));
    animation: float4 9s ease-in-out infinite;
    transform: rotate(-30deg);
}

.circle-5 {
    width: 55px;
    height: 25px;
    bottom: 15%;
    left: 25%;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.08), rgba(249, 115, 22, 0.05));
    animation: float5 7.5s ease-in-out infinite;
    transform: rotate(60deg);
}

.circle-6 {
    width: 90px;
    height: 40px;
    top: 45%;
    left: 5%;
    border-radius: 45px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.07), rgba(59, 130, 246, 0.04));
    animation: float6 8.5s ease-in-out infinite;
    transform: rotate(10deg);
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(15deg); }
    50% { transform: translateY(-60px) translateX(40px) rotate(35deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(-20deg); }
    50% { transform: translateY(50px) translateX(-35px) rotate(0deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(45deg); }
    50% { transform: translateY(-45px) translateX(-50px) rotate(25deg); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(-30deg); }
    50% { transform: translateY(-70px) translateX(30px) rotate(-60deg); }
}

@keyframes float5 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(60deg); }
    50% { transform: translateY(40px) translateX(-40px) rotate(40deg); }
}

@keyframes float6 {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(10deg); }
    50% { transform: translateY(-55px) translateX(60px) rotate(30deg); }
}

.auth-card, .login-card {
    position: relative;
    z-index: 10;
    background: #ffffff;
    border-radius: 24px;
    padding: 0;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    min-height: min-content;
    max-height: calc(100vh - 2rem);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(229, 231, 235, 0.8);
    animation: cardSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    overflow: hidden;
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0px) scale(1);
    }
}

.auth-form-section, .login-form-section {
    flex: 1;
    padding: 3rem;
    background: #ffffff;
}

.login-contact-section {
    flex: 0 0 450px;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green-light) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    position: relative;
    max-height: calc(100vh - 2rem);
}

/* Titres communs */
.contact-title {
    font-weight: 600;
    font-size: 2.5rem;
    margin-bottom: 3rem !important;
    color: #ffffff;
    opacity: 0.95;
}

.scientists-title {
    font-size: 1.2rem;
}

/* Sections avec séparateurs */
.contact-country,
.scientist {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-country {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.contact-country:last-child,
.scientist:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Titres de sections */
.country-title,
.scientist-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.country-title {
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.scientist-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Informations de contact communes */
.contact-info {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info:last-child {
    margin-bottom: 0;
}

.contact-info i {
    width: 16px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.contact-info-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 70px;
}

.contact-info-value {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 400;
    line-height: 1.3;
}

/* Container pour contacts scientifiques */
.scientist-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Titres et descriptions des scientifiques */
.scientist-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scientist-description {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin-bottom: 1rem;
}

.auth-header, .login-header {
    text-align: center;
    margin-bottom: 3rem;
}

.auth-brand, .login-brand {
    width: 290px;
    height: auto;
    margin-bottom: 2rem;
}

.auth-title, .login-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.auth-subtitle, .login-subtitle {
    color: #64748b;
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.auth-subtitle .text-primary, .login-subtitle .text-primary {
    color: var(--primary-green) !important;
    font-weight: 700;
}

.auth-description, .login-description {
    color: #64748b;
    font-size: 1.05rem;
    margin: 0 0 1.5rem 0;
    font-weight: 400;
    line-height: 1.6;
}

.auth-divider, .login-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 2rem 0 1.5rem 0;
}

.auth-section-title, .connexion-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.error-message {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    animation: errorSlide 0.3s ease;
}

@keyframes errorSlide {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.error-message i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.auth-form, .login-form {
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 2rem;
    display: block;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1.2rem 1rem 1.2rem 0;
    font-size: 1.1rem;
    border: none;
    border-bottom: 2px solid #e2e8f0;
    background: transparent;
    outline: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1a202c;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none !important;
    box-shadow: none !important;
    border-bottom-color: var(--primary-green);
}

/* Handle autofill styles */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
    transition: background-color 5000s ease-in-out 0s;
    animation-name: onAutoFillStart;
    animation-duration: 0.001s;
}

.form-input:-webkit-autofill ~ .form-label {
    transform: translateY(-1.8rem) scale(0.85);
    color: var(--primary-green);
    font-weight: 500;
}

@keyframes onAutoFillStart {
    from { opacity: 0.99; }
    to { opacity: 1; }
}

.form-label {
    position: absolute;
    left: 0;
    top: 1.2rem;
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    transform-origin: left top;
}

.input-wrapper.focused .form-label,
.input-wrapper.has-value .form-label {
    transform: translateY(-1.8rem) scale(0.85);
    color: var(--primary-green);
    font-weight: 500;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper.focused .input-border {
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.password-toggle:hover {
    color: var(--primary-green);
    background: rgba(5, 150, 105, 0.1);
}

.auth-btn, .login-btn {
    width: 100%;
    position: relative;
    background: var(--primary-green);
    border: none;
    border-radius: 12px;
    padding: 1.2rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin: 2.5rem 0 2rem 0;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.auth-btn:hover:not(.loading), .login-btn:hover:not(.loading) {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.auth-btn:active:not(.loading), .login-btn:active:not(.loading) {
    transform: translateY(-1px);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.btn-icon {
    margin-right: .75rem;
    transition: transform 0.3s ease;
}

.auth-btn:hover:not(.loading) .btn-icon, .login-btn:hover:not(.loading) .btn-icon {
    transform: translateX(4px);
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-btn.loading .btn-content, .login-btn.loading .btn-content {
    opacity: 0;
}

.auth-btn.loading .btn-loading, .login-btn.loading .btn-loading {
    opacity: 1;
}

.auth-btn.loading, .login-btn.loading {
    cursor: not-allowed;
    background: #6ee7b7;
    box-shadow: none;
    transform: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.auth-footer, .login-footer {
    text-align: center;
}

.auth-footer p, .login-footer p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.register-link, .login-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.register-link:hover, .login-link:hover {
    color: var(--primary-green-dark);
    text-decoration: underline;
}

/* Checkbox Terms Styling */
.terms-group {
    margin-bottom: 1rem;
}

.terms-wrapper {
    display: flex;
    gap: 0.3rem;
}

.terms-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary-green);
}

.terms-label {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
}

/* Success Message Styling */
.success-message {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-color: #6ee7b7;
    color: #065f46;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        align-items: flex-start;
        padding: 1rem;
    }
    
    .auth-card, .login-card {
        max-width: 95%;
        margin: 0;
        flex-direction: column;
        max-height: none;
        min-height: auto;
    }
    
    .auth-form-section, .login-form-section {
        padding: 2rem;
        order: 2;
    }
    
    .login-contact-section {
        flex: none;
        padding: 2rem;
        max-height: none;
        order: 1;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 0.5rem;
    }
    
    .auth-card, .login-card {
        margin: 0;
        border-radius: 16px;
        max-height: none;
    }
    
    .auth-form-section, .login-form-section {
        padding: 1.5rem;
        order: 1;
    }
    
    .login-contact-section {
        padding: 1.5rem;
        max-height: none;
        order: 2;
    }
    
    /* Titres responsive */
    .contact-title {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .scientists-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .country-title,
    .scientist-name {
        font-size: 0.9rem;
    }
    
    .country-title {
        margin-bottom: 0.75rem;
    }
    
    /* Sections responsive */
    .contact-country,
    .scientist {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    /* Contact info responsive */
    .contact-info {
        margin-bottom: 0.5rem;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .contact-info-label {
        min-width: 60px;
        font-size: 0.75rem;
    }
    
    .contact-info-value {
        font-size: 0.85rem;
    }
    
    /* Textes scientifiques responsive */
    .scientist-title {
        font-size: 0.8rem;
    }
    
    .scientist-description {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        height: auto;
        padding: 1rem;
    }
    
    .auth-card, .login-card {
        margin: 1rem auto;
        padding: 0;
        border-radius: 20px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .auth-form-section, .login-form-section {
        padding: 1rem;
        order: 1;
    }
    
    .login-contact-section {
        padding: 1rem;
        order: 2;
        max-height: none;
        overflow-y: visible;
    }
    
    .auth-brand, .login-brand {
        width: 200px;
        margin-bottom: 1rem;
    }
    
    .auth-title, .login-title {
        font-size: 1.3rem;
    }
    
    .auth-description, .login-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 0.1rem;
        align-items: flex-start;
    }
    
    .contact-info i {
        display: none;
    }
    
    .contact-info-label {
        min-width: auto;
        margin-bottom: 0.1rem;
    }
}

@media (max-height: 700px) and (min-width: 769px) {
    .auth-card, .login-card {
        padding: 2rem;
    }
    
    .auth-header, .login-header {
        margin-bottom: 1.5rem;
    }
    
    .auth-brand, .login-brand {
        width: 150px;
        margin-bottom: 1rem;
    }
}
