/* ==========================
   PAGE CONNEXION
   ========================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --text-primary: #1e293b;
    --border-color: #e2e8f0;
    --shadow-xl: 0 20px 25px rgba(0,0,0,.1);
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(
        135deg,
        var(--light-bg) 0%,
        #ffffff 50%,
        rgba(37, 99, 235, 0.05) 100%
    );
    color: var(--text-primary);
}

main {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 4% 10px;
    margin-top: 20px;
}

.auth-form {
    width: 100%;
    max-width: 480px;
    background: rgba(255,255,255,0.95);
    border-radius: 24px;
    padding: 45px 50px;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.auth-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color)
    );
}

.auth-form h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 30px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-form button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-dark)
    );
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}

.auth-form button:hover {
    transform: translateY(-2px);
}

.error {
    margin-bottom: 20px;
    padding: 14px;
    color: var(--danger-color);
    background: rgba(239,68,68,.1);
    border: 2px solid rgba(239,68,68,.3);
    border-radius: 12px;
    text-align: center;
}

.auth-switch {
    margin-top: 18px;
    text-align: center;
    font-size: 0.95rem;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.25s ease;
}

.auth-switch a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.auth-switch a:hover {
    color: var(--primary-dark);
}

.auth-switch a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.auth-form .captcha {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* Ajustement de la taille pour correspondre au formulaire */
.auth-form .g-recaptcha {
    transform: scale(0.92); /* réduire légèrement pour le design */
    transform-origin: 0 0;
}

/* Optionnel : aligner le texte d'erreur sous le captcha */
.auth-form .captcha-error {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: 8px;
    text-align: center;
}