/**
 * Punky SSO AssoConnect - Styles Frontend
 * ========================================
 */

/* ─── Bouton de connexion ─── */

.punky-sso-login-wrapper {
    display: inline-block;
    margin: 10px 0;
}

.punky-sso-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    line-height: 1.4;
}

.punky-sso-btn--login {
    background-color: #1d4ed8;
    color: #ffffff;
}

.punky-sso-btn--login:hover,
.punky-sso-btn--login:focus {
    background-color: #1e40af;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.punky-sso-btn--logout {
    background-color: transparent;
    color: #64748b;
    border-color: #cbd5e1;
    font-size: 13px;
    padding: 8px 16px;
}

.punky-sso-btn--logout:hover,
.punky-sso-btn--logout:focus {
    background-color: #f1f5f9;
    color: #334155;
    border-color: #94a3b8;
    text-decoration: none;
}

.punky-sso-icon {
    flex-shrink: 0;
}

/* ─── État connecté ─── */

.punky-sso-logged-in {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.punky-sso-welcome {
    margin: 0;
    font-size: 14px;
    color: #475569;
}

/* ─── Informations utilisateur ─── */

.punky-sso-user-info {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.punky-sso-avatar {
    flex-shrink: 0;
}

.punky-sso-avatar img {
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}

.punky-sso-user-details {
    flex: 1;
}

.punky-sso-field {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
}

.punky-sso-field:last-child {
    margin-bottom: 0;
}

.punky-sso-label {
    font-weight: 600;
    color: #1e293b;
}

.punky-sso-value {
    color: #475569;
}

.punky-sso-field--meta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #94a3b8;
}

.punky-sso-field--meta .punky-sso-label,
.punky-sso-field--meta .punky-sso-value {
    color: #94a3b8;
}

/* ─── Erreurs ─── */

.punky-sso-error {
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 4px;
    color: #991b1b;
    font-size: 14px;
}

.punky-sso-error p {
    margin: 0;
}

/* ─── Non connecté ─── */

.punky-sso-not-logged {
    text-align: center;
    padding: 30px;
}

.punky-sso-not-logged p {
    margin: 0 0 16px;
    color: #64748b;
}

/* ─── Responsive ─── */

@media (max-width: 480px) {
    .punky-sso-user-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .punky-sso-logged-in {
        flex-direction: column;
        text-align: center;
    }

    .punky-sso-btn {
        width: 100%;
        justify-content: center;
    }
}
