/* ============================================
   PAGE CONNEXION COMPACTE - TESTCIVIQUE
   Style identique à la page inscription
   ============================================ */

:root {
    --cyan: #00D4FF;
    --cyan-glow: rgba(0, 212, 255, 0.3);
    --text-dark: #111827;
    --text-grey: #6B7280;
    --bg-body: #F9FAFB;
    --border: #E5E7EB;
    --shadow: 0 20px 50px -10px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top center, #F0FDFF 0%, #FFFFFF 60%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text-dark);
    overflow-y: auto;
}

/* --- CARTE COMPACTE (MÊME STYLE) --- */
.compact-card {
    background: white;
    width: 100%;
    max-width: 650px;
    padding: 45px 50px;
    margin: auto;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    animation: popIn 0.5s ease-out;
}

/* --- CROIX REMARQUABLE --- */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    transition: 0.3s;
    z-index: 20;
}

.close-btn:hover {
    background: var(--cyan);
    color: white;
    transform: rotate(90deg);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 28px;
    margin-top: 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 12px;
}

.logo-text {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
}

.logo-text .mon {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.logo-text .testcivique {
    font-family: 'Anton';
    font-size: 1.8rem;
    color: var(--text-dark);
    display: flex;
    gap: 2px;
}

.logo-text .highlight {
    color: var(--cyan);
    position: relative;
}

.logo-text .highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    border-radius: 2px;
}

h1 {
    font-family: 'Inter';
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-grey);
}

/* Social Icons */
.social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: 0.2s;
}

.social-btn:hover {
    background: #F9FAFB;
    border-color: var(--text-dark);
}

.social-btn img {
    width: 22px;
    height: 22px;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 0 20px 24px 20px;
    position: relative;
}

.divider::after {
    content: 'OU';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 12px;
    font-size: 0.75rem;
    color: var(--text-grey);
    font-weight: 700;
}

/* Inputs (Vertical Stack pour Connexion) */
.form-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-box {
    position: relative;
}

.clean-input {
    width: 100%;
    padding: 15px 18px;
    height: 56px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'Inter';
    font-size: 1.05rem;
    color: var(--text-dark);
    background: #FAFAFA;
    transition: 0.2s;
    outline: none;
}

/* Ajuster le padding pour les champs avec bouton toggle */
.input-box:has(.toggle-password) .clean-input {
    padding-right: 48px;
}

.clean-input:focus {
    background: white;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.clean-input::placeholder {
    color: #9CA3AF;
    font-size: 1rem;
}

/* Oeil Mot de passe */
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9CA3AF;
    display: flex;
}

.toggle-password svg {
    width: 22px;
    height: 22px;
}

/* Actions spécifiques Connexion (Remember / Forgot) */
.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    gap: 20px;
    flex-wrap: nowrap;
}

.check-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-grey);
    cursor: pointer;
    flex-shrink: 0;
}

.check-line input {
    accent-color: var(--cyan);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    white-space: nowrap;
}

.forgot-link:hover {
    color: var(--cyan);
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    height: 56px;
    background: var(--text-dark);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-submit:hover {
    background: var(--cyan);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.signup-link {
    text-align: center;
    font-size: 0.95rem;
    margin-top: 24px;
    color: var(--text-grey);
}

.signup-link a {
    color: var(--cyan);
    font-weight: 700;
    text-decoration: none;
}

@keyframes popIn {
    0%{
        opacity:0;
        transform:scale(0.95);
    }
    100%{
        opacity:1;
        transform:scale(1);
    }
}

/* RESPONSIVE TABLETTE */
@media(max-width: 768px) {
    .compact-card {
        max-width: 600px;
        padding: 45px 45px;
    }

    .clean-input {
        height: 54px;
        font-size: 1rem;
        padding: 14px 16px;
    }

    .btn-submit {
        height: 54px;
        font-size: 1rem;
    }
}

/* OPTIMISATION MOBILE */
@media(max-width: 600px) {
    body {
        padding: 8px;
        overflow-y: auto;
        min-height: 100vh;
    }

    .compact-card {
        padding: 30px 26px;
        max-width: 100%;
        margin: 8px auto;
    }

    .close-btn {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .header {
        margin-bottom: 20px;
    }

    .logo {
        margin-bottom: 8px;
    }

    h1 {
        font-size: 1rem;
    }

    .logo-text .mon {
        font-size: 0.6rem;
    }

    .logo-text .testcivique {
        font-size: 1.6rem;
    }

    .social-row {
        gap: 10px;
        margin-bottom: 18px;
    }

    .social-btn {
        padding: 12px 12px;
        font-size: 0.85rem;
        gap: 6px;
    }

    .social-btn img {
        width: 20px;
        height: 20px;
    }

    .divider {
        margin: 0 15px 18px 15px;
    }

    .form-stack {
        gap: 14px;
    }

    .clean-input {
        font-size: 0.95rem;
        padding: 14px 15px;
        height: 50px;
    }

    .input-box:has(.toggle-password) .clean-input {
        padding-right: 45px;
    }

    .toggle-password {
        right: 13px;
    }

    .toggle-password svg {
        width: 20px;
        height: 20px;
    }

    .login-actions {
        margin-top: 12px;
        margin-bottom: 16px;
        font-size: 0.8rem;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .check-line {
        gap: 6px;
        font-size: 0.8rem;
    }

    .check-line input {
        width: 16px;
        height: 16px;
    }

    .forgot-link {
        font-size: 0.8rem;
    }

    .btn-submit {
        height: 50px;
        font-size: 0.95rem;
    }

    .signup-link {
        font-size: 0.85rem;
        margin-top: 18px;
    }
}

/* TRÈS PETITS ÉCRANS */
@media(max-width: 380px) {
    body {
        padding: 4px;
    }

    .compact-card {
        padding: 20px 16px;
        margin: 4px auto;
    }

    .header {
        margin-bottom: 14px;
    }

    .logo-text .testcivique {
        font-size: 1.3rem;
    }

    .social-row {
        margin-bottom: 12px;
        gap: 6px;
    }

    .social-btn {
        padding: 9px 8px;
        font-size: 0.75rem;
    }

    .divider {
        margin: 0 10px 12px 10px;
    }

    .form-stack {
        gap: 10px;
    }

    .clean-input {
        height: 43px;
        font-size: 0.85rem;
        padding: 11px 12px;
    }

    .login-actions {
        margin-top: 8px;
        margin-bottom: 12px;
        font-size: 0.7rem;
        gap: 4px;
    }

    .check-line {
        font-size: 0.7rem;
        gap: 4px;
    }

    .check-line input {
        width: 13px;
        height: 13px;
    }

    .forgot-link {
        font-size: 0.7rem;
    }

    .btn-submit {
        height: 43px;
        font-size: 0.85rem;
    }

    .signup-link {
        margin-top: 12px;
        font-size: 0.75rem;
    }
}
