* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

.wave {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 100%;
    z-index: -1;
}

.container {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 7rem;
    padding: 0 2rem;
}

.img {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.login-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}

.img img {
    width: 500px;
}

form {
    width: 360px;
}

.logo {
    width: 200px;     /* ajuste ici */
    height: auto;     /* évite la déformation */
}

.form-error {
    margin: 0.75rem 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(231, 9, 9, 0.12);
    border: 1px solid rgba(231, 9, 9, 0.28);
    color: #b91c1c;
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: left;
}

.login-content h2 {
    margin: 15px 0;
    color: #333;
    text-transform: uppercase;
    font-size: 2.9rem;
}

.login-content .input-div {
    position: relative;
    display: grid;
    grid-template-columns: 7% 93%;
    margin: 25px 0;
    padding: 5px 0;
    border-bottom: 2px solid #d9d9d9;
}

.login-content .input-div.one {
    margin-top: 0;
}

.i {
    color: #d9d9d9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.i i {
    transition: .3s;
}

.input-div>div {
    position: relative;
    height: 45px;
}

.input-div>div>h5 {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    transition: .3s;
}

.input-div:before,
.input-div:after {
    content: '';
    position: absolute;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background-color: #ff5a5a;
    transition: .4s;
}

.input-div:before {
    right: 50%;
}

.input-div:after {
    left: 50%;
}

.input-div.focus:before,
.input-div.focus:after {
    width: 50%;
}

.input-div.focus>div>h5 {
    top: -5px;
    font-size: 15px;
}

.input-div.focus>.i>i {
    color: #a80000;
}

.input-div>div>input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: none;
    padding: 0.5rem 0.7rem;
    font-size: 1.2rem;
    color: #555;
    font-family: 'poppins', sans-serif;
}

.input-div.pass {
    margin-bottom: 4px;
}

a {
    display: block;
    text-align: right;
    text-decoration: none;
    color: #999;
    font-size: 0.9rem;
    transition: .3s;
}

a:hover {
    color: #ff5a5a;
}

.btn {
    display: block;
    width: 100%;
    height: 50px;
    border-radius: 25px;
    outline: none;
    border: none;
    background-image: linear-gradient(to right, #e70909, #e70909, #d41010);
    background-size: 200%;
    font-size: 1.2rem;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    margin: 1rem 0;
    cursor: pointer;
    transition: .5s;
}

.btn:hover {
    background-position: right;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-top: 0.9rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1rem;
    border: 1px solid transparent;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.social-btn i,
.social-btn svg {
    flex: 0 0 auto;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn-discord {
    background: linear-gradient(135deg, #5865f2, #404eed);
    color: #fff;
    box-shadow: 0 12px 24px rgba(88, 101, 242, 0.28);
}

.social-btn-discord:hover {
    box-shadow: 0 16px 28px rgba(88, 101, 242, 0.38);
}

.social-btn-roblox {
    background: linear-gradient(135deg, #16181d, #2b2f36);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.social-btn-roblox:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

body.dark-mode .social-btn-discord {
    box-shadow: 0 12px 24px rgba(88, 101, 242, 0.22);
}

body.dark-mode .social-btn-roblox {
    background: linear-gradient(135deg, #0b0d12, #1f2430);
}

@media screen and (max-width: 420px) {
    .social-buttons {
        grid-template-columns: 1fr;
    }
}


@media screen and (max-width: 1050px) {
    .container {
        grid-gap: 5rem;
    }
}

@media screen and (max-width: 1000px) {
    form {
        width: 290px;
    }

    .login-content h2 {
        font-size: 2.4rem;
        margin: 8px 0;
    }

    .img img {
        width: 400px;
    }
}

@media screen and (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }

    .img {
        display: none;
    }

    .wave {
        display: none;
    }

    .login-content {
        justify-content: center;
    }
}

body.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode form {
    background: rgba(15, 23, 42, 0.85);
}

body.dark-mode .form-error {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.32);
    color: #fecaca;
}

body.dark-mode .input-div {
    border-bottom-color: #334155;
}

body.dark-mode .i {
    color: #64748b;
}

body.dark-mode .input-div>div>h5 {
    color: #94a3b8;
}

body.dark-mode .input-div>div>input {
    color: #e2e8f0;
}

body.dark-mode a {
    color: #cbd5e1;
}

body.dark-mode a:hover {
    color: #ff8f8f;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-background-clip: text;
    -webkit-text-fill-color: black;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: none;
}

body.dark-mode input:-webkit-autofill,
body.dark-mode input:-webkit-autofill:hover, 
body.dark-mode input:-webkit-autofill:focus, 
body.dark-mode input:-webkit-autofill:active{
    -webkit-background-clip: text;
    -webkit-text-fill-color: #e2e8f0;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: none;
}
