/* ==========================================================================
   Connexion v2 — page d'authentification, habillage focalisé (sans nav/footer)
   ========================================================================== */

.cnv2-shell {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--v2-gap-lg) var(--v2-pad-x);
    background: var(--v2-cream);
    position: relative;
}

.cnv2-close {
    position: absolute;
    top: var(--v2-gap);
    right: var(--v2-gap-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--v2-ink-2);
    font-size: 1.25rem;
    text-decoration: none;
    transition: background var(--v2-duration-fast) var(--v2-ease-out),
                color var(--v2-duration-fast) var(--v2-ease-out);
}

.cnv2-close:hover {
    background: var(--v2-blue-tint);
    color: var(--v2-blue);
}

.cnv2-close:active {
    background: var(--v2-blue-tint-2);
}

.cnv2-card {
    width: 100%;
    max-width: 420px;
    background: var(--v2-white);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-lg);
    box-shadow: var(--v2-shadow-lift);
    padding: var(--v2-gap-lg) var(--v2-gap-lg);
}

.cnv2-header {
    text-align: center;
    margin-bottom: var(--v2-gap-lg);
}

.cnv2-logo {
    display: inline-flex;
    margin-bottom: var(--v2-gap);
}

.cnv2-logo img {
    display: block;
}

.cnv2-header h1 {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-2xl);
    color: var(--v2-ink);
    margin: 0;
}

/* --- Google Sign-In -------------------------------------------------- */

.cnv2-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    min-height: var(--v2-tap);
    padding: 0.75rem 1rem;
    border: 1px solid var(--v2-border-soft);
    border-radius: var(--v2-radius-sm);
    background: var(--v2-white);
    color: var(--v2-ink);
    font-family: var(--v2-font-body);
    font-weight: 600;
    font-size: var(--v2-text-sm);
    text-decoration: none;
    transition: border-color var(--v2-duration-fast) var(--v2-ease-out),
                box-shadow var(--v2-duration-fast) var(--v2-ease-out);
}

.cnv2-google:hover {
    border-color: var(--v2-ink-3);
    box-shadow: var(--v2-shadow);
}

.cnv2-google:active {
    box-shadow: inset 0 1px 3px rgba(23, 33, 43, 0.16);
}

.cnv2-divider {
    display: flex;
    align-items: center;
    gap: var(--v2-gap-sm);
    margin: var(--v2-gap) 0;
    color: var(--v2-ink-3);
    font-size: var(--v2-text-xs);
}

.cnv2-divider::before,
.cnv2-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--v2-border);
}

/* --- Message d'erreur -------------------------------------------------- */

.cnv2-error {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--v2-radius-sm);
    background: var(--v2-red-tint);
    color: var(--v2-red);
    font-size: var(--v2-text-sm);
    margin-bottom: var(--v2-gap);
    border: 1px solid rgba(var(--v2-red-rgb), 0.18);
}

.cnv2-error svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- Formulaire ---------------------------------------------------------- */

.cnv2-field {
    position: relative;
    margin-bottom: var(--v2-gap-sm);
}

.cnv2-input {
    width: 100%;
    min-height: var(--v2-tap);
    padding: 0.75rem 1rem;
    border: 1px solid var(--v2-border-soft);
    border-radius: var(--v2-radius-sm);
    background: var(--v2-cream);
    color: var(--v2-ink);
    font-family: var(--v2-font-body);
    font-size: var(--v2-text-base);
    transition: border-color var(--v2-duration-fast) var(--v2-ease-out),
                background var(--v2-duration-fast) var(--v2-ease-out);
}

.cnv2-input::placeholder {
    color: var(--v2-ink-3);
}

.cnv2-input:focus {
    outline: none;
    border-color: var(--v2-blue);
    background: var(--v2-white);
}

.cnv2-field--pwd .cnv2-input {
    padding-right: 2.75rem;
}

.cnv2-toggle-pwd {
    position: absolute;
    top: 50%;
    right: 0.625rem;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--v2-ink-3);
    cursor: pointer;
    border-radius: 50%;
}

.cnv2-toggle-pwd:hover {
    color: var(--v2-ink);
    background: var(--v2-blue-tint);
}

.cnv2-toggle-pwd:active {
    background: var(--v2-blue-tint-2);
}

.cnv2-toggle-pwd svg {
    width: 18px;
    height: 18px;
}

.cnv2-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--v2-gap-sm);
    margin: var(--v2-gap-sm) 0 var(--v2-gap);
    font-size: var(--v2-text-sm);
}

.cnv2-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--v2-ink-2);
    cursor: pointer;
}

.cnv2-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--v2-blue);
}

.cnv2-forgot {
    color: var(--v2-blue);
    text-decoration: none;
    font-weight: 600;
}

.cnv2-forgot:hover {
    text-decoration: underline;
}

.cnv2-submit {
    width: 100%;
    min-height: var(--v2-tap);
    border: none;
    border-radius: var(--v2-radius-sm);
    background: var(--v2-blue);
    color: var(--v2-white);
    font-family: var(--v2-font-body);
    font-weight: 700;
    font-size: var(--v2-text-sm);
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background var(--v2-duration-fast) var(--v2-ease-out),
                transform var(--v2-duration-fast) var(--v2-ease-out);
}

.cnv2-submit:hover {
    background: var(--v2-blue-dark);
}

.cnv2-submit:active {
    transform: translateY(1px);
}

/* .cnv2-submit is also used on <a> (e.g. activation_v2.html's "Se connecter"
   button) — .v2 a's (0,1,1) specificity beats the single-class rule above
   on those, so re-assert the color at matching specificity. */
a.cnv2-submit {
    color: var(--v2-white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cnv2-signup {
    text-align: center;
    margin-top: var(--v2-gap);
    font-size: var(--v2-text-sm);
    color: var(--v2-ink-2);
}

.cnv2-signup a {
    color: var(--v2-blue);
    font-weight: 700;
    text-decoration: none;
}

.cnv2-signup a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .cnv2-card {
        padding: var(--v2-gap-lg) var(--v2-gap);
    }

    .cnv2-close {
        right: var(--v2-gap);
    }
}
