/* ==========================================================================
   STYLES SPÉCIFIQUES - PAGE CONNEXION (connexion.css)
   Ordinateur (>= 1024px) : écran partagé occupant la hauteur de la fenêtre,
   présentation de l'espace privé à gauche, formulaire à droite (comme la page Contact).
   Tablette et mobile : une seule colonne qui défile.
   ========================================================================== */

body {
    background-color: #000000;
    color: #E0E0E0;
    font-family: 'Newsreader', serif;
    overflow-x: hidden;
}

/* Canvas des particules */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---- Mise en page ---- */
.login-main {
    flex-grow: 1;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding-top: var(--nav-h, 80px);
}

@media (min-width: 1024px) {
    .login-main {
        display: grid;
        grid-template-columns: 1fr 1fr;
        min-height: 100vh;
    }
}

/* ---- Colonne gauche : présentation ---- */
.login-intro-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    padding: 3rem 1.5rem 2rem;
}

@media (min-width: 768px) {
    .login-intro-col {
        padding: 4rem 48px 3rem;
    }
}

@media (min-width: 1024px) {
    .login-intro-col {
        padding: clamp(2rem, 8vh, 6rem) clamp(2rem, 5vw, 6rem) clamp(2rem, 6vh, 4rem) 48px;
        border-right: 1px solid #1c1c1c;
    }
}

.login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8C8C8C;
    margin-bottom: 1.5rem;
}

.login-kicker-dot {
    width: 6px;
    height: 6px;
    background: #E0E0E0;
}

.login-title {
    font-family: 'Instrument Serif', serif;
    font-size: 72px;
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-weight: 300;
    color: #E0E0E0;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .login-title { font-size: 120px; }
}

@media (min-width: 1024px) {
    .login-title { font-size: clamp(120px, 13vw, 200px); }
}

.login-intro {
    max-width: 30rem;
    font-size: 20px;
    line-height: 1.6;
    color: #B8B8B8;
    font-weight: 300;
}

.login-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
}

.login-meta li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.login-meta-label {
    min-width: 6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #666666;
}

.login-meta-value {
    color: #B8B8B8;
}

.login-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 0.5rem;
    color: #E0E0E0;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.login-back:hover,
.login-back:focus-visible {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* ---- Colonne droite : formulaire ---- */
.login-form-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem 4rem;
}

@media (min-width: 768px) {
    .login-form-col { padding: 2rem 48px 5rem; }
}

@media (min-width: 1024px) {
    .login-form-col { padding: 3rem 48px; }
}

.login-form {
    width: 100%;
    max-width: 26rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.login-form-head {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.login-form-title {
    font-family: 'Instrument Serif', serif;
    font-size: 44px;
    line-height: 1;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: #E0E0E0;
}

.login-form-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #8C8C8C;
}

/* ---- Erreur ---- */
.login-error {
    padding: 0.9rem 1rem;
    border-left: 2px solid #ff8a80;
    background: rgba(255, 138, 128, 0.08);
    color: #ffb3ab;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
}

/* ---- Champs ---- */
.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8C8C8C;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.group-input:focus-within .form-label {
    color: #ffffff;
}

/* Le plugin Tailwind Forms définit aussi une classe .form-input (fond blanc, bordure, halo bleu) : surcharge complète */
.login-form .form-input {
    width: 100%;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #2a2a2a;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    padding: 0.6rem 0;
    font-family: 'Newsreader', serif;
    font-size: 20px;   /* >= 16px : évite le zoom automatique d'iOS */
    color: #E0E0E0;
    transition: border-color 0.3s ease;
}

.login-form .form-input:focus {
    border-bottom-color: #ffffff;
    box-shadow: none;
}

.password-field {
    position: relative;
}

.login-form .password-field .form-input {
    padding-right: 5.5rem;
}

.password-toggle {
    position: absolute;
    right: 0;
    bottom: 0.35rem;
    min-height: 32px;
    padding: 0 0.25rem;
    background: none;
    border: 0;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8C8C8C;
    cursor: pointer;
    transition: color 0.3s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #ffffff;
}

.caps-hint {
    min-height: 1.2em;
    margin-top: 0.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: #f5c26b;
}

.caps-hint:empty {
    margin-top: 0;
    min-height: 0;
}

/* ---- Bouton ---- */
.form-submit {
    margin-top: 0.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: #E0E0E0;
    border: 1px solid #E0E0E0;
    padding: 1.1rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: transparent;
    cursor: pointer;
    border-radius: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.form-submit:hover,
.form-submit:focus-visible {
    background-color: #E0E0E0;
    color: #000000;
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.submit-icon {
    font-size: 16px;
}

/* ---- Tablette et mobile : titre, puis formulaire, puis informations et retour au site ---- */
@media (max-width: 1023px) {
    .login-intro-col {
        display: contents;
    }

    .login-intro-col > div {
        order: 1;
        padding: 3rem 1.5rem 0;
    }

    .login-form-col {
        order: 2;
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .login-meta {
        order: 3;
        padding: 0 1.5rem 3rem;
    }

    .login-meta li {
        flex-direction: column;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .login-intro-col > div { padding: 4rem 48px 0; }
    .login-meta { padding: 0 48px 4rem; }
}

/* Ordinateur : l'écran partagé tient dans la fenêtre avec le pied de page */
@media (min-width: 1024px) {
    .login-main {
        min-height: calc(100vh - var(--footer-h, 84px));
    }
}

/* Ordinateur : mêmes marges et même panneau de droite que la page Contact
   (contenu à 120 px du bord gauche, formulaire jusqu'à 120 px du bord droit) */
@media (min-width: 1024px) {
    .login-intro-col {
        padding: clamp(2rem, 7vh, 5rem) clamp(2rem, 5vw, 6rem) clamp(2rem, 6vh, 4rem) 120px;
        border-right: 0;
    }

    .login-form-col {
        justify-content: flex-start;
        padding: clamp(1.5rem, 4vh, 3rem) 120px clamp(1.5rem, 4vh, 3rem) clamp(3rem, 6vw, 8rem);
        border-left: 1px solid #222222;
        background-color: rgba(255, 255, 255, 0.015);
    }

    .login-form {
        max-width: none;
    }
}
