﻿/* =============================================================================
   LOGIN CSS
   Personnalisation de la page de connexion WordPress (/wp-login.php).
   Remplace le design WP natif par le branding du thème.
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');


/* =============================================================================
   1. RESET & VARIABLES
   ============================================================================= */

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


/* =============================================================================
   2. MISE EN PAGE  Corps de la page de connexion
   ============================================================================= */

body.login {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    background-color: #010f1e;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

/* Conteneur Vanta.js — Vanta y injecte son canvas Three.js */
#login-bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

::placeholder {
  color: #acadad;
}


/* =============================================================================
   3. ÉLÉMENTS MASQUÉS
   ============================================================================= */

.language-switcher,
#nav,
#backtoblog {
    display: none !important;
}


/* =============================================================================
   4. LOGO  Lien vers l'accueil du site
   ============================================================================= */

#login h1 {
    text-align: center;
    margin-bottom: 0;
    padding: 0;
}

#login h1 a {
    background-image: url(../images/fabomatic-dark.svg);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    width: 200px;
    height: 52px;
    display: block;
    margin: 0 auto 32px;
    text-indent: -9999px;
    overflow: hidden;
    border: none;
    box-shadow: none !important;
    outline: none !important;
    padding: 0;
    opacity: 0.95;
    transition: opacity 0.2s ease;
}

#login h1 a:hover,
#login h1 a:focus {
    opacity: 1;
    box-shadow: none !important;
}


/* =============================================================================
   5. CONTENEUR PRINCIPAL
   ============================================================================= */

#login {
    width: 420px;
    max-width: 100%;
    padding: 0;
    margin: auto;
    position: relative;
    z-index: 10;
}


/* =============================================================================
   6. CARTE DU FORMULAIRE
   ============================================================================= */

.login form {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.45),
        0 8px 24px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    padding: 40px 40px 40px;
    margin: 0;
    overflow: hidden;
}

/* Titre interne de la carte (si présent) */
.login form h2 {
    color: #0f172a;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}


/* =============================================================================
   7. LABELS & CHAMPS
   ============================================================================= */

.login form label {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 7px;
}

.login form .input,
.login form input[type="text"],
.login form input[type="password"],
.login form input[type="email"] {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    padding: 12px 16px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
    box-shadow: none;
    line-height: 1.5;
}

.login form .input:focus,
.login form input[type="text"]:focus,
.login form input[type="password"]:focus,
.login form input[type="email"]:focus {
    border-color: #011C31;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(1, 28, 49, 0.12);
}

/* Espacement entre les champs */
.login form p {
    margin-bottom: 18px;
}

.login form p:last-of-type {
    margin-bottom: 0;
}


/* =============================================================================
   8. CHECKBOX "Se souvenir de moi"
   ============================================================================= */

.login .forgetmenot {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login .forgetmenot label {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    cursor: pointer;
}

.login .forgetmenot input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #011C31;
    cursor: pointer;
}


/* =============================================================================
   9. LIGNE SUBMIT (checkbox + bouton)
   ============================================================================= */

.login .submit {
    margin-top: 24px;
}

#wp-submit {
    background: #ea6b0c;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 14px 24px;
    width: 100%;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

#wp-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 10px;
}

#wp-submit:hover,
#wp-submit:focus {
    background: #0a3a5c;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(1, 28, 49, 0.45);
    outline: none;
}

#wp-submit:active {
    transform: translateY(0px);
    box-shadow: 0 4px 12px rgba(1, 28, 49, 0.3);
}


/* =============================================================================
   10. MESSAGES D'ERREUR & NOTIFICATIONS
   ============================================================================= */

#login_error,
.login .message,
.login .success {
    border-radius: 10px;
    border-left: none;
    font-size: 13.5px;
    margin-bottom: 20px;
    padding: 14px 18px;
}

#login_error {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    color: #991b1b;
}

.login .message {
    background: #eff6ff;
    border: 1.5px solid #93c5fd;
    color: #1e40af;
}

.login .success {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #166534;
}


/* =============================================================================
   11. RESPONSIVE  Mobile
   ============================================================================= */

@media screen and (max-width: 480px) {

    body.login {
        padding: 24px 16px;
        justify-content: center;
    }

    #login {
        width: 100%;
    }

    #login h1 a {
        width: 160px;
        height: 42px;
        margin-bottom: 24px;
    }

    .login form {
        border-radius: 16px;
        padding: 28px 22px 24px;
    }

    .login form label {
        font-size: 11.5px;
    }

    .login form .input,
    .login form input[type="text"],
    .login form input[type="password"],
    .login form input[type="email"] {
        font-size: 16px; /* Empêche le zoom auto iOS */
        padding: 12px 14px;
    }

    #wp-submit {
        font-size: 15px;
        padding: 13px 20px;
    }
}
