/* ==== GLOBAL ==== */
body {
    margin: 0;
    font-family: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa, #e0ecff, #cce3ff);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-container {
    text-align: center;
    animation: fadeIn 1s ease-in-out;
    width: 100%;
}

/* ==== LOGIN CARD ==== */
.login-card {
    background: white;
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 380px;
    margin: 0 auto;
    transition: 0.3s;
    backdrop-filter: blur(8px);
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 45px rgba(0,0,0,0.15);
}



.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo img {
    display: block;
    width: 150px;
    height: auto;
    object-fit: contain;
}

h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 500;
}

/* ==== FORM ==== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 5px;
}

.input-group {
    position: relative;
}

.login-field-label {
    display: none;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #53B7E8;
    font-size: 18px;
}

.input-group input {
    width: 85%;
    padding: 12px 12px 12px 45px;
    border: 1px solid #d6d9e0;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
    transition: 0.3s;
    background: #fafbff;
    margin: 0 auto;
}

.input-group input:focus {
    border-color: #53B7E8;
    box-shadow: 0 0 6px rgba(83, 183, 232, 0.4);
}

/* ==== BUTTON ==== */
.btn-login {
    background: linear-gradient(90deg, #53B7E8, #4FA1D9);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-login:hover {
    background: linear-gradient(90deg, #4FA1D9, #53B7E8);
    transform: scale(1.02);
}

/* ==== ALERT ==== */
.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

/* Erreur normale */
.alert-default {
    background: #ffefef;
    color: #e74c3c;
}

.alert-info {
    background: #eef7fc;
    color: #245b78;
}

.alert-success {
    background: #eaf7ee;
    color: #1f7a3d;
}

/* Boutique suspendue */
.alert-suspended {
    background: #fff3cd;
    color: #856404;
    font-weight: 500;
}

/* Abonnement expiré */
.alert-expired {
    background: #ffe0e0;
    color: #c0392b;
    font-weight: 600;
}

/* ==== FOOTER ==== */
footer {
    margin-top: 20px;
    color: #777;
    font-size: 13px;
}

.login-signup {
    margin: 20px 0 0;
    color: #666;
    font-size: 14px;
}

.login-signup a {
    color: #278fc2;
    font-weight: 600;
}

/* ==== ANIMATIONS ==== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    body {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        display: block;
        overflow-y: auto;
        overflow-x: hidden;
        background: #f4f7fc;
    }

    .login-container {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        padding: max(24px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
        text-align: center;
        box-sizing: border-box;
    }

    .login-card {
        width: 100%;
        max-width: 420px;
        margin: auto;
        padding: 28px 22px 24px;
        border: 1px solid #e4eaf3;
        border-radius: 20px;
        box-sizing: border-box;
        box-shadow: 0 14px 38px rgba(25,48,88,0.09);
        transform: none;
        backdrop-filter: none;
    }

    .login-card:hover {
        transform: none;
        box-shadow: 0 14px 38px rgba(25,48,88,0.09);
    }

    .logo {
        margin-bottom: 24px;
    }

    .logo img { width: 144px; }

    h3 {
        margin: 0 0 22px;
        color: #0A0F28;
        font-size: 21px;
        font-weight: 700;
    }

    .login-form { gap: 18px; padding: 0; }
    .input-group { display: grid; gap: 8px; text-align: left; }

    .input-group > label:not(.login-field-label) {
        display: block;
        color: #0A0F28;
        font-size: 14px;
        font-weight: 700;
    }

    .login-field-label {
        display: block;
        color: #0A0F28;
        font-size: 14px;
        font-weight: 700;
    }

    .input-group i {
        top: auto;
        bottom: 17px;
        left: 15px;
        transform: none;
        font-size: 18px;
    }

    .input-group input {
        width: 100%;
        min-height: 54px;
        margin: 0;
        padding: 14px 14px 14px 46px;
        border-radius: 13px;
        box-sizing: border-box;
        font-size: 16px;
    }

    .btn-login {
        min-height: 54px;
        margin-top: 2px;
        font-size: 16px;
        font-weight: 700;
    }

    .login-signup { text-align: center; line-height: 1.5; }
    footer { margin: 20px auto 0; text-align: center; }
}

@media (max-width: 380px) {
    .login-container { padding-right: 12px; padding-left: 12px; }
    .login-card { padding-right: 18px; padding-left: 18px; }
}

@media (max-height: 620px) and (max-width: 768px) {
    .login-container { justify-content: flex-start; }
    .login-card { margin-top: 8px; margin-bottom: 0; }
    footer { margin-bottom: 4px; }
}
