/* =============================================================
   Page /connexion — full-screen immersif
   CSS isolé (chargé via assets/app.js comme les autres styles)
   Pas de dépendance aux composants du site (navbar, footer, etc.)
   ============================================================= */

.connexion-page {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    color: #e5e5e5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    z-index: 1;
}

/* Voile dégradé radial pour profondeur */
.connexion-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(0, 113, 227, 0.12), transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 113, 227, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Particules canvas en fond */
.connexion-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

/* === Card centrale === */
.connexion-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    animation: connexion-card-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes connexion-card-in {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* === Brand === */
.connexion-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}
.connexion-brand__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0071e3;
    box-shadow: 0 0 14px rgba(0, 113, 227, 0.6);
    animation: connexion-pulse 2.4s ease-in-out infinite;
}
@keyframes connexion-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.85); }
}
.connexion-brand__name {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
}

/* === Titres === */
.connexion-title {
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    line-height: 1.1;
}
.connexion-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 32px;
    line-height: 1.5;
}

/* === Erreur === */
.connexion-error {
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 60, 60, 0.08);
    border: 0.5px solid rgba(255, 60, 60, 0.25);
    font-size: 13px;
    color: #ff6b6b;
    margin-bottom: 24px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0;
    animation: connexion-shake 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes connexion-shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

/* === Form === */
.connexion-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* === Floating label === */
.connexion-field {
    position: relative;
}
.connexion-field input {
    width: 100%;
    box-sizing: border-box;
    height: 56px;
    padding: 22px 16px 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 200ms ease, background-color 200ms ease;
    outline: none;
}
.connexion-field input:focus,
.connexion-field input:not(:placeholder-shown) {
    border-color: rgba(0, 113, 227, 0.5);
    background: rgba(255, 255, 255, 0.05);
}
.connexion-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.connexion-field input:focus + .connexion-label,
.connexion-field input:not(:placeholder-shown) + .connexion-label {
    top: 12px;
    transform: translateY(0);
    font-size: 11px;
    color: rgba(0, 113, 227, 0.85);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
}

/* === Submit === */
.connexion-submit {
    position: relative;
    height: 52px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    background: #0071e3;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 200ms ease, transform 80ms ease, box-shadow 200ms ease;
    box-shadow: 0 0 0 0 rgba(0, 113, 227, 0);
}
.connexion-submit:hover {
    background: #1d83ff;
    box-shadow: 0 0 24px rgba(0, 113, 227, 0.35);
}
.connexion-submit:active {
    transform: scale(0.98);
}
.connexion-submit:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}
.connexion-submit__label {
    transition: opacity 200ms ease;
}
.connexion-submit__spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 200ms ease;
}
.connexion-submit__spinner::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: connexion-spin 700ms linear infinite;
}
@keyframes connexion-spin {
    to { transform: rotate(360deg); }
}
.connexion-submit.is-loading .connexion-submit__label { opacity: 0; }
.connexion-submit.is-loading .connexion-submit__spinner { opacity: 1; }

/* === Liens === */
.connexion-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
    text-align: center;
}
.connexion-link {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 200ms ease;
}
.connexion-link strong {
    color: rgba(0, 113, 227, 0.95);
    font-weight: 600;
}
.connexion-link:hover { color: rgba(255, 255, 255, 0.85); }
.connexion-link:hover strong { color: #1d83ff; }
.connexion-link--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

/* === Responsive === */
@media (max-width: 480px) {
    .connexion-card { padding: 36px 24px; }
    .connexion-title { font-size: 26px; }
}
