.noscroll {
    overflow: hidden;
}

.hidden {
    display: none;
}

.visible {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 100dvw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--p-4) 80%, transparent) 0%, color-mix(in srgb, var(--p-3) 80%, transparent) 100%);
    overflow: hidden;
    z-index: 1000;
}

.visible::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -150px;
    right: -150px;
}

.visible::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
}

.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    width: 90%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 1;
}

.auth-container .cross {
    position: absolute;
    width: 65px;
    height: 65px;
    background: rgba(255,255,255,0.1);
    border-radius: 0 0 50% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    top: 0px;
    left: 0px;
    z-index: 1;
    cursor: pointer;
}

.auth-side {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-side.left {
    background: linear-gradient(135deg, var(--special-color), var(--p-2), var(--p-3));
    color: white;
    text-align: center;
    position: relative;
}

.auth-side.left::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -50px;
    right: -50px;
}

.auth-side.left::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    bottom: -30px;
    left: -30px;
}

.logo {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    z-index: 1;
    position: relative;
}

.auth-side.left p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    z-index: 1;
    position: relative;
}

.switch-btn {
    background: white;
    color: var(--special-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    z-index: 1;
    position: relative;
}

.switch-btn:hover {
    background: var(--p-5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.auth-side.right {
    background: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.4s ease-in;
    max-height: 75dvh;
    overflow-y: auto;
    padding-right: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    font-size: 2rem;
    color: var(--p-5);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.form-subtitle {
    color: #999;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--p-3);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--p-5);
    box-shadow: 0 0 0 3px rgba(74, 163, 162, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.remember-me input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.forgot-password {
    color: var(--p-5);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--special-color);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--special-color), var(--p-2));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(202, 60, 182, 0.3);
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    color: #999;
    font-size: 0.9rem;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--p-3);
}

.divider::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--p-3);
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid var(--p-3);
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    border-color: var(--p-5);
    background: #f9f9f9;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 95%;
        max-height: 92dvh;
        overflow-y: auto;
    }

    .auth-side.left {
        padding: 1.5rem 2rem;
    }

    .auth-side.left p {
        display: none; /* gain de place sur mobile */
    }

    .logo {
        font-size: 1.5rem;
    }

    .auth-side.right {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .auth-form.active {
        max-height: none;
    }
}